mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-12-22 19:39:24 +01:00
Closes #1278
This commit is contained in:
parent
a296419857
commit
f12e83a4d0
1 changed files with 2 additions and 2 deletions
|
@ -94,13 +94,13 @@ public class BlockGreenhouseGlass extends BlockBase {
|
|||
}
|
||||
}
|
||||
|
||||
public static Triple<BlockPos, IBlockState, IGrowable> firstBlock(World world, BlockPos glassPos) {
|
||||
public Triple<BlockPos, IBlockState, IGrowable> firstBlock(World world, BlockPos glassPos) {
|
||||
BlockPos.MutableBlockPos mut = new BlockPos.MutableBlockPos(glassPos);
|
||||
while (true) {
|
||||
mut.setPos(mut.getX(), mut.getY() - 1, mut.getZ());
|
||||
if (mut.getY() < 0) return null;
|
||||
IBlockState state = world.getBlockState(mut);
|
||||
if (state.isOpaqueCube() || state.getBlock() instanceof IGrowable) {
|
||||
if (state.isOpaqueCube() || state.getBlock() instanceof IGrowable || state.getBlock() == this) {
|
||||
if (state.getBlock() instanceof IGrowable) return Triple.of(mut.toImmutable(), state, (IGrowable) state.getBlock());
|
||||
else return null;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue