Crash when moving xnet controller/cables/connectors on it using projectred frames
xwF6CWD8kyMT opened this issue ยท 5 comments
Issue description:
Minecraft server crashed when sending a redstone signal to a Frame Linear Actuator to raise a ProjectRed Frame platform one block. On this platform, was an XNet controller, cables, and connectors.
Steps to reproduce:
Create ProjectRed platform using Frame blocks
Place XNet controller, cables, connectors.
Beneath the platform, put ProjectRed Frame Linear Actuactor
Trigger the actuator with redstone signal.
Versions:
Minecraft: 1.12.2
Forge: 14.23.4.2729
McJtyLib: 3.0.2
XNet: 1.7.3
Possibly incompatible mods and versions:
ProjectRed - 4.9.1.92
Relevant logs, if any:
Description: Exception while updating neighbours
java.lang.ClassCastException: mcjty.xnet.blocks.controller.TileEntityController cannot be cast to mrtjp.projectred.api.IFrame
at mrtjp.projectred.relocation.StickRegistry$.getFrame$1(stickregistry.scala:60)
at mrtjp.projectred.relocation.StickRegistry$.resolveStick(stickregistry.scala:69)
at mrtjp.projectred.relocation.StickResolver_Impl$$anonfun$iterate$1.apply(APIImpl_Relocation.scala:83)
at mrtjp.projectred.relocation.StickResolver_Impl$$anonfun$iterate$1.apply(APIImpl_Relocation.scala:79)
at scala.collection.immutable.Range.foreach(Range.scala:160)
at mrtjp.projectred.relocation.StickResolver_Impl$.iterate(APIImpl_Relocation.scala:79)
at mrtjp.projectred.relocation.StickResolver_Impl$.getStructure(APIImpl_Relocation.scala:67)
at mrtjp.projectred.relocation.StickResolver_Impl$.getStructure(APIImpl_Relocation.scala:56)
at mrtjp.projectred.expansion.TMotorTile$class.onNeighborBlockChange(TileFrameMotor.scala:106)
at mrtjp.projectred.expansion.TileFrameActuator.onNeighborBlockChange(TileFrameActuator.scala:18)
at mrtjp.core.block.MultiTileBlock.func_189540_a(tileblock.scala:215)
at net.minecraft.block.state.BlockStateContainer$StateImplementation.func_189546_a(BlockStateContainer.java:481)
at net.minecraft.world.World.func_190524_a(World.java:550)
at mcjty.xnet.blocks.cables.ConnectorTileEntity.setPowerOut(ConnectorTileEntity.java:93)
at mcjty.xnet.apiimpl.logic.LogicChannelSettings.tick(LogicChannelSettings.java:131)
at mcjty.xnet.blocks.controller.TileEntityController.func_73660_a(TileEntityController.java:236)
at net.minecraft.world.World.func_72939_s(World.java:1832)
at net.minecraft.world.WorldServer.func_72939_s(WorldServer.java:613)
at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:767)
at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:396)
at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:668)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:526)
at java.lang.Thread.run(Thread.java:748)
A detailed walkthrough of the error, its code path and all known details is as follows:
-- Head --
Thread: Server thread
Stacktrace:
at mrtjp.projectred.relocation.StickRegistry$.getFrame$1(stickregistry.scala:60)
at mrtjp.projectred.relocation.StickRegistry$.resolveStick(stickregistry.scala:69)
at mrtjp.projectred.relocation.StickResolver_Impl$$anonfun$iterate$1.apply(APIImpl_Relocation.scala:83)
at mrtjp.projectred.relocation.StickResolver_Impl$$anonfun$iterate$1.apply(APIImpl_Relocation.scala:79)
at scala.collection.immutable.Range.foreach(Range.scala:160)
at mrtjp.projectred.relocation.StickResolver_Impl$.iterate(APIImpl_Relocation.scala:79)
at mrtjp.projectred.relocation.StickResolver_Impl$.getStructure(APIImpl_Relocation.scala:67)
at mrtjp.projectred.relocation.StickResolver_Impl$.getStructure(APIImpl_Relocation.scala:56)
at mrtjp.projectred.expansion.TMotorTile$class.onNeighborBlockChange(TileFrameMotor.scala:106)
at mrtjp.projectred.expansion.TileFrameActuator.onNeighborBlockChange(TileFrameActuator.scala:18)
at mrtjp.core.block.MultiTileBlock.func_189540_a(tileblock.scala:215)
at net.minecraft.block.state.BlockStateContainer$StateImplementation.func_189546_a(BlockStateContainer.java:481)
-- Block being updated --
Details:
Source block type: ID #4615 (tile.xnet.connector // mcjty.xnet.blocks.cables.ConnectorBlock)
Block: projectred-expansion:machine2[tile_idx=9]
Block location: World: (-415,79,-371), Chunk: (at 1,4,13 in -26,-24; contains blocks -416,0,-384 to -401,255,-369), Region: (-1,-1; contains chunks -32,-32 to -1,-1, blocks -512,0,-512 to -1,255,-1)
Stacktrace:
at net.minecraft.world.World.func_190524_a(World.java:550)
at mcjty.xnet.blocks.cables.ConnectorTileEntity.setPowerOut(ConnectorTileEntity.java:93)
at mcjty.xnet.apiimpl.logic.LogicChannelSettings.tick(LogicChannelSettings.java:131)
at mcjty.xnet.blocks.controller.TileEntityController.func_73660_a(TileEntityController.java:236)
-- Block entity being ticked --
Details:
Name: minecraft:xnet_controller // mcjty.xnet.blocks.controller.TileEntityController
Block type: ID #4608 (tile.xnet.controller // null)
Block data value: 2 / 0x2 / 0b0010
Block location: World: (-417,81,-381), Chunk: (at 15,5,3 in -27,-24; contains blocks -432,0,-384 to -417,255,-369), Region: (-1,-1; contains chunks -32,-32 to -1,-1, blocks -512,0,-512 to -1,255,-1)
Actual block type: ID #4608 (tile.xnet.controller // null)
Actual block data value: 2 / 0x2 / 0b0010
Stacktrace:
at net.minecraft.world.World.func_72939_s(World.java:1832)
at net.minecraft.world.WorldServer.func_72939_s(WorldServer.java:613)
Fixed via 69f7197. On my side, my capability was never being registered, and was null. Xnet also had an improperly registered capability that was null. Since both capabilities were null, Xnet controller was trying to wrap itself as a Frame block, since it thought both were the same.
I believe the line responsible for this is:
Xnet also had an improperly registered capability that was null
@MrTJP Which capability is this?
That's the same line you mentioned at McJtyMods/XNet#294. I commented there why I think that line is fine. Unless I'm missing something else, I think the problem is only on this side.