Fixed a crash when breaking an Ender IO conduit with the Destructor. Fixes #1813

This commit is contained in:
raoulvdberge
2018-06-14 16:58:35 +02:00
parent 67f07a8f5d
commit e8f97d5006
2 changed files with 10 additions and 1 deletions

View File

@@ -14,6 +14,7 @@
- You can no longer put a Filter in filter slots to gain additional filter slots (raoulvdberge)
- You can now re-insert Processing Patterns in the Pattern Grid and have the inputs and outputs be completed (raoulvdberge)
- Fixed bug where pattern was recipe pattern was creatable when there was no recipe output (raoulvdberge)
- Fixed a crash when breaking an Ender IO conduit with the Destructor (raoulvdberge)
- Added a missing config option for Crafter Manager energy usage (raoulvdberge)
- If an Interface is configured to expose the entire network storage (by configuring no export slots), it will no longer expose the entire RS storage, due to performance issues (raoulvdberge)
- The Portable Grid no longer exposes a inventory for crossmod interaction, due to performance issues (raoulvdberge)

View File

@@ -26,6 +26,8 @@ import net.minecraft.tileentity.TileEntityShulkerBox;
import net.minecraft.util.NonNullList;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.RayTraceResult;
import net.minecraft.util.math.Vec3d;
import net.minecraft.world.World;
import net.minecraft.world.WorldServer;
import net.minecraft.world.chunk.Chunk;
@@ -102,7 +104,13 @@ public class NetworkNodeDestructor extends NetworkNode implements IComparable, I
IBlockState frontBlockState = world.getBlockState(front);
Block frontBlock = frontBlockState.getBlock();
ItemStack frontStack = frontBlock.getPickBlock(frontBlockState, null, world, front, null);
ItemStack frontStack = frontBlock.getPickBlock(
frontBlockState,
new RayTraceResult(new Vec3d(pos.getX(), pos.getY(), pos.getZ()), getDirection().getOpposite()),
world,
front,
FakePlayerFactory.getMinecraft((WorldServer) world)
);
if (!frontStack.isEmpty()) {
if (IFilterable.canTake(itemFilters, mode, compare, frontStack) && frontBlockState.getBlockHardness(world, front) != -1.0) {