mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-11-10 12:33:57 +01:00
Add null check to chutes
This commit is contained in:
parent
bf59956f23
commit
7791d340e1
@ -352,9 +352,7 @@ public class ChuteTileEntity extends SmartTileEntity implements IHaveGoggleInfor
|
|||||||
ChuteTileEntity targetChute = getTargetChute(blockState);
|
ChuteTileEntity targetChute = getTargetChute(blockState);
|
||||||
Direction direction = AbstractChuteBlock.getChuteFacing(blockState);
|
Direction direction = AbstractChuteBlock.getChuteFacing(blockState);
|
||||||
|
|
||||||
if (level == null)
|
if (level == null || direction == null || !this.canOutputItems())
|
||||||
return false;
|
|
||||||
if (!this.canOutputItems())
|
|
||||||
return false;
|
return false;
|
||||||
if (!capBelow.isPresent())
|
if (!capBelow.isPresent())
|
||||||
capBelow = grabCapability(Direction.DOWN);
|
capBelow = grabCapability(Direction.DOWN);
|
||||||
@ -406,10 +404,7 @@ public class ChuteTileEntity extends SmartTileEntity implements IHaveGoggleInfor
|
|||||||
private boolean handleUpwardOutput(boolean simulate) {
|
private boolean handleUpwardOutput(boolean simulate) {
|
||||||
BlockState stateAbove = level.getBlockState(worldPosition.above());
|
BlockState stateAbove = level.getBlockState(worldPosition.above());
|
||||||
|
|
||||||
if (level == null)
|
if (level == null || !this.canOutputItems())
|
||||||
return false;
|
|
||||||
|
|
||||||
if (!this.canOutputItems())
|
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (AbstractChuteBlock.isOpenChute(getBlockState())) {
|
if (AbstractChuteBlock.isOpenChute(getBlockState())) {
|
||||||
|
Loading…
Reference in New Issue
Block a user