Fuckloads of work on updating blocks
This commit is contained in:
parent
4b9cf836ed
commit
0e7463d232
38 changed files with 771 additions and 554 deletions
|
@ -8,10 +8,12 @@ import net.minecraft.client.renderer.texture.IIconRegister;
|
|||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import biomesoplenty.BiomesOPlenty;
|
||||
import biomesoplenty.api.BOPItemHelper;
|
||||
|
||||
public class BlockAsh extends Block
|
||||
{
|
||||
|
@ -20,7 +22,7 @@ public class BlockAsh extends Block
|
|||
//TODO: Material.sand
|
||||
super(Material.field_151595_p);
|
||||
|
||||
//TODO: this.setStepSound(Block.soundSandFootstep);
|
||||
//TODO setStepSound(Block.soundSandFootstep)
|
||||
this.func_149672_a(Block.field_149776_m);
|
||||
|
||||
//TODO: this.setCreativeTab()
|
||||
|
@ -86,11 +88,10 @@ public class BlockAsh extends Block
|
|||
|
||||
//@Override
|
||||
//TODO: getItemDropped()
|
||||
//TODO: FEATURE
|
||||
/*public Item func_149650_a(int metadata, Random random, int par3)
|
||||
public Item func_149650_a(int metadata, Random random, int fortune)
|
||||
{
|
||||
return Items.miscItems.get().itemID;
|
||||
}*/
|
||||
return BOPItemHelper.get("misc");
|
||||
}
|
||||
|
||||
@Override
|
||||
//TODO damageDropped()
|
||||
|
|
|
@ -4,15 +4,17 @@ import java.util.List;
|
|||
import java.util.Random;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
import biomesoplenty.BiomesOPlenty;
|
||||
import biomesoplenty.api.BOPItemHelper;
|
||||
|
||||
public class BlockBOPAmethyst extends Block
|
||||
{
|
||||
|
@ -24,7 +26,8 @@ public class BlockBOPAmethyst extends Block
|
|||
//TODO: Material.rock
|
||||
super(Material.field_151576_e);
|
||||
|
||||
this.setStepSound(Block.soundStoneFootstep);
|
||||
//TODO setStepSound(Block.soundStoneFootstep)
|
||||
this.func_149672_a(Block.field_149780_i);
|
||||
|
||||
//TODO: this.setCreativeTab()
|
||||
this.func_149647_a(BiomesOPlenty.tabBiomesOPlenty);
|
||||
|
@ -53,23 +56,25 @@ public class BlockBOPAmethyst extends Block
|
|||
}
|
||||
|
||||
@Override
|
||||
public int getDamageValue(World world, int x, int y, int z)
|
||||
//TODO: getDamageValue()
|
||||
public int func_149643_k(World world, int x, int y, int z)
|
||||
{
|
||||
return world.getBlockMetadata(x, y, z);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
//TODO: getSubBlocks()
|
||||
public void func_149666_a(Item block, CreativeTabs creativeTabs, List list)
|
||||
{
|
||||
for (int i = 0; i < types.length; ++i) {
|
||||
list.add(new ItemStack(blockID, 1, i));
|
||||
for (int i = 0; i < types.length; ++i)
|
||||
{
|
||||
list.add(new ItemStack(block, 1, i));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getBlockHardness(World world, int x, int y, int z)
|
||||
//TODO: getBlockHardness()
|
||||
public float func_149712_f(World world, int x, int y, int z)
|
||||
{
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
|
||||
|
@ -85,9 +90,11 @@ public class BlockBOPAmethyst extends Block
|
|||
}
|
||||
|
||||
@Override
|
||||
public int idDropped(int meta, Random par2Random, int par3)
|
||||
//TODO: getItemDropped()
|
||||
public Item func_149650_a(int metadata, Random random, int fortune)
|
||||
{
|
||||
return (meta % 2 == 0) ? Items.gems.get().itemID : this.blockID;
|
||||
//TODO: getItemFromBlock()
|
||||
return (metadata % 2 == 0) ? BOPItemHelper.get("gems") : Item.func_150898_a(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -157,35 +164,43 @@ public class BlockBOPAmethyst extends Block
|
|||
@Override
|
||||
public int quantityDropped(int meta, int fortune, Random random)
|
||||
{
|
||||
return (meta % 2 == 0) ? quantityDroppedWithBonus(fortune, random) : 1;
|
||||
//TODO: quantityDroppedWithBonus()
|
||||
return (meta % 2 == 0) ? func_149679_a(fortune, random) : 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int quantityDroppedWithBonus(int bonus, Random par2Random)
|
||||
//TODO: quantityDroppedWithBonus()
|
||||
public int func_149679_a(int bonus, Random random)
|
||||
{
|
||||
if (bonus > 0 && blockID != this.idDropped(0, par2Random, bonus))
|
||||
//TODO: getItemForBlock() getItem()
|
||||
if (bonus > 0 && Item.func_150898_a(this) != this.func_149650_a(0, random, bonus))
|
||||
{
|
||||
int rnd = par2Random.nextInt(bonus + 2) - 1;
|
||||
int rnd = random.nextInt(bonus + 2) - 1;
|
||||
|
||||
if (rnd < 0) {
|
||||
rnd = 0;
|
||||
}
|
||||
|
||||
return this.quantityDropped(par2Random) * (rnd + 1);
|
||||
//TODO: quantityDropped()
|
||||
return this.func_149745_a(random) * (rnd + 1);
|
||||
}
|
||||
else
|
||||
return this.quantityDropped(par2Random);
|
||||
return this.func_149745_a(random);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dropBlockAsItemWithChance(World world, int par2, int par3, int par4, int par5, float par6, int par7)
|
||||
//TODO: dropBlockAsItemWithChance()
|
||||
public void func_149690_a(World world, int x, int y, int z, int metadata, float chance, int fortune)
|
||||
{
|
||||
super.dropBlockAsItemWithChance(world, par2, par3, par4, par5, par6, par7);
|
||||
//TODO: dropBlockAsItemWithChance()
|
||||
super.func_149690_a(world, x, y, z, metadata, chance, fortune);
|
||||
|
||||
if (this.idDropped(par5, world.rand, par7) != blockID)
|
||||
//TODO: getItemDropped() getItemFromBlock()
|
||||
if (this.func_149650_a(metadata, world.rand, fortune) != Item.func_150898_a(this))
|
||||
{
|
||||
int var8 = MathHelper.getRandomIntegerInRange(world.rand, 3, 7);
|
||||
this.dropXpOnBlockBreak(world, par2, par3, par4, var8);
|
||||
//TODO: dropXpOnBlockBreak()
|
||||
this.func_149657_c(world, x, y, z, var8);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,15 +30,19 @@ public class BlockBOPAppleLeaves extends BlockLeavesBase implements IShearable
|
|||
private IIcon[] betterTextures;
|
||||
int[] adjacentTreeBlocks;
|
||||
|
||||
public BlockBOPAppleLeaves(int blockID)
|
||||
public BlockBOPAppleLeaves()
|
||||
{
|
||||
super(blockID, Material.leaves, false);
|
||||
setBurnProperties(this.blockID, 30, 60);
|
||||
this.setTickRandomly(true);
|
||||
super(Material.leaves, false);
|
||||
|
||||
//TODO: setBurnProperties() getIdFromBlock()
|
||||
Blocks.fire.func_149842_a(func_149682_b(this), 30, 60);
|
||||
//TODO: setTickRandomly()
|
||||
this.func_149675_a(true);
|
||||
//TODO: this.setHardness
|
||||
this.func_149711_c(0.2F);
|
||||
setLightOpacity(1);
|
||||
setStepSound(Block.soundGrassFootstep);
|
||||
//TODO setStepSound(Block.soundGrassFootstep)
|
||||
this.func_149672_a(Block.field_149779_h);
|
||||
|
||||
//TODO: this.setCreativeTab()
|
||||
this.func_149647_a(BiomesOPlenty.tabBiomesOPlenty);
|
||||
|
@ -86,14 +90,14 @@ public class BlockBOPAppleLeaves extends BlockLeavesBase implements IShearable
|
|||
//TODO: isOpaqueCube()
|
||||
public boolean func_149662_c()
|
||||
{
|
||||
return Block.leaves.isOpaqueCube();
|
||||
return Blocks.leaves.isOpaqueCube();
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
//TODO: getSubBlocks()
|
||||
public void func_149666_a(Item block, CreativeTabs creativeTabs, List list) {
|
||||
list.add(new ItemStack(blockID, 1, 0));
|
||||
public void func_149666_a(Item block, CreativeTabs creativeTabs, List list)
|
||||
{
|
||||
list.add(new ItemStack(block, 1, 0));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -135,7 +139,8 @@ public class BlockBOPAppleLeaves extends BlockLeavesBase implements IShearable
|
|||
}
|
||||
|
||||
@Override
|
||||
public void updateTick(World world, int x, int y, int z, Random random)
|
||||
//TODO: updateTick()
|
||||
public void func_149674_a(World world, int x, int y, int z, Random random)
|
||||
{
|
||||
if (world.isRemote)
|
||||
return;
|
||||
|
@ -280,7 +285,8 @@ public class BlockBOPAppleLeaves extends BlockLeavesBase implements IShearable
|
|||
}
|
||||
|
||||
@Override
|
||||
public int idDropped(int par1, Random par2Random, int par3)
|
||||
//TODO: getItemDropped()
|
||||
public Item func_149650_a(int metadata, Random random, int fortune)
|
||||
{
|
||||
return Blocks.saplings.get().blockID;
|
||||
}
|
||||
|
@ -293,13 +299,15 @@ public class BlockBOPAppleLeaves extends BlockLeavesBase implements IShearable
|
|||
}
|
||||
|
||||
@Override
|
||||
public int quantityDropped(Random random)
|
||||
//TODO: quantityDropped()
|
||||
public int func_149745_a(Random random)
|
||||
{
|
||||
return random.nextInt(20) == 0 ? 1 : 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dropBlockAsItemWithChance(World world, int x, int y, int z, int meta, float chance, int par7)
|
||||
//TODO: dropBlockAsItemWithChance()
|
||||
public void func_149690_a(World world, int x, int y, int z, int metadata, float chance, int fortune)
|
||||
{
|
||||
if (world.isRemote)
|
||||
return;
|
||||
|
@ -322,7 +330,7 @@ public class BlockBOPAppleLeaves extends BlockLeavesBase implements IShearable
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean isShearable(ItemStack item, World world, int x, int y, int z)
|
||||
public boolean isShearable(ItemStack item, IBlockAccess world, int x, int y, int z)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@ -342,7 +350,8 @@ public class BlockBOPAppleLeaves extends BlockLeavesBase implements IShearable
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldSideBeRendered(IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5)
|
||||
//TODO shouldSideBeRendered
|
||||
public boolean func_149646_a(IBlockAccess world, int x, int y, int z, int side)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -19,8 +19,6 @@ import net.minecraft.world.World;
|
|||
import net.minecraftforge.common.IShearable;
|
||||
import biomesoplenty.BiomesOPlenty;
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class BlockBOPColorizedLeaves extends BlockLeavesBase implements IShearable
|
||||
{
|
||||
|
@ -50,13 +48,15 @@ public class BlockBOPColorizedLeaves extends BlockLeavesBase implements IShearab
|
|||
super(Material.field_151584_j, false);
|
||||
|
||||
this.category = cat;
|
||||
this.setTickRandomly(true);
|
||||
|
||||
this.setBurnProperties(this, 30, 60);
|
||||
//TODO: setTickRandomly()
|
||||
this.func_149675_a(true);
|
||||
//TODO: setBurnProperties() getIdFromBlock()
|
||||
Blocks.fire.func_149842_a(func_149682_b(this), 30, 60);
|
||||
//TODO: this.setHardness
|
||||
this.func_149711_c(0.2F);
|
||||
setLightOpacity(1);
|
||||
setStepSound(Block.soundGrassFootstep);
|
||||
//TODO setStepSound(Block.soundGrassFootstep)
|
||||
this.func_149672_a(Block.field_149779_h);
|
||||
|
||||
//TODO: this.setCreativeTab()
|
||||
this.func_149647_a(BiomesOPlenty.tabBiomesOPlenty);
|
||||
|
@ -216,7 +216,8 @@ public class BlockBOPColorizedLeaves extends BlockLeavesBase implements IShearab
|
|||
}
|
||||
|
||||
@Override
|
||||
public void updateTick(World world, int x, int y, int z, Random random)
|
||||
//TODO: updateTick()
|
||||
public void func_149674_a(World world, int x, int y, int z, Random random)
|
||||
{
|
||||
if (world.isRemote)
|
||||
return;
|
||||
|
@ -342,7 +343,8 @@ public class BlockBOPColorizedLeaves extends BlockLeavesBase implements IShearab
|
|||
}
|
||||
|
||||
@Override
|
||||
public int damageDropped(int meta)
|
||||
//TODO damageDropped()
|
||||
public int func_149692_a(int meta)
|
||||
{
|
||||
return getTypeFromMeta(meta) + category.ordinal() * 4;
|
||||
}
|
||||
|
@ -388,12 +390,6 @@ public class BlockBOPColorizedLeaves extends BlockLeavesBase implements IShearab
|
|||
return meta;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void setGraphicsLevel(boolean par1)
|
||||
{
|
||||
graphicsLevel = par1;
|
||||
}
|
||||
|
||||
@Override
|
||||
//TODO shouldSideBeRendered
|
||||
public boolean func_149646_a(IBlockAccess world, int x, int y, int z, int side)
|
||||
|
@ -408,7 +404,7 @@ public class BlockBOPColorizedLeaves extends BlockLeavesBase implements IShearab
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean isLeaves(World world, int x, int y, int z)
|
||||
public boolean isLeaves(IBlockAccess world, int x, int y, int z)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -8,6 +8,7 @@ import net.minecraft.block.BlockFlower;
|
|||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
@ -21,12 +22,16 @@ public class BlockBOPCoral extends BlockFlower
|
|||
private static final String[] coral = new String[] {"kelpbottom", "kelpmiddle", "kelptop", "kelpsingle", "pinkcoral", "orangecoral", "bluecoral", "glowcoral"};
|
||||
private IIcon[] textures;
|
||||
|
||||
public BlockBOPCoral(int blockID)
|
||||
public BlockBOPCoral()
|
||||
{
|
||||
super(blockID, Material.water);
|
||||
this.setTickRandomly(true);
|
||||
super(Material.water);
|
||||
|
||||
//TODO: setTickRandomly()
|
||||
this.func_149675_a(true);
|
||||
|
||||
float f = 0.4F;
|
||||
setBlockBounds(0.5F - f, 0.0F, 0.5F - f, 0.5F + f, 0.8F, 0.5F + f);
|
||||
//TODO: setBlockBounds
|
||||
this.func_149676_a0.5F - f, 0.0F, 0.5F - f, 0.5F + f, 0.8F, 0.5F + f);
|
||||
|
||||
//TODO: this.setCreativeTab()
|
||||
this.func_149647_a(BiomesOPlenty.tabBiomesOPlenty);
|
||||
|
@ -47,7 +52,8 @@ public class BlockBOPCoral extends BlockFlower
|
|||
//TODO: getIcon()
|
||||
public IIcon func_149691_a(int side, int meta)
|
||||
{
|
||||
if (meta < 0 || meta >= textures.length) {
|
||||
if (meta < 0 || meta >= textures.length)
|
||||
{
|
||||
meta = 0;
|
||||
}
|
||||
|
||||
|
@ -55,21 +61,22 @@ public class BlockBOPCoral extends BlockFlower
|
|||
}
|
||||
|
||||
@Override
|
||||
public int getRenderType()
|
||||
//TODO getRenderType()
|
||||
public int func_149645_b()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
//TODO: getSubBlocks()
|
||||
public void func_149666_a(Item block, CreativeTabs creativeTabs, List list) {
|
||||
public void func_149666_a(Item block, CreativeTabs creativeTabs, List list)
|
||||
{
|
||||
for (int i = 0; i < coral.length; ++i)
|
||||
{
|
||||
if (i > 2)
|
||||
{
|
||||
list.add(new ItemStack(blockID, 1, i));
|
||||
list.add(new ItemStack(block, 1, i));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -113,9 +120,11 @@ public class BlockBOPCoral extends BlockFlower
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onNeighborBlockChange(World world, int x, int y, int z, int neighborID)
|
||||
//TODO: onNeighborBlockChange()
|
||||
public void func_149695_a(World world, int x, int y, int z, Block neighborBlock)
|
||||
{
|
||||
super.onNeighborBlockChange(world, x, y, z, neighborID);
|
||||
//TODO: onNeighborBlockChange()
|
||||
super.func_149695_a(world, x, y, z, neighborBlock);
|
||||
|
||||
if (world.getBlockMetadata(x, y, z) == 0 && world.getBlockId(x, y + 1, z) != blockID)
|
||||
{
|
||||
|
@ -185,9 +194,12 @@ public class BlockBOPCoral extends BlockFlower
|
|||
public int getDamageValue(World world, int x, int y, int z)
|
||||
{
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
if (meta < 3) {
|
||||
|
||||
if (meta < 3)
|
||||
{
|
||||
meta = 3;
|
||||
}
|
||||
|
||||
return meta;
|
||||
}
|
||||
|
||||
|
@ -203,12 +215,8 @@ public class BlockBOPCoral extends BlockFlower
|
|||
@Override
|
||||
public boolean isBlockReplaceable(World world, int x, int y, int z)
|
||||
{
|
||||
//ItemStack itemstack = new ItemStack(Blocks.flowers.get(), 1, 10);
|
||||
if (world.getBlockMetadata(x, y, z) == 10) return true;
|
||||
|
||||
if (world.getBlockMetadata(x, y, z) == 10)
|
||||
//if (!world.isRemote)
|
||||
//world.spawnEntityInWorld(new EntityItem(world, x, y, z, itemstack));
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,6 +12,7 @@ import net.minecraft.entity.EntityLivingBase;
|
|||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.potion.Potion;
|
||||
|
@ -34,9 +35,13 @@ public class BlockBOPFlower extends BlockFlower
|
|||
protected BlockBOPFlower()
|
||||
{
|
||||
super(material);
|
||||
this.setTickRandomly(true);
|
||||
|
||||
//TODO: setTickRandomly()
|
||||
this.func_149675_a(true);
|
||||
|
||||
float var4 = 0.2F;
|
||||
this.setBlockBounds(0.5F - var4, 0.0F, 0.5F - var4, 0.5F + var4, var4 * 3.0F, 0.5F + var4);
|
||||
//TODO: setBlockBounds
|
||||
this.func_149676_a(0.5F - var4, 0.0F, 0.5F - var4, 0.5F + var4, var4 * 3.0F, 0.5F + var4);
|
||||
|
||||
//TODO: this.setCreativeTab()
|
||||
this.func_149647_a(BiomesOPlenty.tabBiomesOPlenty);
|
||||
|
@ -65,7 +70,8 @@ public class BlockBOPFlower extends BlockFlower
|
|||
}
|
||||
|
||||
@Override
|
||||
public int getRenderType()
|
||||
//TODO getRenderType()
|
||||
public int func_149645_b()
|
||||
{
|
||||
return RenderUtils.foliageModel;
|
||||
}
|
||||
|
@ -83,49 +89,60 @@ public class BlockBOPFlower extends BlockFlower
|
|||
}
|
||||
|
||||
@Override
|
||||
public void setBlockBoundsBasedOnState(IBlockAccess world, int par2, int par3, int par4)
|
||||
//TODO: setBlockBoundsBasedOnState()
|
||||
public void func_149719_a(IBlockAccess world, int x, int y, int z)
|
||||
{
|
||||
int meta = world.getBlockMetadata(par2, par3, par4);
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
|
||||
switch (meta)
|
||||
{
|
||||
case 0:
|
||||
this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.015625F, 1.0F);
|
||||
//TODO: setBlockBounds
|
||||
this.func_149676_a0.0F, 0.0F, 0.0F, 1.0F, 0.015625F, 1.0F);
|
||||
break;
|
||||
|
||||
case 5:
|
||||
this.setBlockBounds(0.3F, 0.0F, 0.3F, 0.7F, 0.8F, 0.7F);
|
||||
//TODO: setBlockBounds
|
||||
this.func_149676_a0.3F, 0.0F, 0.3F, 0.7F, 0.8F, 0.7F);
|
||||
break;
|
||||
|
||||
case 6:
|
||||
this.setBlockBounds(0.3F, 0.0F, 0.3F, 0.7F, 0.6F, 0.7F);
|
||||
//TODO: setBlockBounds
|
||||
this.func_149676_a0.3F, 0.0F, 0.3F, 0.7F, 0.6F, 0.7F);
|
||||
break;
|
||||
|
||||
case 9:
|
||||
this.setBlockBounds(0.3F, 0.0F, 0.3F, 0.7F, 0.5F, 0.7F);
|
||||
//TODO: setBlockBounds
|
||||
this.func_149676_a0.3F, 0.0F, 0.3F, 0.7F, 0.5F, 0.7F);
|
||||
break;
|
||||
|
||||
case 10:
|
||||
this.setBlockBounds(0.3F, -0.97F, 0.3F, 0.7F, -0.7F, 0.7F);
|
||||
//this.setBlockBounds(0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F);
|
||||
//TODO: setBlockBounds
|
||||
this.func_149676_a0.3F, -0.97F, 0.3F, 0.7F, -0.7F, 0.7F);
|
||||
// //TODO: setBlockBounds
|
||||
this.func_149676_a0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F);
|
||||
break;
|
||||
|
||||
case 11:
|
||||
this.setBlockBounds(0.3F, 0.0F, 0.3F, 0.7F, 0.4F, 0.7F);
|
||||
//TODO: setBlockBounds
|
||||
this.func_149676_a0.3F, 0.0F, 0.3F, 0.7F, 0.4F, 0.7F);
|
||||
break;
|
||||
|
||||
case 15:
|
||||
this.setBlockBounds(0.3F, 0.0F, 0.3F, 0.7F, 0.6F, 0.7F);
|
||||
//TODO: setBlockBounds
|
||||
this.func_149676_a0.3F, 0.0F, 0.3F, 0.7F, 0.6F, 0.7F);
|
||||
break;
|
||||
|
||||
default:
|
||||
this.setBlockBounds(0.1F, 0.0F, 0.1F, 0.9F, 0.8F, 0.9F);
|
||||
//TODO: setBlockBounds
|
||||
this.func_149676_a0.1F, 0.0F, 0.1F, 0.9F, 0.8F, 0.9F);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEntityCollidedWithBlock(World world, int x, int y, int z, Entity entity)
|
||||
//TODO: onEntityCollidedWithBlock()
|
||||
public void func_149670_a(World world, int x, int y, int z, Entity entity)
|
||||
{
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
|
||||
|
@ -147,15 +164,14 @@ public class BlockBOPFlower extends BlockFlower
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A randomly called display update to be able to add particles or other items for display
|
||||
*/
|
||||
@Override
|
||||
//TODO: randomDisplayTick()
|
||||
public void func_149734_b(World world, int x, int y, int z, Random random)
|
||||
{
|
||||
super.randomDisplayTick(par1World, par2, par3, par4, par5Random);
|
||||
|
||||
int meta = par1World.getBlockMetadata(par2, par3, par4);
|
||||
|
||||
if (meta == 2)
|
||||
{
|
||||
if (par5Random.nextInt(4) != 0)
|
||||
|
@ -171,14 +187,14 @@ public class BlockBOPFlower extends BlockFlower
|
|||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
//TODO: getSubBlocks()
|
||||
public void func_149666_a(Item block, CreativeTabs creativeTabs, List list) {
|
||||
public void func_149666_a(Item block, CreativeTabs creativeTabs, List list)
|
||||
{
|
||||
for (int i = 0; i < plants.length; ++i)
|
||||
{
|
||||
if (i != 14)
|
||||
{
|
||||
list.add(new ItemStack(blockID, 1, i));
|
||||
list.add(new ItemStack(block, 1, i));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -238,14 +254,19 @@ public class BlockBOPFlower extends BlockFlower
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onNeighborBlockChange(World world, int x, int y, int z, int neighborID)
|
||||
//TODO: onNeighborBlockChange()
|
||||
public void func_149695_a(World world, int x, int y, int z, Block neighborBlock)
|
||||
{
|
||||
//super.onNeighborBlockChange(world, x, y, z, neighborID);
|
||||
super.func_149695_a(world, x, y, z, neighborBlock);
|
||||
|
||||
this.checkFlowerChange(world, x, y, z);
|
||||
if (world.getBlockMetadata(x, y, z) == SUNFLOWERTOP && world.getBlockId(x, y - 1, z) == blockID && world.getBlockMetadata(x, y - 1, z) != SUNFLOWERBOTTOM) {
|
||||
|
||||
if (world.getBlockMetadata(x, y, z) == SUNFLOWERTOP && world.getBlockId(x, y - 1, z) == blockID && world.getBlockMetadata(x, y - 1, z) != SUNFLOWERBOTTOM)
|
||||
{
|
||||
world.setBlockToAir(x, y, z);
|
||||
}
|
||||
if (world.getBlockMetadata(x, y, z) == SUNFLOWERBOTTOM && world.getBlockId(x, y + 1, z) != blockID) {
|
||||
if (world.getBlockMetadata(x, y, z) == SUNFLOWERBOTTOM && world.getBlockId(x, y + 1, z) != blockID)
|
||||
{
|
||||
world.setBlockToAir(x, y, z);
|
||||
}
|
||||
}
|
||||
|
@ -301,15 +322,16 @@ public class BlockBOPFlower extends BlockFlower
|
|||
}
|
||||
|
||||
@Override
|
||||
public void harvestBlock(World world, EntityPlayer player, int x, int y, int z, int meta)
|
||||
//TODO: harvestBlock()
|
||||
public void func_149636_a(World world, EntityPlayer player, int x, int y, int z, int meta)
|
||||
{
|
||||
super.harvestBlock(world, player, x, y, z, meta);
|
||||
super.func_149636_a(world, player, x, y, z, meta);
|
||||
|
||||
ItemStack equippedItem = player.getCurrentEquippedItem();
|
||||
|
||||
if (equippedItem != null)
|
||||
{
|
||||
if (equippedItem.itemID != Item.shears.itemID)
|
||||
if (equippedItem.getItem() != Items.shears)
|
||||
{
|
||||
if (meta == 2)
|
||||
{
|
||||
|
@ -335,12 +357,8 @@ public class BlockBOPFlower extends BlockFlower
|
|||
@Override
|
||||
public boolean isBlockReplaceable(World world, int x, int y, int z)
|
||||
{
|
||||
//ItemStack itemstack = new ItemStack(Blocks.flowers.get(), 1, 10);
|
||||
if (world.getBlockMetadata(x, y, z) == 10) return true;
|
||||
|
||||
if (world.getBlockMetadata(x, y, z) == 10)
|
||||
//if (!world.isRemote)
|
||||
//world.spawnEntityInWorld(new EntityItem(world, x, y, z, itemstack));
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,9 +29,11 @@ public class BlockBOPFlower2 extends BlockFlower
|
|||
protected BlockBOPFlower2(int blockID, Material material)
|
||||
{
|
||||
super(blockID, material);
|
||||
this.setTickRandomly(true);
|
||||
//TODO: setTickRandomly()
|
||||
this.func_149675_a(true);
|
||||
float var4 = 0.2F;
|
||||
this.setBlockBounds(0.5F - var4, 0.0F, 0.5F - var4, 0.5F + var4, var4 * 3.0F, 0.5F + var4);
|
||||
//TODO: setBlockBounds
|
||||
this.func_149676_a0.5F - var4, 0.0F, 0.5F - var4, 0.5F + var4, var4 * 3.0F, 0.5F + var4);
|
||||
|
||||
this.setCreativeTab(BiomesOPlenty.tabBiomesOPlenty);
|
||||
}
|
||||
|
@ -64,7 +66,8 @@ public class BlockBOPFlower2 extends BlockFlower
|
|||
}
|
||||
|
||||
@Override
|
||||
public int getRenderType()
|
||||
//TODO getRenderType()
|
||||
public int func_149645_b()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
@ -80,20 +83,23 @@ public class BlockBOPFlower2 extends BlockFlower
|
|||
}
|
||||
|
||||
@Override
|
||||
public void setBlockBoundsBasedOnState(IBlockAccess world, int par2, int par3, int par4)
|
||||
//TODO: setBlockBoundsBasedOnState()
|
||||
public void func_149719_a(IBlockAccess world, int x, int y, int z)
|
||||
{
|
||||
int meta = world.getBlockMetadata(par2, par3, par4);
|
||||
|
||||
switch (meta)
|
||||
{
|
||||
default:
|
||||
this.setBlockBounds(0.1F, 0.0F, 0.1F, 0.9F, 0.8F, 0.9F);
|
||||
//TODO: setBlockBounds
|
||||
this.func_149676_a0.1F, 0.0F, 0.1F, 0.9F, 0.8F, 0.9F);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEntityCollidedWithBlock(World world, int x, int y, int z, Entity entity)
|
||||
//TODO: onEntityCollidedWithBlock()
|
||||
public void func_149670_a(World world, int x, int y, int z, Entity entity)
|
||||
{
|
||||
if (world.getBlockMetadata(x, y, z) == 2)
|
||||
{
|
||||
|
@ -114,7 +120,8 @@ public class BlockBOPFlower2 extends BlockFlower
|
|||
}
|
||||
|
||||
@Override
|
||||
public void harvestBlock(World world, EntityPlayer player, int x, int y, int z, int meta)
|
||||
//TODO: harvestBlock()
|
||||
public void func_149636_a(World world, EntityPlayer player, int x, int y, int z, int meta)
|
||||
{
|
||||
super.harvestBlock(world, player, x, y, z, meta);
|
||||
|
||||
|
@ -209,9 +216,11 @@ public class BlockBOPFlower2 extends BlockFlower
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onNeighborBlockChange(World world, int x, int y, int z, int neighborID)
|
||||
//TODO: onNeighborBlockChange()
|
||||
public void func_149695_a(World world, int x, int y, int z, Block neighborBlock)
|
||||
{
|
||||
//super.onNeighborBlockChange(world, x, y, z, neighborID);
|
||||
super.func_149695_a(world, x, y, z, neighborBlock);
|
||||
|
||||
this.checkFlowerChange(world, x, y, z);
|
||||
}
|
||||
|
||||
|
@ -254,12 +263,8 @@ public class BlockBOPFlower2 extends BlockFlower
|
|||
@Override
|
||||
public boolean isBlockReplaceable(World world, int x, int y, int z)
|
||||
{
|
||||
//ItemStack itemstack = new ItemStack(Blocks.flowers.get(), 1, 10);
|
||||
if (world.getBlockMetadata(x, y, z) == 10) return true;
|
||||
|
||||
if (world.getBlockMetadata(x, y, z) == 10)
|
||||
//if (!world.isRemote)
|
||||
//world.spawnEntityInWorld(new EntityItem(world, x, y, z, itemstack));
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -45,11 +45,14 @@ public class BlockBOPFoliage extends BlockTallGrass implements IShearable
|
|||
public BlockBOPFoliage()
|
||||
{
|
||||
float f = 0.4F;
|
||||
setBurnProperties(this.blockID, 60, 100);
|
||||
|
||||
//TODO: setBurnProperties() getIdFromBlock()
|
||||
Blocks.fire.func_149842_a(func_149682_b(this), 60, 100);
|
||||
setBlockBounds(0.5F - f, 0.0F, 0.5F - f, 0.5F + f, 0.8F, 0.5F + f);
|
||||
//TODO: this.setHardness
|
||||
this.func_149711_c(0.0F);
|
||||
setStepSound(Block.soundGrassFootstep);
|
||||
//TODO setStepSound(Block.soundGrassFootstep)
|
||||
this.func_149672_a(Block.field_149779_h);
|
||||
|
||||
//TODO: this.setCreativeTab()
|
||||
this.func_149647_a(BiomesOPlenty.tabBiomesOPlenty);
|
||||
|
@ -81,12 +84,15 @@ public class BlockBOPFoliage extends BlockTallGrass implements IShearable
|
|||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
public void getSubBlocks(int blockID, CreativeTabs par2CreativeTabs, List list)
|
||||
//TODO: getSubBlocks()
|
||||
public void func_149666_a(Item block, CreativeTabs creativeTabs, List list)
|
||||
{
|
||||
for (int i = 0; i < foliageTypes.length; ++i)
|
||||
if (i != GRASSTOP) {
|
||||
list.add(new ItemStack(blockID, 1, i));
|
||||
{
|
||||
if (i != GRASSTOP)
|
||||
{
|
||||
list.add(new ItemStack(block, 1, i));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -188,7 +194,8 @@ public class BlockBOPFoliage extends BlockTallGrass implements IShearable
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onNeighborBlockChange(World world, int x, int y, int z, int neighbourID)
|
||||
//TODO: onNeighborBlockChange()
|
||||
public void func_149695_a(World world, int x, int y, int z, Block neighborBlock)
|
||||
{
|
||||
int metadata = world.getBlockMetadata(x, y, z);
|
||||
|
||||
|
@ -205,31 +212,32 @@ public class BlockBOPFoliage extends BlockTallGrass implements IShearable
|
|||
}
|
||||
}
|
||||
|
||||
super.onNeighborBlockChange(world, x, y, z, neighbourID);
|
||||
super.func_149695_a(world, x, y, z, neighborBlock);
|
||||
this.checkFlowerChange(world, x, y, z);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEntityCollidedWithBlock(World par1World, int x, int y, int z, Entity par5Entity)
|
||||
//TODO: onEntityCollidedWithBlock()
|
||||
public void func_149670_a(World world, int x, int y, int z, Entity entity)
|
||||
{
|
||||
int meta = par1World.getBlockMetadata(x, y, z);
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
|
||||
if (!par1World.isRemote && meta == 7)
|
||||
if (!world.isRemote && meta == 7)
|
||||
{
|
||||
if (par5Entity instanceof EntityLivingBase)
|
||||
if (entity instanceof EntityLivingBase)
|
||||
{
|
||||
if (par5Entity instanceof EntityPlayer)
|
||||
if (entity instanceof EntityPlayer)
|
||||
{
|
||||
InventoryPlayer inventory = ((EntityPlayer)par5Entity).inventory;
|
||||
InventoryPlayer inventory = ((EntityPlayer)entity).inventory;
|
||||
|
||||
if (!((inventory.armorInventory[0] != null && inventory.armorInventory[0].itemID == Item.bootsLeather.itemID) && (inventory.armorInventory[1] != null && inventory.armorInventory[1].itemID == Item.legsLeather.itemID)))
|
||||
if (!((inventory.armorInventory[0] != null && inventory.armorInventory[0].getItem() == Items.leather_boots) && (inventory.armorInventory[1] != null && inventory.armorInventory[1].getItem() == Items.leather_leggings)))
|
||||
{
|
||||
((EntityLivingBase)par5Entity).addPotionEffect(new PotionEffect(Potion.poison.id, 100));
|
||||
((EntityLivingBase)entity).addPotionEffect(new PotionEffect(Potion.poison.id, 100));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
((EntityLivingBase)par5Entity).addPotionEffect(new PotionEffect(Potion.poison.id, 100));
|
||||
((EntityLivingBase)entity).addPotionEffect(new PotionEffect(Potion.poison.id, 100));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -253,7 +261,8 @@ public class BlockBOPFoliage extends BlockTallGrass implements IShearable
|
|||
}
|
||||
|
||||
@Override
|
||||
public int getRenderType()
|
||||
//TODO getRenderType()
|
||||
public int func_149645_b()
|
||||
{
|
||||
return RenderUtils.foliageModel;
|
||||
}
|
||||
|
@ -281,7 +290,8 @@ public class BlockBOPFoliage extends BlockTallGrass implements IShearable
|
|||
}
|
||||
|
||||
@Override
|
||||
public int idDropped(int par1, Random par2Random, int par3)
|
||||
//TODO: getItemDropped()
|
||||
public Item func_149650_a(int metadata, Random random, int fortune)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
@ -311,9 +321,10 @@ public class BlockBOPFoliage extends BlockTallGrass implements IShearable
|
|||
}
|
||||
|
||||
@Override
|
||||
public void setBlockBoundsBasedOnState(IBlockAccess iblockaccess, int x, int y, int z)
|
||||
//TODO: setBlockBoundsBasedOnState()
|
||||
public void func_149719_a(IBlockAccess world, int x, int y, int z)
|
||||
{
|
||||
int meta = iblockaccess.getBlockMetadata(x, y, z);
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
|
||||
float minX;
|
||||
float minY;
|
||||
|
@ -362,13 +373,14 @@ public class BlockBOPFoliage extends BlockTallGrass implements IShearable
|
|||
}
|
||||
|
||||
@Override
|
||||
public void harvestBlock(World world, EntityPlayer player, int x, int y, int z, int meta)
|
||||
//TODO: harvestBlock()
|
||||
public void func_149636_a(World world, EntityPlayer player, int x, int y, int z, int meta)
|
||||
{
|
||||
super.harvestBlock(world, player, x, y, z, meta);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated (World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9)
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9)
|
||||
{
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
if (meta == 8)
|
||||
|
@ -393,7 +405,7 @@ public class BlockBOPFoliage extends BlockTallGrass implements IShearable
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean isShearable(ItemStack item, World world, int x, int y, int z)
|
||||
public boolean isShearable(ItemStack item, IBlockAccess world, int x, int y, int z)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@ package biomesoplenty.common.blocks;
|
|||
import java.util.Random;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.util.IIcon;
|
||||
|
@ -20,7 +21,7 @@ public class BlockBOPGeneric extends Block
|
|||
private IIcon texture;
|
||||
private BlockType type;
|
||||
|
||||
public BlockBOPGeneric(BlockType type)
|
||||
public BlockBOPGeneric(Material material, BlockType type)
|
||||
{
|
||||
super(material);
|
||||
this.type = type;
|
||||
|
@ -31,27 +32,33 @@ public class BlockBOPGeneric extends Block
|
|||
{
|
||||
case ASH_STONE:
|
||||
//TODO: this.setHardness
|
||||
this.func_149711_c(1.0F).setStepSound(Block.soundStoneFootstep);
|
||||
this.func_149711_c(1.0F);
|
||||
//TODO setStepSound(Block.soundStoneFootstep)
|
||||
this.func_149672_a(Block.field_149780_i);
|
||||
break;
|
||||
|
||||
case CRAG_ROCK:
|
||||
//TODO: this.setHardness
|
||||
this.func_149711_c(1.0F).setStepSound(Block.soundGravelFootstep);
|
||||
this.func_149711_c(1.0F);
|
||||
this.setStepSound(Block.soundGravelFootstep);
|
||||
break;
|
||||
|
||||
case DRIED_DIRT:
|
||||
//TODO: this.setHardness
|
||||
this.func_149711_c(0.1F).setStepSound(Block.soundStoneFootstep);
|
||||
this.func_149711_c(0.1F). //TODO setStepSound(Block.sound)
|
||||
this.func_149672_a(Block.soundStoneFootstep);
|
||||
break;
|
||||
|
||||
case HARD_DIRT:
|
||||
//TODO: this.setHardness
|
||||
this.func_149711_c(0.9F).setStepSound(Block.soundStoneFootstep);
|
||||
this.func_149711_c(0.9F). //TODO setStepSound(Block.sound)
|
||||
this.func_149672_a(Block.soundStoneFootstep);
|
||||
break;
|
||||
|
||||
case HARD_ICE:
|
||||
//TODO: this.setHardness
|
||||
this.func_149711_c(0.75F).setStepSound(Block.soundStoneFootstep);
|
||||
this.func_149711_c(0.75F). //TODO setStepSound(Block.sound)
|
||||
this.func_149672_a(Block.soundStoneFootstep);
|
||||
break;
|
||||
|
||||
case HARD_SAND:
|
||||
|
@ -61,7 +68,8 @@ public class BlockBOPGeneric extends Block
|
|||
|
||||
case MUD_BRICK:
|
||||
//TODO: this.setHardness
|
||||
this.func_149711_c(1.0F).setResistance(2.0F).setStepSound(Block.soundStoneFootstep);
|
||||
this.func_149711_c(1.0F).setResistance(2.0F). //TODO setStepSound(Block.sound)
|
||||
this.func_149672_a(Block.soundStoneFootstep);
|
||||
break;
|
||||
|
||||
case HOLY_DIRT:
|
||||
|
@ -133,7 +141,8 @@ public class BlockBOPGeneric extends Block
|
|||
}
|
||||
|
||||
@Override
|
||||
public int idDropped(int par1, Random par2Random, int par3)
|
||||
//TODO: getItemDropped()
|
||||
public Item func_149650_a(int metadata, Random random, int fortune)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
|
|
|
@ -24,8 +24,10 @@ public class BlockBOPGrass extends Block
|
|||
public BlockBOPGrass()
|
||||
{
|
||||
super(Material.grass);
|
||||
this.setTickRandomly(true);
|
||||
setStepSound(Block.soundGrassFootstep);
|
||||
//TODO: setTickRandomly()
|
||||
this.func_149675_a(true);
|
||||
//TODO setStepSound(Block.soundGrassFootstep)
|
||||
this.func_149672_a(Block.field_149779_h);
|
||||
//TODO: this.setHardness
|
||||
this.func_149711_c(0.6F);
|
||||
//setLightValue(0.25F);
|
||||
|
@ -147,7 +149,8 @@ public class BlockBOPGrass extends Block
|
|||
}
|
||||
|
||||
@Override
|
||||
public void updateTick(World world, int x, int y, int z, Random random)
|
||||
public void //TODO: updateTick()
|
||||
public void func_149674_a(World world, int x, int y, int z, Random random)(World world, int x, int y, int z, Random random)
|
||||
{
|
||||
if (world.getBlockMetadata(x, y, z) == 0)
|
||||
{
|
||||
|
@ -196,7 +199,8 @@ public class BlockBOPGrass extends Block
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onEntityCollidedWithBlock(World world, int x, int y, int z, Entity entity)
|
||||
//TODO: onEntityCollidedWithBlock()
|
||||
public void func_149670_a(World world, int x, int y, int z, Entity entity)
|
||||
{
|
||||
if (world.getBlockMetadata(x, y, z) == 1) {
|
||||
entity.setFire(2);
|
||||
|
@ -204,7 +208,8 @@ public class BlockBOPGrass extends Block
|
|||
}
|
||||
|
||||
@Override
|
||||
public int idDropped(int meta, Random par2Random, int par3)
|
||||
//TODO: getItemDropped()
|
||||
public Item func_149650_a(int metadata, Random random, int fortune)
|
||||
{
|
||||
return meta == 0 ? Blocks.holyDirt.get().blockID : Block.dirt.blockID;
|
||||
}
|
||||
|
|
|
@ -63,7 +63,8 @@ public class BlockBOPLeaves extends BlockLeavesBase implements IShearable
|
|||
{
|
||||
super(Material.leaves, false);
|
||||
category = cat;
|
||||
this.setTickRandomly(true);
|
||||
//TODO: setTickRandomly()
|
||||
this.func_149675_a(true);
|
||||
//TODO: this.setHardness
|
||||
this.func_149711_c(0.2F);
|
||||
setLightOpacity(1);
|
||||
|
@ -187,7 +188,8 @@ public class BlockBOPLeaves extends BlockLeavesBase implements IShearable
|
|||
}
|
||||
|
||||
@Override
|
||||
public void updateTick(World world, int x, int y, int z, Random random)
|
||||
public void //TODO: updateTick()
|
||||
public void func_149674_a(World world, int x, int y, int z, Random random)(World world, int x, int y, int z, Random random)
|
||||
{
|
||||
if (world.isRemote)
|
||||
return;
|
||||
|
@ -344,7 +346,8 @@ public class BlockBOPLeaves extends BlockLeavesBase implements IShearable
|
|||
}
|
||||
|
||||
@Override
|
||||
public void dropBlockAsItemWithChance(World world, int x, int y, int z, int meta, float chance, int par7)
|
||||
//TODO: dropBlockAsItemWithChance()
|
||||
public void func_149690_a(World world, int x, int y, int z, int metadata, float chance, int fortune)
|
||||
{
|
||||
if (world.isRemote)
|
||||
return;
|
||||
|
@ -361,7 +364,8 @@ public class BlockBOPLeaves extends BlockLeavesBase implements IShearable
|
|||
}
|
||||
|
||||
@Override
|
||||
public int damageDropped(int meta)
|
||||
//TODO damageDropped()
|
||||
public int func_149692_a(int meta)
|
||||
{
|
||||
return (getTypeFromMeta(meta) + category.ordinal() * 4) + 1;
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@ import net.minecraft.block.BlockFlower;
|
|||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
@ -26,9 +27,11 @@ public class BlockBOPMushroom extends BlockFlower
|
|||
|
||||
//TODO: setTickRandomly()
|
||||
this.func_149675_a(true);
|
||||
|
||||
float var4 = 0.2F;
|
||||
|
||||
this.setBlockBounds(0.3F, 0.0F, 0.3F, 0.7F, 0.4F, 0.7F);
|
||||
//TODO: setBlockBounds
|
||||
this.func_149676_a(0.3F, 0.0F, 0.3F, 0.7F, 0.4F, 0.7F);
|
||||
|
||||
//TODO: this.setCreativeTab()
|
||||
this.func_149647_a(BiomesOPlenty.tabBiomesOPlenty);
|
||||
|
@ -58,7 +61,8 @@ public class BlockBOPMushroom extends BlockFlower
|
|||
}
|
||||
|
||||
@Override
|
||||
public int getRenderType()
|
||||
//TODO getRenderType()
|
||||
public int func_149645_b()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
@ -74,40 +78,36 @@ public class BlockBOPMushroom extends BlockFlower
|
|||
}
|
||||
|
||||
@Override
|
||||
public void setBlockBoundsBasedOnState(IBlockAccess world, int par2, int par3, int par4)
|
||||
//TODO: setBlockBoundsBasedOnState()
|
||||
public void func_149719_a(IBlockAccess world, int x, int y, int z)
|
||||
{
|
||||
int meta = world.getBlockMetadata(par2, par3, par4);
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
|
||||
switch (meta)
|
||||
{
|
||||
case 0:
|
||||
this.setBlockBounds(0.3F, 0.0F, 0.3F, 0.7F, 0.4F, 0.7F);
|
||||
//TODO: setBlockBounds
|
||||
this.func_149676_a(0.3F, 0.0F, 0.3F, 0.7F, 0.4F, 0.7F);
|
||||
break;
|
||||
|
||||
default:
|
||||
this.setBlockBounds(0.3F, 0.0F, 0.3F, 0.7F, 0.4F, 0.7F);
|
||||
//TODO: setBlockBounds
|
||||
this.func_149676_a(0.3F, 0.0F, 0.3F, 0.7F, 0.4F, 0.7F);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
//TODO: getSubBlocks()
|
||||
public void func_149666_a(Item block, CreativeTabs creativeTabs, List list)
|
||||
{
|
||||
for (int i = 0; i < plants.length; ++i) {
|
||||
list.add(new ItemStack(blockID, 1, i));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean canThisPlantGrowOnThisBlockID(int id)
|
||||
for (int i = 0; i < plants.length; ++i)
|
||||
{
|
||||
return id == Block.grass.blockID || id == Block.dirt.blockID || id == Block.mycelium.blockID || id == Blocks.overgrownNetherrack.get().blockID;
|
||||
list.add(new ItemStack(block, 1, i));
|
||||
}
|
||||
}
|
||||
|
||||
protected boolean canThisPlantGrowOnThisBlockID(int id, int metadata)
|
||||
protected boolean canThisPlantGrowOnThisBlock(Block block, int metadata)
|
||||
{
|
||||
if (metadata == 0) //Toadstool
|
||||
return id == Block.grass.blockID || id == Block.dirt.blockID || id == Block.mycelium.blockID || id == Blocks.holyGrass.get().blockID || id == Block.netherrack.blockID || id == Blocks.overgrownNetherrack.get().blockID;
|
||||
|
@ -152,9 +152,11 @@ public class BlockBOPMushroom extends BlockFlower
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean canBlockStay(World world, int x, int y, int z)
|
||||
//TODO: canBlockStay()
|
||||
public boolean func_149718_j(World world, int x, int y, int z)
|
||||
{
|
||||
return this.canThisPlantGrowOnThisBlockID(world.getBlockId(x, y - 1, z), world.getBlockMetadata(x, y, z));
|
||||
//TODO: getBlock()
|
||||
return this.canThisPlantGrowOnThisBlockID(world.func_147439_a(x, y - 1, z), world.getBlockMetadata(x, y, z));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -34,11 +34,13 @@ public class BlockBOPPersimmonLeaves extends BlockLeavesBase implements IShearab
|
|||
{
|
||||
super(Material.leaves, false);
|
||||
setBurnProperties(this.blockID, 30, 60);
|
||||
this.setTickRandomly(true);
|
||||
//TODO: setTickRandomly()
|
||||
this.func_149675_a(true);
|
||||
//TODO: this.setHardness
|
||||
this.func_149711_c(0.2F);
|
||||
setLightOpacity(1);
|
||||
setStepSound(Block.soundGrassFootstep);
|
||||
//TODO setStepSound(Block.soundGrassFootstep)
|
||||
this.func_149672_a(Block.field_149779_h);
|
||||
|
||||
//TODO: this.setCreativeTab()
|
||||
this.func_149647_a(BiomesOPlenty.tabBiomesOPlenty);
|
||||
|
@ -90,10 +92,10 @@ public class BlockBOPPersimmonLeaves extends BlockLeavesBase implements IShearab
|
|||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
//TODO: getSubBlocks()
|
||||
public void func_149666_a(Item block, CreativeTabs creativeTabs, List list) {
|
||||
list.add(new ItemStack(blockID, 1, 0));
|
||||
public void func_149666_a(Item block, CreativeTabs creativeTabs, List list)
|
||||
{
|
||||
list.add(new ItemStack(block, 1, 0));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -135,7 +137,8 @@ public class BlockBOPPersimmonLeaves extends BlockLeavesBase implements IShearab
|
|||
}
|
||||
|
||||
@Override
|
||||
public void updateTick(World world, int x, int y, int z, Random random)
|
||||
//TODO: updateTick()
|
||||
public void func_149674_a(World world, int x, int y, int z, Random random)(World world, int x, int y, int z, Random random)
|
||||
{
|
||||
if (world.isRemote)
|
||||
return;
|
||||
|
@ -260,7 +263,7 @@ public class BlockBOPPersimmonLeaves extends BlockLeavesBase implements IShearab
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated (World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9)
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9)
|
||||
{
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
if ((meta & 3) == 3)
|
||||
|
@ -280,7 +283,8 @@ public class BlockBOPPersimmonLeaves extends BlockLeavesBase implements IShearab
|
|||
}
|
||||
|
||||
@Override
|
||||
public int idDropped(int par1, Random par2Random, int par3)
|
||||
//TODO: getItemDropped()
|
||||
public Item func_149650_a(int metadata, Random random, int fortune)
|
||||
{
|
||||
return Blocks.saplings.get().blockID;
|
||||
}
|
||||
|
@ -293,13 +297,15 @@ public class BlockBOPPersimmonLeaves extends BlockLeavesBase implements IShearab
|
|||
}
|
||||
|
||||
@Override
|
||||
public int quantityDropped(Random random)
|
||||
//TODO: quantityDropped()
|
||||
public int func_149745_a(Random random)
|
||||
{
|
||||
return random.nextInt(20) == 0 ? 1 : 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dropBlockAsItemWithChance(World world, int x, int y, int z, int meta, float chance, int par7)
|
||||
//TODO: dropBlockAsItemWithChance()
|
||||
public void func_149690_a(World world, int x, int y, int z, int metadata, float chance, int fortune)
|
||||
{
|
||||
if (world.isRemote)
|
||||
return;
|
||||
|
@ -322,7 +328,7 @@ public class BlockBOPPersimmonLeaves extends BlockLeavesBase implements IShearab
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean isShearable(ItemStack item, World world, int x, int y, int z)
|
||||
public boolean isShearable(ItemStack item, IBlockAccess world, int x, int y, int z)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@ -342,7 +348,8 @@ public class BlockBOPPersimmonLeaves extends BlockLeavesBase implements IShearab
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldSideBeRendered(IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5)
|
||||
//TODO shouldSideBeRendered
|
||||
public boolean func_149646_a(IBlockAccess world, int x, int y, int z, int side)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -9,8 +9,11 @@ import net.minecraft.block.BlockLeavesBase;
|
|||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.IShearable;
|
||||
import biomesoplenty.BiomesOPlenty;
|
||||
|
@ -22,13 +25,17 @@ public class BlockBOPPetals extends BlockLeavesBase implements IShearable
|
|||
|
||||
public BlockBOPPetals()
|
||||
{
|
||||
super(Material.leaves, false);
|
||||
setBurnProperties(this.blockID, 30, 60);
|
||||
this.setTickRandomly(true);
|
||||
//TODO: Material.leaves
|
||||
super(Material.field_151584_j, false);
|
||||
|
||||
//TODO: setBurnProperties() getIdFromBlock()
|
||||
Blocks.fire.func_149842_a(func_149682_b(this), 30, 60);
|
||||
//TODO: setTickRandomly()
|
||||
this.func_149675_a(true);
|
||||
//TODO: this.setHardness
|
||||
this.func_149711_c(0.2F);
|
||||
setLightOpacity(1);
|
||||
setStepSound(Block.soundGrassFootstep);
|
||||
//TODO setStepSound(Block.soundGrassFootstep)
|
||||
this.func_149672_a(Block.field_149779_h);
|
||||
|
||||
//TODO: this.setCreativeTab()
|
||||
this.func_149647_a(BiomesOPlenty.tabBiomesOPlenty);
|
||||
|
@ -59,21 +66,24 @@ public class BlockBOPPetals extends BlockLeavesBase implements IShearable
|
|||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
//TODO: getSubBlocks()
|
||||
public void func_149666_a(Item block, CreativeTabs creativeTabs, List list) {
|
||||
public void func_149666_a(Item block, CreativeTabs creativeTabs, List list)
|
||||
{
|
||||
for (int i = 0; i < textures.length; ++i) {
|
||||
list.add(new ItemStack(blockID, 1, i));
|
||||
list.add(new ItemStack(block, 1, i));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int idDropped(int par1, Random par2Random, int par3)
|
||||
//TODO: getItemDropped()
|
||||
public Item func_149650_a(int metadata, Random random, int fortune)
|
||||
{
|
||||
if (par1 == 0)
|
||||
return Block.plantRed.blockID;
|
||||
if (metadata == 0)
|
||||
//TODO: getItemFromBlock()
|
||||
return Item.func_150898_a(Blocks.red_flower);
|
||||
else
|
||||
return Block.plantYellow.blockID;
|
||||
//TODO: getItemFromBlock()
|
||||
return Item.func_150898_a(Blocks.yellow_flower);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -84,13 +94,14 @@ public class BlockBOPPetals extends BlockLeavesBase implements IShearable
|
|||
}
|
||||
|
||||
@Override
|
||||
public int quantityDropped(Random random)
|
||||
//TODO: quantityDropped()
|
||||
public int func_149745_a(Random random)
|
||||
{
|
||||
return random.nextInt(20) == 0 ? 1 : 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isShearable(ItemStack item, World world, int x, int y, int z)
|
||||
public boolean isShearable(ItemStack item, IBlockAccess world, int x, int y, int z)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -6,6 +6,8 @@ import net.minecraft.block.Block;
|
|||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import biomesoplenty.BiomesOPlenty;
|
||||
|
@ -17,8 +19,11 @@ public class BlockBOPPlank extends Block
|
|||
|
||||
public BlockBOPPlank()
|
||||
{
|
||||
super(Material.wood);
|
||||
setBurnProperties(this.blockID, 5, 20);
|
||||
//TODO: Material.wood
|
||||
super(Material.field_151575_d);
|
||||
|
||||
//TODO: setBurnProperties() getIdFromBlock()
|
||||
Blocks.fire.func_149842_a(func_149682_b(this), 5, 20);
|
||||
//TODO: this.setHardness
|
||||
this.func_149711_c(2.0F);
|
||||
|
||||
|
@ -51,9 +56,11 @@ public class BlockBOPPlank extends Block
|
|||
@Override
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
//TODO: getSubBlocks()
|
||||
public void func_149666_a(Item block, CreativeTabs creativeTabs, List list) {
|
||||
for (int i = 0; i < woodTypes.length; ++i) {
|
||||
list.add(new ItemStack(blockID, 1, i));
|
||||
public void func_149666_a(Item block, CreativeTabs creativeTabs, List list)
|
||||
{
|
||||
for (int i = 0; i < woodTypes.length; ++i)
|
||||
{
|
||||
list.add(new ItemStack(block, 1, i));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -40,13 +40,16 @@ public class BlockBOPPlant extends BlockFlower implements IShearable
|
|||
public BlockBOPPlant()
|
||||
{
|
||||
super(Material.vine);
|
||||
|
||||
setTickRandomly(true);
|
||||
float var3 = 0.4F;
|
||||
setBurnProperties(blockID, 60, 100);
|
||||
//TODO: this.setHardness
|
||||
this.func_149711_c(0.0F);
|
||||
setStepSound(Block.soundGrassFootstep);
|
||||
setBlockBounds(0.5F - var3, 0.0F, 0.5F - var3, 0.5F + var3, 0.8F, 0.5F + var3);
|
||||
//TODO setStepSound(Block.soundGrassFootstep)
|
||||
this.func_149672_a(Block.field_149779_h);
|
||||
//TODO: setBlockBounds
|
||||
this.func_149676_a(0.5F - var3, 0.0F, 0.5F - var3, 0.5F + var3, 0.8F, 0.5F + var3);
|
||||
|
||||
//TODO: this.setCreativeTab()
|
||||
this.func_149647_a(BiomesOPlenty.tabBiomesOPlenty);
|
||||
|
@ -77,37 +80,42 @@ public class BlockBOPPlant extends BlockFlower implements IShearable
|
|||
}
|
||||
|
||||
@Override
|
||||
public int getRenderType ()
|
||||
//TODO getRenderType()
|
||||
public int func_149645_b()
|
||||
{
|
||||
return RenderUtils.plantsModel;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setBlockBoundsBasedOnState(IBlockAccess world, int par2, int par3, int par4)
|
||||
//TODO: setBlockBoundsBasedOnState()
|
||||
public void func_149719_a(IBlockAccess world, int x, int y, int z)
|
||||
{
|
||||
int meta = world.getBlockMetadata(par2, par3, par4);
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
|
||||
switch (meta)
|
||||
{
|
||||
case 6:
|
||||
case 7:
|
||||
this.setBlockBounds(0.125F, 0.0F, 0.125F, 0.875F, 1.00F, 0.875F);
|
||||
//TODO: setBlockBounds
|
||||
this.func_149676_a(0.125F, 0.0F, 0.125F, 0.875F, 1.00F, 0.875F);
|
||||
break;
|
||||
|
||||
default:
|
||||
this.setBlockBounds(0.1F, 0.0F, 0.1F, 0.9F, 0.8F, 0.9F);
|
||||
//TODO: setBlockBounds
|
||||
this.func_149676_a(0.1F, 0.0F, 0.1F, 0.9F, 0.8F, 0.9F);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
public void getSubBlocks(int blockID, CreativeTabs creativeTabs, List list)
|
||||
//TODO: getSubBlocks()
|
||||
public void func_149666_a(Item block, CreativeTabs creativeTabs, List list)
|
||||
{
|
||||
for (int i = 0; i < plants.length; ++i)
|
||||
{
|
||||
for (int i = 0; i < plants.length; ++i) {
|
||||
if (i != CATTAILTOP && i!= CATTAILBOTTOM && i!= 11)
|
||||
{
|
||||
list.add(new ItemStack(blockID, 1, i));
|
||||
list.add(new ItemStack(block, 1, i));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -240,9 +248,11 @@ public class BlockBOPPlant extends BlockFlower implements IShearable
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onNeighborBlockChange(World world, int x, int y, int z, int neighborID)
|
||||
//TODO: onNeighborBlockChange()
|
||||
public void func_149695_a(World world, int x, int y, int z, Block neighborBlock)(World world, int x, int y, int z, int neighborID)
|
||||
{
|
||||
super.onNeighborBlockChange(world, x, y, z, neighborID);
|
||||
super. //TODO: onNeighborBlockChange()
|
||||
public void func_149695_a(World world, int x, int y, int z, Block neighborBlock)(world, x, y, z, neighborID);
|
||||
this.checkFlowerChange(world, x, y, z);
|
||||
if (world.getBlockMetadata(x, y, z) == CATTAILTOP && world.getBlockId(x, y - 1, z) == blockID && world.getBlockMetadata(x, y - 1, z) != CATTAILBOTTOM)
|
||||
{
|
||||
|
@ -271,7 +281,8 @@ public class BlockBOPPlant extends BlockFlower implements IShearable
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onEntityCollidedWithBlock(World world, int x, int y, int z, Entity entity)
|
||||
//TODO: onEntityCollidedWithBlock()
|
||||
public void func_149670_a(World world, int x, int y, int z, Entity entity)
|
||||
{
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
if (meta == 5)
|
||||
|
@ -339,7 +350,8 @@ public class BlockBOPPlant extends BlockFlower implements IShearable
|
|||
}
|
||||
|
||||
@Override
|
||||
public int idDropped(int par1, Random par2Random, int par3)
|
||||
//TODO: getItemDropped()
|
||||
public Item func_149650_a(int metadata, Random random, int fortune)
|
||||
{
|
||||
if (par1 > 5 && par1 != 11)
|
||||
{
|
||||
|
@ -389,7 +401,8 @@ public class BlockBOPPlant extends BlockFlower implements IShearable
|
|||
}
|
||||
|
||||
@Override
|
||||
public void harvestBlock(World world, EntityPlayer player, int x, int y, int z, int meta)
|
||||
//TODO: harvestBlock()
|
||||
public void func_149636_a(World world, EntityPlayer player, int x, int y, int z, int meta)
|
||||
{
|
||||
super.harvestBlock(world, player, x, y, z, meta);
|
||||
|
||||
|
@ -455,7 +468,7 @@ public class BlockBOPPlant extends BlockFlower implements IShearable
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean isShearable(ItemStack item, World world, int x, int y, int z)
|
||||
public boolean isShearable(ItemStack item, IBlockAccess world, int x, int y, int z)
|
||||
{
|
||||
if (world.getBlockMetadata(x, y, z) == 7 || world.getBlockMetadata(x, y, z) == 8 || world.getBlockMetadata(x, y, z) == 9)
|
||||
return false;
|
||||
|
|
|
@ -22,7 +22,9 @@ public class BlockBOPRedRock extends Block
|
|||
{
|
||||
//TODO: Material.rock
|
||||
super(Material.field_151576_e);
|
||||
setStepSound(Block.soundStoneFootstep);
|
||||
|
||||
//TODO setStepSound(Block.soundStoneFootstep)
|
||||
this.func_149672_a(Block.field_149780_i);
|
||||
|
||||
//TODO: this.setCreativeTab()
|
||||
this.func_149647_a(BiomesOPlenty.tabBiomesOPlenty);
|
||||
|
@ -52,7 +54,8 @@ public class BlockBOPRedRock extends Block
|
|||
}
|
||||
|
||||
@Override
|
||||
public int getDamageValue(World world, int x, int y, int z)
|
||||
//TODO: getDamageValue()
|
||||
public int func_149643_k(World world, int x, int y, int z)
|
||||
{
|
||||
return world.getBlockMetadata(x, y, z);
|
||||
}
|
||||
|
@ -61,8 +64,9 @@ public class BlockBOPRedRock extends Block
|
|||
//TODO: getSubBlocks()
|
||||
public void func_149666_a(Item block, CreativeTabs creativeTabs, List list)
|
||||
{
|
||||
for (int i = 0; i < types.length; ++i) {
|
||||
list.add(new ItemStack(blockID, 1, i));
|
||||
for (int i = 0; i < types.length; ++i)
|
||||
{
|
||||
list.add(new ItemStack(block, 1, i));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -74,10 +78,12 @@ public class BlockBOPRedRock extends Block
|
|||
}
|
||||
|
||||
@Override
|
||||
public float getBlockHardness(World world, int x, int y, int z)
|
||||
//TODO: getBlockHardness()
|
||||
public float func_149712_f(World world, int x, int y, int z)
|
||||
{
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
float hardness = blockHardness;
|
||||
//TODO: blockHardness
|
||||
float hardness = field_149782_v;
|
||||
|
||||
switch (meta)
|
||||
{
|
||||
|
@ -101,7 +107,8 @@ public class BlockBOPRedRock extends Block
|
|||
public float getExplosionResistance(Entity par1Entity, World world, int x, int y, int z, double explosionX, double explosionY, double explosionZ)
|
||||
{
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
float resistance = blockResistance;
|
||||
//TODO: blockResistance
|
||||
float resistance = field_149781_w;
|
||||
|
||||
switch (meta)
|
||||
{
|
||||
|
|
|
@ -8,6 +8,7 @@ import net.minecraft.block.BlockSapling;
|
|||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
|
@ -25,7 +26,8 @@ public class BlockBOPSapling extends BlockSapling
|
|||
{
|
||||
//TODO: this.setHardness
|
||||
this.func_149711_c(0.0F);
|
||||
setStepSound(Block.soundGrassFootstep);
|
||||
//TODO setStepSound(Block.soundGrassFootstep)
|
||||
this.func_149672_a(Block.field_149779_h);
|
||||
|
||||
//TODO: this.setCreativeTab()
|
||||
this.func_149647_a(BiomesOPlenty.tabBiomesOPlenty);
|
||||
|
@ -55,74 +57,71 @@ public class BlockBOPSapling extends BlockSapling
|
|||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
//TODO: getSubBlocks()
|
||||
public void func_149666_a(Item block, CreativeTabs creativeTabs, List list) {
|
||||
for (int i = 0; i < saplings.length; ++i) {
|
||||
list.add(new ItemStack(blockID, 1, i));
|
||||
public void func_149666_a(Item block, CreativeTabs creativeTabs, List list)
|
||||
{
|
||||
for (int i = 0; i < saplings.length; ++i)
|
||||
{
|
||||
list.add(new ItemStack(block, 1, i));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canPlaceBlockOnSide(World world, int x, int y, int z, int side, ItemStack itemStack)
|
||||
//TODO: canPlaceBlockOnSide
|
||||
public boolean func_149707_d(World world, int x, int y, int z, int side)
|
||||
{
|
||||
int id = world.getBlockId(x, y - 1, z);
|
||||
int meta = itemStack.getItemDamage();
|
||||
//TODO: getBlock()
|
||||
Block block = world.func_147439_a(x, y - 1, z);
|
||||
int meta = world.getBlockMetadata(x, y - 1, z);
|
||||
|
||||
if (itemStack.itemID == blockID && id != 0) {
|
||||
switch (meta)
|
||||
{
|
||||
case 7: // Loftwood
|
||||
return id == Blocks.holyGrass.get().blockID || id == Blocks.holyDirt.get().blockID;
|
||||
/*TODO FEATURE case 7: // Loftwood
|
||||
return id == Blocks.holyGrass.get().blockID || id == Blocks.holyDirt.get().blockID;*/
|
||||
|
||||
default:
|
||||
return id == Block.grass.blockID || id == Block.dirt.blockID || id == Block.tilledField.blockID || blocksList[id].canSustainPlant(world, x, y - 1, z, ForgeDirection.UP, this);
|
||||
return block == Blocks.grass || block == Blocks.dirt || block == Blocks.farmland || block.canSustainPlant(world, x, y - 1, z, ForgeDirection.UP, this);
|
||||
}
|
||||
} else
|
||||
return this.canPlaceBlockOnSide(world, x, y, z, side);
|
||||
}
|
||||
|
||||
protected boolean canThisPlantGrowOnThisBlockID(int blockID, int metadata)
|
||||
@Override
|
||||
//TODO: canBlockStay()
|
||||
public boolean func_149718_j(World world, int x, int y, int z)
|
||||
{
|
||||
if (metadata == 7) //Loftwood
|
||||
return blockID == Blocks.holyGrass.get().blockID || blockID == Blocks.holyDirt.get().blockID;
|
||||
//TODO: getBlock()
|
||||
Block soil = world.func_147439_a(x, y - 1, z);
|
||||
|
||||
if (world.getBlockMetadata(x, y, z) != 1)
|
||||
return (world.getFullBlockLightValue(x, y, z) >= 8 || world.canBlockSeeTheSky(x, y, z)) &&
|
||||
(soil != null && soil.canSustainPlant(world, x, y - 1, z, ForgeDirection.UP, this));
|
||||
else
|
||||
return blockID == Block.grass.blockID || blockID == Block.dirt.blockID || blockID == Block.tilledField.blockID;
|
||||
return (world.getFullBlockLightValue(x, y, z) >= 8 || world.canBlockSeeTheSky(x, y, z)) &&
|
||||
(soil != null && (soil.canSustainPlant(world, x, y - 1, z, ForgeDirection.UP, this) /*TODO FEATURE || soil == Blocks.holyGrass*/));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canBlockStay(World par1World, int par2, int par3, int par4)
|
||||
//TODO: updateTick()
|
||||
public void func_149674_a(World world, int x, int y, int z, Random random)
|
||||
{
|
||||
Block soil = blocksList[par1World.getBlockId(par2, par3 - 1, par4)];
|
||||
if (par1World.getBlockMetadata(par2, par3, par4) != 7)
|
||||
return (par1World.getFullBlockLightValue(par2, par3, par4) >= 8 || par1World.canBlockSeeTheSky(par2, par3, par4)) &&
|
||||
(soil != null && soil.canSustainPlant(par1World, par2, par3 - 1, par4, ForgeDirection.UP, this));
|
||||
else
|
||||
return (par1World.getFullBlockLightValue(par2, par3, par4) >= 8 || par1World.canBlockSeeTheSky(par2, par3, par4)) &&
|
||||
(soil != null && (soil.canSustainPlant(par1World, par2, par3 - 1, par4, ForgeDirection.UP, this) || soil.blockID == Blocks.holyGrass.get().blockID));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateTick(World world, int x, int y, int z, Random random)
|
||||
if (!world.isRemote)
|
||||
{
|
||||
if (world.isRemote)
|
||||
return;
|
||||
|
||||
this.checkFlowerChange(world, x, y, z);
|
||||
|
||||
if (world.getBlockLightValue(x, y + 1, z) >= 9 && random.nextInt(7) == 0) {
|
||||
this.growTree(world, x, y, z, random);
|
||||
if (world.getBlockLightValue(x, y + 1, z) >= 9 && random.nextInt(7) == 0)
|
||||
{
|
||||
//TODO: growTree()
|
||||
this.func_149878_d(world, x, y, z, random);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void growTree(World world, int x, int y, int z, Random random)
|
||||
//TODO: growTree()
|
||||
public void func_149878_d(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)
|
||||
/*TODO: FEATURE if (obj == null)
|
||||
{
|
||||
switch (meta)
|
||||
{
|
||||
|
@ -202,14 +201,17 @@ public class BlockBOPSapling extends BlockSapling
|
|||
obj = new WorldGenPersimmon(false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
if (obj != null)
|
||||
{
|
||||
world.setBlockToAir(x, y, z);
|
||||
//TODO: setBlockToAir()
|
||||
world.func_147468_f(x, y, z);
|
||||
|
||||
if (!((WorldGenerator)obj).generate(world, random, x, y, z)) {
|
||||
world.setBlock(x, y, z, blockID, meta, 2);
|
||||
if (!((WorldGenerator)obj).generate(world, random, x, y, z))
|
||||
{
|
||||
//TODO: setBlock()
|
||||
world.func_147465_d(x, y, z, this, meta, 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -222,7 +224,8 @@ public class BlockBOPSapling extends BlockSapling
|
|||
}
|
||||
|
||||
@Override
|
||||
public int getDamageValue(World world, int x, int y, int z)
|
||||
//TODO: getDamageValue()
|
||||
public int func_149643_k(World world, int x, int y, int z)
|
||||
{
|
||||
return world.getBlockMetadata(x, y, z) & TYPES;
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@ import net.minecraft.block.material.Material;
|
|||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
|
@ -21,7 +22,9 @@ public class BlockBOPSkystone extends Block
|
|||
{
|
||||
//TODO: Material.rock
|
||||
super(Material.field_151576_e);
|
||||
setStepSound(Block.soundStoneFootstep);
|
||||
|
||||
//TODO setStepSound(Block.soundStoneFootstep)
|
||||
this.func_149672_a(Block.field_149780_i);
|
||||
|
||||
//TODO: this.setCreativeTab()
|
||||
this.func_149647_a(BiomesOPlenty.tabBiomesOPlenty);
|
||||
|
@ -50,16 +53,20 @@ public class BlockBOPSkystone extends Block
|
|||
}
|
||||
|
||||
@Override
|
||||
public int getDamageValue(World world, int x, int y, int z) {
|
||||
//TODO: getDamageValue()
|
||||
public int func_149643_k(World world, int x, int y, int z)
|
||||
{
|
||||
return world.getBlockMetadata(x, y, z);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
//TODO: getSubBlocks()
|
||||
public void func_149666_a(Item block, CreativeTabs creativeTabs, List list) {
|
||||
for (int i = 0; i < types.length; ++i) {
|
||||
list.add(new ItemStack(blockID, 1, i));
|
||||
public void func_149666_a(Item block, CreativeTabs creativeTabs, List list)
|
||||
{
|
||||
for (int i = 0; i < types.length; ++i)
|
||||
{
|
||||
list.add(new ItemStack(block, 1, i));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -80,10 +87,12 @@ public class BlockBOPSkystone extends Block
|
|||
}
|
||||
|
||||
@Override
|
||||
public float getBlockHardness(World world, int x, int y, int z)
|
||||
//TODO: getBlockHardness()
|
||||
public float func_149712_f(World world, int x, int y, int z)
|
||||
{
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
float hardness = blockHardness;
|
||||
//TODO: blockHardness
|
||||
float hardness = field_149782_v;
|
||||
|
||||
switch (meta)
|
||||
{
|
||||
|
@ -111,7 +120,8 @@ public class BlockBOPSkystone extends Block
|
|||
public float getExplosionResistance(Entity par1Entity, World world, int x, int y, int z, double explosionX, double explosionY, double explosionZ)
|
||||
{
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
float resistance = blockResistance;
|
||||
//TODO: blockResistance
|
||||
float resistance = field_149781_w;
|
||||
|
||||
switch (meta)
|
||||
{
|
||||
|
|
|
@ -4,22 +4,25 @@ import java.util.List;
|
|||
import java.util.Random;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockSlab;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
import biomesoplenty.BiomesOPlenty;
|
||||
|
||||
public class BlockBOPSlab extends BlockHalfSlab
|
||||
public class BlockBOPSlab extends BlockSlab
|
||||
{
|
||||
public static enum SlabCategory
|
||||
{
|
||||
WOOD1, WOOD2, STONE;
|
||||
}
|
||||
|
||||
private static final String[] woodTypes = new String[] {"acacia", "cherry", "dark", "fir", "holy", "magic", "mangrove", "palm", "redwood", "willow", "pine", "hell_bark", "jacaranda"};
|
||||
private static final String[] rockTypes = new String[] {"redcobble", "redbrick", "mudbrick", "holycobble", "holybrick"};
|
||||
private IIcon[] textures;
|
||||
|
@ -27,30 +30,32 @@ public class BlockBOPSlab extends BlockHalfSlab
|
|||
|
||||
private final SlabCategory category;
|
||||
|
||||
public BlockBOPSlab(boolean par2, Material material, SlabCategory cat)
|
||||
public BlockBOPSlab(boolean isDoubleSlab, Material material, SlabCategory cat)
|
||||
{
|
||||
super(par2, material);
|
||||
isDoubleSlab = par2;
|
||||
super(isDoubleSlab, material);
|
||||
|
||||
category = cat;
|
||||
|
||||
if (material == Material.wood)
|
||||
{
|
||||
setBurnProperties(blockID, 5, 20);
|
||||
//TODO: setBurnProperties() getIdFromBlock()
|
||||
Blocks.fire.func_149842_a(func_149682_b(this), 5, 20);
|
||||
//TODO: this.setHardness
|
||||
this.func_149711_c(2.0F);
|
||||
setResistance(5.0F);
|
||||
setStepSound(Block.soundWoodFootstep);
|
||||
}
|
||||
else if (material == Material.rock) {
|
||||
setStepSound(Block.soundStoneFootstep);
|
||||
else if (material == Material.rock)
|
||||
{
|
||||
//TODO setStepSound(Block.sound)
|
||||
this.func_149672_a(Block.soundStoneFootstep);
|
||||
}
|
||||
|
||||
if (!par2)
|
||||
if (!isDoubleSlab)
|
||||
{
|
||||
//TODO: this.setCreativeTab()
|
||||
this.func_149647_a(BiomesOPlenty.tabBiomesOPlenty);
|
||||
}
|
||||
|
||||
useNeighborBrightness[blockID] = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -88,7 +93,8 @@ public class BlockBOPSlab extends BlockHalfSlab
|
|||
@Override
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
//TODO: getSubBlocks()
|
||||
public void func_149666_a(Item block, CreativeTabs creativeTabs, List list) {
|
||||
public void func_149666_a(Item block, CreativeTabs creativeTabs, List list)
|
||||
{
|
||||
int max = 0;
|
||||
|
||||
if (category == SlabCategory.WOOD1) {
|
||||
|
@ -121,13 +127,14 @@ public class BlockBOPSlab extends BlockHalfSlab
|
|||
}
|
||||
|
||||
@Override
|
||||
public int idDropped(int meta, Random par2Random, int par3)
|
||||
//TODO: getItemDropped()
|
||||
public Item func_149650_a(int metadata, Random random, int fortune)
|
||||
{
|
||||
if (isDoubleSlab)
|
||||
{
|
||||
if (blockID == Blocks.woodenDoubleSlab1.get().blockID)
|
||||
if (this == Blocks.woodenDoubleSlab1.get().blockID)
|
||||
return Blocks.woodenSingleSlab1.get().blockID;
|
||||
if (blockID == Blocks.woodenDoubleSlab2.get().blockID)
|
||||
if (this == Blocks.woodenDoubleSlab2.get().blockID)
|
||||
return Blocks.woodenSingleSlab2.get().blockID;
|
||||
else
|
||||
return Blocks.stoneSingleSlab.get().blockID;
|
||||
|
@ -137,7 +144,8 @@ public class BlockBOPSlab extends BlockHalfSlab
|
|||
}
|
||||
|
||||
@Override
|
||||
public float getBlockHardness(World world, int x, int y, int z)
|
||||
//TODO: getBlockHardness()
|
||||
public float func_149712_f(World world, int x, int y, int z)
|
||||
{
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
float hardness = blockHardness;
|
||||
|
|
|
@ -6,6 +6,7 @@ import java.util.List;
|
|||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockStairs;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.util.IIcon;
|
||||
import biomesoplenty.BiomesOPlenty;
|
||||
|
||||
|
@ -34,12 +35,11 @@ public class BlockBOPStairs extends BlockStairs
|
|||
public BlockBOPStairs(Block model, Category cat)
|
||||
{
|
||||
super(model, 0);
|
||||
|
||||
category = cat;
|
||||
setBurnProperties(this.blockID, 5, 20);
|
||||
this.setLightOpacity(0);
|
||||
this. //TODO: this.setHardness
|
||||
this.func_149711_c(model.blockHardness);
|
||||
this.setResistance(model.blockResistance / 3.0F);
|
||||
|
||||
//TODO: setBurnProperties() getIdFromBlock()
|
||||
Blocks.fire.func_149842_a(func_149682_b(this), 5, 20);
|
||||
|
||||
//TODO: this.setCreativeTab()
|
||||
this.func_149647_a(BiomesOPlenty.tabBiomesOPlenty);
|
||||
|
|
|
@ -7,8 +7,10 @@ import net.minecraft.block.Block;
|
|||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import biomesoplenty.BiomesOPlenty;
|
||||
|
||||
|
@ -19,10 +21,13 @@ public class BlockBamboo extends Block
|
|||
|
||||
public BlockBamboo()
|
||||
{
|
||||
super(Material.plants);
|
||||
//TODO: Material.plants
|
||||
super(Material.field_151585_k);
|
||||
|
||||
this.setBurnProperties(this, 5, 5);
|
||||
this.setTickRandomly(true);
|
||||
//TODO: setBurnProperties() getIdFromBlock()
|
||||
Blocks.fire.func_149842_a(func_149682_b(this), 5, 5);
|
||||
//TODO: setTickRandomly()
|
||||
this.func_149675_a(true);
|
||||
|
||||
//TODO: this.setCreativeTab()
|
||||
this.func_149647_a(BiomesOPlenty.tabBiomesOPlenty);
|
||||
|
@ -47,13 +52,16 @@ public class BlockBamboo extends Block
|
|||
}
|
||||
|
||||
@Override
|
||||
public void updateTick(World world, int x, int y, int z, Random random)
|
||||
//TODO: updateTick()
|
||||
public void func_149674_a(World world, int x, int y, int z, Random random)
|
||||
{
|
||||
if (world.isAirBlock(x, y + 1, z))
|
||||
//TODO: isAirBlock()
|
||||
if (world.func_147437_c(x, y + 1, z))
|
||||
{
|
||||
int var6;
|
||||
|
||||
for (var6 = 1; world.getBlockId(x, y - var6, z) == blockID; ++var6)
|
||||
//TODO: getBlock()
|
||||
for (var6 = 1; world.func_147439_a(x, y - var6, z) == this; ++var6)
|
||||
{
|
||||
;
|
||||
}
|
||||
|
@ -64,7 +72,8 @@ public class BlockBamboo extends Block
|
|||
|
||||
if (var7 == 15)
|
||||
{
|
||||
world.setBlock(x, y + 1, z, blockID);
|
||||
//TODO: setBlock()
|
||||
world.func_147465_d(x, y + 1, z, this, 0, 2);
|
||||
world.setBlockMetadataWithNotify(x, y, z, 0, 2);
|
||||
}
|
||||
else
|
||||
|
@ -87,19 +96,22 @@ public class BlockBamboo extends Block
|
|||
public void addCollisionBoxesToList(World world, int x, int y, int z, AxisAlignedBB axisAlignedBB, List list, Entity entity)
|
||||
{
|
||||
float pixel = 0.0625F;
|
||||
this.setBlockBounds((pixel * 4), 0.0F, (pixel * 4), 1.0F - (pixel * 4), 1.0F, 1.0F - (pixel * 4));
|
||||
//TODO: setBlockBounds
|
||||
this.func_149676_a((pixel * 4), 0.0F, (pixel * 4), 1.0F - (pixel * 4), 1.0F, 1.0F - (pixel * 4));
|
||||
super.addCollisionBoxesToList(world, x, y, z, axisAlignedBB, list, entity);
|
||||
this.setBlockBoundsForItemRender();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setBlockBoundsForItemRender()
|
||||
//TODO: setBlockBoundsForItemRender()
|
||||
public void func_149683_g()
|
||||
{
|
||||
this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
|
||||
//TODO: setBlockBounds
|
||||
this.func_149676_a(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canBeReplacedByLeaves(World world, int x, int y, int z)
|
||||
public boolean canBeReplacedByLeaves(IBlockAccess world, int x, int y, int z)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -117,9 +129,10 @@ public class BlockBamboo extends Block
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onNeighborBlockChange(World par1World, int par2, int par3, int par4, int par5)
|
||||
//TODO: onNeighborBlockChange()
|
||||
public void func_149695_a(World world, int x, int y, int z, Block neighborBlock)
|
||||
{
|
||||
this.checkBlockCoordValid(par1World, par2, par3, par4);
|
||||
this.checkBlockCoordValid(world, x, y, z);
|
||||
}
|
||||
|
||||
protected final void checkBlockCoordValid(World par1World, int par2, int par3, int par4)
|
||||
|
@ -145,19 +158,21 @@ public class BlockBamboo extends Block
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean renderAsNormalBlock()
|
||||
//TODO: renderAsNormalBlock()
|
||||
public boolean func_149686_d()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderType()
|
||||
//TODO getRenderType()
|
||||
public int func_149645_b()
|
||||
{
|
||||
return RenderUtils.bambooModel;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canSustainLeaves(World world, int x, int y, int z)
|
||||
public boolean canSustainLeaves(IBlockAccess world, int x, int y, int z)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -6,6 +6,7 @@ import net.minecraft.block.Block;
|
|||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.IIcon;
|
||||
|
@ -13,16 +14,20 @@ import net.minecraft.world.IBlockAccess;
|
|||
import net.minecraft.world.World;
|
||||
import biomesoplenty.BiomesOPlenty;
|
||||
|
||||
public class BlockBones extends Block {
|
||||
public class BlockBones extends Block
|
||||
{
|
||||
//Meta 3 & 4 used by alternate small bone rotations, 5 & 6 are used by alternate medium bone rotations
|
||||
private static final String[] boneTypes = new String[] {"bones_small", "bones_medium", "bones_large"};
|
||||
private IIcon[] textures;
|
||||
|
||||
public BlockBones(int blockID)
|
||||
public BlockBones()
|
||||
{
|
||||
super(blockID, Material.rock);
|
||||
//TODO: Material.rock
|
||||
super(Material.field_151576_e);
|
||||
|
||||
//TODO: this.setHardness
|
||||
this.func_149711_c(3.0F);
|
||||
|
||||
setResistance(5.0F);
|
||||
|
||||
//TODO: this.setCreativeTab()
|
||||
|
@ -35,7 +40,8 @@ public class BlockBones extends Block {
|
|||
{
|
||||
textures = new IIcon[boneTypes.length];
|
||||
|
||||
for (int i = 0; i < boneTypes.length; ++i) {
|
||||
for (int i = 0; i < boneTypes.length; ++i)
|
||||
{
|
||||
textures[i] = iconRegister.registerIcon("biomesoplenty:"+boneTypes[i]);
|
||||
}
|
||||
}
|
||||
|
@ -117,7 +123,8 @@ public class BlockBones extends Block {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void setBlockBoundsBasedOnState(IBlockAccess iblockaccess, int x, int y, int z)
|
||||
//TODO: setBlockBoundsBasedOnState()
|
||||
public void func_149719_a(IBlockAccess world, int x, int y, int z)
|
||||
{
|
||||
int meta = iblockaccess.getBlockMetadata(x, y, z);
|
||||
|
||||
|
@ -184,7 +191,8 @@ public class BlockBones extends Block {
|
|||
}
|
||||
|
||||
@Override
|
||||
public int getDamageValue(World world, int x, int y, int z)
|
||||
//TODO: getDamageValue()
|
||||
public int func_149643_k(World world, int x, int y, int z)
|
||||
{
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
if (meta == 3 || meta == 4) {
|
||||
|
@ -197,10 +205,11 @@ public class BlockBones extends Block {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void getSubBlocks(int blockID, CreativeTabs creativeTabs, List list)
|
||||
//TODO: getSubBlocks()
|
||||
public void func_149666_a(Item block, CreativeTabs creativeTabs, List list)
|
||||
{
|
||||
for (int i = 0; i < boneTypes.length; ++i) {
|
||||
list.add(new ItemStack(blockID, 1, i));
|
||||
list.add(new ItemStack(block, 1, i));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -212,19 +221,22 @@ public class BlockBones extends Block {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean renderAsNormalBlock()
|
||||
//TODO: renderAsNormalBlock()
|
||||
public boolean func_149686_d()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderType()
|
||||
//TODO getRenderType()
|
||||
public int func_149645_b()
|
||||
{
|
||||
return RenderUtils.bonesModel;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldSideBeRendered(IBlockAccess iblockaccess, int i, int j, int k, int l)
|
||||
//TODO shouldSideBeRendered
|
||||
public boolean func_149646_a(IBlockAccess world, int x, int y, int z, int side)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@ -233,10 +245,12 @@ public class BlockBones extends Block {
|
|||
//TODO damageDropped()
|
||||
public int func_149692_a(int meta)
|
||||
{
|
||||
if (meta == 3 || meta == 4) {
|
||||
if (meta == 3 || meta == 4)
|
||||
{
|
||||
meta = 0;
|
||||
}
|
||||
if (meta == 5 || meta == 6) {
|
||||
if (meta == 5 || meta == 6)
|
||||
{
|
||||
meta = 1;
|
||||
}
|
||||
return meta;
|
||||
|
|
|
@ -8,17 +8,18 @@ import net.minecraft.client.renderer.texture.IIconRegister;
|
|||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.World;
|
||||
import biomesoplenty.BiomesOPlenty;
|
||||
import biomesoplenty.api.BOPItemHelper;
|
||||
|
||||
public class BlockFlesh extends Block
|
||||
{
|
||||
public BlockFlesh(int par1)
|
||||
{
|
||||
super(Material.sponge);
|
||||
//TODO: Material.sponge
|
||||
super(Material.field_151583_m);
|
||||
|
||||
//TODO: this.setCreativeTab()
|
||||
this.func_149647_a(BiomesOPlenty.tabBiomesOPlenty);
|
||||
|
@ -33,40 +34,44 @@ public class BlockFlesh extends Block
|
|||
}
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getCollisionBoundingBoxFromPool(World par1World, int par2, int par3, int par4)
|
||||
//TODO: getCollisionBoundingBoxFromPool
|
||||
public AxisAlignedBB func_149668_a(World world, int x, int y, int z)
|
||||
{
|
||||
float var5 = 0.125F;
|
||||
return AxisAlignedBB.getAABBPool().getAABB(par2, par3, par4, par2 + 1, par3 + 1 - var5, par4 + 1);
|
||||
return AxisAlignedBB.getAABBPool().getAABB(x, y, z, x + 1, y + 1 - var5, z + 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
//TODO: randomDisplayTick()
|
||||
public void func_149734_b(World world, int x, int y, int z, Random random)
|
||||
{
|
||||
super.func_149734_b(par1World, par2, par3, par4, par5Random);
|
||||
super.func_149734_b(world, x, y, z, random);
|
||||
|
||||
if (par5Random.nextInt(4) == 0)
|
||||
if (random.nextInt(4) == 0)
|
||||
{
|
||||
par1World.spawnParticle("tilecrack_" + String.valueOf(Blocks.flesh.get().blockID) + "_0", par2 + par5Random.nextFloat(), par3 - 0.4F, par4 + par5Random.nextFloat(), 0.0D, 0.0D, 0.0D);
|
||||
//TODO: getIdFromBlock()
|
||||
world.spawnParticle("blockcrack_" + String.valueOf(Block.func_149682_b(this)) + "_0", x + random.nextFloat(), y - 0.4F, z + random.nextFloat(), 0.0D, 0.0D, 0.0D);
|
||||
}
|
||||
|
||||
if (par5Random.nextInt(12) == 0)
|
||||
if (random.nextInt(12) == 0)
|
||||
{
|
||||
par1World.spawnParticle("tilecrack_" + String.valueOf(Blocks.flesh.get().blockID) + "_0", par2 + par5Random.nextFloat(), par3 + 1.0F, par4 + par5Random.nextFloat(), 0.0D, 0.0D, 0.0D);
|
||||
//TODO: getIdFromBlock()
|
||||
world.spawnParticle("blockcrack_" + String.valueOf(Block.func_149682_b(this)) + "_0", x + random.nextFloat(), y + 1.0F, z + random.nextFloat(), 0.0D, 0.0D, 0.0D);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEntityCollidedWithBlock(World world, int x, int y, int z, Entity entity)
|
||||
//TODO: onEntityCollidedWithBlock()
|
||||
public void func_149670_a(World world, int x, int y, int z, Entity entity)
|
||||
{
|
||||
if (entity instanceof EntityPlayer)
|
||||
{
|
||||
InventoryPlayer inventory = ((EntityPlayer)entity).inventory;
|
||||
|
||||
if (inventory.armorInventory[0] != null && inventory.armorInventory[0].itemID == Items.wadingBoots.get().itemID)
|
||||
/*TODO FEATURE if (inventory.armorInventory[0] != null && inventory.armorInventory[0].itemID == Items.wadingBoots.get().itemID)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
entity.motionX *= 0.9D;
|
||||
|
@ -74,9 +79,10 @@ public class BlockFlesh extends Block
|
|||
}
|
||||
|
||||
@Override
|
||||
public int idDropped(int par1, Random par2Random, int par3)
|
||||
//TODO: getItemDropped()
|
||||
public Item func_149650_a(int metadata, Random random, int fortune)
|
||||
{
|
||||
return Items.miscItems.get().itemID;
|
||||
return BOPItemHelper.get("misc");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -87,8 +93,9 @@ public class BlockFlesh extends Block
|
|||
}
|
||||
|
||||
@Override
|
||||
public int quantityDropped(Random par1Random)
|
||||
//TODO: getQuantityDropped()
|
||||
public int func_149745_a(Random random)
|
||||
{
|
||||
return par1Random.nextInt(5);
|
||||
return random.nextInt(5);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,34 +34,40 @@ public class BlockGrave extends Block
|
|||
}
|
||||
|
||||
@Override
|
||||
public void setBlockBoundsBasedOnState(IBlockAccess world, int par2, int par3, int par4)
|
||||
//TODO: setBlockBoundsBasedOnState()
|
||||
public void func_149719_a(IBlockAccess world, int x, int y, int z)
|
||||
{
|
||||
int meta = world.getBlockMetadata(par2, par3, par4);
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
|
||||
switch (meta)
|
||||
{
|
||||
case 0:
|
||||
this.setBlockBounds(0.0F, 0.0F, 0.31F, 1.0F, 1.6875F, 0.69F);
|
||||
//TODO: setBlockBounds
|
||||
this.func_149676_a(0.0F, 0.0F, 0.31F, 1.0F, 1.6875F, 0.69F);
|
||||
break;
|
||||
|
||||
case 1:
|
||||
this.setBlockBounds(0.0F, -1.0F, 0.31F, 1.0F, 0.6875F, 0.69F);
|
||||
//TODO: setBlockBounds
|
||||
this.func_149676_a(0.0F, -1.0F, 0.31F, 1.0F, 0.6875F, 0.69F);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
this.setBlockBounds(0.31F, 0.0F, 0.0F, 0.69F, 1.6875F, 1.0F);
|
||||
//TODO: setBlockBounds
|
||||
this.func_149676_a(0.31F, 0.0F, 0.0F, 0.69F, 1.6875F, 1.0F);
|
||||
break;
|
||||
|
||||
case 3:
|
||||
this.setBlockBounds(0.31F, -1.0F, 0.0F, 0.69F, 0.6875F, 1.0F);
|
||||
//TODO: setBlockBounds
|
||||
this.func_149676_a(0.31F, -1.0F, 0.0F, 0.69F, 0.6875F, 1.0F);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNeighborBlockChange(World world, int x, int y, int z, int neighbourID)
|
||||
//TODO: onNeighborBlockChange()
|
||||
public void func_149695_a(World world, int x, int y, int z, Block neighborBlock)
|
||||
{
|
||||
if (neighbourID == Blocks.grave.get().blockID)
|
||||
if (neighborBlock == this)
|
||||
{
|
||||
if (world.getBlockMetadata(x, y, z) == 0 || world.getBlockMetadata(x, y, z) == 2)
|
||||
{
|
||||
|
@ -92,7 +98,8 @@ public class BlockGrave extends Block
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean renderAsNormalBlock()
|
||||
//TODO: renderAsNormalBlock()
|
||||
public boolean func_149686_d()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -105,7 +112,8 @@ public class BlockGrave extends Block
|
|||
}
|
||||
|
||||
@Override
|
||||
public int getRenderType()
|
||||
//TODO getRenderType()
|
||||
public int func_149645_b()
|
||||
{
|
||||
return RenderUtils.graveModel;
|
||||
}
|
||||
|
|
|
@ -7,11 +7,12 @@ import net.minecraft.block.Block;
|
|||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
import biomesoplenty.BiomesOPlenty;
|
||||
import biomesoplenty.api.BOPItemHelper;
|
||||
|
||||
public class BlockHive extends Block
|
||||
{
|
||||
|
@ -20,7 +21,8 @@ public class BlockHive extends Block
|
|||
|
||||
public BlockHive()
|
||||
{
|
||||
super(Material.wood);
|
||||
//TODO: Material.wood
|
||||
super(Material.field_151575_d);
|
||||
|
||||
//TODO: this.setCreativeTab()
|
||||
this.func_149647_a(BiomesOPlenty.tabBiomesOPlenty);
|
||||
|
@ -32,9 +34,9 @@ public class BlockHive extends Block
|
|||
{
|
||||
if (world.getBlockMetadata(x, y, z) == 2)
|
||||
{
|
||||
EntityWasp wasp = new EntityWasp(world);
|
||||
/*TODO: FEATURE EntityWasp wasp = new EntityWasp(world);
|
||||
wasp.setLocationAndAngles((double)x + 0.6, (double)y, (double)z + 0.3, 0.0F, 0.0F);
|
||||
world.spawnEntityInWorld(wasp);
|
||||
world.spawnEntityInWorld(wasp);*/
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -44,7 +46,8 @@ public class BlockHive extends Block
|
|||
{
|
||||
textures = new IIcon[hiveTypes.length];
|
||||
|
||||
for (int i = 0; i < hiveTypes.length; ++i) {
|
||||
for (int i = 0; i < hiveTypes.length; ++i)
|
||||
{
|
||||
textures[i] = iconRegister.registerIcon("biomesoplenty:"+hiveTypes[i]);
|
||||
}
|
||||
}
|
||||
|
@ -53,34 +56,40 @@ public class BlockHive extends Block
|
|||
//TODO: getIcon()
|
||||
public IIcon func_149691_a(int side, int meta)
|
||||
{
|
||||
if (meta < 0 || meta >= hiveTypes.length) {
|
||||
if (meta < 0 || meta >= hiveTypes.length)
|
||||
{
|
||||
meta = 0;
|
||||
}
|
||||
|
||||
return textures[meta];
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getSubBlocks(int blockID, CreativeTabs creativeTabs, List list)
|
||||
//TODO: getSubBlocks()
|
||||
public void func_149666_a(Item block, CreativeTabs creativeTabs, List list)
|
||||
{
|
||||
for (int i = 0; i < hiveTypes.length; ++i) {
|
||||
list.add(new ItemStack(blockID, 1, i));
|
||||
for (int i = 0; i < hiveTypes.length; ++i)
|
||||
{
|
||||
list.add(new ItemStack(block, 1, i));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int idDropped(int meta, Random par2Random, int par3)
|
||||
//TODO: getItemDropped()
|
||||
public Item func_149650_a(int metadata, Random random, int fortune)
|
||||
{
|
||||
if (meta == 0)
|
||||
if (metadata == 0)
|
||||
{
|
||||
return Items.miscItems.get().itemID;
|
||||
return BOPItemHelper.get("misc");
|
||||
}
|
||||
|
||||
if (meta == 3)
|
||||
if (metadata == 3)
|
||||
{
|
||||
return Items.food.get().itemID;
|
||||
return BOPItemHelper.get("food");
|
||||
}
|
||||
|
||||
return this.blockID;
|
||||
//TODO: getItemFromBlock()
|
||||
return Item.func_150898_a(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -5,8 +5,6 @@ import net.minecraft.block.material.Material;
|
|||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import biomesoplenty.BiomesOPlenty;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class BlockHoney extends Block
|
||||
{
|
||||
|
|
|
@ -22,7 +22,8 @@ public class BlockIvy extends Block implements IShearable
|
|||
public BlockIvy()
|
||||
{
|
||||
super(Material.vine);
|
||||
this.setTickRandomly(true);
|
||||
//TODO: setTickRandomly()
|
||||
this.func_149675_a(true);
|
||||
|
||||
//TODO: this.setCreativeTab()
|
||||
this.func_149647_a(BiomesOPlenty.tabBiomesOPlenty);
|
||||
|
@ -42,14 +43,16 @@ public class BlockIvy extends Block implements IShearable
|
|||
@Override
|
||||
public void setBlockBoundsForItemRender()
|
||||
{
|
||||
this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
|
||||
//TODO: setBlockBounds
|
||||
this.func_149676_a0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
|
||||
}
|
||||
|
||||
/**
|
||||
* The type of render function that is called for this block
|
||||
*/
|
||||
@Override
|
||||
public int getRenderType()
|
||||
public int //TODO getRenderType()
|
||||
public int func_149645_b()()
|
||||
{
|
||||
return 20;
|
||||
}
|
||||
|
@ -69,7 +72,8 @@ public class BlockIvy extends Block implements IShearable
|
|||
* If this block doesn't render as an ordinary block it will return False (examples: signs, buttons, stairs, etc)
|
||||
*/
|
||||
@Override
|
||||
public boolean renderAsNormalBlock()
|
||||
public boolean //TODO: renderAsNormalBlock()
|
||||
public boolean func_149686_d()()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -78,7 +82,8 @@ public class BlockIvy extends Block implements IShearable
|
|||
* Updates the blocks bounds based on its current state. Args: world, x, y, z
|
||||
*/
|
||||
@Override
|
||||
public void setBlockBoundsBasedOnState(IBlockAccess par1IBlockAccess, int par2, int par3, int par4)
|
||||
//TODO: setBlockBoundsBasedOnState()
|
||||
public void func_149719_a(IBlockAccess world, int x, int y, int z)
|
||||
{
|
||||
int var6 = par1IBlockAccess.getBlockMetadata(par2, par3, par4);
|
||||
float var7 = 1.0F;
|
||||
|
@ -143,7 +148,8 @@ public class BlockIvy extends Block implements IShearable
|
|||
var12 = 1.0F;
|
||||
}
|
||||
|
||||
this.setBlockBounds(var7, var8, var9, var10, var11, var12);
|
||||
//TODO: setBlockBounds
|
||||
this.func_149676_avar7, var8, var9, var10, var11, var12);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -151,7 +157,8 @@ public class BlockIvy extends Block implements IShearable
|
|||
* cleared to be reused)
|
||||
*/
|
||||
@Override
|
||||
public AxisAlignedBB getCollisionBoundingBoxFromPool(World par1World, int par2, int par3, int par4)
|
||||
//TODO: getCollisionBoundingBoxFromPool
|
||||
public AxisAlignedBB func_149668_a(World world, int x, int y, int z)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
@ -194,7 +201,8 @@ public class BlockIvy extends Block implements IShearable
|
|||
else
|
||||
{
|
||||
Block var2 = Block.blocksList[par1];
|
||||
return var2.renderAsNormalBlock() && var2.blockMaterial.blocksMovement();
|
||||
return var2. //TODO: renderAsNormalBlock()
|
||||
public boolean func_149686_d()() && var2.blockMaterial.blocksMovement();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -258,7 +266,8 @@ public class BlockIvy extends Block implements IShearable
|
|||
* their own) Args: x, y, z, neighbor blockID
|
||||
*/
|
||||
@Override
|
||||
public void onNeighborBlockChange(World par1World, int par2, int par3, int par4, int par5)
|
||||
public void //TODO: onNeighborBlockChange()
|
||||
public void func_149695_a(World world, int x, int y, int z, Block neighborBlock)(World par1World, int par2, int par3, int par4, int par5)
|
||||
{
|
||||
if (!par1World.isRemote && !this.canVineStay(par1World, par2, par3, par4))
|
||||
{
|
||||
|
@ -271,7 +280,8 @@ public class BlockIvy extends Block implements IShearable
|
|||
* Ticks the block if it's been scheduled
|
||||
*/
|
||||
@Override
|
||||
public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random)
|
||||
public void //TODO: updateTick()
|
||||
public void func_149674_a(World world, int x, int y, int z, Random random)(World par1World, int par2, int par3, int par4, Random par5Random)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -336,7 +346,8 @@ public class BlockIvy extends Block implements IShearable
|
|||
* Returns the ID of the items to drop on destruction.
|
||||
*/
|
||||
@Override
|
||||
public int idDropped(int par1, Random par2Random, int par3)
|
||||
//TODO: getItemDropped()
|
||||
public Item func_149650_a(int metadata, Random random, int fortune
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -345,7 +356,8 @@ public class BlockIvy extends Block implements IShearable
|
|||
* Returns the quantity of items to drop on block destruction.
|
||||
*/
|
||||
@Override
|
||||
public int quantityDropped(Random par1Random)
|
||||
//TODO: getQuantityDropped()
|
||||
public int func_149745_a(Random random)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -361,7 +373,7 @@ public class BlockIvy extends Block implements IShearable
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean isShearable(ItemStack item, World world, int x, int y, int z)
|
||||
public boolean isShearable(ItemStack item, IBlockAccess world, int x, int y, int z)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -21,7 +21,8 @@ public class BlockLongGrass extends Block
|
|||
public BlockLongGrass()
|
||||
{
|
||||
super(Material.grass);
|
||||
this.setTickRandomly(true);
|
||||
//TODO: setTickRandomly()
|
||||
this.func_149675_a(true);
|
||||
|
||||
//TODO: this.setCreativeTab()
|
||||
this.func_149647_a(BiomesOPlenty.tabBiomesOPlenty);
|
||||
|
@ -114,7 +115,8 @@ public class BlockLongGrass extends Block
|
|||
* Ticks the block if it's been scheduled
|
||||
*/
|
||||
@Override
|
||||
public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random)
|
||||
public void //TODO: updateTick()
|
||||
public void func_149674_a(World world, int x, int y, int z, Random random)(World par1World, int par2, int par3, int par4, Random par5Random)
|
||||
{
|
||||
if (!par1World.isRemote)
|
||||
{
|
||||
|
@ -144,7 +146,8 @@ public class BlockLongGrass extends Block
|
|||
* Returns the ID of the items to drop on destruction.
|
||||
*/
|
||||
@Override
|
||||
public int idDropped(int par1, Random par2Random, int par3)
|
||||
//TODO: getItemDropped()
|
||||
public Item func_149650_a(int metadata, Random random, int fortune
|
||||
{
|
||||
return Block.dirt.idDropped(0, par2Random, par3);
|
||||
}
|
||||
|
|
|
@ -19,7 +19,8 @@ public class BlockMoss extends Block
|
|||
{
|
||||
super(Material.vine);
|
||||
setBurnProperties(blockID, 15, 100);
|
||||
this.setTickRandomly(true);
|
||||
//TODO: setTickRandomly()
|
||||
this.func_149675_a(true);
|
||||
|
||||
//TODO: this.setCreativeTab()
|
||||
this.func_149647_a(BiomesOPlenty.tabBiomesOPlenty);
|
||||
|
@ -30,31 +31,24 @@ public class BlockMoss extends Block
|
|||
public void func_149651_a(IIconRegister iconRegister)
|
||||
{
|
||||
//TODO: blockIcon
|
||||
this.field_149761_L = par1IconRegister.registerIcon("biomesoplenty:moss");
|
||||
this.field_149761_L = iconRegister.registerIcon("biomesoplenty:moss");
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the block's bounds for rendering it as an item
|
||||
*/
|
||||
|
||||
@Override
|
||||
public void setBlockBoundsForItemRender()
|
||||
{
|
||||
this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
|
||||
//TODO: setBlockBounds
|
||||
this.func_149676_a0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
|
||||
}
|
||||
|
||||
/**
|
||||
* The type of render function that is called for this block
|
||||
*/
|
||||
@Override
|
||||
public int getRenderType()
|
||||
//TODO getRenderType()
|
||||
public int func_149645_b()
|
||||
{
|
||||
return 20;
|
||||
}
|
||||
|
||||
/**
|
||||
* Is this block (a) opaque and (b) a full 1m cube? This determines whether or not to render the shared face of two
|
||||
* adjacent blocks and also whether the player can attach torches, redstone wire, etc to this block.
|
||||
*/
|
||||
@Override
|
||||
//TODO: isOpaqueCube()
|
||||
public boolean func_149662_c()
|
||||
|
@ -62,20 +56,16 @@ public class BlockMoss extends Block
|
|||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* If this block doesn't render as an ordinary block it will return False (examples: signs, buttons, stairs, etc)
|
||||
*/
|
||||
@Override
|
||||
public boolean renderAsNormalBlock()
|
||||
//TODO: renderAsNormalBlock()
|
||||
public boolean func_149686_d()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates the blocks bounds based on its current state. Args: world, x, y, z
|
||||
*/
|
||||
@Override
|
||||
public void setBlockBoundsBasedOnState(IBlockAccess par1IBlockAccess, int par2, int par3, int par4)
|
||||
//TODO: setBlockBoundsBasedOnState()
|
||||
public void func_149719_a(IBlockAccess world, int x, int y, int z)
|
||||
{
|
||||
int var6 = par1IBlockAccess.getBlockMetadata(par2, par3, par4);
|
||||
float var7 = 1.0F;
|
||||
|
@ -140,22 +130,17 @@ public class BlockMoss extends Block
|
|||
var12 = 1.0F;
|
||||
}
|
||||
|
||||
this.setBlockBounds(var7, var8, var9, var10, var11, var12);
|
||||
//TODO: setBlockBounds
|
||||
this.func_149676_avar7, var8, var9, var10, var11, var12);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a bounding box from the pool of bounding boxes (this means this box can change after the pool has been
|
||||
* cleared to be reused)
|
||||
*/
|
||||
@Override
|
||||
public AxisAlignedBB getCollisionBoundingBoxFromPool(World par1World, int par2, int par3, int par4)
|
||||
//TODO: getCollisionBoundingBoxFromPool
|
||||
public AxisAlignedBB func_149668_a(World world, int x, int y, int z)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* checks to see if you can place this block can be placed on that side of a block: BlockLever overrides
|
||||
*/
|
||||
@Override
|
||||
public boolean canPlaceBlockOnSide(World par1World, int par2, int par3, int par4, int par5)
|
||||
{
|
||||
|
@ -232,9 +217,6 @@ public class BlockMoss extends Block
|
|||
return ColorizerFoliage.getFoliageColorBasic();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the color this block should be rendered. Used by leaves.
|
||||
*/
|
||||
@Override
|
||||
public int getRenderColor(int par1)
|
||||
{
|
||||
|
@ -247,12 +229,9 @@ public class BlockMoss extends Block
|
|||
return par1IBlockAccess.getBiomeGenForCoords(par2, par4).getBiomeFoliageColor();
|
||||
}
|
||||
|
||||
/**
|
||||
* Lets the block know when one of its neighbor changes. Doesn't know which neighbor changed (coordinates passed are
|
||||
* their own) Args: x, y, z, neighbor blockID
|
||||
*/
|
||||
@Override
|
||||
public void onNeighborBlockChange(World par1World, int par2, int par3, int par4, int par5)
|
||||
//TODO: onNeighborBlockChange()
|
||||
public void func_149695_a(World world, int x, int y, int z, Block neighborBlock)
|
||||
{
|
||||
if (!par1World.isRemote && !this.canVineStay(par1World, par2, par3, par4))
|
||||
{
|
||||
|
@ -265,7 +244,8 @@ public class BlockMoss extends Block
|
|||
* Ticks the block if it's been scheduled
|
||||
*/
|
||||
@Override
|
||||
public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random)
|
||||
public void //TODO: updateTick()
|
||||
public void func_149674_a(World world, int x, int y, int z, Random random)(World par1World, int par2, int par3, int par4, Random par5Random)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -300,9 +280,6 @@ public class BlockMoss extends Block
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when a block is placed using its ItemBlock. Args: World, X, Y, Z, side, hitX, hitY, hitZ, block metadata
|
||||
*/
|
||||
@Override
|
||||
public int onBlockPlaced(World par1World, int par2, int par3, int par4, int par5, float par6, float par7, float par8, int par9)
|
||||
{
|
||||
|
@ -327,7 +304,8 @@ public class BlockMoss extends Block
|
|||
}
|
||||
|
||||
@Override
|
||||
public int quantityDropped(Random par1Random)
|
||||
//TODO: getQuantityDropped()
|
||||
public int func_149745_a(Random random)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@ public class BlockMud extends Block
|
|||
//TODO: this.setHardness
|
||||
this.func_149711_c(0.6F);
|
||||
|
||||
//TODO: this.setStepSound(Block.soundSandFootstep);
|
||||
//TODO setStepSound(Block.soundSandFootstep)
|
||||
this.func_149672_a(Block.field_149776_m);
|
||||
|
||||
//TODO: this.setCreativeTab()
|
||||
|
@ -71,7 +71,7 @@ public class BlockMud extends Block
|
|||
}
|
||||
}
|
||||
|
||||
//@Override
|
||||
@Override
|
||||
//TODO: getCollisionBoundingBoxFromPool
|
||||
public AxisAlignedBB func_149668_a(World world, int x, int y, int z)
|
||||
{
|
||||
|
@ -111,7 +111,7 @@ public class BlockMud extends Block
|
|||
|
||||
//@Override
|
||||
//TODO: getItemDropped()
|
||||
public Item func_149650_a(int metadata, Random random, int par3)
|
||||
public Item func_149650_a(int metadata, Random random, int fortune)
|
||||
{
|
||||
if (metadata == 0)
|
||||
return BOPItemHelper.get("mudball");
|
||||
|
@ -127,7 +127,7 @@ public class BlockMud extends Block
|
|||
return meta;
|
||||
}
|
||||
|
||||
//@Override
|
||||
@Override
|
||||
public int quantityDropped(int meta, int fortune, Random random)
|
||||
{
|
||||
if (meta == 0)
|
||||
|
|
|
@ -21,7 +21,8 @@ public class BlockOriginGrass extends Block
|
|||
public BlockOriginGrass()
|
||||
{
|
||||
super(Material.grass);
|
||||
this.setTickRandomly(true);
|
||||
//TODO: setTickRandomly()
|
||||
this.func_149675_a(true);
|
||||
|
||||
//TODO: this.setCreativeTab()
|
||||
this.func_149647_a(BiomesOPlenty.tabBiomesOPlenty);
|
||||
|
@ -114,7 +115,8 @@ public class BlockOriginGrass extends Block
|
|||
* Ticks the block if it's been scheduled
|
||||
*/
|
||||
@Override
|
||||
public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random)
|
||||
public void //TODO: updateTick()
|
||||
public void func_149674_a(World world, int x, int y, int z, Random random)(World par1World, int par2, int par3, int par4, Random par5Random)
|
||||
{
|
||||
if (!par1World.isRemote)
|
||||
{
|
||||
|
@ -144,7 +146,8 @@ public class BlockOriginGrass extends Block
|
|||
* Returns the ID of the items to drop on destruction.
|
||||
*/
|
||||
@Override
|
||||
public int idDropped(int par1, Random par2Random, int par3)
|
||||
//TODO: getItemDropped()
|
||||
public Item func_149650_a(int metadata, Random random, int fortune
|
||||
{
|
||||
return Block.dirt.idDropped(0, par2Random, par3);
|
||||
}
|
||||
|
|
|
@ -20,7 +20,8 @@ public class BlockOvergrownNetherrack extends Block
|
|||
{
|
||||
//TODO: Material.rock
|
||||
super(Material.field_151576_e);
|
||||
this.setTickRandomly(true);
|
||||
//TODO: setTickRandomly()
|
||||
this.func_149675_a(true);
|
||||
|
||||
//TODO: this.setCreativeTab()
|
||||
this.func_149647_a(BiomesOPlenty.tabBiomesOPlenty);
|
||||
|
@ -88,7 +89,8 @@ public class BlockOvergrownNetherrack extends Block
|
|||
* Returns the ID of the items to drop on destruction.
|
||||
*/
|
||||
@Override
|
||||
public int idDropped(int par1, Random par2Random, int par3)
|
||||
//TODO: getItemDropped()
|
||||
public Item func_149650_a(int metadata, Random random, int fortune
|
||||
{
|
||||
return Block.netherrack.idDropped(0, par2Random, par3);
|
||||
}
|
||||
|
|
|
@ -45,7 +45,8 @@ public class BlockPromisedPortal extends Block
|
|||
* Returns true if the given side of this block type should be rendered, if the adjacent block is at the given
|
||||
* coordinates. Args: blockAccess, x, y, z, side
|
||||
*/
|
||||
public boolean shouldSideBeRendered(IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5)
|
||||
//TODO shouldSideBeRendered
|
||||
public boolean func_149646_a(IBlockAccess world, int x, int y, int z, int side)
|
||||
{
|
||||
return super.shouldSideBeRendered(par1IBlockAccess, par2, par3, par4, 1 - par5);
|
||||
}
|
||||
|
@ -55,7 +56,8 @@ public class BlockPromisedPortal extends Block
|
|||
* cleared to be reused)
|
||||
*/
|
||||
@Override
|
||||
public AxisAlignedBB getCollisionBoundingBoxFromPool(World par1World, int par2, int par3, int par4)
|
||||
//TODO: getCollisionBoundingBoxFromPool
|
||||
public AxisAlignedBB func_149668_a(World world, int x, int y, int z)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -22,8 +22,10 @@ public class BlockPuddle extends Block
|
|||
public BlockPuddle(int par1)
|
||||
{
|
||||
super(par1, Material.ground);
|
||||
this.setTickRandomly(true);
|
||||
this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.8135F, 1.0F);
|
||||
//TODO: setTickRandomly()
|
||||
this.func_149675_a(true);
|
||||
//TODO: setBlockBounds
|
||||
this.func_149676_a0.0F, 0.0F, 0.0F, 1.0F, 0.8135F, 1.0F);
|
||||
this.setLightOpacity(0);
|
||||
}
|
||||
|
||||
|
@ -46,13 +48,15 @@ public class BlockPuddle extends Block
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean renderAsNormalBlock()
|
||||
public boolean //TODO: renderAsNormalBlock()
|
||||
public boolean func_149686_d()()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateTick(World world, int x, int y, int z, Random par5Random)
|
||||
public void //TODO: updateTick()
|
||||
public void func_149674_a(World world, int x, int y, int z, Random random)(World world, int x, int y, int z, Random par5Random)
|
||||
{
|
||||
if (!world.isRaining() && world.rand.nextInt(2) == 0)
|
||||
{
|
||||
|
@ -75,7 +79,8 @@ public class BlockPuddle extends Block
|
|||
}
|
||||
|
||||
@Override
|
||||
public int getRenderType()
|
||||
public int //TODO getRenderType()
|
||||
public int func_149645_b()()
|
||||
{
|
||||
return RenderUtils.puddleModel;
|
||||
}
|
||||
|
@ -89,7 +94,8 @@ public class BlockPuddle extends Block
|
|||
}
|
||||
|
||||
@Override
|
||||
public int idDropped(int par1, Random par2Random, int par3)
|
||||
//TODO: getItemDropped()
|
||||
public Item func_149650_a(int metadata, Random random, int fortune
|
||||
{
|
||||
return Block.dirt.idDropped(0, par2Random, par3);
|
||||
}
|
||||
|
|
|
@ -24,9 +24,11 @@ public class BlockStoneFormations extends BlockFlower
|
|||
protected BlockStoneFormations(Material material)
|
||||
{
|
||||
super(material);
|
||||
this.setTickRandomly(true);
|
||||
//TODO: setTickRandomly()
|
||||
this.func_149675_a(true);
|
||||
float var4 = 0.2F;
|
||||
this.setBlockBounds(0.5F - var4, 0.0F, 0.5F - var4, 0.5F + var4, var4 * 3.0F, 0.5F + var4);
|
||||
//TODO: setBlockBounds
|
||||
this.func_149676_a0.5F - var4, 0.0F, 0.5F - var4, 0.5F + var4, var4 * 3.0F, 0.5F + var4);
|
||||
|
||||
//TODO: this.setCreativeTab()
|
||||
this.func_149647_a(BiomesOPlenty.tabBiomesOPlenty);
|
||||
|
@ -60,20 +62,23 @@ public class BlockStoneFormations extends BlockFlower
|
|||
}
|
||||
|
||||
@Override
|
||||
public int getRenderType()
|
||||
public int //TODO getRenderType()
|
||||
public int func_149645_b()()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setBlockBoundsBasedOnState(IBlockAccess world, int par2, int par3, int par4)
|
||||
//TODO: setBlockBoundsBasedOnState()
|
||||
public void func_149719_a(IBlockAccess world, int x, int y, int z)
|
||||
{
|
||||
int meta = world.getBlockMetadata(par2, par3, par4);
|
||||
|
||||
switch (meta)
|
||||
{
|
||||
default:
|
||||
this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
|
||||
//TODO: setBlockBounds
|
||||
this.func_149676_a0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -125,9 +130,11 @@ public class BlockStoneFormations extends BlockFlower
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onNeighborBlockChange(World world, int x, int y, int z, int neighborID)
|
||||
public void //TODO: onNeighborBlockChange()
|
||||
public void func_149695_a(World world, int x, int y, int z, Block neighborBlock)(World world, int x, int y, int z, int neighborID)
|
||||
{
|
||||
//super.onNeighborBlockChange(world, x, y, z, neighborID);
|
||||
//super. //TODO: onNeighborBlockChange()
|
||||
public void func_149695_a(World world, int x, int y, int z, Block neighborBlock)(world, x, y, z, neighborID);
|
||||
this.checkFlowerChange(world, x, y, z);
|
||||
}
|
||||
|
||||
|
|
|
@ -19,8 +19,10 @@ public class BlockTreeMoss extends Block implements IShearable
|
|||
{
|
||||
public BlockTreeMoss()
|
||||
{
|
||||
super(par1, Material.vine);
|
||||
this.setTickRandomly(true);
|
||||
super(Material.vine);
|
||||
|
||||
//TODO: setTickRandomly()
|
||||
this.func_149675_a(true);
|
||||
setBurnProperties(blockID, 15, 100);
|
||||
|
||||
//TODO: this.setCreativeTab()
|
||||
|
@ -32,23 +34,20 @@ public class BlockTreeMoss extends Block implements IShearable
|
|||
public void func_149651_a(IIconRegister iconRegister)
|
||||
{
|
||||
//TODO: blockIcon
|
||||
this.field_149761_L = par1IconRegister.registerIcon("biomesoplenty:treemoss");
|
||||
this.field_149761_L = iconRegister.registerIcon("biomesoplenty:treemoss");
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the block's bounds for rendering it as an item
|
||||
*/
|
||||
@Override
|
||||
public void setBlockBoundsForItemRender()
|
||||
{
|
||||
this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
|
||||
//TODO: setBlockBounds
|
||||
this.func_149676_a(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
|
||||
}
|
||||
|
||||
/**
|
||||
* The type of render function that is called for this block
|
||||
*/
|
||||
|
||||
@Override
|
||||
public int getRenderType()
|
||||
//TODO getRenderType()
|
||||
public int func_149645_b()
|
||||
{
|
||||
return 20;
|
||||
}
|
||||
|
@ -68,27 +67,27 @@ public class BlockTreeMoss extends Block implements IShearable
|
|||
* If this block doesn't render as an ordinary block it will return False (examples: signs, buttons, stairs, etc)
|
||||
*/
|
||||
@Override
|
||||
public boolean renderAsNormalBlock()
|
||||
//TODO: renderAsNormalBlock()
|
||||
public boolean func_149686_d()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates the blocks bounds based on its current state. Args: world, x, y, z
|
||||
*/
|
||||
@Override
|
||||
public void setBlockBoundsBasedOnState(IBlockAccess par1IBlockAccess, int par2, int par3, int par4)
|
||||
//TODO: setBlockBoundsBasedOnState()
|
||||
public void func_149719_a(IBlockAccess world, int x, int y, int z)
|
||||
{
|
||||
int var6 = par1IBlockAccess.getBlockMetadata(par2, par3, par4);
|
||||
int metadata = par1IBlockAccess.getBlockMetadata(par2, par3, par4);
|
||||
|
||||
float var7 = 1.0F;
|
||||
float var8 = 1.0F;
|
||||
float var9 = 1.0F;
|
||||
float var10 = 0.0F;
|
||||
float var11 = 0.0F;
|
||||
float var12 = 0.0F;
|
||||
boolean var13 = var6 > 0;
|
||||
boolean var13 = metadata > 0;
|
||||
|
||||
if ((var6 & 2) != 0)
|
||||
if ((metadata & 2) != 0)
|
||||
{
|
||||
var10 = Math.max(var10, 0.0625F);
|
||||
var7 = 0.0F;
|
||||
|
@ -99,7 +98,7 @@ public class BlockTreeMoss extends Block implements IShearable
|
|||
var13 = true;
|
||||
}
|
||||
|
||||
if ((var6 & 8) != 0)
|
||||
if ((metadata & 8) != 0)
|
||||
{
|
||||
var7 = Math.min(var7, 0.9375F);
|
||||
var10 = 1.0F;
|
||||
|
@ -110,7 +109,7 @@ public class BlockTreeMoss extends Block implements IShearable
|
|||
var13 = true;
|
||||
}
|
||||
|
||||
if ((var6 & 4) != 0)
|
||||
if ((metadata & 4) != 0)
|
||||
{
|
||||
var12 = Math.max(var12, 0.0625F);
|
||||
var9 = 0.0F;
|
||||
|
@ -121,7 +120,7 @@ public class BlockTreeMoss extends Block implements IShearable
|
|||
var13 = true;
|
||||
}
|
||||
|
||||
if ((var6 & 1) != 0)
|
||||
if ((metadata & 1) != 0)
|
||||
{
|
||||
var9 = Math.min(var9, 0.9375F);
|
||||
var12 = 1.0F;
|
||||
|
@ -142,7 +141,8 @@ public class BlockTreeMoss extends Block implements IShearable
|
|||
var12 = 1.0F;
|
||||
}
|
||||
|
||||
this.setBlockBounds(var7, var8, var9, var10, var11, var12);
|
||||
//TODO: setBlockBounds
|
||||
this.func_149676_a(var7, var8, var9, var10, var11, var12);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -150,14 +150,12 @@ public class BlockTreeMoss extends Block implements IShearable
|
|||
* cleared to be reused)
|
||||
*/
|
||||
@Override
|
||||
public AxisAlignedBB getCollisionBoundingBoxFromPool(World par1World, int par2, int par3, int par4)
|
||||
//TODO: getCollisionBoundingBoxFromPool
|
||||
public AxisAlignedBB func_149668_a(World world, int x, int y, int z)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* checks to see if you can place this block can be placed on that side of a block: BlockLever overrides
|
||||
*/
|
||||
@Override
|
||||
public boolean canPlaceBlockOnSide(World par1World, int par2, int par3, int par4, int par5)
|
||||
{
|
||||
|
@ -183,9 +181,6 @@ public class BlockTreeMoss extends Block implements IShearable
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* returns true if a vine can be placed on that block (checks for render as normal block and if it is solid)
|
||||
*/
|
||||
private boolean canBePlacedOn(int par1)
|
||||
{
|
||||
if (par1 == 0)
|
||||
|
@ -193,13 +188,11 @@ public class BlockTreeMoss extends Block implements IShearable
|
|||
else
|
||||
{
|
||||
Block var2 = Block.blocksList[par1];
|
||||
return var2.renderAsNormalBlock() && var2.blockMaterial.blocksMovement();
|
||||
//TODO: renderAsNormalBlock()
|
||||
return var2.func_149686_d() && var2.blockMaterial.blocksMovement();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns if the vine can stay in the world. It also changes the metadata according to neighboring blocks.
|
||||
*/
|
||||
private boolean canVineStay(World par1World, int par2, int par3, int par4)
|
||||
{
|
||||
int var5 = par1World.getBlockMetadata(par2, par3, par4);
|
||||
|
@ -231,12 +224,9 @@ public class BlockTreeMoss extends Block implements IShearable
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Lets the block know when one of its neighbor changes. Doesn't know which neighbor changed (coordinates passed are
|
||||
* their own) Args: x, y, z, neighbor blockID
|
||||
*/
|
||||
@Override
|
||||
public void onNeighborBlockChange(World par1World, int par2, int par3, int par4, int par5)
|
||||
//TODO: onNeighborBlockChange()
|
||||
public void func_149695_a(World world, int x, int y, int z, Block neighborBlock)
|
||||
{
|
||||
if (!par1World.isRemote && !this.canVineStay(par1World, par2, par3, par4))
|
||||
{
|
||||
|
@ -245,17 +235,16 @@ public class BlockTreeMoss extends Block implements IShearable
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Ticks the block if it's been scheduled
|
||||
*/
|
||||
@Override
|
||||
public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random)
|
||||
//TODO: updateTick()
|
||||
public void func_149674_a(World world, int x, int y, int z, Random random)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* called before onBlockPlacedBy by ItemBlock and ItemReed
|
||||
*/
|
||||
@Override
|
||||
public void updateBlockMetadata(World par1World, int par2, int par3, int par4, int par5, float par6, float par7, float par8)
|
||||
{
|
||||
byte var9 = 0;
|
||||
|
@ -314,7 +303,8 @@ public class BlockTreeMoss extends Block implements IShearable
|
|||
* Returns the ID of the items to drop on destruction.
|
||||
*/
|
||||
@Override
|
||||
public int idDropped(int par1, Random par2Random, int par3)
|
||||
//TODO: getItemDropped()
|
||||
public Item func_149650_a(int metadata, Random random, int fortune
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -323,7 +313,8 @@ public class BlockTreeMoss extends Block implements IShearable
|
|||
* Returns the quantity of items to drop on block destruction.
|
||||
*/
|
||||
@Override
|
||||
public int quantityDropped(Random par1Random)
|
||||
//TODO: getQuantityDropped()
|
||||
public int func_149745_a(Random random)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -339,7 +330,7 @@ public class BlockTreeMoss extends Block implements IShearable
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean isShearable(ItemStack item, World world, int x, int y, int z)
|
||||
public boolean isShearable(ItemStack item, IBlockAccess world, int x, int y, int z)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -22,7 +22,8 @@ public class BlockWillow extends Block implements IShearable
|
|||
{
|
||||
super(par1, Material.vine);
|
||||
setBurnProperties(blockID, 15, 100);
|
||||
this.setTickRandomly(true);
|
||||
//TODO: setTickRandomly()
|
||||
this.func_149675_a(true);
|
||||
|
||||
//TODO: this.setCreativeTab()
|
||||
this.func_149647_a(BiomesOPlenty.tabBiomesOPlenty);
|
||||
|
@ -42,14 +43,16 @@ public class BlockWillow extends Block implements IShearable
|
|||
@Override
|
||||
public void setBlockBoundsForItemRender()
|
||||
{
|
||||
this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
|
||||
//TODO: setBlockBounds
|
||||
this.func_149676_a0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
|
||||
}
|
||||
|
||||
/**
|
||||
* The type of render function that is called for this block
|
||||
*/
|
||||
@Override
|
||||
public int getRenderType()
|
||||
public int //TODO getRenderType()
|
||||
public int func_149645_b()()
|
||||
{
|
||||
return 20;
|
||||
}
|
||||
|
@ -69,7 +72,8 @@ public class BlockWillow extends Block implements IShearable
|
|||
* If this block doesn't render as an ordinary block it will return False (examples: signs, buttons, stairs, etc)
|
||||
*/
|
||||
@Override
|
||||
public boolean renderAsNormalBlock()
|
||||
public boolean //TODO: renderAsNormalBlock()
|
||||
public boolean func_149686_d()()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -78,7 +82,8 @@ public class BlockWillow extends Block implements IShearable
|
|||
* Updates the blocks bounds based on its current state. Args: world, x, y, z
|
||||
*/
|
||||
@Override
|
||||
public void setBlockBoundsBasedOnState(IBlockAccess par1IBlockAccess, int par2, int par3, int par4)
|
||||
//TODO: setBlockBoundsBasedOnState()
|
||||
public void func_149719_a(IBlockAccess world, int x, int y, int z)
|
||||
{
|
||||
int var6 = par1IBlockAccess.getBlockMetadata(par2, par3, par4);
|
||||
float var7 = 1.0F;
|
||||
|
@ -143,7 +148,8 @@ public class BlockWillow extends Block implements IShearable
|
|||
var12 = 1.0F;
|
||||
}
|
||||
|
||||
this.setBlockBounds(var7, var8, var9, var10, var11, var12);
|
||||
//TODO: setBlockBounds
|
||||
this.func_149676_avar7, var8, var9, var10, var11, var12);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -151,7 +157,8 @@ public class BlockWillow extends Block implements IShearable
|
|||
* cleared to be reused)
|
||||
*/
|
||||
@Override
|
||||
public AxisAlignedBB getCollisionBoundingBoxFromPool(World par1World, int par2, int par3, int par4)
|
||||
//TODO: getCollisionBoundingBoxFromPool
|
||||
public AxisAlignedBB func_149668_a(World world, int x, int y, int z)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
@ -194,7 +201,8 @@ public class BlockWillow extends Block implements IShearable
|
|||
else
|
||||
{
|
||||
Block var2 = Block.blocksList[par1];
|
||||
return var2.renderAsNormalBlock() && var2.blockMaterial.blocksMovement();
|
||||
return var2. //TODO: renderAsNormalBlock()
|
||||
public boolean func_149686_d()() && var2.blockMaterial.blocksMovement();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -262,7 +270,8 @@ public class BlockWillow extends Block implements IShearable
|
|||
* their own) Args: x, y, z, neighbor blockID
|
||||
*/
|
||||
@Override
|
||||
public void onNeighborBlockChange(World par1World, int par2, int par3, int par4, int par5)
|
||||
public void //TODO: onNeighborBlockChange()
|
||||
public void func_149695_a(World world, int x, int y, int z, Block neighborBlock)(World par1World, int par2, int par3, int par4, int par5)
|
||||
{
|
||||
if (!par1World.isRemote && !this.canVineStay(par1World, par2, par3, par4))
|
||||
{
|
||||
|
@ -275,7 +284,8 @@ public class BlockWillow extends Block implements IShearable
|
|||
* Ticks the block if it's been scheduled
|
||||
*/
|
||||
@Override
|
||||
public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random)
|
||||
public void //TODO: updateTick()
|
||||
public void func_149674_a(World world, int x, int y, int z, Random random)(World par1World, int par2, int par3, int par4, Random par5Random)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -340,7 +350,8 @@ public class BlockWillow extends Block implements IShearable
|
|||
* Returns the ID of the items to drop on destruction.
|
||||
*/
|
||||
@Override
|
||||
public int idDropped(int par1, Random par2Random, int par3)
|
||||
//TODO: getItemDropped()
|
||||
public Item func_149650_a(int metadata, Random random, int fortune
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -349,7 +360,8 @@ public class BlockWillow extends Block implements IShearable
|
|||
* Returns the quantity of items to drop on block destruction.
|
||||
*/
|
||||
@Override
|
||||
public int quantityDropped(Random par1Random)
|
||||
//TODO: getQuantityDropped()
|
||||
public int func_149745_a(Random random)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -365,7 +377,7 @@ public class BlockWillow extends Block implements IShearable
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean isShearable(ItemStack item, World world, int x, int y, int z)
|
||||
public boolean isShearable(ItemStack item, IBlockAccess world, int x, int y, int z)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue