[Fix] Stalactites could not grow beyong size 7 (#260)
This commit is contained in:
parent
1448ea8467
commit
fc2a68180b
1 changed files with 8 additions and 2 deletions
|
@ -116,7 +116,10 @@ public abstract class StalactiteBlock extends BaseBlockNotFull implements Simple
|
||||||
int startSize = floor ? 1 : 2;
|
int startSize = floor ? 1 : 2;
|
||||||
mut.set(pos.getX(), pos.getY() + 1, pos.getZ());
|
mut.set(pos.getX(), pos.getY() + 1, pos.getZ());
|
||||||
for (int i = 0; i < 8 && isThis(bState); i++) {
|
for (int i = 0; i < 8 && isThis(bState); i++) {
|
||||||
world.setBlockAndUpdate(mut, bState.setValue(SIZE, startSize++).setValue(IS_FLOOR, false));
|
world.setBlockAndUpdate(
|
||||||
|
mut,
|
||||||
|
bState.setValue(SIZE, Math.min(7, startSize + i)).setValue(IS_FLOOR, false)
|
||||||
|
);
|
||||||
mut.setY(mut.getY() + 1);
|
mut.setY(mut.getY() + 1);
|
||||||
bState = world.getBlockState(mut);
|
bState = world.getBlockState(mut);
|
||||||
}
|
}
|
||||||
|
@ -125,7 +128,10 @@ public abstract class StalactiteBlock extends BaseBlockNotFull implements Simple
|
||||||
startSize = floor ? 2 : 1;
|
startSize = floor ? 2 : 1;
|
||||||
mut.set(pos.getX(), pos.getY() - 1, pos.getZ());
|
mut.set(pos.getX(), pos.getY() - 1, pos.getZ());
|
||||||
for (int i = 0; i < 8 && isThis(bState); i++) {
|
for (int i = 0; i < 8 && isThis(bState); i++) {
|
||||||
world.setBlockAndUpdate(mut, bState.setValue(SIZE, startSize++).setValue(IS_FLOOR, true));
|
world.setBlockAndUpdate(
|
||||||
|
mut,
|
||||||
|
bState.setValue(SIZE, Math.min(7, startSize + i)).setValue(IS_FLOOR, true)
|
||||||
|
);
|
||||||
mut.setY(mut.getY() - 1);
|
mut.setY(mut.getY() - 1);
|
||||||
bState = world.getBlockState(mut);
|
bState = world.getBlockState(mut);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue