@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/level/block/BlockSapling.java
|
||||
+++ b/net/minecraft/world/level/block/BlockSapling.java
|
||||
@@ -15,12 +15,20 @@
|
||||
@@ -14,12 +14,20 @@
|
||||
import net.minecraft.world.phys.shapes.VoxelShape;
|
||||
import net.minecraft.world.phys.shapes.VoxelShapeCollision;
|
||||
|
||||
@@ -15,20 +15,20 @@
|
||||
|
||||
public static final BlockStateInteger STAGE = BlockProperties.STAGE;
|
||||
protected static final float AABB_OFFSET = 6.0F;
|
||||
protected static final VoxelShape SHAPE = Block.a(2.0D, 0.0D, 2.0D, 14.0D, 12.0D, 14.0D);
|
||||
protected static final VoxelShape SHAPE = Block.box(2.0D, 0.0D, 2.0D, 14.0D, 12.0D, 14.0D);
|
||||
private final WorldGenTreeProvider treeGrower;
|
||||
+ public static TreeType treeType; // CraftBukkit
|
||||
|
||||
protected BlockSapling(WorldGenTreeProvider worldgentreeprovider, BlockBase.Info blockbase_info) {
|
||||
super(blockbase_info);
|
||||
@@ -36,7 +44,30 @@
|
||||
@@ -35,7 +43,30 @@
|
||||
@Override
|
||||
public void tick(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, Random random) {
|
||||
if (worldserver.getLightLevel(blockposition.up()) >= 9 && random.nextInt(7) == 0) {
|
||||
public void randomTick(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, Random random) {
|
||||
if (worldserver.getMaxLocalRawBrightness(blockposition.above()) >= 9 && random.nextInt(7) == 0) {
|
||||
+ // CraftBukkit start
|
||||
+ worldserver.captureTreeGeneration = true;
|
||||
+ // CraftBukkit end
|
||||
this.grow(worldserver, blockposition, iblockdata, random);
|
||||
this.advanceTree(worldserver, blockposition, iblockdata, random);
|
||||
+ // CraftBukkit start
|
||||
+ worldserver.captureTreeGeneration = false;
|
||||
+ if (worldserver.capturedBlockStates.size() > 0) {
|
||||
|
||||
Reference in New Issue
Block a user