You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
50 lines
1.4 KiB
Java
50 lines
1.4 KiB
Java
package com.zivilon.cinder_loe.blocks;
|
|
|
|
import com.zivilon.cinder_loe.CinderLoE;
|
|
import cpw.mods.fml.relauncher.Side;
|
|
import cpw.mods.fml.relauncher.SideOnly;
|
|
import lotr.common.LOTRMod;
|
|
import net.minecraft.block.BlockCrops;
|
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
|
import net.minecraft.item.Item;
|
|
import net.minecraft.util.IIcon;
|
|
import net.minecraft.world.IBlockAccess;
|
|
import net.minecraftforge.common.EnumPlantType;
|
|
|
|
public class cabbageCrop
|
|
extends BlockCrops {
|
|
@SideOnly(value=Side.CLIENT)
|
|
private IIcon[] cabbageIcons;
|
|
|
|
@SideOnly(value=Side.CLIENT)
|
|
public IIcon getIcon(int i, int j) {
|
|
if (j < 7) {
|
|
if (j == 6) {
|
|
j = 5;
|
|
}
|
|
return this.cabbageIcons[j >> 1];
|
|
}
|
|
return this.cabbageIcons[3];
|
|
}
|
|
|
|
@SideOnly(value=Side.CLIENT)
|
|
public void registerBlockIcons(IIconRegister iconregister) {
|
|
this.cabbageIcons = new IIcon[4];
|
|
for (int i = 0; i < this.cabbageIcons.length; ++i) {
|
|
this.cabbageIcons[i] = iconregister.registerIcon(this.getTextureName() + "_" + i);
|
|
}
|
|
}
|
|
|
|
public Item func_149866_i() {
|
|
return CinderLoE.cabbage;
|
|
}
|
|
|
|
public Item func_149865_P() {
|
|
return CinderLoE.cabbage;
|
|
}
|
|
|
|
public EnumPlantType getPlantType(IBlockAccess world, int i, int j, int k) {
|
|
return EnumPlantType.Crop;
|
|
}
|
|
}
|