mirror of
https://github.com/barkeser2002/CatServer.git
synced 2026-09-25 06:40:05 +03:00
51 lines
1.9 KiB
Diff
51 lines
1.9 KiB
Diff
--- ../src-base/minecraft/net/minecraft/world/gen/feature/WorldGenMegaJungle.java
|
|
+++ ../src-work/minecraft/net/minecraft/world/gen/feature/WorldGenMegaJungle.java
|
|
@@ -55,7 +55,7 @@
|
|
{
|
|
BlockPos blockpos = position.up(i2);
|
|
|
|
- if (this.canGrowInto(worldIn.getBlockState(blockpos).getBlock()))
|
|
+ if (this.isAirLeaves(worldIn,blockpos))
|
|
{
|
|
this.setBlockAndNotifyAdequately(worldIn, blockpos, this.woodMetadata);
|
|
|
|
@@ -70,7 +70,7 @@
|
|
{
|
|
BlockPos blockpos1 = blockpos.east();
|
|
|
|
- if (this.canGrowInto(worldIn.getBlockState(blockpos1).getBlock()))
|
|
+ if (this.isAirLeaves(worldIn,blockpos1))
|
|
{
|
|
this.setBlockAndNotifyAdequately(worldIn, blockpos1, this.woodMetadata);
|
|
|
|
@@ -83,7 +83,7 @@
|
|
|
|
BlockPos blockpos2 = blockpos.south().east();
|
|
|
|
- if (this.canGrowInto(worldIn.getBlockState(blockpos2).getBlock()))
|
|
+ if (this.isAirLeaves(worldIn,blockpos2))
|
|
{
|
|
this.setBlockAndNotifyAdequately(worldIn, blockpos2, this.woodMetadata);
|
|
|
|
@@ -96,7 +96,7 @@
|
|
|
|
BlockPos blockpos3 = blockpos.south();
|
|
|
|
- if (this.canGrowInto(worldIn.getBlockState(blockpos3).getBlock()))
|
|
+ if (this.isAirLeaves(worldIn,blockpos3))
|
|
{
|
|
this.setBlockAndNotifyAdequately(worldIn, blockpos3, this.woodMetadata);
|
|
|
|
@@ -130,4 +130,11 @@
|
|
this.growLeavesLayerStrict(worldIn, p_175930_2_.up(j), p_175930_3_ + 1 - j);
|
|
}
|
|
}
|
|
+
|
|
+ //Helper macro
|
|
+ private boolean isAirLeaves(World world, BlockPos pos)
|
|
+ {
|
|
+ IBlockState state = world.getBlockState(pos);
|
|
+ return state.getBlock().isAir(state, world, pos) || state.getBlock().isLeaves(state, world, pos);
|
|
+ }
|
|
}
|