Templates...

This commit is contained in:
Harrison Deng 2016-01-06 12:46:57 -05:00
parent 63e67199c2
commit d965d04d50
5 changed files with 40 additions and 0 deletions

View File

@ -0,0 +1,40 @@
package org.bitbucket.alltra101ify.advancedsatelliteutilization.moditems;
import org.bitbucket.alltra101ify.advancedsatelliteutilization.reference.ModInfo;
import org.bitbucket.alltra101ify.advancedsatelliteutilization.reference.moditemblockreference.ModBasicItemTemplate;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
public class PCBTemplate extends ModBasicItemTemplate {
byte type;
public IIcon icon[] = new IIcon[4];
public PCBTemplate(byte type) {
this.type = type;
setUnlocalizedName("PCBTemplate"+type);
setTextureName(ModInfo.MODID + ":" + "/PCBTemplate/" + getUnlocalizedName().substring(5));
setMaxStackSize(16);
}
@Override
public void registerIcons(IIconRegister icon) {
for (int i = 0; i < this.icon.length; i++) {
this.icon[i] = icon.registerIcon(ModInfo.MODID + ":" + "/PCBTemplate/" + getUnlocalizedName().substring(5));
}
super.registerIcons(icon);
}
@Override
public IIcon getIcon(ItemStack stack, int pass) {
switch (type) {
case 0: return icon[0];
case 1: return icon[1];
case 2: return icon[2];
case 3: return icon[3];
}
return icon[0];
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 282 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 312 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 313 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 315 B