ImmersiveEngineering icon indicating copy to clipboard operation
ImmersiveEngineering copied to clipboard

(1.18.1) Create Schematic Incompatibility With Redstone Wire Connectors

Open clickthecreeper opened this issue 2 years ago • 2 comments

Description of the issue:

Game crashes upon attempting to load a Create schematic containing redstone wire connectors. No issue arrises when defining the schematic with a schematic and quill, saving it, or loading onto a new schematic. There is only issue when the schematic is placed in the world. The game crashes and the schematic is not placed. This bug occured in singleplayer and occurs consistently (tested 3-4 times). It also only occurs when the connectors have wire connections.

Crashlog:

Crashlog is here attached: crash-2022-04-21_23.00.06-client.txt

Versions & Modlist

ImmersiveEngineering-1.18.1-7.1.0-145 Forge 39.1.0 create-mc1.18.1_v0.4f

clickthecreeper avatar Apr 22 '22 06:04 clickthecreeper

Stop trying to put connectors in schematics then? =P

@malte0811 anything we can do about this? I can't evaluate if this is create calling things wrongly on the clientside or us not checking for clientsidedness.

In either case, even if we do fix this, 1.18.1 is not getting any more releases, so this will only be fixed for 1.18.2

BluSunrize avatar Apr 22 '22 06:04 BluSunrize

Already looking into it :) cc @simibubi I think this will need changes in both IE and Create.

We get a ServerLevelAccessor from MC, but Create wants to call StructureTemplate#placeInWorld on the client, so they have an implementation where one of the methods (getLevel, which returns ServerLevel) throws on the client. We don't actually need a ServerLevel (just a Level would be fine, we only needs access to world capabilities) but there isn't a way to get that directly from a ServerLevelAccessor. As I read the code the SchematicWorld is used for previews, so using the capabilities for the main client world would be a bad idea anyway.

@simibubi can you think of a reasonable way to fix this? The problematic IE code is used to allow wires to be stored in structure templates, usually they are part of a world capability.

malte0811 avatar Apr 22 '22 07:04 malte0811