Railcraft

Railcraft

34M Downloads

Breaking valve from tank's bottom layer crashing

xJon opened this issue ยท 0 comments

commented

Destroying a valve block placed in the bottom layer of railcraft's liquids tank crashes the game.

Steps to reproduce:
1 - Build a Ralicraft liquids tank
2 - Place a tank valve into the bottom-most layer of the tank (Except the outermost layer, tank has to register as a valid multiblock and has to be interactible with)
3 - Destroy the valve block
4 - Game crashes

(From xJon/Tekkit-2#171)

Logs & Environment

Description: Playing level event

java.lang.ArrayIndexOutOfBoundsException: -1
	at mods.railcraft.common.blocks.structures.StructurePattern.getPatternMarker(StructurePattern.java:97)
	at mods.railcraft.common.blocks.structures.StructurePattern.getPatternMarker(StructurePattern.java:93)
	at mods.railcraft.common.blocks.logic.StructureLogic.getMarker(StructureLogic.java:164)
	at mods.railcraft.common.blocks.structures.TileTankValve.lambda$null$1(TileTankValve.java:36)
	at mods.railcraft.common.blocks.structures.TileTankValve$$Lambda$1010/117051690.test(Unknown Source)
	at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:174)
	at java.util.Spliterators$ArraySpliterator.tryAdvance(Spliterators.java:958)
	at java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:126)
	at java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:529)
	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:516)
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:502)
	at java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:152)
	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:464)
	at mods.railcraft.common.blocks.structures.TileTankValve.lambda$getActualState$3(TileTankValve.java:37)
	at mods.railcraft.common.blocks.structures.TileTankValve$$Lambda$1009/66128555.apply(Unknown Source)
	at java.util.Optional.map(Optional.java:215)
	at mods.railcraft.common.blocks.structures.TileTankValve.getActualState(TileTankValve.java:34)
	at mods.railcraft.common.blocks.BlockEntityDelegate.lambda$getActualState$15(BlockEntityDelegate.java:223)
	at mods.railcraft.common.blocks.BlockEntityDelegate$$Lambda$1002/734462904.apply(Unknown Source)
	at java.util.Optional.map(Optional.java:215)
	at mods.railcraft.common.blocks.BlockEntityDelegate.func_176221_a(BlockEntityDelegate.java:223)
	at net.minecraft.block.state.BlockStateContainer$StateImplementation.func_185899_b(BlockStateContainer.java:423)
	at net.minecraft.client.particle.ParticleManager.func_180533_a(ParticleManager.java:415)
	at net.minecraft.client.renderer.RenderGlobal.func_180439_a(RenderGlobal.java:2422)
	at net.minecraft.world.World.func_180498_a(World.java:3709)
	at net.minecraft.world.World.func_175718_b(World.java:3700)
	at net.minecraft.client.multiplayer.PlayerControllerMP.func_187103_a(PlayerControllerMP.java:155)
	at net.minecraft.client.multiplayer.PlayerControllerMP.func_178891_a(PlayerControllerMP.java:74)
	at net.minecraft.client.multiplayer.PlayerControllerMP.func_180511_b(PlayerControllerMP.java:223)
	at net.minecraft.client.Minecraft.func_147116_af(Minecraft.java:1518)
	at net.minecraft.client.Minecraft.func_184117_aA(Minecraft.java:2249)
	at net.minecraft.client.Minecraft.func_184118_az(Minecraft.java:2020)
	at net.minecraft.client.Minecraft.func_71407_l(Minecraft.java:1808)
	at net.minecraft.client.Minecraft.func_71411_J(Minecraft.java:1098)
	at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:398)
	at net.minecraft.client.main.Main.main(SourceFile:123)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:497)
	at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
	at net.minecraft.launchwrapper.Launch.main(Launch.java:28)

Additional context

Reproducible with only Railcraft installed.