mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-12-16 21:13:41 +01:00
Fix rope pulley breaking bedrock
This commit is contained in:
parent
92a1395b14
commit
8f7945ff4e
1 changed files with 12 additions and 1 deletions
|
@ -48,6 +48,17 @@ public class PulleyTileEntity extends LinearActuatorTileEntity {
|
|||
return;
|
||||
if (speed == 0)
|
||||
return;
|
||||
int maxLength = AllConfigs.SERVER.kinetics.maxRopeLength.get();
|
||||
int i = 1;
|
||||
while (i <= maxLength) {
|
||||
BlockPos ropePos = pos.down(i);
|
||||
BlockState ropeState = world.getBlockState(ropePos);
|
||||
if (!AllBlocks.ROPE.has(ropeState) && !AllBlocks.PULLEY_MAGNET.has(ropeState)) {
|
||||
break;
|
||||
}
|
||||
++i;
|
||||
}
|
||||
offset = i - 1;
|
||||
if (offset >= getExtensionRange() && getSpeed() > 0)
|
||||
return;
|
||||
if (offset <= 0 && getSpeed() < 0)
|
||||
|
@ -70,7 +81,7 @@ public class PulleyTileEntity extends LinearActuatorTileEntity {
|
|||
if (!canAssembleStructure && getSpeed() > 0)
|
||||
return;
|
||||
|
||||
for (int i = ((int) offset); i > 0; i--) {
|
||||
for (i = ((int) offset); i > 0; i--) {
|
||||
BlockPos offset = pos.down(i);
|
||||
BlockState oldState = world.getBlockState(offset);
|
||||
if (oldState.getBlock() instanceof IWaterLoggable && oldState.has(BlockStateProperties.WATERLOGGED)
|
||||
|
|
Loading…
Reference in a new issue