Picking up Controller Rails

- Controller Rails can now be picked up using a Wrench
This commit is contained in:
simibubi 2021-07-03 16:30:37 +02:00
parent b2ff3a465f
commit 1b5f9e7944

View file

@ -222,16 +222,9 @@ public class ControllerRailBlock extends AbstractRailBlock implements IWrenchabl
BlockState testState = rotate(state, testRotation);
if (isStableWith(testState, world, pos)) {
placeAndNotify(testState, pos, world);
break;
return ActionResultType.SUCCESS;
}
}
return ActionResultType.SUCCESS;
}
@Override
public ActionResultType onSneakWrenched(BlockState state, ItemUseContext context) {
World world = context.getWorld();
BlockPos pos = context.getPos();
BlockState testState = state.with(BACKWARDS, !state.get(BACKWARDS));
if (isStableWith(testState, world, pos))
placeAndNotify(testState, pos, world);