Rough update to Forge 656, only thing that needs work is crashes due to block textures

This commit is contained in:
Adubbz 2013-04-17 09:34:18 +10:00
parent b4200c9a4d
commit 5d568b5a83
53 changed files with 702 additions and 700 deletions

View file

@ -28,12 +28,12 @@ public class ArmorAmethyst extends ItemArmor implements IArmorTextureProvider
return null;
}
public void updateIcons(IconRegister iconRegister)
public void registerIcons(IconRegister iconRegister)
{
if(textureID==0){ iconIndex = iconRegister.registerIcon("BiomesOPlenty:amethysthelmet"); }
else if(textureID==1){ iconIndex = iconRegister.registerIcon("BiomesOPlenty:amethystchestplate"); }
else if(textureID==2){ iconIndex = iconRegister.registerIcon("BiomesOPlenty:amethystleggings"); }
else if(textureID==3){ iconIndex = iconRegister.registerIcon("BiomesOPlenty:amethystboots"); }
else { iconIndex = iconRegister.registerIcon("BiomesOPlenty:mudball"); }
if(textureID==0){ itemIcon = iconRegister.registerIcon("BiomesOPlenty:amethysthelmet"); }
else if(textureID==1){ itemIcon = iconRegister.registerIcon("BiomesOPlenty:amethystchestplate"); }
else if(textureID==2){ itemIcon = iconRegister.registerIcon("BiomesOPlenty:amethystleggings"); }
else if(textureID==3){ itemIcon = iconRegister.registerIcon("BiomesOPlenty:amethystboots"); }
else { itemIcon = iconRegister.registerIcon("BiomesOPlenty:mudball"); }
}
}

View file

@ -28,12 +28,12 @@ public class ArmorMuddy extends ItemArmor implements IArmorTextureProvider
return null;
}
public void updateIcons(IconRegister iconRegister)
public void registerIcons(IconRegister iconRegister)
{
if(textureID==0){ iconIndex = iconRegister.registerIcon("BiomesOPlenty:mudhelmet"); }
else if(textureID==1){ iconIndex = iconRegister.registerIcon("BiomesOPlenty:mudchestplate"); }
else if(textureID==2){ iconIndex = iconRegister.registerIcon("BiomesOPlenty:mudleggings"); }
else if(textureID==3){ iconIndex = iconRegister.registerIcon("BiomesOPlenty:mudboots"); }
else { iconIndex = iconRegister.registerIcon("BiomesOPlenty:mudball"); }
if(textureID==0){ itemIcon = iconRegister.registerIcon("BiomesOPlenty:mudhelmet"); }
else if(textureID==1){ itemIcon = iconRegister.registerIcon("BiomesOPlenty:mudchestplate"); }
else if(textureID==2){ itemIcon = iconRegister.registerIcon("BiomesOPlenty:mudleggings"); }
else if(textureID==3){ itemIcon = iconRegister.registerIcon("BiomesOPlenty:mudboots"); }
else { itemIcon = iconRegister.registerIcon("BiomesOPlenty:mudball"); }
}
}

View file

@ -48,8 +48,9 @@ public class BlockAcaciaLeaves extends BlockLeavesBase implements IShearable
this.blockIcon[1] = par1IconRegister.registerIcon("BiomesOPlenty:acacialeaves2");
}
@Override
@SideOnly(Side.CLIENT)
public Icon getBlockTextureFromSideAndMetadata(int par1, int par2)
public Icon getIcon(int par1, int par2)
{
return blockIcon[(!isOpaqueCube() ? 0 : 1)];
}

View file

@ -91,7 +91,7 @@ public class BlockBOPColorizedLeaves extends BlockLeavesBase implements IShearab
@Override
@SideOnly(Side.CLIENT)
public Icon getBlockTextureFromSideAndMetadata(int side, int meta)
public Icon getIcon(int side, int meta)
{
if (meta < 0 || meta >= textures[0].length)
meta = 0;

View file

@ -1,139 +1,139 @@
package biomesoplenty.blocks;
import java.util.List;
import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.block.BlockSapling;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.ItemStack;
import net.minecraft.util.Icon;
import net.minecraft.world.World;
import net.minecraft.world.gen.feature.WorldGenerator;
import biomesoplenty.mod_BiomesOPlenty;
import biomesoplenty.worldgen.WorldGenAcacia;
import biomesoplenty.worldgen.WorldGenAutumn;
import biomesoplenty.worldgen.WorldGenAutumn2;
import biomesoplenty.worldgen.WorldGenBambooTree;
import biomesoplenty.worldgen.WorldGenBambooTree2;
import biomesoplenty.worldgen.WorldGenCherry1;
import biomesoplenty.worldgen.WorldGenCherry2;
import biomesoplenty.worldgen.WorldGenDeadTree2;
import biomesoplenty.worldgen.WorldGenMangrove;
import biomesoplenty.worldgen.WorldGenMaple;
import biomesoplenty.worldgen.WorldGenMystic2;
import biomesoplenty.worldgen.WorldGenOminous1;
import biomesoplenty.worldgen.WorldGenOminous2;
import biomesoplenty.worldgen.WorldGenOriginTree;
import biomesoplenty.worldgen.WorldGenPalmTree1;
import biomesoplenty.worldgen.WorldGenPalmTree3;
import biomesoplenty.worldgen.WorldGenPromisedTree;
import biomesoplenty.worldgen.WorldGenRedwoodTree2;
import biomesoplenty.worldgen.WorldGenTaiga9;
import biomesoplenty.worldgen.WorldGenWillow;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class BlockBOPColorizedSapling extends BlockSapling
{
private static final String[] saplings = new String[] {"acacia", "mangrove", "palm", "redwood", "willow"};
@SideOnly(Side.CLIENT)
private Icon[] textures;
private static final int TYPES = 15;
public BlockBOPColorizedSapling(int par1)
{
super(par1);
setHardness(0.0F);
setStepSound(Block.soundGrassFootstep);
this.setCreativeTab(mod_BiomesOPlenty.tabBiomesOPlenty);
}
@Override
@SideOnly(Side.CLIENT)
public void registerIcons(IconRegister iconRegister)
{
textures = new Icon[saplings.length];
for (int i = 0; i < saplings.length; ++i)
textures[i] = iconRegister.registerIcon("BiomesOPlenty:" + saplings[i] + "sapling");
}
@Override
@SideOnly(Side.CLIENT)
public Icon getBlockTextureFromSideAndMetadata(int side, int meta)
{
if (meta < 0 || meta >= saplings.length)
meta = 0;
return textures[meta];
}
@Override
@SideOnly(Side.CLIENT)
public void getSubBlocks(int blockID, CreativeTabs creativeTabs, List list) {
for (int i = 0; i < saplings.length; ++i)
list.add(new ItemStack(blockID, 1, i));
}
@Override
public void growTree(World world, int x, int y, int z, Random random)
{
int meta = world.getBlockMetadata(x, y, z) & TYPES;
Object obj = null;
int rnd = random.nextInt(8);
if (obj == null)
{
switch (meta)
{
case 0: // Acacia Tree
obj = new WorldGenAcacia(false);
break;
case 1: // Mangrove Tree
obj = new WorldGenMangrove(false);
break;
case 2: // Palm Tree
rnd = random.nextInt(4);
if (rnd == 0)
obj = new WorldGenPalmTree1();
else
obj = new WorldGenPalmTree3();
break;
case 3: // Redwood Tree
obj = new WorldGenRedwoodTree2(false);
break;
case 4: // Willow Tree
obj = new WorldGenWillow();
break;
}
}
if (obj != null)
{
world.setBlockToAir(x, y, z);
if (!((WorldGenerator)obj).generate(world, random, x, y, z))
world.setBlock(x, y, z, this.blockID, meta, 2);
}
}
@Override
public int damageDropped(int meta)
{
return meta & TYPES;
}
@Override
public int getDamageValue(World world, int x, int y, int z)
{
return world.getBlockMetadata(x, y, z) & TYPES;
}
}
package biomesoplenty.blocks;
import java.util.List;
import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.block.BlockSapling;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.ItemStack;
import net.minecraft.util.Icon;
import net.minecraft.world.World;
import net.minecraft.world.gen.feature.WorldGenerator;
import biomesoplenty.mod_BiomesOPlenty;
import biomesoplenty.worldgen.WorldGenAcacia;
import biomesoplenty.worldgen.WorldGenAutumn;
import biomesoplenty.worldgen.WorldGenAutumn2;
import biomesoplenty.worldgen.WorldGenBambooTree;
import biomesoplenty.worldgen.WorldGenBambooTree2;
import biomesoplenty.worldgen.WorldGenCherry1;
import biomesoplenty.worldgen.WorldGenCherry2;
import biomesoplenty.worldgen.WorldGenDeadTree2;
import biomesoplenty.worldgen.WorldGenMangrove;
import biomesoplenty.worldgen.WorldGenMaple;
import biomesoplenty.worldgen.WorldGenMystic2;
import biomesoplenty.worldgen.WorldGenOminous1;
import biomesoplenty.worldgen.WorldGenOminous2;
import biomesoplenty.worldgen.WorldGenOriginTree;
import biomesoplenty.worldgen.WorldGenPalmTree1;
import biomesoplenty.worldgen.WorldGenPalmTree3;
import biomesoplenty.worldgen.WorldGenPromisedTree;
import biomesoplenty.worldgen.WorldGenRedwoodTree2;
import biomesoplenty.worldgen.WorldGenTaiga9;
import biomesoplenty.worldgen.WorldGenWillow;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class BlockBOPColorizedSapling extends BlockSapling
{
private static final String[] saplings = new String[] {"acacia", "mangrove", "palm", "redwood", "willow"};
@SideOnly(Side.CLIENT)
private Icon[] textures;
private static final int TYPES = 15;
public BlockBOPColorizedSapling(int par1)
{
super(par1);
setHardness(0.0F);
setStepSound(Block.soundGrassFootstep);
this.setCreativeTab(mod_BiomesOPlenty.tabBiomesOPlenty);
}
@Override
@SideOnly(Side.CLIENT)
public void registerIcons(IconRegister iconRegister)
{
textures = new Icon[saplings.length];
for (int i = 0; i < saplings.length; ++i)
textures[i] = iconRegister.registerIcon("BiomesOPlenty:" + saplings[i] + "sapling");
}
@Override
@SideOnly(Side.CLIENT)
public Icon getIcon(int side, int meta)
{
if (meta < 0 || meta >= saplings.length)
meta = 0;
return textures[meta];
}
@Override
@SideOnly(Side.CLIENT)
public void getSubBlocks(int blockID, CreativeTabs creativeTabs, List list) {
for (int i = 0; i < saplings.length; ++i)
list.add(new ItemStack(blockID, 1, i));
}
@Override
public void growTree(World world, int x, int y, int z, Random random)
{
int meta = world.getBlockMetadata(x, y, z) & TYPES;
Object obj = null;
int rnd = random.nextInt(8);
if (obj == null)
{
switch (meta)
{
case 0: // Acacia Tree
obj = new WorldGenAcacia(false);
break;
case 1: // Mangrove Tree
obj = new WorldGenMangrove(false);
break;
case 2: // Palm Tree
rnd = random.nextInt(4);
if (rnd == 0)
obj = new WorldGenPalmTree1();
else
obj = new WorldGenPalmTree3();
break;
case 3: // Redwood Tree
obj = new WorldGenRedwoodTree2(false);
break;
case 4: // Willow Tree
obj = new WorldGenWillow();
break;
}
}
if (obj != null)
{
world.setBlockToAir(x, y, z);
if (!((WorldGenerator)obj).generate(world, random, x, y, z))
world.setBlock(x, y, z, this.blockID, meta, 2);
}
}
@Override
public int damageDropped(int meta)
{
return meta & TYPES;
}
@Override
public int getDamageValue(World world, int x, int y, int z)
{
return world.getBlockMetadata(x, y, z) & TYPES;
}
}

View file

@ -51,7 +51,7 @@ public class BlockBOPFlower extends BlockFlower
@Override
@SideOnly(Side.CLIENT)
public Icon getBlockTextureFromSideAndMetadata(int side, int meta)
public Icon getIcon(int side, int meta)
{
if (meta < 0 || meta >= textures.length)
meta = 0;

View file

@ -57,7 +57,7 @@ public class BlockBOPFoliage extends BlockFlower implements IShearable
@Override
@SideOnly(Side.CLIENT)
public Icon getBlockTextureFromSideAndMetadata(int side, int meta)
public Icon getIcon(int side, int meta)
{
if (meta >= textures.length)
meta = 0;

View file

@ -54,7 +54,7 @@ public class BlockBOPLeaves extends BlockLeavesBase implements IShearable
@Override
@SideOnly(Side.CLIENT)
public Icon getBlockTextureFromSideAndMetadata(int side, int meta)
public Icon getIcon(int side, int meta)
{
if (meta < 0 || meta >= textures[0].length)
meta = 0;

View file

@ -55,7 +55,7 @@ public class BlockBOPLog extends Block
@Override
@SideOnly(Side.CLIENT)
public Icon getBlockTextureFromSideAndMetadata(int side, int meta)
public Icon getIcon(int side, int meta)
{
int pos = meta & 12;
if (pos == 0 && (side == 1 || side == 0) || pos == 4 && (side == 5 || side == 4) || pos == 8 && (side == 2 || side == 3))

View file

@ -1,99 +1,99 @@
package biomesoplenty.blocks;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import biomesoplenty.mod_BiomesOPlenty;
import biomesoplenty.api.Blocks;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block;
import net.minecraft.block.BlockLeavesBase;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.ItemStack;
import net.minecraft.util.Icon;
import net.minecraft.world.World;
import net.minecraftforge.common.IShearable;
public class BlockBOPPetals extends BlockLeavesBase implements IShearable
{
private static final String[] petals = new String[] {"bigflowerred", "bigfloweryellow"};
@SideOnly(Side.CLIENT)
private Icon[] textures;
public BlockBOPPetals(int blockID)
{
super(blockID, Material.leaves, false);
setBurnProperties(this.blockID, 30, 60);
this.setTickRandomly(true);
setHardness(0.2F);
setLightOpacity(1);
setStepSound(Block.soundGrassFootstep);
this.setCreativeTab(mod_BiomesOPlenty.tabBiomesOPlenty);
}
@Override
@SideOnly(Side.CLIENT)
public void registerIcons(IconRegister iconRegister)
{
textures = new Icon[petals.length];
for (int i = 0; i < petals.length; ++i)
textures[i] = iconRegister.registerIcon("BiomesOPlenty:" + petals[i]);
}
@Override
@SideOnly(Side.CLIENT)
public Icon getBlockTextureFromSideAndMetadata(int side, int meta)
{
if (meta < 0 || meta >= textures.length)
meta = 0;
return textures[meta];
}
@Override
@SideOnly(Side.CLIENT)
public void getSubBlocks(int blockID, CreativeTabs creativeTabs, List list) {
for (int i = 0; i < textures.length; ++i)
list.add(new ItemStack(blockID, 1, i));
}
@Override
public int idDropped(int par1, Random par2Random, int par3)
{
if (par1 == 0)
return Block.plantRed.blockID;
else
return Block.plantYellow.blockID;
}
@Override
public int damageDropped(int meta)
{
return meta & 15;
}
@Override
public int quantityDropped(Random random)
{
return random.nextInt(20) == 0 ? 1 : 0;
}
@Override
public boolean isShearable(ItemStack item, World world, int x, int y, int z)
{
return true;
}
@Override
public ArrayList<ItemStack> onSheared(ItemStack item, World world, int x, int y, int z, int fortune)
{
ArrayList<ItemStack> ret = new ArrayList<ItemStack>();
ret.add(new ItemStack(this, 1, world.getBlockMetadata(x, y, z) & 15));
return ret;
}
}
package biomesoplenty.blocks;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import biomesoplenty.mod_BiomesOPlenty;
import biomesoplenty.api.Blocks;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block;
import net.minecraft.block.BlockLeavesBase;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.ItemStack;
import net.minecraft.util.Icon;
import net.minecraft.world.World;
import net.minecraftforge.common.IShearable;
public class BlockBOPPetals extends BlockLeavesBase implements IShearable
{
private static final String[] petals = new String[] {"bigflowerred", "bigfloweryellow"};
@SideOnly(Side.CLIENT)
private Icon[] textures;
public BlockBOPPetals(int blockID)
{
super(blockID, Material.leaves, false);
setBurnProperties(this.blockID, 30, 60);
this.setTickRandomly(true);
setHardness(0.2F);
setLightOpacity(1);
setStepSound(Block.soundGrassFootstep);
this.setCreativeTab(mod_BiomesOPlenty.tabBiomesOPlenty);
}
@Override
@SideOnly(Side.CLIENT)
public void registerIcons(IconRegister iconRegister)
{
textures = new Icon[petals.length];
for (int i = 0; i < petals.length; ++i)
textures[i] = iconRegister.registerIcon("BiomesOPlenty:" + petals[i]);
}
@Override
@SideOnly(Side.CLIENT)
public Icon getIcon(int side, int meta)
{
if (meta < 0 || meta >= textures.length)
meta = 0;
return textures[meta];
}
@Override
@SideOnly(Side.CLIENT)
public void getSubBlocks(int blockID, CreativeTabs creativeTabs, List list) {
for (int i = 0; i < textures.length; ++i)
list.add(new ItemStack(blockID, 1, i));
}
@Override
public int idDropped(int par1, Random par2Random, int par3)
{
if (par1 == 0)
return Block.plantRed.blockID;
else
return Block.plantYellow.blockID;
}
@Override
public int damageDropped(int meta)
{
return meta & 15;
}
@Override
public int quantityDropped(Random random)
{
return random.nextInt(20) == 0 ? 1 : 0;
}
@Override
public boolean isShearable(ItemStack item, World world, int x, int y, int z)
{
return true;
}
@Override
public ArrayList<ItemStack> onSheared(ItemStack item, World world, int x, int y, int z, int fortune)
{
ArrayList<ItemStack> ret = new ArrayList<ItemStack>();
ret.add(new ItemStack(this, 1, world.getBlockMetadata(x, y, z) & 15));
return ret;
}
}

View file

@ -39,7 +39,7 @@ public class BlockBOPPlank extends Block
@Override
@SideOnly(Side.CLIENT)
public Icon getBlockTextureFromSideAndMetadata(int side, int meta)
public Icon getIcon(int side, int meta)
{
if (meta < 0 || meta >= textures.length)
meta = 0;

View file

@ -53,7 +53,7 @@ public class BlockBOPPlant extends BlockFlower implements IShearable
@Override
@SideOnly(Side.CLIENT)
public Icon getBlockTextureFromSideAndMetadata(int side, int meta)
public Icon getIcon(int side, int meta)
{
if (meta < 0 || meta >= textures.length)
meta = 0;

View file

@ -1,166 +1,166 @@
package biomesoplenty.blocks;
import java.util.List;
import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.block.BlockSapling;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.ItemStack;
import net.minecraft.util.Icon;
import net.minecraft.world.World;
import net.minecraft.world.gen.feature.WorldGenerator;
import biomesoplenty.mod_BiomesOPlenty;
import biomesoplenty.worldgen.WorldGenAutumn;
import biomesoplenty.worldgen.WorldGenAutumn2;
import biomesoplenty.worldgen.WorldGenBambooTree;
import biomesoplenty.worldgen.WorldGenBambooTree2;
import biomesoplenty.worldgen.WorldGenCherry1;
import biomesoplenty.worldgen.WorldGenCherry2;
import biomesoplenty.worldgen.WorldGenDeadTree2;
import biomesoplenty.worldgen.WorldGenMaple;
import biomesoplenty.worldgen.WorldGenMystic2;
import biomesoplenty.worldgen.WorldGenOminous1;
import biomesoplenty.worldgen.WorldGenOminous2;
import biomesoplenty.worldgen.WorldGenOriginTree;
import biomesoplenty.worldgen.WorldGenPromisedTree;
import biomesoplenty.worldgen.WorldGenTaiga9;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class BlockBOPSapling extends BlockSapling
{
private static final String[] saplings = new String[] {"yellow", "bamboo", "magic", "dark", "brown", "fir", "holy", "orange", "origin", "pink", "red", "white"};
@SideOnly(Side.CLIENT)
private Icon[] textures;
private static final int TYPES = 15;
public BlockBOPSapling(int par1)
{
super(par1);
setHardness(0.0F);
setStepSound(Block.soundGrassFootstep);
this.setCreativeTab(mod_BiomesOPlenty.tabBiomesOPlenty);
}
@Override
@SideOnly(Side.CLIENT)
public void registerIcons(IconRegister iconRegister)
{
textures = new Icon[saplings.length];
for (int i = 0; i < saplings.length; ++i)
textures[i] = iconRegister.registerIcon("BiomesOPlenty:" + saplings[i] + "sapling");
}
@Override
@SideOnly(Side.CLIENT)
public Icon getBlockTextureFromSideAndMetadata(int side, int meta)
{
if (meta < 0 || meta >= saplings.length)
meta = 0;
return textures[meta];
}
@Override
@SideOnly(Side.CLIENT)
public void getSubBlocks(int blockID, CreativeTabs creativeTabs, List list) {
for (int i = 0; i < saplings.length; ++i)
list.add(new ItemStack(blockID, 1, i));
}
@Override
public void growTree(World world, int x, int y, int z, Random random)
{
int meta = world.getBlockMetadata(x, y, z) & TYPES;
Object obj = null;
int rnd = random.nextInt(8);
if (obj == null)
{
switch (meta)
{
case 0: // Autumn Tree
obj = new WorldGenAutumn(false);
break;
case 1: // Bamboo Tree
rnd = random.nextInt(8);
if (rnd == 0)
obj = new WorldGenBambooTree(false);
else
obj = new WorldGenBambooTree2(false);
break;
case 2: // Magic Tree
obj = new WorldGenMystic2(false);
break;
case 3: // Dark Tree
rnd = random.nextInt(8);
if (rnd == 0)
obj = new WorldGenOminous2();
else
obj = new WorldGenOminous1(false);
break;
case 4: // Dead Tree
obj = new WorldGenDeadTree2(false);
break;
case 5: // Fir Tree
obj = new WorldGenTaiga9(false);
break;
case 6: // Holy Tree
obj = new WorldGenPromisedTree(false);
break;
case 7: // Autumn Tree
obj = new WorldGenAutumn2(false);
break;
case 8: // Origin Tree
obj = new WorldGenOriginTree(false);
break;
case 9: // Pink Cherry Tree
obj = new WorldGenCherry1(false);
break;
case 10: // Maple Tree
obj = new WorldGenMaple(false);
break;
case 11: // White Cherry Tree
obj = new WorldGenCherry2(false);
break;
}
}
if (obj != null)
{
world.setBlockToAir(x, y, z);
if (!((WorldGenerator)obj).generate(world, random, x, y, z))
world.setBlock(x, y, z, this.blockID, meta, 2);
}
}
@Override
public int damageDropped(int meta)
{
return meta & TYPES;
}
@Override
public int getDamageValue(World world, int x, int y, int z)
{
return world.getBlockMetadata(x, y, z) & TYPES;
}
}
package biomesoplenty.blocks;
import java.util.List;
import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.block.BlockSapling;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.ItemStack;
import net.minecraft.util.Icon;
import net.minecraft.world.World;
import net.minecraft.world.gen.feature.WorldGenerator;
import biomesoplenty.mod_BiomesOPlenty;
import biomesoplenty.worldgen.WorldGenAutumn;
import biomesoplenty.worldgen.WorldGenAutumn2;
import biomesoplenty.worldgen.WorldGenBambooTree;
import biomesoplenty.worldgen.WorldGenBambooTree2;
import biomesoplenty.worldgen.WorldGenCherry1;
import biomesoplenty.worldgen.WorldGenCherry2;
import biomesoplenty.worldgen.WorldGenDeadTree2;
import biomesoplenty.worldgen.WorldGenMaple;
import biomesoplenty.worldgen.WorldGenMystic2;
import biomesoplenty.worldgen.WorldGenOminous1;
import biomesoplenty.worldgen.WorldGenOminous2;
import biomesoplenty.worldgen.WorldGenOriginTree;
import biomesoplenty.worldgen.WorldGenPromisedTree;
import biomesoplenty.worldgen.WorldGenTaiga9;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class BlockBOPSapling extends BlockSapling
{
private static final String[] saplings = new String[] {"yellow", "bamboo", "magic", "dark", "brown", "fir", "holy", "orange", "origin", "pink", "red", "white"};
@SideOnly(Side.CLIENT)
private Icon[] textures;
private static final int TYPES = 15;
public BlockBOPSapling(int par1)
{
super(par1);
setHardness(0.0F);
setStepSound(Block.soundGrassFootstep);
this.setCreativeTab(mod_BiomesOPlenty.tabBiomesOPlenty);
}
@Override
@SideOnly(Side.CLIENT)
public void registerIcons(IconRegister iconRegister)
{
textures = new Icon[saplings.length];
for (int i = 0; i < saplings.length; ++i)
textures[i] = iconRegister.registerIcon("BiomesOPlenty:" + saplings[i] + "sapling");
}
@Override
@SideOnly(Side.CLIENT)
public Icon getIcon(int side, int meta)
{
if (meta < 0 || meta >= saplings.length)
meta = 0;
return textures[meta];
}
@Override
@SideOnly(Side.CLIENT)
public void getSubBlocks(int blockID, CreativeTabs creativeTabs, List list) {
for (int i = 0; i < saplings.length; ++i)
list.add(new ItemStack(blockID, 1, i));
}
@Override
public void growTree(World world, int x, int y, int z, Random random)
{
int meta = world.getBlockMetadata(x, y, z) & TYPES;
Object obj = null;
int rnd = random.nextInt(8);
if (obj == null)
{
switch (meta)
{
case 0: // Autumn Tree
obj = new WorldGenAutumn(false);
break;
case 1: // Bamboo Tree
rnd = random.nextInt(8);
if (rnd == 0)
obj = new WorldGenBambooTree(false);
else
obj = new WorldGenBambooTree2(false);
break;
case 2: // Magic Tree
obj = new WorldGenMystic2(false);
break;
case 3: // Dark Tree
rnd = random.nextInt(8);
if (rnd == 0)
obj = new WorldGenOminous2();
else
obj = new WorldGenOminous1(false);
break;
case 4: // Dead Tree
obj = new WorldGenDeadTree2(false);
break;
case 5: // Fir Tree
obj = new WorldGenTaiga9(false);
break;
case 6: // Holy Tree
obj = new WorldGenPromisedTree(false);
break;
case 7: // Autumn Tree
obj = new WorldGenAutumn2(false);
break;
case 8: // Origin Tree
obj = new WorldGenOriginTree(false);
break;
case 9: // Pink Cherry Tree
obj = new WorldGenCherry1(false);
break;
case 10: // Maple Tree
obj = new WorldGenMaple(false);
break;
case 11: // White Cherry Tree
obj = new WorldGenCherry2(false);
break;
}
}
if (obj != null)
{
world.setBlockToAir(x, y, z);
if (!((WorldGenerator)obj).generate(world, random, x, y, z))
world.setBlock(x, y, z, this.blockID, meta, 2);
}
}
@Override
public int damageDropped(int meta)
{
return meta & TYPES;
}
@Override
public int getDamageValue(World world, int x, int y, int z)
{
return world.getBlockMetadata(x, y, z) & TYPES;
}
}

View file

@ -69,7 +69,7 @@ public class BlockBOPSlab extends BlockHalfSlab
@Override
@SideOnly(Side.CLIENT)
public Icon getBlockTextureFromSideAndMetadata(int side, int meta)
public Icon getIcon(int side, int meta)
{
if (category == SlabCategory.STONE)
return textures[getTypeFromMeta(meta)];

View file

@ -42,7 +42,7 @@ public class BlockBOPStairs extends BlockStairs
@Override
@SideOnly(Side.CLIENT)
public Icon getBlockTextureFromSideAndMetadata(int side, int meta)
public Icon getIcon(int side, int meta)
{
return textures[category.ordinal()];
}

View file

@ -1,6 +1,6 @@
package biomesoplenty.blocks;
public class BlockBOPVines
{
}
package biomesoplenty.blocks;
public class BlockBOPVines
{
}

View file

@ -292,7 +292,7 @@ public class BlockMoss extends Block
var9 = par1World.getBlockMetadata(par2, par3, par4);
var10 = par1World.rand.nextInt(6);
var11 = Direction.vineGrowth[var10];
var11 = Direction.facingToDirection[var10];
int var12;
int var13;

View file

@ -1,44 +1,44 @@
package biomesoplenty.blocks.renderers;
import net.minecraft.block.Block;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.world.IBlockAccess;
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
import cpw.mods.fml.client.registry.RenderingRegistry;
public class FoliageRenderer implements ISimpleBlockRenderingHandler
{
public static int render = RenderingRegistry.getNextAvailableRenderId();
@Override
public void renderInventoryBlock(Block block, int metadata, int modelID, RenderBlocks renderer)
{
// Doesn't render in inventory
}
@Override
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer)
{
if (modelId == render)
{
int meta = world.getBlockMetadata(x, y, z);
if (meta == 0)
return renderer.renderBlockLilyPad(block, x, y, z);
else
return renderer.renderCrossedSquares(block, x, y, z);
}
return true;
}
@Override
public boolean shouldRender3DInInventory()
{
return false;
}
@Override
public int getRenderId()
{
return render;
}
}
package biomesoplenty.blocks.renderers;
import net.minecraft.block.Block;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.world.IBlockAccess;
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
import cpw.mods.fml.client.registry.RenderingRegistry;
public class FoliageRenderer implements ISimpleBlockRenderingHandler
{
public static int render = RenderingRegistry.getNextAvailableRenderId();
@Override
public void renderInventoryBlock(Block block, int metadata, int modelID, RenderBlocks renderer)
{
// Doesn't render in inventory
}
@Override
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer)
{
if (modelId == render)
{
int meta = world.getBlockMetadata(x, y, z);
if (meta == 0)
return renderer.renderBlockLilyPad(block, x, y, z);
else
return renderer.renderCrossedSquares(block, x, y, z);
}
return true;
}
@Override
public boolean shouldRender3DInInventory()
{
return false;
}
@Override
public int getRenderId()
{
return render;
}
}

View file

@ -1,44 +1,44 @@
package biomesoplenty.blocks.renderers;
import net.minecraft.block.Block;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.world.IBlockAccess;
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
import cpw.mods.fml.client.registry.RenderingRegistry;
public class PlantsRenderer implements ISimpleBlockRenderingHandler
{
public static int render = RenderingRegistry.getNextAvailableRenderId();
@Override
public void renderInventoryBlock(Block block, int metadata, int modelID, RenderBlocks renderer)
{
// Doesn't render in inventory
}
@Override
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer)
{
if (modelId == render)
{
int meta = world.getBlockMetadata(x, y, z);
if (meta > 5)
return renderer.renderBlockCrops(block, x, y, z);
else
return renderer.renderCrossedSquares(block, x, y, z);
}
return true;
}
@Override
public boolean shouldRender3DInInventory()
{
return false;
}
@Override
public int getRenderId()
{
return render;
}
}
package biomesoplenty.blocks.renderers;
import net.minecraft.block.Block;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.world.IBlockAccess;
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
import cpw.mods.fml.client.registry.RenderingRegistry;
public class PlantsRenderer implements ISimpleBlockRenderingHandler
{
public static int render = RenderingRegistry.getNextAvailableRenderId();
@Override
public void renderInventoryBlock(Block block, int metadata, int modelID, RenderBlocks renderer)
{
// Doesn't render in inventory
}
@Override
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer)
{
if (modelId == render)
{
int meta = world.getBlockMetadata(x, y, z);
if (meta > 5)
return renderer.renderBlockCrops(block, x, y, z);
else
return renderer.renderCrossedSquares(block, x, y, z);
}
return true;
}
@Override
public boolean shouldRender3DInInventory()
{
return false;
}
@Override
public int getRenderId()
{
return render;
}
}

View file

@ -193,7 +193,7 @@ public class TeleporterPromised extends Teleporter
var12 = 1;
var13 = 31;
var14 = 0;
var20.field_85087_d = this.worldServerInstance.getTotalWorldTime();
var20.lastUpdateTime = this.worldServerInstance.getTotalWorldTime();
var19 = false;
}
else
@ -264,11 +264,11 @@ public class TeleporterPromised extends Teleporter
var50 = 1;
}
int var30 = par1Entity.func_82148_at();
int var30 = par1Entity.getTeleportDirection();
if (var50 > -1)
{
int var31 = Direction.field_71578_g[var50];
int var31 = Direction.rotateLeft[var50];
int var32 = Direction.offsetX[var50];
int var33 = Direction.offsetZ[var50];
int var34 = Direction.offsetX[var31];
@ -278,8 +278,8 @@ public class TeleporterPromised extends Teleporter
if (var36 && var37)
{
var50 = Direction.footInvisibleFaceRemap[var50];
var31 = Direction.footInvisibleFaceRemap[var31];
var50 = Direction.rotateOpposite[var50];
var31 = Direction.rotateOpposite[var31];
var32 = Direction.offsetX[var50];
var33 = Direction.offsetZ[var50];
var34 = Direction.offsetX[var31];
@ -320,12 +320,12 @@ public class TeleporterPromised extends Teleporter
var40 = 1.0F;
var41 = 1.0F;
}
else if (var50 == Direction.footInvisibleFaceRemap[var30])
else if (var50 == Direction.rotateOpposite[var30])
{
var40 = -1.0F;
var41 = -1.0F;
}
else if (var50 == Direction.enderEyeMetaToDirection[var30])
else if (var50 == Direction.rotateRight[var30])
{
var42 = 1.0F;
var43 = -1.0F;
@ -783,7 +783,7 @@ public class TeleporterPromised extends Teleporter
@SuppressWarnings("rawtypes")
@Override
public void func_85189_a(long par1)
public void removeStalePortalLocations(long par1)
{
if (par1 % 100L == 0L)
{
@ -795,7 +795,7 @@ public class TeleporterPromised extends Teleporter
Long var6 = (Long) var3.next();
PortalPosition var7 = (PortalPosition) this.field_85191_c.getValueByKey(var6.longValue());
if (var7 == null || var7.field_85087_d < var4)
if (var7 == null || var7.lastUpdateTime < var4)
{
var3.remove();
this.field_85191_c.remove(var6.longValue());

View file

@ -22,9 +22,9 @@ public class ItemAncientStaff extends Item
return true;
}
public void updateIcons(IconRegister iconRegister)
public void registerIcons(IconRegister iconRegister)
{
iconIndex = iconRegister.registerIcon("BiomesOPlenty:ancientstaff");
itemIcon = iconRegister.registerIcon("BiomesOPlenty:ancientstaff");
}
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)

View file

@ -19,17 +19,17 @@ public class ItemBOP extends Item
boptextureid = texture;
}
public void updateIcons(IconRegister iconRegister)
public void registerIcons(IconRegister iconRegister)
{
if(boptextureid==0){ iconIndex = iconRegister.registerIcon("BiomesOPlenty:mudball"); }
else if(boptextureid==1){ iconIndex = iconRegister.registerIcon("BiomesOPlenty:mudbrick"); }
else if(boptextureid==2){ iconIndex = iconRegister.registerIcon("BiomesOPlenty:moss"); }
else if(boptextureid==3){ iconIndex = iconRegister.registerIcon("BiomesOPlenty:ash"); }
else if(boptextureid==4){ iconIndex = iconRegister.registerIcon("BiomesOPlenty:amethyst"); }
else if(boptextureid==5){ iconIndex = iconRegister.registerIcon("BiomesOPlenty:staffhandle"); }
else if(boptextureid==6){ iconIndex = iconRegister.registerIcon("BiomesOPlenty:staffpole"); }
else if(boptextureid==7){ iconIndex = iconRegister.registerIcon("BiomesOPlenty:stafftopper"); }
else { iconIndex = iconRegister.registerIcon("BiomesOPlenty:mudball"); }
if(boptextureid==0){ itemIcon = iconRegister.registerIcon("BiomesOPlenty:mudball"); }
else if(boptextureid==1){ itemIcon = iconRegister.registerIcon("BiomesOPlenty:mudbrick"); }
else if(boptextureid==2){ itemIcon = iconRegister.registerIcon("BiomesOPlenty:moss"); }
else if(boptextureid==3){ itemIcon = iconRegister.registerIcon("BiomesOPlenty:ash"); }
else if(boptextureid==4){ itemIcon = iconRegister.registerIcon("BiomesOPlenty:amethyst"); }
else if(boptextureid==5){ itemIcon = iconRegister.registerIcon("BiomesOPlenty:staffhandle"); }
else if(boptextureid==6){ itemIcon = iconRegister.registerIcon("BiomesOPlenty:staffpole"); }
else if(boptextureid==7){ itemIcon = iconRegister.registerIcon("BiomesOPlenty:stafftopper"); }
else { itemIcon = iconRegister.registerIcon("BiomesOPlenty:mudball"); }
}
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)

View file

@ -14,10 +14,10 @@ public class ItemBOPAxe extends ItemAxe
TextureID = texture;
}
public void updateIcons(IconRegister iconRegister)
public void registerIcons(IconRegister iconRegister)
{
if(TextureID==0){ iconIndex = iconRegister.registerIcon("BiomesOPlenty:mudaxe"); }
else if(TextureID==1){ iconIndex = iconRegister.registerIcon("BiomesOPlenty:amethystaxe"); }
else { iconIndex = iconRegister.registerIcon("BiomesOPlenty:mudball"); }
if(TextureID==0){ itemIcon = iconRegister.registerIcon("BiomesOPlenty:mudaxe"); }
else if(TextureID==1){ itemIcon = iconRegister.registerIcon("BiomesOPlenty:amethystaxe"); }
else { itemIcon = iconRegister.registerIcon("BiomesOPlenty:mudball"); }
}
}

View file

@ -1,38 +1,38 @@
package biomesoplenty.items;
import net.minecraft.block.Block;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import net.minecraft.util.Icon;
public class ItemBOPColorizedSapling extends ItemBlock
{
private static final String[] saplings = new String[] {"acacia", "mangrove", "palm", "redwood", "willow"};
public ItemBOPColorizedSapling(int par1)
{
super(par1);
setMaxDamage(0);
setHasSubtypes(true);
}
@Override
public int getMetadata(int meta)
{
return meta & 15;
}
@Override
public String getUnlocalizedName(ItemStack itemStack)
{
return (new StringBuilder()).append(saplings[itemStack.getItemDamage()]).append("Sapling").toString();
}
@Override
public Icon getIconFromDamage(int meta)
{
return Block.blocksList[this.itemID].getBlockTextureFromSideAndMetadata(0, meta);
}
}
package biomesoplenty.items;
import net.minecraft.block.Block;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import net.minecraft.util.Icon;
public class ItemBOPColorizedSapling extends ItemBlock
{
private static final String[] saplings = new String[] {"acacia", "mangrove", "palm", "redwood", "willow"};
public ItemBOPColorizedSapling(int par1)
{
super(par1);
setMaxDamage(0);
setHasSubtypes(true);
}
@Override
public int getMetadata(int meta)
{
return meta & 15;
}
@Override
public String getUnlocalizedName(ItemStack itemStack)
{
return (new StringBuilder()).append(saplings[itemStack.getItemDamage()]).append("Sapling").toString();
}
@Override
public Icon getIconFromDamage(int meta)
{
return Block.blocksList[this.itemID].getIcon(0, meta);
}
}

View file

@ -31,6 +31,6 @@ public class ItemBOPFlower extends ItemBlock
@Override
public Icon getIconFromDamage(int meta)
{
return Block.blocksList[this.itemID].getBlockTextureFromSideAndMetadata(0, meta);
return Block.blocksList[this.itemID].getIcon(0, meta);
}
}

View file

@ -24,7 +24,7 @@ public class ItemBOPFoliage extends ItemBlock
}
@SideOnly(Side.CLIENT)
public void updateIcons(IconRegister iconRegister)
public void registerIcons(IconRegister iconRegister)
{
textures = new Icon[foliageTypes.length - 1];

View file

@ -14,10 +14,10 @@ public class ItemBOPHoe extends ItemHoe
TextureID = texture;
}
public void updateIcons(IconRegister iconRegister)
public void registerIcons(IconRegister iconRegister)
{
if(TextureID==0){ iconIndex = iconRegister.registerIcon("BiomesOPlenty:mudhoe"); }
else if(TextureID==1){ iconIndex = iconRegister.registerIcon("BiomesOPlenty:amethysthoe"); }
else { iconIndex = iconRegister.registerIcon("BiomesOPlenty:mudball"); }
if(TextureID==0){ itemIcon = iconRegister.registerIcon("BiomesOPlenty:mudhoe"); }
else if(TextureID==1){ itemIcon = iconRegister.registerIcon("BiomesOPlenty:amethysthoe"); }
else { itemIcon = iconRegister.registerIcon("BiomesOPlenty:mudball"); }
}
}

View file

@ -1,28 +1,28 @@
package biomesoplenty.items;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
public class ItemBOPPetals extends ItemBlock
{
private static final String[] petals = new String[] {"bigflowerred", "bigfloweryellow"};
public ItemBOPPetals(int par1)
{
super(par1);
setMaxDamage(0);
setHasSubtypes(true);
}
@Override
public int getMetadata(int meta)
{
return meta & 15;
}
@Override
public String getUnlocalizedName(ItemStack itemStack)
{
return (new StringBuilder()).append(petals[itemStack.getItemDamage()]).toString();
}
package biomesoplenty.items;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
public class ItemBOPPetals extends ItemBlock
{
private static final String[] petals = new String[] {"bigflowerred", "bigfloweryellow"};
public ItemBOPPetals(int par1)
{
super(par1);
setMaxDamage(0);
setHasSubtypes(true);
}
@Override
public int getMetadata(int meta)
{
return meta & 15;
}
@Override
public String getUnlocalizedName(ItemStack itemStack)
{
return (new StringBuilder()).append(petals[itemStack.getItemDamage()]).toString();
}
}

View file

@ -14,10 +14,10 @@ public class ItemBOPPickaxe extends ItemPickaxe
TextureID = texture;
}
public void updateIcons(IconRegister iconRegister)
public void registerIcons(IconRegister iconRegister)
{
if(TextureID==0){ iconIndex = iconRegister.registerIcon("BiomesOPlenty:mudpickaxe"); }
else if(TextureID==1){ iconIndex = iconRegister.registerIcon("BiomesOPlenty:amethystpickaxe"); }
else { iconIndex = iconRegister.registerIcon("BiomesOPlenty:mudball"); }
if(TextureID==0){ itemIcon = iconRegister.registerIcon("BiomesOPlenty:mudpickaxe"); }
else if(TextureID==1){ itemIcon = iconRegister.registerIcon("BiomesOPlenty:amethystpickaxe"); }
else { itemIcon = iconRegister.registerIcon("BiomesOPlenty:mudball"); }
}
}

View file

@ -31,6 +31,6 @@ public class ItemBOPPlant extends ItemBlock
@Override
public Icon getIconFromDamage(int meta)
{
return Block.blocksList[this.itemID].getBlockTextureFromSideAndMetadata(0, meta);
return Block.blocksList[this.itemID].getIcon(0, meta);
}
}

View file

@ -36,9 +36,9 @@ public class ItemBOPRecord extends ItemRecord
records.put(par2Str, this);
}
public void updateIcons(IconRegister iconRegister)
public void registerIcons(IconRegister iconRegister)
{
iconIndex = iconRegister.registerIcon("BiomesOPlenty:boprecord");
itemIcon = iconRegister.registerIcon("BiomesOPlenty:boprecord");
}
/**

View file

@ -36,9 +36,9 @@ public class ItemBOPRecordMud extends ItemRecord
records.put(par2Str, this);
}
public void updateIcons(IconRegister iconRegister)
public void registerIcons(IconRegister iconRegister)
{
iconIndex = iconRegister.registerIcon("BiomesOPlenty:mudrecord");
itemIcon = iconRegister.registerIcon("BiomesOPlenty:mudrecord");
}
/**

View file

@ -1,38 +1,38 @@
package biomesoplenty.items;
import net.minecraft.block.Block;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import net.minecraft.util.Icon;
public class ItemBOPSapling extends ItemBlock
{
private static final String[] saplings = new String[] {"yellow", "bamboo", "magic", "dark", "brown", "fir", "holy", "orange", "origin", "pink", "red", "white"};
public ItemBOPSapling(int par1)
{
super(par1);
setMaxDamage(0);
setHasSubtypes(true);
}
@Override
public int getMetadata(int meta)
{
return meta & 15;
}
@Override
public String getUnlocalizedName(ItemStack itemStack)
{
return (new StringBuilder()).append(saplings[itemStack.getItemDamage()]).append("Sapling").toString();
}
@Override
public Icon getIconFromDamage(int meta)
{
return Block.blocksList[this.itemID].getBlockTextureFromSideAndMetadata(0, meta);
}
}
package biomesoplenty.items;
import net.minecraft.block.Block;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import net.minecraft.util.Icon;
public class ItemBOPSapling extends ItemBlock
{
private static final String[] saplings = new String[] {"yellow", "bamboo", "magic", "dark", "brown", "fir", "holy", "orange", "origin", "pink", "red", "white"};
public ItemBOPSapling(int par1)
{
super(par1);
setMaxDamage(0);
setHasSubtypes(true);
}
@Override
public int getMetadata(int meta)
{
return meta & 15;
}
@Override
public String getUnlocalizedName(ItemStack itemStack)
{
return (new StringBuilder()).append(saplings[itemStack.getItemDamage()]).append("Sapling").toString();
}
@Override
public Icon getIconFromDamage(int meta)
{
return Block.blocksList[this.itemID].getIcon(0, meta);
}
}

View file

@ -32,7 +32,8 @@ public class ItemBOPSlab extends ItemSlab
@Override
public String getUnlocalizedName(ItemStack itemStack) {
BlockBOPSlab slab = (BlockBOPSlab)Block.blocksList[itemStack.itemID];
return (new StringBuilder()).append(slab.getFullSlabName(itemStack.getItemDamage())).toString();
// BlockBOPSlab slab = (BlockBOPSlab)Block.blocksList[itemStack.itemID];
// return (new StringBuilder()).append(slab.getFullSlabName(itemStack.getItemDamage())).toString();
return itemStack.getItem().getUnlocalizedName();
}
}

View file

@ -14,10 +14,10 @@ public class ItemBOPSpade extends ItemSpade
TextureID = texture;
}
public void updateIcons(IconRegister iconRegister)
public void registerIcons(IconRegister iconRegister)
{
if(TextureID==0){ iconIndex = iconRegister.registerIcon("BiomesOPlenty:mudshovel"); }
else if(TextureID==1){ iconIndex = iconRegister.registerIcon("BiomesOPlenty:amethystshovel"); }
else { iconIndex = iconRegister.registerIcon("BiomesOPlenty:mudball"); }
if(TextureID==0){ itemIcon = iconRegister.registerIcon("BiomesOPlenty:mudshovel"); }
else if(TextureID==1){ itemIcon = iconRegister.registerIcon("BiomesOPlenty:amethystshovel"); }
else { itemIcon = iconRegister.registerIcon("BiomesOPlenty:mudball"); }
}
}

View file

@ -14,10 +14,10 @@ public class ItemBOPSword extends ItemSword
TextureID = texture;
}
public void updateIcons(IconRegister iconRegister)
public void registerIcons(IconRegister iconRegister)
{
if(TextureID==0){ iconIndex = iconRegister.registerIcon("BiomesOPlenty:mudsword"); }
else if(TextureID==1){ iconIndex = iconRegister.registerIcon("BiomesOPlenty:amethystsword"); }
else { iconIndex = iconRegister.registerIcon("BiomesOPlenty:mudball"); }
if(TextureID==0){ itemIcon = iconRegister.registerIcon("BiomesOPlenty:mudsword"); }
else if(TextureID==1){ itemIcon = iconRegister.registerIcon("BiomesOPlenty:amethystsword"); }
else { itemIcon = iconRegister.registerIcon("BiomesOPlenty:mudball"); }
}
}

View file

@ -18,9 +18,9 @@ public class ItemBamboo extends Item
this.spawnID = par2Block.blockID;
}
public void updateIcons(IconRegister iconRegister)
public void registerIcons(IconRegister iconRegister)
{
iconIndex = iconRegister.registerIcon("BiomesOPlenty:bamboo");
itemIcon = iconRegister.registerIcon("BiomesOPlenty:bamboo");
}
public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, int par5, int par6, int par7, float par8, float par9, float par10)

View file

@ -18,9 +18,9 @@ public class ItemBarley extends Item
this.spawnID = par2Block.blockID;
}
public void updateIcons(IconRegister iconRegister)
public void registerIcons(IconRegister iconRegister)
{
iconIndex = iconRegister.registerIcon("BiomesOPlenty:barley");
itemIcon = iconRegister.registerIcon("BiomesOPlenty:barley");
}
public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, int par5, int par6, int par7, float par8, float par9, float par10)

View file

@ -19,9 +19,9 @@ public class ItemBush extends Item
this.spawnID = par2Block.blockID;
}
public void updateIcons(IconRegister iconRegister)
public void registerIcons(IconRegister iconRegister)
{
iconIndex = iconRegister.registerIcon("BiomesOPlenty:bush");
itemIcon = iconRegister.registerIcon("BiomesOPlenty:bush");
}
/**

View file

@ -19,9 +19,9 @@ public class ItemCattail extends Item
this.spawnID = par2Block.blockID;
}
public void updateIcons(IconRegister iconRegister)
public void registerIcons(IconRegister iconRegister)
{
iconIndex = iconRegister.registerIcon("BiomesOPlenty:cattail");
itemIcon = iconRegister.registerIcon("BiomesOPlenty:cattail");
}
/**

View file

@ -18,9 +18,9 @@ public class ItemEnderporter extends Item
this.setMaxDamage(9);
}
public void updateIcons(IconRegister iconRegister)
public void registerIcons(IconRegister iconRegister)
{
iconIndex = iconRegister.registerIcon("BiomesOPlenty:enderporter");
itemIcon = iconRegister.registerIcon("BiomesOPlenty:enderporter");
}
public boolean hasEffect(ItemStack par1ItemStack)

View file

@ -19,9 +19,9 @@ public class ItemMediumGrass extends Item
this.spawnID = par2Block.blockID;
}
public void updateIcons(IconRegister iconRegister)
public void registerIcons(IconRegister iconRegister)
{
iconIndex = iconRegister.registerIcon("BiomesOPlenty:mediumgrass");
itemIcon = iconRegister.registerIcon("BiomesOPlenty:mediumgrass");
}
/**

View file

@ -19,9 +19,9 @@ public class ItemShortGrass extends Item
this.spawnID = par2Block.blockID;
}
public void updateIcons(IconRegister iconRegister)
public void registerIcons(IconRegister iconRegister)
{
iconIndex = iconRegister.registerIcon("BiomesOPlenty:shortgrass");
itemIcon = iconRegister.registerIcon("BiomesOPlenty:shortgrass");
}
/**

View file

@ -10,8 +10,8 @@ public class ItemShroomPowder extends ItemFood
super(par1, par2, par3, par4);
}
public void updateIcons(IconRegister iconRegister)
public void registerIcons(IconRegister iconRegister)
{
iconIndex = iconRegister.registerIcon("BiomesOPlenty:shroompowder");
itemIcon = iconRegister.registerIcon("BiomesOPlenty:shroompowder");
}
}

View file

@ -19,9 +19,9 @@ public class ItemSprout extends Item
this.spawnID = par2Block.blockID;
}
public void updateIcons(IconRegister iconRegister)
public void registerIcons(IconRegister iconRegister)
{
iconIndex = iconRegister.registerIcon("BiomesOPlenty:sprout");
itemIcon = iconRegister.registerIcon("BiomesOPlenty:sprout");
}
/**

View file

@ -233,7 +233,7 @@ public class WorldGenBambooTree extends WorldGenerator
if (par2Random.nextInt(4 - var11) == 0)
{
var13 = par2Random.nextInt(3);
this.setBlockAndMetadata(par1World, par3 + Direction.offsetX[Direction.footInvisibleFaceRemap[var12]], par4 + var6 - 5 + var11, par5 + Direction.offsetZ[Direction.footInvisibleFaceRemap[var12]], Block.cocoaPlant.blockID, var13 << 2 | var12);
this.setBlockAndMetadata(par1World, par3 + Direction.offsetX[Direction.rotateOpposite[var12]], par4 + var6 - 5 + var11, par5 + Direction.offsetZ[Direction.rotateOpposite[var12]], Block.cocoaPlant.blockID, var13 << 2 | var12);
}
}
}

View file

@ -233,7 +233,7 @@ public class WorldGenBambooTree2 extends WorldGenerator
if (par2Random.nextInt(4 - var11) == 0)
{
var13 = par2Random.nextInt(3);
this.setBlockAndMetadata(par1World, X + Direction.offsetX[Direction.footInvisibleFaceRemap[var12]], Y + var6 - 5 + var11, Z + Direction.offsetZ[Direction.footInvisibleFaceRemap[var12]], Block.cocoaPlant.blockID, var13 << 2 | var12);
this.setBlockAndMetadata(par1World, X + Direction.offsetX[Direction.rotateOpposite[var12]], Y + var6 - 5 + var11, Z + Direction.offsetZ[Direction.rotateOpposite[var12]], Block.cocoaPlant.blockID, var13 << 2 | var12);
}
}
}

View file

@ -231,7 +231,7 @@ public class WorldGenDeciduous extends WorldGenerator
if (par2Random.nextInt(4 - var11) == 0)
{
var13 = par2Random.nextInt(3);
this.setBlockAndMetadata(par1World, par3 + Direction.offsetX[Direction.footInvisibleFaceRemap[var12]], par4 + var6 - 5 + var11, par5 + Direction.offsetZ[Direction.footInvisibleFaceRemap[var12]], Block.cocoaPlant.blockID, var13 << 2 | var12);
this.setBlockAndMetadata(par1World, par3 + Direction.offsetX[Direction.rotateOpposite[var12]], par4 + var6 - 5 + var11, par5 + Direction.offsetZ[Direction.rotateOpposite[var12]], Block.cocoaPlant.blockID, var13 << 2 | var12);
}
}
}

View file

@ -199,7 +199,7 @@ public class WorldGenHeath extends WorldGenerator
if (par2Random.nextInt(4 - var11) == 0)
{
var13 = par2Random.nextInt(3);
this.setBlockAndMetadata(par1World, par3 + Direction.offsetX[Direction.footInvisibleFaceRemap[var12]], par4 + var6 - 5 + var11, par5 + Direction.offsetZ[Direction.footInvisibleFaceRemap[var12]], Block.cocoaPlant.blockID, var13 << 2 | var12);
this.setBlockAndMetadata(par1World, par3 + Direction.offsetX[Direction.rotateOpposite[var12]], par4 + var6 - 5 + var11, par5 + Direction.offsetZ[Direction.rotateOpposite[var12]], Block.cocoaPlant.blockID, var13 << 2 | var12);
}
}
}

View file

@ -23,7 +23,7 @@ public class WorldGenMoss extends WorldGenerator
{
if (BOPBlocks.moss.canPlaceBlockOnSide(par1World, par3, par4, par5, var8))
{
par1World.setBlock(par3, par4, par5, BOPBlocks.moss.blockID, 1 << Direction.vineGrowth[Facing.faceToSide[var8]], 2);
par1World.setBlock(par3, par4, par5, BOPBlocks.moss.blockID, 1 << Direction.facingToDirection[Facing.oppositeSide[var8]], 2);
break;
}
}

View file

@ -211,7 +211,7 @@ public class WorldGenRainforestTree1 extends WorldGenerator
if (par2Random.nextInt(4 - var11) == 0)
{
var13 = par2Random.nextInt(3);
this.setBlockAndMetadata(par1World, par3 + Direction.offsetX[Direction.footInvisibleFaceRemap[var12]], par4 + var6 - 5 + var11, par5 + Direction.offsetZ[Direction.footInvisibleFaceRemap[var12]], Block.cocoaPlant.blockID, var13 << 2 | var12);
this.setBlockAndMetadata(par1World, par3 + Direction.offsetX[Direction.rotateOpposite[var12]], par4 + var6 - 5 + var11, par5 + Direction.offsetZ[Direction.rotateOpposite[var12]], Block.cocoaPlant.blockID, var13 << 2 | var12);
}
}
}

View file

@ -332,7 +332,7 @@ public class WorldGenRedwoodTree extends WorldGenerator
if (par2Random.nextInt(4 - var11) == 0)
{
var13 = par2Random.nextInt(3);
this.setBlockAndMetadata(par1World, par3 + Direction.offsetX[Direction.footInvisibleFaceRemap[var12]], par4 + var6 - 5 + var11, par5 + Direction.offsetZ[Direction.footInvisibleFaceRemap[var12]], Block.cocoaPlant.blockID, var13 << 2 | var12);
this.setBlockAndMetadata(par1World, par3 + Direction.offsetX[Direction.rotateOpposite[var12]], par4 + var6 - 5 + var11, par5 + Direction.offsetZ[Direction.rotateOpposite[var12]], Block.cocoaPlant.blockID, var13 << 2 | var12);
}
}
}

View file

@ -277,7 +277,7 @@ public class WorldGenRedwoodTree2 extends WorldGenerator
if (par2Random.nextInt(4 - var11) == 0)
{
var13 = par2Random.nextInt(3);
this.setBlockAndMetadata(par1World, par3 + Direction.offsetX[Direction.footInvisibleFaceRemap[var12]], par4 + var6 - 5 + var11, par5 + Direction.offsetZ[Direction.footInvisibleFaceRemap[var12]], Block.cocoaPlant.blockID, var13 << 2 | var12);
this.setBlockAndMetadata(par1World, par3 + Direction.offsetX[Direction.rotateOpposite[var12]], par4 + var6 - 5 + var11, par5 + Direction.offsetZ[Direction.rotateOpposite[var12]], Block.cocoaPlant.blockID, var13 << 2 | var12);
}
}
}