mirror of
https://github.com/PaperMC/Paper.git
synced 2025-03-19 05:31:32 +01:00
SPIGOT-1988: Chorus Plant Generation
By: md_5 <git@md-5.net>
This commit is contained in:
parent
6d1fcb4866
commit
0d7ce64a2f
1 changed files with 6 additions and 1 deletions
|
@ -404,6 +404,8 @@ public class CraftWorld implements World {
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean generateTree(Location loc, TreeType type) {
|
public boolean generateTree(Location loc, TreeType type) {
|
||||||
|
BlockPosition pos = new BlockPosition(loc.getBlockX(), loc.getBlockY(), loc.getBlockZ());
|
||||||
|
|
||||||
net.minecraft.server.WorldGenerator gen;
|
net.minecraft.server.WorldGenerator gen;
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case BIG_TREE:
|
case BIG_TREE:
|
||||||
|
@ -459,13 +461,16 @@ public class CraftWorld implements World {
|
||||||
case TALL_BIRCH:
|
case TALL_BIRCH:
|
||||||
gen = new WorldGenForest(true, true);
|
gen = new WorldGenForest(true, true);
|
||||||
break;
|
break;
|
||||||
|
case CHORUS_PLANT:
|
||||||
|
BlockChorusFlower.a(world, pos, rand, 8);
|
||||||
|
return true;
|
||||||
case TREE:
|
case TREE:
|
||||||
default:
|
default:
|
||||||
gen = new WorldGenTrees(true);
|
gen = new WorldGenTrees(true);
|
||||||
break;
|
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) {
|
public boolean generateTree(Location loc, TreeType type, BlockChangeDelegate delegate) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue