More Red

More Red

13M Downloads

[1.16.4] Crash when attempting to place XNet Connector between two Hoppers

ViRb3 opened this issue ยท 2 comments

commented

Explanation

XNet extends net.minecraft.tileentity.TileEntity:
https://github.com/McJtyMods/McJtyLib/blob/d0ecc7b0099eef0a3f63efb40b73a66fd97880bc/src/main/java/mcjty/lib/tileentity/GenericTileEntity.java#L46

https://github.com/McJtyMods/XNet/blob/d344ab46e26f548cea89ceb573cf8963afaaa790/src/main/java/mcjty/xnet/modules/cables/blocks/ConnectorTileEntity.java#L45

And crashes with java.lang.ClassCastException: net.minecraft.tileentity.HopperTileEntity cannot be cast to mcjty.xnet.modules.cables.blocks.ConnectorTileEntity.

This only happens when MoreRed is installed. I assume MoreRed changes the hopper's class to not extend from TileEntity like it is supposed to.

Crash log

https://paste.gg/p/anonymous/f8da4950f2074661a93ba2e25b995acc

Reproduction video

2020-11-13_13-50-13.zip

Crash zone

image

commented

More Red does not change the class of any vanilla block or replace them with other blocks via the block registry, however I will look into this

commented

This was fixed on xnet's end, and as far as I can tell the fix on xnet's end was the correct way to fix this