From e56aa4665695cfbed972f03430971ce2f8428c5f Mon Sep 17 00:00:00 2001 From: md_5 Date: Sun, 20 Mar 2016 19:02:48 +1100 Subject: [PATCH] SPIGOT-1988: Chorus Plant Generation --- src/main/java/org/bukkit/craftbukkit/CraftWorld.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java index 593fd63a4b..86ce61f349 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -404,6 +404,8 @@ public class CraftWorld implements World { } public boolean generateTree(Location loc, TreeType type) { + BlockPosition pos = new BlockPosition(loc.getBlockX(), loc.getBlockY(), loc.getBlockZ()); + net.minecraft.server.WorldGenerator gen; switch (type) { case BIG_TREE: @@ -459,13 +461,16 @@ public class CraftWorld implements World { case TALL_BIRCH: gen = new WorldGenForest(true, true); break; + case CHORUS_PLANT: + BlockChorusFlower.a(world, pos, rand, 8); + return true; case TREE: default: gen = new WorldGenTrees(true); break; } - return gen.generate(world, rand, new BlockPosition(loc.getBlockX(), loc.getBlockY(), loc.getBlockZ())); + return gen.generate(world, rand, pos); } public boolean generateTree(Location loc, TreeType type, BlockChangeDelegate delegate) {