Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.morefood.mod.crops;
- import com.morefood.mod.Morefood;
- import cpw.mods.fml.relauncher.Side;
- import cpw.mods.fml.relauncher.SideOnly;
- import net.minecraft.block.BlockCrops;
- import net.minecraft.client.renderer.texture.IIconRegister;
- import net.minecraft.init.Items;
- import net.minecraft.item.Item;
- import net.minecraft.util.IIcon;
- public class AspCrop extends BlockCrops
- {
- @SideOnly(Side.CLIENT)
- private IIcon[] iconArray;
- /**
- * Gets the block's texture. Args: side, meta
- */
- @SideOnly(Side.CLIENT)
- public IIcon getIcon(int side, int metadata)
- {
- if (metadata < 7)
- {
- if (metadata == 6)
- {
- metadata = 5;
- }
- return this.iconArray[metadata >> 1];
- }
- else
- {
- return this.iconArray[3];
- }
- }
- protected Item func_149866_i()
- {
- return Morefood.cropRawAsparagus;
- }
- protected Item func_149865_P()
- {
- return Morefood.cropRawAsparagus;
- }
- @SideOnly(Side.CLIENT)
- public void registerBlockIcons(IIconRegister iconRegister)
- {
- this.iconArray = new IIcon[5];
- for (int i = 0; i < this.iconArray.length; ++i)
- {
- this.iconArray[i] = iconRegister.registerIcon(Morefood.modid + ":" + this.getUnlocalizedName().substring(5) + (i + 1));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement