Structure Procedure Crash

Started by morlanjo on

Topic category: Troubleshooting, bugs, and solutions

Joined Nov 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Structure Procedure Crash

This is on the 1.14 snapshot.

I created a block with a right click action, to run this procedure: https://imgur.com/a/AQRO2Up

The structure I have imported works if I create it as a structure spawn, but if I try right clicking the block I crash.

---- Minecraft Crash Report ----
// Don't do that.

Time: 11/28/19 7:10 AM
Description: Unexpected error

java.lang.ClassCastException: net.minecraft.client.world.ClientWorld cannot be cast to net.minecraft.world.server.ServerWorld
    at net.mcreator.mc_arpg.MCreatorMcarpgdungeongenerateproc.executeProcedure(MCreatorMcarpgdungeongenerateproc.java:41) ~[main/:?] {re:classloading}
    at net.mcreator.mc_arpg.MCreatorTest$CustomBlock.onBlockActivated(MCreatorTest.java:63) ~[main/:?] {re:classloading}
    at net.minecraft.block.BlockState.onBlockActivated(BlockState.java:296) ~[forge-1.14.4-28.1.90_mapped_snapshot_20190719-1.14.3-recomp.jar:?] {re:classloading}
    at net.minecraft.client.multiplayer.PlayerController.func_217292_a(PlayerController.java:299) ~[forge-1.14.4-28.1.90_mapped_snapshot_20190719-1.14.3-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A}
    at net.minecraft.client.Minecraft.rightClickMouse(Minecraft.java:1286) ~[forge-1.14.4-28.1.90_mapped_snapshot_20190719-1.14.3-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
    at net.minecraft.client.Minecraft.processKeyBinds(Minecraft.java:1544) ~[forge-1.14.4-28.1.90_mapped_snapshot_20190719-1.14.3-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
    at net.minecraft.client.Minecraft.runTick(Minecraft.java:1377) ~[forge-1.14.4-28.1.90_mapped_snapshot_20190719-1.14.3-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
    at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:904) ~[forge-1.14.4-28.1.90_mapped_snapshot_20190719-1.14.3-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
    at net.minecraft.client.Minecraft.run(Minecraft.java:384) ~[forge-1.14.4-28.1.90_mapped_snapshot_20190719-1.14.3-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
    at net.minecraft.client.main.Main.main(Main.java:128) ~[forge-1.14.4-28.1.90_mapped_snapshot_20190719-1.14.3-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A}
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_222] {}
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_222] {}
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_222] {}
    at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_222] {}
    at net.minecraftforge.userdev.FMLUserdevClientLaunchProvider.lambda$launchService$0(FMLUserdevClientLaunchProvider.java:55) ~[forge-1.14.4-28.1.90_mapped_snapshot_20190719-1.14.3-recomp.jar:?] {}
    at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-4.1.0.jar:?] {}
    at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) [modlauncher-4.1.0.jar:?] {}
    at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) [modlauncher-4.1.0.jar:?] {}
    at cpw.mods.modlauncher.Launcher.run(Launcher.java:81) [modlauncher-4.1.0.jar:?] {}
    at cpw.mods.modlauncher.Launcher.main(Launcher.java:65) [modlauncher-4.1.0.jar:?] {}
    at net.minecraftforge.userdev.LaunchTesting.main(LaunchTesting.java:101) [forge-1.14.4-28.1.90_mapped_snapshot_20190719-1.14.3-recomp.jar:?] {}

A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- Head --
Thread: Client thread
Stacktrace:
    at net.mcreator.mc_arpg.MCreatorMcarpgdungeongenerateproc.executeProcedure(MCreatorMcarpgdungeongenerateproc.java:41)
    at net.mcreator.mc_arpg.MCreatorTest$CustomBlock.onBlockActivated(MCreatorTest.java:63)
    at net.minecraft.block.BlockState.onBlockActivated(BlockState.java:296)
    at net.minecraft.client.multiplayer.PlayerController.func_217292_a(PlayerController.java:299)
    at net.minecraft.client.Minecraft.rightClickMouse(Minecraft.java:1286)
    at net.minecraft.client.Minecraft.processKeyBinds(Minecraft.java:1544)

-- Affected level --
Details:
    All players: 1 total; [ClientPlayerEntity['Dev'/308, l='MpServer', x=29.50, y=79.00, z=-41.50]]
    Chunk stats: Client Chunk Cache: 169, 81
    Level dimension: DimensionType{minecraft:overworld}
    Level name: MpServer
    Level seed: 0
    Level generator: ID 00 - default, ver 1. Features enabled: false
    Level generator options: {}
    Level spawn location: World: (32,77,-48), Chunk: (at 0,4,0 in 2,-3; contains blocks 32,0,-48 to 47,255,-33), Region: (0,-1; contains chunks 0,-32 to 31,-1, blocks 0,0,-512 to 511,255,-1)
    Level time: 241 game time, 241 day time
    Level storage version: 0x00000 - Unknown?
    Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false)
    Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: false
    Server brand: forge
    Server type: Integrated singleplayer server
Stacktrace:
    at net.minecraft.client.world.ClientWorld.fillCrashReport(ClientWorld.java:425)
    at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:1824)
    at net.minecraft.client.Minecraft.run(Minecraft.java:405)
    at net.minecraft.client.main.Main.main(Main.java:128)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at net.minecraftforge.userdev.FMLUserdevClientLaunchProvider.lambda$launchService$0(FMLUserdevClientLaunchProvider.java:55)
    at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37)
    at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54)
    at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72)
    at cpw.mods.modlauncher.Launcher.run(Launcher.java:81)
    at cpw.mods.modlauncher.Launcher.main(Launcher.java:65)
    at net.minecraftforge.userdev.LaunchTesting.main(LaunchTesting.java:101)

-- System Details --
Details:
    Minecraft Version: 1.14.4
    Minecraft Version ID: 1.14.4
    Operating System: Windows 10 (amd64) version 10.0
    Java Version: 1.8.0_222, BellSoft
    Java VM Version: OpenJDK 64-Bit Server VM (mixed mode),
    Memory: 1016520872 bytes (969 MB) / 1616904192 bytes (1542 MB) up to 3808428032 bytes (3632 MB)
    CPUs: 12
    JVM Flags: 1 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump
    ModLauncher: 4.1.0+62+5bfa59b
    ModLauncher launch target: fmluserdevclient
    ModLauncher naming: mcp
    ModLauncher services:
        /eventbus-1.0.0-service.jar eventbus PLUGINSERVICE
        /forge-1.14.4-28.1.90_mapped_snapshot_20190719-1.14.3-launcher.jar object_holder_definalize PLUGINSERVICE
        /forge-1.14.4-28.1.90_mapped_snapshot_20190719-1.14.3-launcher.jar runtime_enum_extender PLUGINSERVICE
        /accesstransformers-1.0.1-milestone.0.1+94458e7-shadowed.jar accesstransformer PLUGINSERVICE
        /forge-1.14.4-28.1.90_mapped_snapshot_20190719-1.14.3-launcher.jar capability_inject_definalize PLUGINSERVICE
        /forge-1.14.4-28.1.90_mapped_snapshot_20190719-1.14.3-launcher.jar runtimedistcleaner PLUGINSERVICE
        /forge-1.14.4-28.1.90_mapped_snapshot_20190719-1.14.3-launcher.jar fml TRANSFORMATIONSERVICE
    FML: 28.1
    Forge: net.minecraftforge:28.1.90
    FML Language Providers:
        javafml@28.1
        minecraft@1
    Mod List:
        client-extra.jar Minecraft {minecraft@1.14.4 DONE}
        forge-1.14.4-28.1.90_mapped_snapshot_20190719-1.14.3-recomp.jar Forge {forge@28.1.90 DONE}
        main mc_arpg {mc_arpg@1.0.0 DONE}
    Launched Version: MOD_DEV
    LWJGL: 3.2.2 build 10
    OpenGL: GeForce GTX 1070/PCIe/SSE2 GL version 4.6.0 NVIDIA 436.30, NVIDIA Corporation
    GL Caps: Using GL 1.3 multitexturing.
Using GL 1.3 texture combiners.
Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported.
Shaders are available because OpenGL 2.1 is supported.
VBOs are available because OpenGL 1.5 is supported.

    Using VBOs: Yes
    Is Modded: Definitely; Client brand changed to 'forge'
    Type: Client (map_client.txt)
    Resource Packs:
    Current Language: English (US)
    CPU: 12x AMD Ryzen 5 1600 Six-Core Processor

 

Maybe the structure stacked…
Mon, 12/02/2019 - 02:06

Maybe the structure stacked because it's big, try mess around with some xyz+- math.

This placing structure…
Mon, 12/02/2019 - 02:09

This placing structure procedure will NOT normally work in any case, but unsure why crashed.