mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-22 15:18:34 +01:00
Closes #1177
This commit is contained in:
parent
1cca640345
commit
1240287b3b
1 changed files with 59 additions and 60 deletions
|
@ -78,15 +78,14 @@ public class BlockGreenhouseGlass extends BlockBase {
|
|||
|
||||
if (world.canBlockSeeSky(pos) && world.isDaytime()) {
|
||||
Triple<BlockPos, IBlockState, IGrowable> trip = firstBlock(world, pos);
|
||||
|
||||
boolean once = false;
|
||||
|
||||
for (int i = 0; i < 3; i++)
|
||||
if (trip != null && trip.getRight().canGrow(world, trip.getLeft(), trip.getMiddle(), false)) {
|
||||
trip.getRight().grow(world, rand, trip.getLeft(), trip.getMiddle());
|
||||
for (int i = 0; i < 3; i++) {
|
||||
IBlockState growState = i == 0 ? trip.getMiddle() : world.getBlockState(trip.getLeft());
|
||||
if (trip != null && trip.getRight().canGrow(world, trip.getLeft(), growState, false)) {
|
||||
trip.getRight().grow(world, rand, trip.getLeft(), growState);
|
||||
once = true;
|
||||
}
|
||||
|
||||
}
|
||||
if (once) world.playEvent(2005, trip.getMiddle().isOpaqueCube() ? trip.getLeft().up() : trip.getLeft(), 0);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue