mirror of
https://github.com/Jozufozu/Flywheel.git
synced 2024-12-24 22:16:22 +01:00
Fix another kinetic loop when removing shafts from a belt segment
This commit is contained in:
parent
cf80822024
commit
3902569cbd
1 changed files with 1 additions and 6 deletions
|
@ -299,12 +299,7 @@ public class BeltBlock extends HorizontalKineticBlock implements ITE<BeltTileEnt
|
||||||
if (state.get(PART) == BeltPart.PULLEY) {
|
if (state.get(PART) == BeltPart.PULLEY) {
|
||||||
if (world.isRemote)
|
if (world.isRemote)
|
||||||
return ActionResultType.SUCCESS;
|
return ActionResultType.SUCCESS;
|
||||||
world.setBlockState(context.getPos(), state.with(PART, BeltPart.MIDDLE), 2);
|
KineticTileEntity.switchToBlockState(world, pos, state.with(PART, BeltPart.MIDDLE));
|
||||||
BeltTileEntity belt = BeltHelper.getSegmentTE(world, context.getPos());
|
|
||||||
if (belt != null) {
|
|
||||||
belt.detachKinetics();
|
|
||||||
belt.attachKinetics();
|
|
||||||
}
|
|
||||||
if (player != null && !player.isCreative())
|
if (player != null && !player.isCreative())
|
||||||
player.inventory.placeItemBackInInventory(world, AllBlocks.SHAFT.asStack());
|
player.inventory.placeItemBackInInventory(world, AllBlocks.SHAFT.asStack());
|
||||||
return ActionResultType.SUCCESS;
|
return ActionResultType.SUCCESS;
|
||||||
|
|
Loading…
Reference in a new issue