mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-26 00:38:35 +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);
|
BlockPos.MutableBlockPos mut = new BlockPos.MutableBlockPos(glassPos);
|
||||||
while (true) {
|
while (true) {
|
||||||
mut.setPos(mut.getX(), mut.getY() - 1, mut.getZ());
|
mut.setPos(mut.getX(), mut.getY() - 1, mut.getZ());
|
||||||
if (mut.getY() < 0) return null;
|
if (mut.getY() < 0) return null;
|
||||||
IBlockState state = world.getBlockState(mut);
|
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());
|
if (state.getBlock() instanceof IGrowable) return Triple.of(mut.toImmutable(), state, (IGrowable) state.getBlock());
|
||||||
else return null;
|
else return null;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue