more fixes

This commit is contained in:
Progwml6 committed 2014-01-09 04:08:38 -05:00
1 parent eba66e0182
commit fb04e8eb08
55 files changed
+1446 -1442

No files matched your search

@@ -3,13 +3,14 @@ package tconstruct.worldgen;
import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.init.Blocks;
import net.minecraft.world.World;
import net.minecraft.world.gen.feature.WorldGenerator;
public class PlantGen extends WorldGenerator
{
/** The ID of the plant block used in this plant generator. */
public final int plantID;
public final Block plant;
public final int metadata;
public int chances = 64;
int xSize = 8;
@@ -17,15 +18,15 @@ public class PlantGen extends WorldGenerator
int zSize = 8;
boolean clumped = true;
public PlantGen(int id, int meta)
public PlantGen(Block b, int meta)
{
this.plantID = id;
this.plant = b;
this.metadata = meta;
}
public PlantGen(int id, int meta, int count, int range, int height, int width, boolean clumped)
public PlantGen(Block b, int meta, int count, int range, int height, int width, boolean clumped)
{
this.plantID = id;
this.plant = b;
this.metadata = meta;
this.chances = count;
this.xSize = range;
@@ -42,9 +43,9 @@ public class PlantGen extends WorldGenerator
int posY = clumped ? y + random.nextInt(ySize) - random.nextInt(ySize) : y + random.nextInt(ySize);
int posZ = clumped ? z + random.nextInt(zSize) - random.nextInt(zSize) : z + random.nextInt(zSize);
if (world.isAirBlock(posX, posY, posZ) && (!world.provider.hasNoSky || posY < 127) && Block.blocksList[this.plantID].canBlockStay(world, posX, posY, posZ))
if (world.func_147439_a(posX, posY, posZ) == Blocks.air && (!world.provider.hasNoSky || posY < 127) && this.plant.func_149718_j(world, posX, posY, posZ))
{
world.setBlock(posX, posY, posZ, this.plantID, this.metadata, 2);
world.func_147465_d(posX, posY, posZ, this.plant, this.metadata, 2);
}
}