Update to Minecraft 1.15.2

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2020-01-22 08:00:00 +11:00
parent 09a2fa4d96
commit 77b64e0c78
50 changed files with 293 additions and 421 deletions

View File

@@ -1,14 +1,14 @@
--- a/net/minecraft/server/WorldGenTreeProvider.java
+++ b/net/minecraft/server/WorldGenTreeProvider.java
@@ -2,6 +2,7 @@
@@ -3,6 +3,7 @@
import java.util.Iterator;
import java.util.Random;
import javax.annotation.Nullable;
+import org.bukkit.TreeType; // CraftBukkit
public abstract class WorldGenTreeProvider {
@@ -16,6 +17,7 @@
@@ -17,6 +18,7 @@
if (worldgenfeatureconfigured == null) {
return false;
} else {
@@ -16,14 +16,14 @@
generatoraccess.setTypeAndData(blockposition, Blocks.AIR.getBlockData(), 4);
((WorldGenFeatureSmallTreeConfigurationConfiguration) worldgenfeatureconfigured.c).a();
if (worldgenfeatureconfigured.a(generatoraccess, chunkgenerator, random, blockposition)) {
@@ -26,4 +28,46 @@
}
}
@@ -43,4 +45,46 @@
return true;
}
+
+ // CraftBukkit start
+ protected void setTreeType(WorldGenFeatureConfigured<?, ?> worldgentreeabstract) {
+ if (worldgentreeabstract.c == BiomeDecoratorGroups.NORMAL_TREE) {
+ if (worldgentreeabstract.c == BiomeDecoratorGroups.NORMAL_TREE || worldgentreeabstract.c == BiomeDecoratorGroups.NORMAL_TREE_BEES_005) {
+ BlockSapling.treeType = TreeType.TREE;
+ } else if (worldgentreeabstract.c == BiomeDecoratorGroups.HUGE_RED_MUSHROOM) {
+ BlockSapling.treeType = TreeType.RED_MUSHROOM;
@@ -39,13 +39,13 @@
+ BlockSapling.treeType = TreeType.REDWOOD;
+ } else if (worldgentreeabstract.c == BiomeDecoratorGroups.ACACIA_TREE) {
+ BlockSapling.treeType = TreeType.ACACIA;
+ } else if (worldgentreeabstract.c == BiomeDecoratorGroups.BIRCH_TREE) {
+ } else if (worldgentreeabstract.c == BiomeDecoratorGroups.BIRCH_TREE || worldgentreeabstract.c == BiomeDecoratorGroups.BIRCH_TREE_BEES_005) {
+ BlockSapling.treeType = TreeType.BIRCH;
+ } else if (worldgentreeabstract.c == BiomeDecoratorGroups.TALL_BIRCH_TREE) {
+ } else if (worldgentreeabstract.c == BiomeDecoratorGroups.TALL_BIRCH_TREE_BEES_0002) {
+ BlockSapling.treeType = TreeType.TALL_BIRCH;
+ } else if (worldgentreeabstract.c == BiomeDecoratorGroups.SWAMP_TREE) {
+ BlockSapling.treeType = TreeType.SWAMP;
+ } else if (worldgentreeabstract.c == BiomeDecoratorGroups.FANCY_TREE) {
+ } else if (worldgentreeabstract.c == BiomeDecoratorGroups.FANCY_TREE || worldgentreeabstract.c == BiomeDecoratorGroups.FANCY_TREE_BEES_005) {
+ BlockSapling.treeType = TreeType.BIG_TREE;
+ } else if (worldgentreeabstract.c == BiomeDecoratorGroups.JUNGLE_BUSH) {
+ BlockSapling.treeType = TreeType.JUNGLE_BUSH;