Simple Storage Network

Simple Storage Network

56M Downloads

Errors in log "StorageNetwork: exception thrown while updating neighbours:"

mezz opened this issue ยท 3 comments

commented

https://github.com/PrinceOfAmber/Storage-Network/blob/89c984d730f9c54d3376ceaf3becedca2a5c2bb8/src/main/java/mrriegel/storagenetwork/AbstractBlockConnectable.java#L43

[07:51:18] [Server thread/INFO] [STDOUT]: [mrriegel.storagenetwork.AbstractBlockConnectable:func_189540_a:43]: StorageNetwork: exception thrown while updating neighbours:
[07:51:18] [Server thread/INFO] [STDERR]: [mrriegel.storagenetwork.AbstractBlockConnectable:func_189540_a:44]: java.lang.IllegalArgumentException: Cannot get property PropertyInteger{name=meta, clazz=class java.lang.Integer, values=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]} as it does not exist in BlockStateContainer{block=storagenetwork:ex_kabel, properties=[]}
[07:51:18] [Server thread/INFO] [STDERR]: [mrriegel.storagenetwork.AbstractBlockConnectable:func_189540_a:44]: 	at net.minecraft.block.state.BlockStateContainer$StateImplementation.func_177229_b(BlockStateContainer.java:201)
[07:51:18] [Server thread/INFO] [STDERR]: [mrriegel.storagenetwork.AbstractBlockConnectable:func_189540_a:44]: 	at cofh.thermaldynamics.block.BlockDuct.func_176201_c(BlockDuct.java:113)
[07:51:18] [Server thread/INFO] [STDERR]: [mrriegel.storagenetwork.AbstractBlockConnectable:func_189540_a:44]: 	at cofh.thermaldynamics.block.BlockDuct.hasTileEntity(BlockDuct.java:218)
[07:51:18] [Server thread/INFO] [STDERR]: [mrriegel.storagenetwork.AbstractBlockConnectable:func_189540_a:44]: 	at mrriegel.storagenetwork.AbstractBlockConnectable.func_189540_a(AbstractBlockConnectable.java:21)
[07:51:18] [Server thread/INFO] [STDERR]: [mrriegel.storagenetwork.AbstractBlockConnectable:func_189540_a:44]: 	at net.minecraft.block.state.BlockStateContainer$StateImplementation.func_189546_a(BlockStateContainer.java:481)
[07:51:18] [Server thread/INFO] [STDERR]: [mrriegel.storagenetwork.AbstractBlockConnectable:func_189540_a:44]: 	at net.minecraft.world.World.func_190524_a(World.java:550)
[07:51:18] [Server thread/INFO] [STDERR]: [mrriegel.storagenetwork.AbstractBlockConnectable:func_189540_a:44]: 	at net.minecraft.world.World.func_175685_c(World.java:491)
[07:51:18] [Server thread/INFO] [STDERR]: [mrriegel.storagenetwork.AbstractBlockConnectable:func_189540_a:44]: 	at cofh.core.block.TileCore.callNeighborStateChange(TileCore.java:56)
[07:51:18] [Server thread/INFO] [STDERR]: [mrriegel.storagenetwork.AbstractBlockConnectable:func_189540_a:44]: 	at cofh.thermaldynamics.duct.tiles.TileGrid.onNeighborBlockChange(TileGrid.java:201)
[07:51:18] [Server thread/INFO] [STDERR]: [mrriegel.storagenetwork.AbstractBlockConnectable:func_189540_a:44]: 	at cofh.thermaldynamics.duct.tiles.DuctUnit.onNeighborBlockChange(DuctUnit.java:283)
[07:51:18] [Server thread/INFO] [STDERR]: [mrriegel.storagenetwork.AbstractBlockConnectable:func_189540_a:44]: 	at cofh.thermaldynamics.multiblock.MultiBlockFormer.checkMultiBlock(MultiBlockFormer.java:43)
[07:51:18] [Server thread/INFO] [STDERR]: [mrriegel.storagenetwork.AbstractBlockConnectable:func_189540_a:44]: 	at cofh.thermaldynamics.multiblock.MultiBlockFormer.formGrid(MultiBlockFormer.java:23)
[07:51:18] [Server thread/INFO] [STDERR]: [mrriegel.storagenetwork.AbstractBlockConnectable:func_189540_a:44]: 	at cofh.thermaldynamics.duct.tiles.DuctUnit.formGrid(DuctUnit.java:252)
[07:51:18] [Server thread/INFO] [STDERR]: [mrriegel.storagenetwork.AbstractBlockConnectable:func_189540_a:44]: 	at cofh.thermaldynamics.duct.tiles.DuctUnit.singleTick(DuctUnit.java:349)
[07:51:18] [Server thread/INFO] [STDERR]: [mrriegel.storagenetwork.AbstractBlockConnectable:func_189540_a:44]: 	at cofh.thermaldynamics.util.WorldGridList.tickEnd(WorldGridList.java:84)
[07:51:18] [Server thread/INFO] [STDERR]: [mrriegel.storagenetwork.AbstractBlockConnectable:func_189540_a:44]: 	at cofh.thermaldynamics.util.TickHandler.tick(TickHandler.java:93)
[07:51:18] [Server thread/INFO] [STDERR]: [mrriegel.storagenetwork.AbstractBlockConnectable:func_189540_a:44]: 	at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_385_TickHandler_tick_WorldTickEvent.invoke(.dynamic)
[07:51:18] [Server thread/INFO] [STDERR]: [mrriegel.storagenetwork.AbstractBlockConnectable:func_189540_a:44]: 	at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90)
[07:51:18] [Server thread/INFO] [STDERR]: [mrriegel.storagenetwork.AbstractBlockConnectable:func_189540_a:44]: 	at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:179)
[07:51:18] [Server thread/INFO] [STDERR]: [mrriegel.storagenetwork.AbstractBlockConnectable:func_189540_a:44]: 	at net.minecraftforge.fml.common.FMLCommonHandler.onPostWorldTick(FMLCommonHandler.java:272)
[07:51:18] [Server thread/INFO] [STDERR]: [mrriegel.storagenetwork.AbstractBlockConnectable:func_189540_a:44]: 	at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:774)
[07:51:18] [Server thread/INFO] [STDERR]: [mrriegel.storagenetwork.AbstractBlockConnectable:func_189540_a:44]: 	at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:396)
[07:51:18] [Server thread/INFO] [STDERR]: [mrriegel.storagenetwork.AbstractBlockConnectable:func_189540_a:44]: 	at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:666)
[07:51:18] [Server thread/INFO] [STDERR]: [mrriegel.storagenetwork.AbstractBlockConnectable:func_189540_a:44]: 	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:524)
[07:51:18] [Server thread/INFO] [STDERR]: [mrriegel.storagenetwork.AbstractBlockConnectable:func_189540_a:44]: 	at java.lang.Thread.run(Thread.java:745)

Also please do not use System.out or e.printStackTrace()
You can create cleaner logs for this by using log4j.

You can create an instance with

Logger logger = LogManager.getLogger(StorageNetwork.MODID)` 

and log the error with

logger.error("exception thrown while updating neighbours:", e);

The log method optionally takes an exception as the last argument, and it will log everything nicely.

commented

Yeah you're right, i have the logger in my other mods, i just haven't added it to this mod since taking it over from the previous author. I'll do that.

As for the actual error: I think i can do this whole process without calling blockIn.hasTileEntity. (or at least pass it the right input, I guess the block does not match the blockstate or something)

I think this is also related to
#39

commented

Thanks! I think this is a duplicate of that issue.