start 1.10.2

This commit is contained in:
marcin212 committed 2016-10-20 04:32:47 +02:00
1 parent f969f63b66
commit 6a7c4bf67d
826 files changed
+60550 -63758

No files matched your search

@@ -1,78 +1,75 @@
//
// Decompiled by Procyon v0.5.30
//
package binnie.extratrees.gen;
import java.util.Random;
import net.minecraft.world.World;
import forestry.api.world.ITreeGenData;
import forestry.api.arboriculture.ITree;
import forestry.api.world.ITreeGenData;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import net.minecraft.world.gen.feature.WorldGenerator;
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;
import java.util.Random;
public TreeGenBase() {
this.minHeight = 4;
this.maxHeight = 80;
this.spawnPods = false;
this.minPodHeight = 3;
}
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 final int randBetween(final int a, final int b) {
return a + this.rand.nextInt(b - a);
}
public TreeGenBase() {
this.minHeight = 4;
this.maxHeight = 80;
this.spawnPods = false;
this.minPodHeight = 3;
}
protected final float randBetween(final float a, final float b) {
return a + this.rand.nextFloat() * (b - a);
}
protected final int randBetween(final int a, final int b) {
return a + this.rand.nextInt(b - a);
}
@Override
public boolean generate(final World world, final Random random, final int x, final int y, final int z) {
this.world = world;
this.startX = x;
this.startY = y;
this.startZ = z;
this.girth = this.tree.getGirth(world, x, y, z);
this.height = (int) (this.randBetween(this.getHeight()[0], this.getHeight()[1]) * this.tree.getGenome().getHeight());
if (this.tree.canGrow(world, x, y, z, this.girth, this.height)) {
this.generate();
return true;
}
return false;
}
protected final float randBetween(final float a, final float b) {
return a + this.rand.nextFloat() * (b - a);
}
protected void generate() {
}
protected int[] getHeight() {
return new int[] { 5, 2 };
}
@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;
}
private static class Vector
{
int x;
int y;
int z;
protected void generate() {
}
public Vector(final int x, final int y, final int z) {
this.x = x;
this.y = y;
this.z = z;
}
}
protected int[] getHeight() {
return new int[]{5, 2};
}
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;
}
}
}