mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-25 22:34:33 +00:00
Fix #761 Make tree vines generate correctly
This commit is contained in:
1 parent
e223537485
commit
9251e17b9a
1 file changed
+10
-6
@@ -24,7 +24,11 @@ import forestry.core.worldgen.WorldGenBase;
|
||||
|
||||
public abstract class WorldGenArboriculture extends WorldGenBase {
|
||||
|
||||
private static final BlockType vine = new BlockType(Blocks.vine, 0);
|
||||
private static final BlockType vineNorth = new BlockType(Blocks.vine, 1);
|
||||
private static final BlockType vineSouth = new BlockType(Blocks.vine, 4);
|
||||
private static final BlockType vineWest = new BlockType(Blocks.vine, 8);
|
||||
private static final BlockType vineEast = new BlockType(Blocks.vine, 2);
|
||||
|
||||
private static final BlockType air = new BlockTypeVoid();
|
||||
|
||||
protected final ITreeGenData tree;
|
||||
@@ -184,7 +188,7 @@ public abstract class WorldGenArboriculture extends WorldGenBase {
|
||||
addBlock(x, y, z, leaf, replace);
|
||||
}
|
||||
|
||||
protected final void addVine(int x, int y, int z) {
|
||||
protected final void addVine(int x, int y, int z, BlockType vine) {
|
||||
addBlock(x, y, z, vine, EnumReplaceMode.NONE);
|
||||
}
|
||||
|
||||
@@ -194,16 +198,16 @@ public abstract class WorldGenArboriculture extends WorldGenBase {
|
||||
}
|
||||
|
||||
if (rand.nextFloat() < chance) {
|
||||
addVine(x - 1, y, z);
|
||||
addVine(x - 1, y, z, vineWest);
|
||||
}
|
||||
if (rand.nextFloat() < chance) {
|
||||
addVine(x + 1, y, z);
|
||||
addVine(x + 1, y, z, vineEast);
|
||||
}
|
||||
if (rand.nextFloat() < chance) {
|
||||
addVine(x, y, z - 1);
|
||||
addVine(x, y, z - 1, vineNorth);
|
||||
}
|
||||
if (rand.nextFloat() < chance) {
|
||||
addVine(x, y, z + 1);
|
||||
addVine(x, y, z + 1, vineSouth);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user