How about some new Matter types? Much love to @BigBadChris! (Support him at http://www.patreon.com/bigbadchris)
|
@ -20,6 +20,7 @@ public class ModItems
|
|||
public static final ItemEE diviningRod = new ItemDiviningRod();
|
||||
public static final ItemEE alchemicalTome = new ItemAlchemicalTome();
|
||||
public static final ItemEE guide = new ItemGuide();
|
||||
public static final ItemEE matter = new ItemMatter();
|
||||
|
||||
public static void init()
|
||||
{
|
||||
|
@ -35,5 +36,6 @@ public class ModItems
|
|||
GameRegistry.registerItem(diviningRod, Names.Items.DIVINING_ROD);
|
||||
GameRegistry.registerItem(alchemicalTome, Names.Items.ALCHEMICAL_TOME);
|
||||
GameRegistry.registerItem(guide, Names.Items.GUIDE);
|
||||
GameRegistry.registerItem(matter, Names.Items.MATTER);
|
||||
}
|
||||
}
|
||||
|
|
69
src/main/java/com/pahimar/ee3/item/ItemMatter.java
Normal file
|
@ -0,0 +1,69 @@
|
|||
package com.pahimar.ee3.item;
|
||||
|
||||
import com.pahimar.ee3.reference.Names;
|
||||
import com.pahimar.ee3.reference.Textures;
|
||||
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;
|
||||
|
||||
public class ItemMatter extends ItemEE
|
||||
{
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon[] icons;
|
||||
|
||||
public ItemMatter()
|
||||
{
|
||||
super();
|
||||
this.setMaxStackSize(64);
|
||||
this.setHasSubtypes(true);
|
||||
this.setUnlocalizedName(Names.Items.MATTER);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName()
|
||||
{
|
||||
return String.format("item.%s%s", Textures.RESOURCE_PREFIX, Names.Items.MATTER);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack itemStack)
|
||||
{
|
||||
return String.format("item.%s%s%s", Textures.RESOURCE_PREFIX, Names.Items.MATTER, Names.Items.MATTER_SUBTYPES[MathHelper.clamp_int(itemStack.getItemDamage(), 0, Names.Items.MATTER_SUBTYPES.length - 1)]);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(Item item, CreativeTabs creativeTab, List list)
|
||||
{
|
||||
for (int meta = 0; meta < Names.Items.MATTER_SUBTYPES.length; ++meta)
|
||||
{
|
||||
list.add(new ItemStack(this, 1, meta));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIconFromDamage(int meta)
|
||||
{
|
||||
return icons[MathHelper.clamp_int(meta, 0, Names.Items.MATTER_SUBTYPES.length - 1)];
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister iconRegister)
|
||||
{
|
||||
icons = new IIcon[Names.Items.MATTER_SUBTYPES.length];
|
||||
|
||||
for (int i = 0; i < Names.Items.MATTER_SUBTYPES.length; i++)
|
||||
{
|
||||
icons[i] = iconRegister.registerIcon(Textures.RESOURCE_PREFIX + Names.Items.MATTER + Names.Items.MATTER_SUBTYPES[i]);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -33,6 +33,8 @@ public class Names
|
|||
public static final String DIVINING_ROD = "diviningRod";
|
||||
public static final String ALCHEMICAL_TOME = "alchemicalTome";
|
||||
public static final String GUIDE = "guide";
|
||||
public static final String MATTER = "matter";
|
||||
public static final String[] MATTER_SUBTYPES = {"Dark", "Corporeal", "Kinetic", "Temporal", "Essentia", "Amorphous", "Void", "Omni"};
|
||||
}
|
||||
|
||||
public static final class NBT
|
||||
|
|
|
@ -25,6 +25,14 @@ item.ee3:alchemicalUpgrade.azure.name=Azure Upgrade
|
|||
item.ee3:alchemicalUpgrade.minium.name=Minium Upgrade
|
||||
item.ee3:alchemicalTome.name=Tome of Alchemical Knowledge [WIP]
|
||||
item.ee3:guide.name=Guide To Alchemy [WIP]
|
||||
item.ee3:matterDark.name=Dark Matter
|
||||
item.ee3:matterOmni.name=Omni Matter
|
||||
item.ee3:matterCorporeal.name=Corporeal Matter
|
||||
item.ee3:matterKinetic.name=Kinetic Matter
|
||||
item.ee3:matterTemporal.name=Temporal Matter
|
||||
item.ee3:matterEssentia.name=Essentia Matter
|
||||
item.ee3:matterAmorphous.name=Amorphous Matter
|
||||
item.ee3:matterVoid.name=Void Matter
|
||||
|
||||
# Block localizations
|
||||
tile.ee3:alchemicalChest.name=Alchemical Chest
|
||||
|
|
BIN
src/main/resources/assets/ee3/textures/items/matterAmorphous.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
src/main/resources/assets/ee3/textures/items/matterCorporeal.png
Normal file
After Width: | Height: | Size: 2.1 KiB |
BIN
src/main/resources/assets/ee3/textures/items/matterDark.png
Normal file
After Width: | Height: | Size: 2.6 KiB |
BIN
src/main/resources/assets/ee3/textures/items/matterDark2.png
Normal file
After Width: | Height: | Size: 2.4 KiB |
BIN
src/main/resources/assets/ee3/textures/items/matterEssentia.png
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
src/main/resources/assets/ee3/textures/items/matterKinetic.png
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
src/main/resources/assets/ee3/textures/items/matterOmni.png
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
src/main/resources/assets/ee3/textures/items/matterTemporal.png
Normal file
After Width: | Height: | Size: 2 KiB |
BIN
src/main/resources/assets/ee3/textures/items/matterVoid.png
Normal file
After Width: | Height: | Size: 1.9 KiB |