mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-12-28 16:06:48 +01:00
Fix #527
This commit is contained in:
parent
fa6bac2bfc
commit
743d303bbe
1 changed files with 14 additions and 16 deletions
|
@ -127,14 +127,6 @@ public class BeltBlock extends HorizontalKineticBlock implements ITE<BeltTileEnt
|
||||||
return drops;
|
return drops;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void spawnAdditionalDrops(BlockState state, World worldIn, BlockPos pos, ItemStack stack) {
|
|
||||||
BeltTileEntity controllerTE = BeltHelper.getControllerTE(worldIn, pos);
|
|
||||||
if (controllerTE != null)
|
|
||||||
controllerTE.getInventory()
|
|
||||||
.ejectAll();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isFlammable(BlockState state, IBlockReader world, BlockPos pos, Direction face) {
|
public boolean isFlammable(BlockState state, IBlockReader world, BlockPos pos, Direction face) {
|
||||||
return false;
|
return false;
|
||||||
|
@ -436,9 +428,15 @@ public class BeltBlock extends HorizontalKineticBlock implements ITE<BeltTileEnt
|
||||||
return;
|
return;
|
||||||
if (isMoving)
|
if (isMoving)
|
||||||
return;
|
return;
|
||||||
TileEntity belt = world.getTileEntity(pos);
|
|
||||||
if (belt instanceof BeltTileEntity)
|
TileEntity te = world.getTileEntity(pos);
|
||||||
belt.remove();
|
if (te instanceof BeltTileEntity) {
|
||||||
|
BeltTileEntity beltTileEntity = (BeltTileEntity) te;
|
||||||
|
if (beltTileEntity.isController())
|
||||||
|
beltTileEntity.getInventory()
|
||||||
|
.ejectAll();
|
||||||
|
world.removeTileEntity(pos);
|
||||||
|
}
|
||||||
|
|
||||||
// Destroy chain
|
// Destroy chain
|
||||||
for (boolean forward : Iterate.trueAndFalse) {
|
for (boolean forward : Iterate.trueAndFalse) {
|
||||||
|
@ -452,13 +450,13 @@ public class BeltBlock extends HorizontalKineticBlock implements ITE<BeltTileEnt
|
||||||
boolean hasPulley = false;
|
boolean hasPulley = false;
|
||||||
TileEntity tileEntity = world.getTileEntity(currentPos);
|
TileEntity tileEntity = world.getTileEntity(currentPos);
|
||||||
if (tileEntity instanceof BeltTileEntity) {
|
if (tileEntity instanceof BeltTileEntity) {
|
||||||
BeltTileEntity te = (BeltTileEntity) tileEntity;
|
BeltTileEntity belt = (BeltTileEntity) tileEntity;
|
||||||
if (te.isController())
|
if (belt.isController())
|
||||||
te.getInventory()
|
belt.getInventory()
|
||||||
.ejectAll();
|
.ejectAll();
|
||||||
|
|
||||||
te.remove();
|
belt.remove();
|
||||||
hasPulley = te.hasPulley();
|
hasPulley = belt.hasPulley();
|
||||||
}
|
}
|
||||||
|
|
||||||
BlockState shaftState = AllBlocks.SHAFT.getDefaultState()
|
BlockState shaftState = AllBlocks.SHAFT.getDefaultState()
|
||||||
|
|
Loading…
Reference in a new issue