Tree growing destroys blocks with TileEntities
MatthiasMann opened this issue ยท 11 comments
The following code:
https://github.com/Ivorforce/RecurrentComplex/blob/master/src/main/java/ivorius/reccomplex/world/gen/feature/sapling/RCSaplingGenerator.java#L131
Is deleting TileEntity data from machines likes EnderIO's farming station:
SleepyTrousers/EnderIO-1.5-1.12#4012 (comment)
That should really only be the case if the farming station is set up to be matched by one of the saplings, as an ingredient with 'delete' set to true. Do you use custom saplings?
net.minecraft.world.World.setBlockstate(World.java:331) at
ivorius.reccomplex.world.gen.feature.sapling.RCSaplingGenerator.lambda$growSapling$554(RCSaplingGenerator.java:130) at
java.util.stream.ForEachOps$ForEachOp$OfRef.accept(Unknown Source) at
java.util.stream.ReferencePipeline$3$1.accept(Unknown Source) at
java.util.stream.ReferencePipeline$2$1.accept(Unknown Source) at
java.util.HashMap$EntrySpliterator.forEachRemaining(Unknown Source) at
java.util.stream.AbstractPipeline.copyInto(Unknown Source) at
java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source) at
java.util.stream.ForEachOps$ForEachOp.evaluateSequential(Unknown Source) at
java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(Unknown Source) at
java.util.stream.AbstractPipeline.evaluate(Unknown Source) at
java.util.stream.ReferencePipeline.forEach(Unknown Source) at
ivorius.reccomplex.world.gen.feature.structure.generic.BlockPattern.forEach(BlockPattern.java:140) at
ivorius.reccomplex.world.gen.feature.sapling.RCSaplingGenerator.growSapling(RCSaplingGenerator.java:126) at
ivorius.reccomplex.world.gen.feature.sapling.RCSaplingGenerator.maybeGrowSapling(RCSaplingGenerator.java:55) at
ivorius.reccomplex.events.handlers.RCTerrainGenEventHandler.onSaplingGrow(RCTerrainGenEventHandler.java:70) at
net.minecraftforge.fml.common.eventhandler.ASMEventHandler_477_RCTerrainGenEventHandler_onSaplingGrow_SaplingGrowTreeEvent.invoke(.dynamic) at
It is really extremely hard to read, but it looks like you're making a copy of the world, setting everything to air, try to spawn your tree and if that doesn't work, restore your (partial!!!) backup.
[13:47:17] [Server thread/WARN] [EnderIO]: TE crazypants.enderio.machine.farm.TileFarmStation@58ef602d invalidated at
crazypants.enderio.TileEntityEio.func_145843_s(TileEntityEio.java:42) at
crazypants.enderio.machine.AbstractMachineEntity.func_145843_s(AbstractMachineEntity.java:304) at
net.minecraft.world.chunk.Chunk.func_177425_e(Chunk.java:833) at
net.minecraft.world.World.func_175713_t(World.java:2488) at
net.minecraft.block.Block.func_180663_b(Block.java:514) at
net.minecraft.world.chunk.Chunk.func_177436_a(Chunk.java:565) at
net.minecraft.world.World.func_180501_a(World.java:331) at
ivorius.reccomplex.world.gen.feature.sapling.RCSaplingGenerator.lambda$growSapling$554(RCSaplingGenerator.java:130) at
java.util.stream.ForEachOps$ForEachOp$OfRef.accept(Unknown Source) at
java.util.stream.ReferencePipeline$3$1.accept(Unknown Source) at
java.util.stream.ReferencePipeline$2$1.accept(Unknown Source) at
java.util.HashMap$EntrySpliterator.forEachRemaining(Unknown Source) at
java.util.stream.AbstractPipeline.copyInto(Unknown Source) at
java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source) at
java.util.stream.ForEachOps$ForEachOp.evaluateSequential(Unknown Source) at
java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(Unknown Source) at
java.util.stream.AbstractPipeline.evaluate(Unknown Source) at
java.util.stream.ReferencePipeline.forEach(Unknown Source) at
ivorius.reccomplex.world.gen.feature.structure.generic.BlockPattern.forEach(BlockPattern.java:140) at
ivorius.reccomplex.world.gen.feature.sapling.RCSaplingGenerator.growSapling(RCSaplingGenerator.java:126) at
ivorius.reccomplex.world.gen.feature.sapling.RCSaplingGenerator.maybeGrowSapling(RCSaplingGenerator.java:55) at
ivorius.reccomplex.events.handlers.RCTerrainGenEventHandler.onSaplingGrow(RCTerrainGenEventHandler.java:70) at
net.minecraftforge.fml.common.eventhandler.ASMEventHandler_477_RCTerrainGenEventHandler_onSaplingGrow_SaplingGrowTreeEvent.invoke(.dynamic) at
net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90) at
net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:185) at
net.minecraftforge.event.terraingen.TerrainGen.saplingGrowTree(TerrainGen.java:75) at
net.minecraft.block.BlockSapling.func_176476_e(BlockSapling.java:80) at
net.minecraft.block.BlockSapling.func_176478_d(BlockSapling.java:74) at
net.minecraft.block.BlockSapling.func_180650_b(BlockSapling.java:61) at
de.ellpeck.actuallyadditions.mod.entity.EntityWorm.func_70030_z(EntityWorm.java:100) at
de.ellpeck.actuallyadditions.mod.entity.EntityWorm.func_70071_h_(EntityWorm.java:63) at
net.minecraft.world.World.func_72866_a(World.java:1964) at
net.minecraft.world.WorldServer.func_72866_a(WorldServer.java:839) at
net.minecraft.world.World.func_72870_g(World.java:1934) at
net.minecraft.world.World.func_72939_s(World.java:1750) at
net.minecraft.world.WorldServer.func_72939_s(WorldServer.java:620) at
net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:709) at
net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:387) at
net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:613) at
net.minecraft.server.MinecraftServer.run(MinecraftServer.java:471) at
java.lang.Thread.run(Unknown Source)
full file at SleepyTrousers/EnderIO-1.5-1.12#4012 (comment)
What actually happens is that I set all blocks are being expected to be deleted at tree spawn (i.e. just saplings by default) to air, and if the tree structure refuses to spawn I restore them, minus tile entity for convenience (since usually you don't use tile entities as saplings anyway).
It seems to me the ingredient expression is matching the farm station block for some reason - either it's a custom expression or mine is broken somehow.
So I ask again, are you using custom sapling structures (or have the defaults modified)?
Original issue poster here. Nothing was changed on our server other than the tree generation being disabled. (Which, for my local testing, was accidentally left enabled).
server co-host here for original issue, we upgraded mods and accidentally didn't keep our configs when we did so. therefore all configs including RecCurrent complex got reset. we had in the past disabled RecComplex's tree generation because whenever a sappling grew it NPE crashed the server so we disabled those settings, but with the update to the pack we forgot to re-disable those settings.
I see and accept the problem - apparently there's a bad transformation going on again. Will fix asap.
Can you confirm what version of Recurrent Complex this is? The issue I found was unrelated (just some trees badly setup) and I fixed an issue a few versions ago that would cause this.
1.2.8 changes:
'* Some trees spawning from saplings didn't spawn on the saplings!'