Fixed spawning in the promised land.

Switched back top of the high grass to its metadata.
This commit is contained in:
Amnet 2013-05-08 15:39:07 +02:00
parent b71d1b2df1
commit d87db66d6a
11 changed files with 25 additions and 22 deletions

View file

@ -63,7 +63,7 @@ public class BlockReferences {
cattail (Blocks.plants, 7), cattail (Blocks.plants, 7),
reed (Blocks.plants, 8), reed (Blocks.plants, 8),
poisonIvyItem (Blocks.foliage, 6), poisonIvyItem (Blocks.foliage, 7),
sproutItem (Blocks.foliage, 5), sproutItem (Blocks.foliage, 5),
bushItem (Blocks.foliage, 4), bushItem (Blocks.foliage, 4),
highGrassItem (Blocks.foliage, 3), highGrassItem (Blocks.foliage, 3),

View file

@ -380,7 +380,7 @@ public class BiomeDecoratorBOP extends BiomeDecorator
this.duneGrassGen = new WorldGenBOPFlowers(Blocks.plants.get().blockID, 3); this.duneGrassGen = new WorldGenBOPFlowers(Blocks.plants.get().blockID, 3);
this.holyTallGrassGen = new WorldGenBOPFlowers(Blocks.plants.get().blockID, 4); this.holyTallGrassGen = new WorldGenBOPFlowers(Blocks.plants.get().blockID, 4);
this.desertSproutsGen = new WorldGenBOPFlowers(Blocks.plants.get().blockID, 2); this.desertSproutsGen = new WorldGenBOPFlowers(Blocks.plants.get().blockID, 2);
this.poisonIvyGen = new WorldGenBush(Blocks.foliage.get().blockID, 6); this.poisonIvyGen = new WorldGenBush(Blocks.foliage.get().blockID, 7);
this.promisedWillowGen = new WorldGenPromisedWillow(); this.promisedWillowGen = new WorldGenPromisedWillow();
this.quicksandGen = new WorldGenQuicksand(); this.quicksandGen = new WorldGenQuicksand();
this.quicksand2Gen = new WorldGenQuicksand2(); this.quicksand2Gen = new WorldGenQuicksand2();

View file

@ -31,11 +31,11 @@ import cpw.mods.fml.relauncher.SideOnly;
public class BlockBOPFoliage extends BlockFlower implements IShearable public class BlockBOPFoliage extends BlockFlower implements IShearable
{ {
private static final String[] foliageTypes = new String[] {"algae", "shortgrass", "mediumgrass", "highgrassbottom", "bush", "sprout", "poisonivy", "highgrasstop"}; private static final String[] foliageTypes = new String[] {"algae", "shortgrass", "mediumgrass", "highgrassbottom", "bush", "sprout", "highgrasstop", "poisonivy"};
private Icon[] textures; private Icon[] textures;
private static final int GRASSTOP = 7; private static final int GRASSTOP = 6;
private static final int ALGAE = 0; private static final int ALGAE = 0;
private static final int GRASSBOTTOM = 3; private static final int GRASSBOTTOM = 3;
@ -72,8 +72,9 @@ public class BlockBOPFoliage extends BlockFlower implements IShearable
@SuppressWarnings({ "rawtypes", "unchecked" }) @SuppressWarnings({ "rawtypes", "unchecked" })
public void getSubBlocks(int blockID, CreativeTabs par2CreativeTabs, List list) public void getSubBlocks(int blockID, CreativeTabs par2CreativeTabs, List list)
{ {
for (int i = 0; i < GRASSTOP; ++i) for (int i = 0; i < foliageTypes.length; ++i)
list.add(new ItemStack(blockID, 1, i)); if (i != GRASSTOP)
list.add(new ItemStack(blockID, 1, i));
} }
@Override @Override
@ -256,7 +257,7 @@ public class BlockBOPFoliage extends BlockFlower implements IShearable
{ {
ArrayList<ItemStack> ret = new ArrayList<ItemStack>(); ArrayList<ItemStack> ret = new ArrayList<ItemStack>();
if (world.getBlockMetadata(x, y, z) != 7) if (world.getBlockMetadata(x, y, z) != GRASSTOP)
ret.add(new ItemStack(this, 1, world.getBlockMetadata(x, y, z))); ret.add(new ItemStack(this, 1, world.getBlockMetadata(x, y, z)));
else else
ret.add(new ItemStack(Block.tallGrass, 1, 1)); ret.add(new ItemStack(Block.tallGrass, 1, 1));

View file

@ -1,5 +1,6 @@
package biomesoplenty.blocks; package biomesoplenty.blocks;
import biomesoplenty.BiomesOPlenty;
import biomesoplenty.configuration.BOPConfiguration; import biomesoplenty.configuration.BOPConfiguration;
import biomesoplenty.helpers.TeleporterPromised; import biomesoplenty.helpers.TeleporterPromised;

View file

@ -13,7 +13,7 @@ import cpw.mods.fml.client.registry.RenderingRegistry;
public class FoliageRenderer implements ISimpleBlockRenderingHandler public class FoliageRenderer implements ISimpleBlockRenderingHandler
{ {
public static int render = RenderingRegistry.getNextAvailableRenderId(); public static int render = RenderingRegistry.getNextAvailableRenderId();
private final int GRASSTOP = 7; private final int GRASSTOP = 6;
@Override @Override
public void renderInventoryBlock(Block block, int metadata, int modelID, RenderBlocks renderer) public void renderInventoryBlock(Block block, int metadata, int modelID, RenderBlocks renderer)

View file

@ -257,7 +257,7 @@ public class BOPBlocks {
LanguageRegistry.addName(new ItemStack(Blocks.leaves1.get(),1,4), "Dying Leaves"); LanguageRegistry.addName(new ItemStack(Blocks.leaves1.get(),1,4), "Dying Leaves");
LanguageRegistry.addName(new ItemStack(Blocks.foliage.get(),1,1), "Short Grass"); LanguageRegistry.addName(new ItemStack(Blocks.foliage.get(),1,1), "Short Grass");
LanguageRegistry.addName(Blocks.leavesFruit.get(), "Apple Leaves"); LanguageRegistry.addName(Blocks.leavesFruit.get(), "Apple Leaves");
LanguageRegistry.addName(new ItemStack(Blocks.foliage.get(),1,6), "Poison Ivy"); LanguageRegistry.addName(new ItemStack(Blocks.foliage.get(),1,7), "Poison Ivy");
LanguageRegistry.addName(new ItemStack(Blocks.foliage.get(),1,5), "Sprout"); LanguageRegistry.addName(new ItemStack(Blocks.foliage.get(),1,5), "Sprout");
LanguageRegistry.addName(new ItemStack(Blocks.foliage.get(),1,4), "Bush"); LanguageRegistry.addName(new ItemStack(Blocks.foliage.get(),1,4), "Bush");
LanguageRegistry.addName(Blocks.bamboo.get(), "Bamboo"); LanguageRegistry.addName(Blocks.bamboo.get(), "Bamboo");

View file

@ -157,7 +157,7 @@ public class BOPCrafting
//Plants //Plants
GameRegistry.addShapelessRecipe(new ItemStack(Items.shroomPowder.get(), 2), new Object[] {new ItemStack(Blocks.flowers.get(),1,10)}); GameRegistry.addShapelessRecipe(new ItemStack(Items.shroomPowder.get(), 2), new Object[] {new ItemStack(Blocks.flowers.get(),1,10)});
GameRegistry.addShapelessRecipe(new ItemStack(Items.miscItems.get(), 2, 3), new Object[] {new ItemStack(Blocks.foliage.get(),1,6)}); GameRegistry.addShapelessRecipe(new ItemStack(Items.miscItems.get(), 2, 3), new Object[] {new ItemStack(Blocks.foliage.get(),1,7)});
} }
private static void addSmeltingRecipes() private static void addSmeltingRecipes()

View file

@ -348,7 +348,7 @@ public class TeleporterPromised extends Teleporter
par1Entity.motionX = par1Entity.motionY = par1Entity.motionZ = 0.0D; par1Entity.motionX = par1Entity.motionY = par1Entity.motionZ = 0.0D;
} }
par1Entity.setLocationAndAngles(var49 + 3, var25, var27 + 3, par1Entity.rotationYaw, par1Entity.rotationPitch); par1Entity.setLocationAndAngles(var49 + 1, var25, var27 + 1, par1Entity.rotationYaw, par1Entity.rotationPitch);
return true; return true;
} }
else else

View file

@ -17,9 +17,10 @@ import cpw.mods.fml.relauncher.SideOnly;
public class ItemBOPFoliage extends ItemColored public class ItemBOPFoliage extends ItemColored
{ {
private static final String[] foliageTypes = new String[] {"algae", "shortgrass", "mediumgrass", "highgrassbottom", "bush", "sprout", "poisonivy", "highgrasstop"}; private static final String[] foliageTypes = new String[] {"algae", "shortgrass", "mediumgrass", "highgrassbottom", "bush", "sprout", "highgrasstop", "poisonivy"};
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
private Icon[] textures; private Icon[] textures;
private static final int GRASSTOP = 6;
public ItemBOPFoliage(int par1) public ItemBOPFoliage(int par1)
{ {
@ -31,9 +32,9 @@ public class ItemBOPFoliage extends ItemColored
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public void registerIcons(IconRegister iconRegister) public void registerIcons(IconRegister iconRegister)
{ {
textures = new Icon[foliageTypes.length - 1]; textures = new Icon[foliageTypes.length];
for (int i = 0; i < foliageTypes.length - 1; ++i) for (int i = 0; i < foliageTypes.length; ++i)
textures[i] = iconRegister.registerIcon("BiomesOPlenty:" + foliageTypes[i]); textures[i] = iconRegister.registerIcon("BiomesOPlenty:" + foliageTypes[i]);
textures[3] = iconRegister.registerIcon("BiomesOPlenty:item_highgrass"); textures[3] = iconRegister.registerIcon("BiomesOPlenty:item_highgrass");
@ -63,7 +64,7 @@ public class ItemBOPFoliage extends ItemColored
@Override @Override
public Icon getIconFromDamage(int meta) public Icon getIconFromDamage(int meta)
{ {
if (meta == 7) if (meta == GRASSTOP)
meta = 3; meta = 3;
return textures[meta]; return textures[meta];
} }
@ -154,7 +155,7 @@ public class ItemBOPFoliage extends ItemColored
if (world.setBlock(x, y, z, this.getBlockID(), itemStack.getItemDamage(), 3)) if (world.setBlock(x, y, z, this.getBlockID(), itemStack.getItemDamage(), 3))
{ {
if (itemStack.getItemDamage() == 3 && world.getBlockMaterial(x, y + 1, z).isReplaceable()) if (itemStack.getItemDamage() == 3 && world.getBlockMaterial(x, y + 1, z).isReplaceable())
world.setBlock(x, y + 1, z, this.getBlockID(), 7, 2); world.setBlock(x, y + 1, z, this.getBlockID(), GRASSTOP, 2);
if (world.getBlockId(x, y, z) == this.getBlockID()) if (world.getBlockId(x, y, z) == this.getBlockID())
{ {

View file

@ -39,7 +39,7 @@ public class WorldGenHighGrass extends WorldGenerator
if (par1World.isAirBlock(var8, var9, var10) && Block.blocksList[this.tallGrassID].canBlockStay(par1World, var8, var9, var10)) if (par1World.isAirBlock(var8, var9, var10) && Block.blocksList[this.tallGrassID].canBlockStay(par1World, var8, var9, var10))
{ {
par1World.setBlock(var8, var9, var10, Blocks.foliage.get().blockID, 3, 2); par1World.setBlock(var8, var9, var10, Blocks.foliage.get().blockID, 3, 2);
par1World.setBlock(var8, var9 + 1, var10, Blocks.foliage.get().blockID, 7, 2); par1World.setBlock(var8, var9 + 1, var10, Blocks.foliage.get().blockID, 6, 2);
} }
} }

View file

@ -114,15 +114,15 @@ public class WorldGenMarsh extends WorldGenerator
if (par2Random.nextInt(3) == 0) if (par2Random.nextInt(3) == 0)
{ {
par1World.setBlock(par3, par4 + 1, par5, Blocks.foliage.get().blockID, 3, 2); par1World.setBlock(par3, par4 + 1, par5, Blocks.foliage.get().blockID, 3, 2);
par1World.setBlock(par3, par4 + 2, par5, Blocks.foliage.get().blockID, 7, 2); par1World.setBlock(par3, par4 + 2, par5, Blocks.foliage.get().blockID, 6, 2);
par1World.setBlock(par3 - 1, par4 + 1, par5, Blocks.foliage.get().blockID, 3, 2); par1World.setBlock(par3 - 1, par4 + 1, par5, Blocks.foliage.get().blockID, 3, 2);
par1World.setBlock(par3 - 1, par4 + 2, par5, Blocks.foliage.get().blockID, 7, 2); par1World.setBlock(par3 - 1, par4 + 2, par5, Blocks.foliage.get().blockID, 6, 2);
par1World.setBlock(par3 + 1, par4 + 1, par5, Blocks.foliage.get().blockID, 3, 2); par1World.setBlock(par3 + 1, par4 + 1, par5, Blocks.foliage.get().blockID, 3, 2);
par1World.setBlock(par3 + 1, par4 + 2, par5, Blocks.foliage.get().blockID, 7, 2); par1World.setBlock(par3 + 1, par4 + 2, par5, Blocks.foliage.get().blockID, 6, 2);
par1World.setBlock(par3, par4 + 1, par5 - 1, Blocks.foliage.get().blockID, 3, 2); par1World.setBlock(par3, par4 + 1, par5 - 1, Blocks.foliage.get().blockID, 3, 2);
par1World.setBlock(par3, par4 + 2, par5 - 1, Blocks.foliage.get().blockID, 7, 2); par1World.setBlock(par3, par4 + 2, par5 - 1, Blocks.foliage.get().blockID, 6, 2);
par1World.setBlock(par3, par4 + 1, par5 + 1, Blocks.foliage.get().blockID, 3, 2); par1World.setBlock(par3, par4 + 1, par5 + 1, Blocks.foliage.get().blockID, 3, 2);
par1World.setBlock(par3, par4 + 2, par5 + 1, Blocks.foliage.get().blockID, 7, 2); par1World.setBlock(par3, par4 + 2, par5 + 1, Blocks.foliage.get().blockID, 6, 2);
} }
else else
{ {