[Companion Bug] Random crashing when generating villages
TechnoMysterio opened this issue ยท 3 comments
Description
This one's difficult to pinpoint since it's been happening to us randomly on a server when we go exploring, but might be connected to Charm's village generation changes?
Regardless, when exploring we kept getting server crashes when a new village was generating in distant chunks, and from the server crash logs it's apparently due to doors not spawning correctly. We checked the village afterwards since the crash only happened when it was generating, and doors on the town hall building were missing, with the town hall being partially buried into the terrain and other structures around the town hall having chunks cut out of them.
Please find a crash log below.
Context
Environment
The issue is present in Multi-Player, probably Single-Player
Other mods
We're not sure what other mods may be involved, definitely Witchery: Resurrected, maybe Companion, maybe Charm.
Steps to Reproduce
This one's tricky, however...
- Walk into yonder distance.
- Wait for villages to spawn.
- Maybe get a crash?
Crash Report / logs
https://pastebin.com/VDs6LUzc
A couple clarifications:
- That crash log above has 2 separate instances of the crash in it
- This does reproduce with just normal forge and witchery + companion
- Reproducing this is not consistent - it seems like the direction/speed you load the village chunks in matters.
- In villages that I got crashes in, if a town hall is there, it will have at least 1 door missing and some stray blocks matching the surrounding terrain near where the door would be
Here is a more complete crash log:
Crash Log
Description: Exception while updating neighbours
java.lang.IllegalArgumentException: Cannot get property PropertyEnum{name=half, clazz=class net.minecraft.block.BlockDoor$EnumDoorHalf, values=[upper, lower]} as it does not exist in BlockStateContainer{block=minecraft:air, properties=[]}
at net.minecraft.block.state.BlockStateContainer$StateImplementation.func_177229_b(BlockStateContainer.java:201)
at net.minecraft.block.BlockDoor.getEffectivePos(BlockDoor.java:546)
at net.minecraft.block.BlockDoor.func_180663_b(BlockDoor.java:564)
at net.minecraft.world.chunk.Chunk.func_177436_a(Chunk.java:567)
at net.minecraft.world.World.func_180501_a(World.java:343)
at net.minecraft.world.World.func_175698_g(World.java:398)
at net.minecraft.block.BlockDoor.func_189540_a(BlockDoor.java:202)
at net.minecraft.block.state.BlockStateContainer$StateImplementation.func_189546_a(BlockStateContainer.java:481)
at net.minecraft.world.World.func_190524_a(World.java:551)
at net.minecraft.world.World.func_175685_c(World.java:494)
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.block.BlockBush.func_176475_e(BlockBush.java:68)
at net.minecraft.block.BlockBush.func_189540_a(BlockBush.java:55)
at net.minecraft.block.state.BlockStateContainer$StateImplementation.func_189546_a(BlockStateContainer.java:481)
at net.minecraft.world.World.func_190524_a(World.java:551)
at net.minecraft.world.World.func_175685_c(World.java:495)
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.msrandom.witchery.world.gen.structure.WitcheryVillagePiece.func_74875_a(WitcheryVillagePiece.kt:82)
at net.msrandom.witchery.WitcheryModContainer$Companion.addComponentParts(WitcheryModContainer.kt:156)
at net.msrandom.witchery.WitcheryModContainer.addComponentParts(WitcheryModContainer.kt)
at net.minecraft.world.gen.structure.StructureStart.func_75068_a(StructureStart.java:47)
at net.minecraft.world.gen.structure.MapGenStructure.func_175794_a(MapGenStructure.java:94)
at net.minecraft.world.gen.ChunkGeneratorOverworld.func_185931_b(ChunkGeneratorOverworld.java:406)
at net.minecraft.world.chunk.Chunk.func_186034_a(Chunk.java:1019)
at net.minecraft.world.chunk.Chunk.func_186030_a(Chunk.java:990)
at net.minecraft.world.gen.ChunkProviderServer.func_186025_d(ChunkProviderServer.java:157)
at net.minecraft.server.management.PlayerChunkMapEntry.func_187268_a(PlayerChunkMapEntry.java:126)
at net.minecraft.server.management.PlayerChunkMap.func_72693_b(SourceFile:147)
at net.minecraft.world.WorldServer.func_72835_b(WorldServer.java:227)
at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:756)
at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:668)
at net.minecraft.server.integrated.IntegratedServer.func_71217_p(IntegratedServer.java:185)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:526)
at java.lang.Thread.run(Thread.java:750)
-- Block being updated --
Details:
Source block type: ID #31 (tile.tallgrass // net.minecraft.block.BlockTallGrass // minecraft:tallgrass)
Block: minecraft:iron_door[facing=west,half=lower,hinge=right,open=false,powered=false]
Block location: World: (-3285,65,328), Chunk: (at 11,4,8 in -206,20; contains blocks -3296,0,320 to -3281,255,335), Region: (-7,0; contains chunks -224,0 to -193,31, blocks -3584,0,0 to -3073,255,511)
Stacktrace:
at net.minecraft.world.World.func_190524_a(World.java:551)
at net.minecraft.world.World.func_175685_c(World.java:494)
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.block.BlockBush.func_176475_e(BlockBush.java:68)
at net.minecraft.block.BlockBush.func_189540_a(BlockBush.java:55)
at net.minecraft.block.state.BlockStateContainer$StateImplementation.func_189546_a(BlockStateContainer.java:481)
-- Block being updated --
Details:
Source block type: ID #2 (tile.grass // net.minecraft.block.BlockGrass // minecraft:grass)
Block: minecraft:tallgrass[type=tall_grass]
Block location: World: (-3285,66,328), Chunk: (at 11,4,8 in -206,20; contains blocks -3296,0,320 to -3281,255,335), Region: (-7,0; contains chunks -224,0 to -193,31, blocks -3584,0,0 to -3073,255,511)
Stacktrace:
at net.minecraft.world.World.func_190524_a(World.java:551)
at net.minecraft.world.World.func_175685_c(World.java:495)
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.msrandom.witchery.world.gen.structure.WitcheryVillagePiece.func_74875_a(WitcheryVillagePiece.kt:82)
at net.msrandom.witchery.WitcheryModContainer$Companion.addComponentParts(WitcheryModContainer.kt:156)
at net.msrandom.witchery.WitcheryModContainer.addComponentParts(WitcheryModContainer.kt)
at net.minecraft.world.gen.structure.StructureStart.func_75068_a(StructureStart.java:47)
at net.minecraft.world.gen.structure.MapGenStructure.func_175794_a(MapGenStructure.java:94)
at net.minecraft.world.gen.ChunkGeneratorOverworld.func_185931_b(ChunkGeneratorOverworld.java:406)
at net.minecraft.world.chunk.Chunk.func_186034_a(Chunk.java:1019)
at net.minecraft.world.chunk.Chunk.func_186030_a(Chunk.java:990)
at net.minecraft.world.gen.ChunkProviderServer.func_186025_d(ChunkProviderServer.java:157)
at net.minecraft.server.management.PlayerChunkMapEntry.func_187268_a(PlayerChunkMapEntry.java:126)
at net.minecraft.server.management.PlayerChunkMap.func_72693_b(SourceFile:147)
at net.minecraft.world.WorldServer.func_72835_b(WorldServer.java:227)
-- Affected level --
Details:
Level name: <redacted>
All players: 1 total; [EntityPlayerMP['<redacted>'/575, l='<redacted>', x=-3125.27, y=106.74, z=253.53]]
Chunk stats: ServerChunkCache: 680 Drop: 0
Level seed: -500340400117508748
Level generator: ID 00 - default, ver 1. Features enabled: true
Level generator options:
Level spawn location: World: (12,64,252), Chunk: (at 12,4,12 in 0,15; contains blocks 0,0,240 to 15,255,255), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,0,0 to 511,255,511)
Level time: 3535 game time, 3535 day time
Level dimension: 0
Level storage version: 0x04ABD - Anvil
Level weather: Rain time: 90434 (now: false), thunder time: 155391 (now: false)
Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: true
Here is what I think was the missing door, and there is some suspicious grass near it (the door block itself is currently empty, but the crash log suggests it might have also been grass):
As a bonus, here are some beds on a floor above that don't seem like they generated correctly:
The best way I found to get it to crash is to load a world, go to spectator mode, and sprint fly around at max speed until it crashed. When trying to find a consistent reproducer, I found that the village generation isn't very consistent - for example, sometimes villages generated without walls when I know they had one in other runs. I'll leave that for another bug though.
This is probably due to a mistake I made when I introduced the Triggered Dispersal system, and might be the same bug of #51 and #55.
Companion is probably responsible for the crash, but not for the missing door. In fact, the bug should trigger when a door block is broken. There's some reason for the door to break, and Companion makes it crash.
The bug has been fixed in dev, and I'll release a new version asap.
Thank you so much for all the reports and detailed infos!