mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-12-28 16:06:48 +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 (world.isRemote)
|
||||
return ActionResultType.SUCCESS;
|
||||
world.setBlockState(context.getPos(), state.with(PART, BeltPart.MIDDLE), 2);
|
||||
BeltTileEntity belt = BeltHelper.getSegmentTE(world, context.getPos());
|
||||
if (belt != null) {
|
||||
belt.detachKinetics();
|
||||
belt.attachKinetics();
|
||||
}
|
||||
KineticTileEntity.switchToBlockState(world, pos, state.with(PART, BeltPart.MIDDLE));
|
||||
if (player != null && !player.isCreative())
|
||||
player.inventory.placeItemBackInInventory(world, AllBlocks.SHAFT.asStack());
|
||||
return ActionResultType.SUCCESS;
|
||||
|
|
Loading…
Reference in a new issue