mirror of
https://github.com/Jozufozu/Flywheel.git
synced 2024-12-29 08:26:37 +01:00
Quickfix
- Fixed gantry shafts able to cause loops in kinetic connectivity when switching to powered state
This commit is contained in:
parent
88f80c6240
commit
2315625c4b
1 changed files with 3 additions and 7 deletions
|
@ -187,13 +187,9 @@ public class GantryShaftBlock extends DirectionalKineticBlock {
|
||||||
toUpdate.add(pos);
|
toUpdate.add(pos);
|
||||||
for (BlockPos blockPos : toUpdate) {
|
for (BlockPos blockPos : toUpdate) {
|
||||||
BlockState blockState = worldIn.getBlockState(blockPos);
|
BlockState blockState = worldIn.getBlockState(blockPos);
|
||||||
|
TileEntity te = worldIn.getTileEntity(blockPos);
|
||||||
if (!shouldPower) {
|
if (te instanceof KineticTileEntity)
|
||||||
TileEntity te = worldIn.getTileEntity(blockPos);
|
((KineticTileEntity) te).detachKinetics();
|
||||||
if (te instanceof KineticTileEntity)
|
|
||||||
((KineticTileEntity) te).detachKinetics();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (blockState.getBlock() instanceof GantryShaftBlock)
|
if (blockState.getBlock() instanceof GantryShaftBlock)
|
||||||
worldIn.setBlockState(blockPos, blockState.with(POWERED, shouldPower), 2);
|
worldIn.setBlockState(blockPos, blockState.with(POWERED, shouldPower), 2);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue