Crash when using Screwdriver on Create pipes
DracoHero opened this issue ยท 0 comments
Context
The game crashes when using the ScrewdriverItem from TFMG on a Create pipe (FluidPipeBlockEntity).
The crash happens because the screwdriver tries to cast a Create pipe to TFMGPipeBlockEntity without checking the block type.
Crash Log (relevant part):
java.lang.ClassCastException: class com.simibubi.create.content.fluids.pipes.FluidPipeBlockEntity
cannot be cast to class com.drmangotea.tfmg.content.decoration.pipes.TFMGPipeBlockEntity
at com.drmangotea.tfmg.content.items.ScrewdriverItem.useOn(ScrewdriverItem.java:34)
Versions:
- Minecraft: 1.21.1
- Create: 6.0.6
- TFMG: 1.0.2f
- Loader: NeoForge
Steps to reproduce:
- Install Create and TFMG.
- Place a Create fluid pipe.
- Use the TFMG Screwdriver on the pipe.
- The game crashes immediately.
Expected behavior:
The ScrewdriverItem should properly check the block type (e.g., with instanceof) before casting.
If the block is not a TFMG pipe, it should ignore it or handle it gracefully instead of crashing.