CreativeMD / LittleTiles

GNU Lesser General Public License v3.0
174 stars 53 forks source link

Structure support broken since pre199_21 #394

Closed LemADEC closed 4 years ago

LemADEC commented 4 years ago

As of LittleTiles_v1.5.0-pre199_21_mc1.12.2 + CreativeCore_v1.10.12_mc1.12.2 + WarpDrive-1.12.2-1.5.13, there's a regression in LittleTiles that cause structure like doors to disappear during jump/rotation. As of LittleTiles_v1.5.0-pre199_19_mc1.12.2, issue is not reproduced. As of LittleTiles_v1.5.0-pre199_23_mc1.12.2, issue is getting worse as the console is spammed with errors during jump:

[09:08:45] [Server thread/INFO] [STDERR]: [com.creativemd.littletiles.common.structure.connection.StructureLinkTile:failedConnect:55]: java.lang.RuntimeException: Failed to connect to structure coord coord:[2,0,2]|position:[19, 0, 7]|0!
[09:08:45] [Server thread/INFO] [STDERR]: [com.creativemd.littletiles.common.structure.connection.StructureLinkTile:failedConnect:55]:  at com.creativemd.littletiles.common.structure.connection.StructureLinkTile.failedConnect(StructureLinkTile.java:55)
[09:08:45] [Server thread/INFO] [STDERR]: [com.creativemd.littletiles.common.structure.connection.StructureLinkTile:failedConnect:55]:  at com.creativemd.littletiles.common.structure.connection.StructureLinkBaseRelative.isConnected(StructureLinkBaseRelative.java:75)
[09:08:45] [Server thread/INFO] [STDERR]: [com.creativemd.littletiles.common.structure.connection.StructureLinkTile:failedConnect:55]:  at com.creativemd.littletiles.common.structure.connection.StructureLinkBaseRelative.getStructure(StructureLinkBaseRelative.java:87)
[09:08:45] [Server thread/INFO] [STDERR]: [com.creativemd.littletiles.common.structure.connection.StructureLinkTile:failedConnect:55]:  at com.creativemd.littletiles.common.tileentity.TileList$2$1.findNext(TileList.java:132)
[09:08:45] [Server thread/INFO] [STDERR]: [com.creativemd.littletiles.common.structure.connection.StructureLinkTile:failedConnect:55]:  at com.creativemd.littletiles.common.tileentity.TileList$2$1.<init>(TileList.java:125)
[09:08:45] [Server thread/INFO] [STDERR]: [com.creativemd.littletiles.common.structure.connection.StructureLinkTile:failedConnect:55]:  at com.creativemd.littletiles.common.tileentity.TileList$2.iterator(TileList.java:118)
[09:08:45] [Server thread/INFO] [STDERR]: [com.creativemd.littletiles.common.structure.connection.StructureLinkTile:failedConnect:55]:  at com.creativemd.littletiles.common.tileentity.TileEntityLittleTiles.notifyStructure(TileEntityLittleTiles.java:250)
[09:08:45] [Server thread/INFO] [STDERR]: [com.creativemd.littletiles.common.structure.connection.StructureLinkTile:failedConnect:55]:  at com.creativemd.littletiles.common.tileentity.TileEntityLittleTiles.onNeighbourChanged(TileEntityLittleTiles.java:246)
[09:08:45] [Server thread/INFO] [STDERR]: [com.creativemd.littletiles.common.structure.connection.StructureLinkTile:failedConnect:55]:  at com.creativemd.littletiles.common.block.BlockTile.onNeighborChange(BlockTile.java:748)
[09:08:45] [Server thread/INFO] [STDERR]: [com.creativemd.littletiles.common.structure.connection.StructureLinkTile:failedConnect:55]:  at net.minecraft.world.World.func_175666_e(World.java:3817)
[09:08:45] [Server thread/INFO] [STDERR]: [com.creativemd.littletiles.common.structure.connection.StructureLinkTile:failedConnect:55]:  at net.minecraft.tileentity.TileEntity.func_70296_d(TileEntity.java:163)
[09:08:45] [Server thread/INFO] [STDERR]: [com.creativemd.littletiles.common.structure.connection.StructureLinkTile:failedConnect:55]:  at cr0s.warpdrive.data.JumpBlock.deploy(JumpBlock.java:410)
[09:08:45] [Server thread/INFO] [STDERR]: [com.creativemd.littletiles.common.structure.connection.StructureLinkTile:failedConnect:55]:  at cr0s.warpdrive.event.JumpSequencer.state_moveBlocks(JumpSequencer.java:1061)
[09:08:45] [Server thread/INFO] [STDERR]: [com.creativemd.littletiles.common.structure.connection.StructureLinkTile:failedConnect:55]:  at cr0s.warpdrive.event.JumpSequencer.onUpdate(JumpSequencer.java:319)
[09:08:45] [Server thread/INFO] [STDERR]: [com.creativemd.littletiles.common.structure.connection.StructureLinkTile:failedConnect:55]:  at cr0s.warpdrive.event.AbstractSequencer.updateTick(AbstractSequencer.java:24)
[09:08:45] [Server thread/INFO] [STDERR]: [com.creativemd.littletiles.common.structure.connection.StructureLinkTile:failedConnect:55]:  at cr0s.warpdrive.event.WorldHandler.onServerTick(WorldHandler.java:129)
[09:08:45] [Server thread/INFO] [STDERR]: [com.creativemd.littletiles.common.structure.connection.StructureLinkTile:failedConnect:55]:  at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_320_WorldHandler_onServerTick_ServerTickEvent.invoke(.dynamic)
[09:08:45] [Server thread/INFO] [STDERR]: [com.creativemd.littletiles.common.structure.connection.StructureLinkTile:failedConnect:55]:  at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90)
[09:08:45] [Server thread/INFO] [STDERR]: [com.creativemd.littletiles.common.structure.connection.StructureLinkTile:failedConnect:55]:  at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:182)
[09:08:45] [Server thread/INFO] [STDERR]: [com.creativemd.littletiles.common.structure.connection.StructureLinkTile:failedConnect:55]:  at net.minecraftforge.fml.common.FMLCommonHandler.onPostServerTick(FMLCommonHandler.java:266)
[09:08:45] [Server thread/INFO] [STDERR]: [com.creativemd.littletiles.common.structure.connection.StructureLinkTile:failedConnect:55]:  at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:712)
[09:08:45] [Server thread/INFO] [STDERR]: [com.creativemd.littletiles.common.structure.connection.StructureLinkTile:failedConnect:55]:  at net.minecraft.server.integrated.IntegratedServer.func_71217_p(IntegratedServer.java:185)
[09:08:45] [Server thread/INFO] [STDERR]: [com.creativemd.littletiles.common.structure.connection.StructureLinkTile:failedConnect:55]:  at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:526)
[09:08:45] [Server thread/INFO] [STDERR]: [com.creativemd.littletiles.common.structure.connection.StructureLinkTile:failedConnect:55]:  at java.lang.Thread.run(Unknown Source)

On a possibly related note, a multithreading error is observed in tha EntityAnimation, trying to notify neighbouring blocks outside the server thread:

    java.lang.Thread.State: RUNNABLE
        at sun.management.ThreadImpl.getThreadInfo1(Native Method)
        at sun.management.ThreadImpl.getThreadInfo(Unknown Source)
        at cr0s.warpdrive.Commons.dumpAllThreads(Commons.java:789)
        at cr0s.warpdrive.event.ChunkHandler.getChunkData(ChunkHandler.java:261)
        at cr0s.warpdrive.event.ChunkHandler.onBlockUpdated(ChunkHandler.java:236)
        at cr0s.warpdrive.event.WorldHandler.onBlockUpdated(WorldHandler.java:136)
        at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_101_WorldHandler_onBlockUpdated_BlockEvent.invoke(.dynamic)
        at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90)
        at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:182)
        at net.minecraftforge.event.ForgeEventFactory.onNeighborNotify(ForgeEventFactory.java:185)
        at net.minecraft.world.World.func_175685_c(World.java:489)
        at net.minecraft.world.World.func_175722_b(World.java:440)
        at net.minecraft.world.World.markAndNotifyBlock(World.java:381)
        at net.minecraft.world.World.func_180501_a(World.java:361)
        at net.minecraft.world.World.func_175656_a(World.java:425)
        at com.creativemd.littletiles.common.entity.EntityAnimation.func_70037_a(EntityAnimation.java:937)
        at net.minecraft.entity.Entity.func_70020_e(Entity.java:1866)
        at net.minecraft.entity.EntityList.func_75615_a(EntityList.java:221)
        at net.minecraft.world.chunk.storage.AnvilChunkLoader.func_186053_a(AnvilChunkLoader.java:601)
        at net.minecraft.world.chunk.storage.AnvilChunkLoader.func_186050_a(AnvilChunkLoader.java:528)
        at net.minecraft.world.chunk.storage.AnvilChunkLoader.loadEntities(AnvilChunkLoader.java:485)
        at net.minecraftforge.common.chunkio.ChunkIOProvider.syncCallback(ChunkIOProvider.java:101)
        at net.minecraftforge.common.chunkio.ChunkIOExecutor.syncChunkLoad(ChunkIOExecutor.java:94)
        at net.minecraft.world.gen.ChunkProviderServer.loadChunk(ChunkProviderServer.java:118)
        at net.minecraft.world.gen.ChunkProviderServer.func_186028_c(ChunkProviderServer.java:89)
        at net.minecraft.world.gen.ChunkProviderServer.func_186025_d(ChunkProviderServer.java:135)
        at net.minecraft.server.MinecraftServer.func_71222_d(MinecraftServer.java:344)
        at net.minecraft.server.integrated.IntegratedServer.func_71247_a(IntegratedServer.java:142)
        at net.minecraft.server.integrated.IntegratedServer.func_71197_b(IntegratedServer.java:156)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:486)
        at java.lang.Thread.run(Unknown Source)

I thought the fake world wasn't supposed to trigger neighbors update?

Other mods potentially involved: AE2WTLib-1.12.2-1.0.30 appliedenergistics2-rv6-stable-7 bdlib-1.14.3.12-mc1.12.2 cc-tweaked-1.12.2-1.87.0 Chisel-MC1.12.2-0.2.1.35 CTM-MC1.12.2-0.3.3.22 Decocraft-2.6.2_1.12.2 forestry_1.12.2-5.8.2.394 ImmersiveEngineering-0.12-89 instantunify-1.12.2-1.1.2 OreLib-1.12.2-3.5.2.2 p455w0rdslib-1.12.2-2.2.156 PTRLib-1.0.4.jar RandomThings-MC1.12.2-4.2.7.3

CreativeMD commented 4 years ago

Sorry for not responding earlier. I have changed some stuff in the background for some reason this resulted in structures not connecting after being warped. I still have no clue why this occurs now. I have fixed the update loop, but this will of course not fix the broken structures.

I plan to rewrite the connection between tiles and structures very soon. I hope I can fix it then.

CreativeMD commented 4 years ago

Finally the rewrite is done. If you want to you can test if it works: https://cdn.discordapp.com/attachments/326729168266199040/748915793831657502/CreativeCore_v1.10.18_mc1.12.2.jar https://cdn.discordapp.com/attachments/326729168266199040/748915823812280422/LittleTiles_v1.5.0-pre199_41_mc1.12.2.jar

Be careful and backup your world before you use these versions as they are still not 100% stable.

CreativeMD commented 4 years ago

Tested it and it worked just fine. Looks like it's finally fixed now.