mirror of
https://github.com/GTNewHorizons/Binnie.git
synced 2026-11-26 15:03:14 +00:00
Auto-format spaces to tabs (#2)
This commit is contained in:
1 parent
25be7fd254
commit
5bb4b5d9a5
756 files changed
+49198
-48489
No files matched your search
@@ -9,67 +9,67 @@ import net.minecraft.world.gen.feature.WorldGenerator;
|
||||
import java.util.Random;
|
||||
|
||||
public class TreeGenBase extends WorldGenerator {
|
||||
protected ITree tree;
|
||||
protected ITreeGenData treeGen;
|
||||
protected World world;
|
||||
protected Random rand;
|
||||
protected int startX;
|
||||
protected int startY;
|
||||
protected int startZ;
|
||||
protected int girth;
|
||||
protected int height;
|
||||
protected int minHeight;
|
||||
protected int maxHeight;
|
||||
protected boolean spawnPods;
|
||||
protected int minPodHeight;
|
||||
protected ITree tree;
|
||||
protected ITreeGenData treeGen;
|
||||
protected World world;
|
||||
protected Random rand;
|
||||
protected int startX;
|
||||
protected int startY;
|
||||
protected int startZ;
|
||||
protected int girth;
|
||||
protected int height;
|
||||
protected int minHeight;
|
||||
protected int maxHeight;
|
||||
protected boolean spawnPods;
|
||||
protected int minPodHeight;
|
||||
|
||||
public TreeGenBase() {
|
||||
this.minHeight = 4;
|
||||
this.maxHeight = 80;
|
||||
this.spawnPods = false;
|
||||
this.minPodHeight = 3;
|
||||
}
|
||||
public TreeGenBase() {
|
||||
this.minHeight = 4;
|
||||
this.maxHeight = 80;
|
||||
this.spawnPods = false;
|
||||
this.minPodHeight = 3;
|
||||
}
|
||||
|
||||
protected final int randBetween(final int a, final int b) {
|
||||
return a + this.rand.nextInt(b - a);
|
||||
}
|
||||
protected final int randBetween(final int a, final int b) {
|
||||
return a + this.rand.nextInt(b - a);
|
||||
}
|
||||
|
||||
protected final float randBetween(final float a, final float b) {
|
||||
return a + this.rand.nextFloat() * (b - a);
|
||||
}
|
||||
protected final float randBetween(final float a, final float b) {
|
||||
return a + this.rand.nextFloat() * (b - a);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean generate(World worldIn, Random rand, BlockPos position) {
|
||||
this.world = worldIn;
|
||||
this.startX = position.getX();
|
||||
this.startY = position.getY();
|
||||
this.startZ = position.getZ();
|
||||
this.girth = this.tree.getGirth();
|
||||
this.height = (int) (this.randBetween(this.getHeight()[0], this.getHeight()[1]) * this.tree.getGenome().getHeight());
|
||||
if (this.tree.canGrow(world, position, this.girth, this.height) != null) {
|
||||
this.generate();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public boolean generate(World worldIn, Random rand, BlockPos position) {
|
||||
this.world = worldIn;
|
||||
this.startX = position.getX();
|
||||
this.startY = position.getY();
|
||||
this.startZ = position.getZ();
|
||||
this.girth = this.tree.getGirth();
|
||||
this.height = (int) (this.randBetween(this.getHeight()[0], this.getHeight()[1]) * this.tree.getGenome().getHeight());
|
||||
if (this.tree.canGrow(world, position, this.girth, this.height) != null) {
|
||||
this.generate();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
protected void generate() {
|
||||
}
|
||||
protected void generate() {
|
||||
}
|
||||
|
||||
protected int[] getHeight() {
|
||||
return new int[]{5, 2};
|
||||
}
|
||||
protected int[] getHeight() {
|
||||
return new int[]{5, 2};
|
||||
}
|
||||
|
||||
private static class Vector {
|
||||
int x;
|
||||
int y;
|
||||
int z;
|
||||
private static class Vector {
|
||||
int x;
|
||||
int y;
|
||||
int z;
|
||||
|
||||
public Vector(final int x, final int y, final int z) {
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.z = z;
|
||||
}
|
||||
}
|
||||
public Vector(final int x, final int y, final int z) {
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.z = z;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user