mirror of
https://github.com/GTNewHorizons/Avaritia.git
synced 2026-11-26 06:53:22 +00:00
Spangly rainbow razzmatazz. AND THE VOID.
This commit is contained in:
1 parent
48cbc0fb7c
commit
4eb97f5179
13 files changed
+219
-21
No files matched your search
@@ -2,9 +2,11 @@ package fox.spiteful.avaritia.items;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MathHelper;
|
||||
|
||||
import java.util.List;
|
||||
@@ -12,7 +14,10 @@ import java.util.List;
|
||||
public class ItemSingularity extends Item {
|
||||
|
||||
public static final String[] types = new String[]{"iron", "gold", "lapis"};
|
||||
public static final int[] colors = new int[]{0x7F7F7F, 0xFFFF00, 0x0000FF};
|
||||
public static final int[] colors = new int[]{0xEFEFEF, 0xeaee57, 0x5a82e2};
|
||||
public static final int[] colors2 = new int[]{0x7F7F7F, 0xdba213, 0x224baf};
|
||||
public static IIcon background;
|
||||
public static IIcon foreground;
|
||||
|
||||
public ItemSingularity(){
|
||||
this.setHasSubtypes(true);
|
||||
@@ -24,7 +29,9 @@ public class ItemSingularity extends Item {
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public int getColorFromItemStack(ItemStack itemstack, int renderpass) {
|
||||
return colors[itemstack.getItemDamage() % colors.length];
|
||||
//System.out.println(foreground);
|
||||
return renderpass == 0 ? colors2[itemstack.getItemDamage() % colors.length] : colors[itemstack.getItemDamage() % colors2.length];
|
||||
//return 0xFFFFFF;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -40,4 +47,25 @@ public class ItemSingularity extends Item {
|
||||
list.add(new ItemStack(item, 1, j));
|
||||
}
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void registerIcons(IIconRegister ir) {
|
||||
foreground = ir.registerIcon("avaritia:singularity");
|
||||
background = ir.registerIcon("avaritia:singularity2");
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(ItemStack stack, int pass)
|
||||
{
|
||||
if (pass == 0) { return background; }
|
||||
return foreground;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public boolean requiresMultipleRenderPasses()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user