add icons for some blocks and items
This commit is contained in:
@@ -1,15 +1,19 @@
|
||||
package storagecraft.item;
|
||||
|
||||
import java.util.List;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
import storagecraft.storage.CellStorage;
|
||||
|
||||
public class ItemStorageCell extends ItemSC {
|
||||
private IIcon[] icons = new IIcon[5];
|
||||
|
||||
public ItemStorageCell() {
|
||||
super("storageCell");
|
||||
|
||||
@@ -40,4 +44,16 @@ public class ItemStorageCell extends ItemSC {
|
||||
|
||||
CellStorage.init(stack);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerIcons(IIconRegister register) {
|
||||
for (int i = 0; i < 5; ++i) {
|
||||
icons[i] = register.registerIcon("storagecraft:storageCell" + i);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIconFromDamage(int damage) {
|
||||
return icons[damage];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user