mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-07 07:32:03 -07:00
Update to Minecraft 1.9
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/server/BlockSapling.java
|
||||
+++ b/net/minecraft/server/BlockSapling.java
|
||||
@@ -2,10 +2,20 @@
|
||||
@@ -2,11 +2,21 @@
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
@@ -17,11 +17,12 @@
|
||||
|
||||
public static final BlockStateEnum<BlockWood.EnumLogVariant> TYPE = BlockStateEnum.of("type", BlockWood.EnumLogVariant.class);
|
||||
public static final BlockStateInteger STAGE = BlockStateInteger.of("stage", 0, 1);
|
||||
protected static final AxisAlignedBB d = new AxisAlignedBB(0.09999999403953552D, 0.0D, 0.09999999403953552D, 0.8999999761581421D, 0.800000011920929D, 0.8999999761581421D);
|
||||
+ public static TreeType treeType; // CraftBukkit
|
||||
|
||||
protected BlockSapling() {
|
||||
this.j(this.blockStateList.getBlockData().set(BlockSapling.TYPE, BlockWood.EnumLogVariant.OAK).set(BlockSapling.STAGE, Integer.valueOf(0)));
|
||||
@@ -23,7 +33,30 @@
|
||||
this.w(this.blockStateList.getBlockData().set(BlockSapling.TYPE, BlockWood.EnumLogVariant.OAK).set(BlockSapling.STAGE, Integer.valueOf(0)));
|
||||
@@ -25,7 +35,30 @@
|
||||
if (!world.isClientSide) {
|
||||
super.b(world, blockposition, iblockdata, random);
|
||||
if (world.getLightLevel(blockposition.up()) >= 9 && random.nextInt(7) == 0) {
|
||||
@@ -52,10 +53,10 @@
|
||||
}
|
||||
|
||||
}
|
||||
@@ -39,7 +72,17 @@
|
||||
@@ -41,7 +74,17 @@
|
||||
}
|
||||
|
||||
public void e(World world, BlockPosition blockposition, IBlockData iblockdata, Random random) {
|
||||
public void d(World world, BlockPosition blockposition, IBlockData iblockdata, Random random) {
|
||||
- Object object = random.nextInt(10) == 0 ? new WorldGenBigTree(true) : new WorldGenTrees(true);
|
||||
+ // CraftBukkit start - Turn ternary operator into if statement to set treeType
|
||||
+ // Object object = random.nextInt(10) == 0 ? new WorldGenBigTree(true) : new WorldGenTrees(true);
|
||||
@@ -71,7 +72,7 @@
|
||||
int i = 0;
|
||||
int j = 0;
|
||||
boolean flag = false;
|
||||
@@ -51,6 +94,7 @@
|
||||
@@ -53,6 +96,7 @@
|
||||
for (i = 0; i >= -1; --i) {
|
||||
for (j = 0; j >= -1; --j) {
|
||||
if (this.a(world, blockposition, i, j, BlockWood.EnumLogVariant.SPRUCE)) {
|
||||
@@ -79,7 +80,7 @@
|
||||
object = new WorldGenMegaTree(false, random.nextBoolean());
|
||||
flag = true;
|
||||
break label66;
|
||||
@@ -61,11 +105,13 @@
|
||||
@@ -63,11 +107,13 @@
|
||||
if (!flag) {
|
||||
j = 0;
|
||||
i = 0;
|
||||
@@ -93,7 +94,7 @@
|
||||
object = new WorldGenForest(true, false);
|
||||
break;
|
||||
|
||||
@@ -77,6 +123,7 @@
|
||||
@@ -79,6 +125,7 @@
|
||||
for (i = 0; i >= -1; --i) {
|
||||
for (j = 0; j >= -1; --j) {
|
||||
if (this.a(world, blockposition, i, j, BlockWood.EnumLogVariant.JUNGLE)) {
|
||||
@@ -101,7 +102,7 @@
|
||||
object = new WorldGenJungleTree(true, 10, 20, iblockdata1, iblockdata2);
|
||||
flag = true;
|
||||
break label78;
|
||||
@@ -87,11 +134,13 @@
|
||||
@@ -89,11 +136,13 @@
|
||||
if (!flag) {
|
||||
j = 0;
|
||||
i = 0;
|
||||
@@ -115,7 +116,7 @@
|
||||
object = new WorldGenAcaciaTree(true);
|
||||
break;
|
||||
|
||||
@@ -100,6 +149,7 @@
|
||||
@@ -102,6 +151,7 @@
|
||||
for (i = 0; i >= -1; --i) {
|
||||
for (j = 0; j >= -1; --j) {
|
||||
if (this.a(world, blockposition, i, j, BlockWood.EnumLogVariant.DARK_OAK)) {
|
||||
|
Reference in New Issue
Block a user