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),
reed (Blocks.plants, 8),
poisonIvyItem (Blocks.foliage, 6),
poisonIvyItem (Blocks.foliage, 7),
sproutItem (Blocks.foliage, 5),
bushItem (Blocks.foliage, 4),
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.holyTallGrassGen = new WorldGenBOPFlowers(Blocks.plants.get().blockID, 4);
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.quicksandGen = new WorldGenQuicksand();
this.quicksand2Gen = new WorldGenQuicksand2();

View file

@ -31,11 +31,11 @@ import cpw.mods.fml.relauncher.SideOnly;
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 static final int GRASSTOP = 7;
private static final int GRASSTOP = 6;
private static final int ALGAE = 0;
private static final int GRASSBOTTOM = 3;
@ -72,8 +72,9 @@ public class BlockBOPFoliage extends BlockFlower implements IShearable
@SuppressWarnings({ "rawtypes", "unchecked" })
public void getSubBlocks(int blockID, CreativeTabs par2CreativeTabs, List list)
{
for (int i = 0; i < GRASSTOP; ++i)
list.add(new ItemStack(blockID, 1, i));
for (int i = 0; i < foliageTypes.length; ++i)
if (i != GRASSTOP)
list.add(new ItemStack(blockID, 1, i));
}
@Override
@ -256,7 +257,7 @@ public class BlockBOPFoliage extends BlockFlower implements IShearable
{
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)));
else
ret.add(new ItemStack(Block.tallGrass, 1, 1));

View file

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

View file

@ -13,7 +13,7 @@ import cpw.mods.fml.client.registry.RenderingRegistry;
public class FoliageRenderer implements ISimpleBlockRenderingHandler
{
public static int render = RenderingRegistry.getNextAvailableRenderId();
private final int GRASSTOP = 7;
private final int GRASSTOP = 6;
@Override
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.foliage.get(),1,1), "Short Grass");
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,4), "Bush");
LanguageRegistry.addName(Blocks.bamboo.get(), "Bamboo");

View file

@ -157,7 +157,7 @@ public class BOPCrafting
//Plants
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()

View file

@ -348,7 +348,7 @@ public class TeleporterPromised extends Teleporter
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;
}
else

View file

@ -17,9 +17,10 @@ import cpw.mods.fml.relauncher.SideOnly;
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)
private Icon[] textures;
private static final int GRASSTOP = 6;
public ItemBOPFoliage(int par1)
{
@ -31,9 +32,9 @@ public class ItemBOPFoliage extends ItemColored
@SideOnly(Side.CLIENT)
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[3] = iconRegister.registerIcon("BiomesOPlenty:item_highgrass");
@ -63,7 +64,7 @@ public class ItemBOPFoliage extends ItemColored
@Override
public Icon getIconFromDamage(int meta)
{
if (meta == 7)
if (meta == GRASSTOP)
meta = 3;
return textures[meta];
}
@ -154,7 +155,7 @@ public class ItemBOPFoliage extends ItemColored
if (world.setBlock(x, y, z, this.getBlockID(), itemStack.getItemDamage(), 3))
{
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())
{

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))
{
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)
{
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 + 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 + 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 + 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 + 2, par5 + 1, Blocks.foliage.get().blockID, 7, 2);
par1World.setBlock(par3, par4 + 2, par5 + 1, Blocks.foliage.get().blockID, 6, 2);
}
else
{