Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package maniamsmart.FoodAddOn;
- import java.util.Random;
- import cpw.mods.fml.relauncher.Side;
- import cpw.mods.fml.relauncher.SideOnly;
- import net.minecraft.block.BlockCrops;
- import net.minecraft.util.IIcon;
- import net.minecraft.client.renderer.texture.IIconRegister;
- import net.minecraft.item.Item;
- public class CustomCrop extends BlockCrops{
- @SideOnly(Side.CLIENT)
- private IIcon[] iconarray;
- @SideOnly(Side.CLIENT)
- public void registerBlockIcons(IIconRegister iconRegister){
- this.iconarray = new IIcon[4];
- for (int i = 0; i < this.iconarray.length; i++)
- {
- this.iconarray[i] = iconRegister.registerIcon("fao:" + this.getUnlocalizedName().substring(5) + (i + 1));
- }
- }
- public IIcon getIcon(int side, int metadata){
- if (metadata < 7)
- {
- if (metadata == 6)
- {
- metadata = 5;
- }
- return this.iconarray[metadata >> 1];
- }
- return this.iconarray[3];
- }
- public int quantityDropped (Random random)
- {
- return 1;
- }
- protected Item func_149866_i(){
- return FoodAddOn.itemOatsSeeds;
- }
- protected Item func_149865_P(){
- return FoodAddOn.itemOats;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement