Standardize "alchemical" over "alchemy" for names, get all the items rendering again as they were prior to MC 1.5

This commit is contained in:
pahimar 2013-03-06 18:46:19 -05:00
parent 987689d193
commit 30d3e3aef5
32 changed files with 97 additions and 56 deletions

View file

@ -49,8 +49,8 @@ public class GuiAlchemicalBag extends GuiContainer {
if (this.mc.thePlayer != null) {
for (ItemStack itemStack : this.mc.thePlayer.inventory.mainInventory) {
if (itemStack != null) {
if (NBTHelper.hasTag(itemStack, Strings.NBT_ITEM_ALCHEMY_BAG_GUI_OPEN)) {
NBTHelper.removeTag(itemStack, Strings.NBT_ITEM_ALCHEMY_BAG_GUI_OPEN);
if (NBTHelper.hasTag(itemStack, Strings.NBT_ITEM_ALCHEMICAL_BAG_GUI_OPEN)) {
NBTHelper.removeTag(itemStack, Strings.NBT_ITEM_ALCHEMICAL_BAG_GUI_OPEN);
}
}
}

View file

@ -95,9 +95,9 @@ public class ConfigurationHandler {
ItemIds.MINIUM_SHARD = configuration.getItem(Strings.MINIUM_SHARD_NAME, ItemIds.MINIUM_SHARD_DEFAULT).getInt(ItemIds.MINIUM_SHARD_DEFAULT);
ItemIds.INERT_STONE = configuration.getItem(Strings.INERT_STONE_NAME, ItemIds.INERT_STONE_DEFAULT).getInt(ItemIds.INERT_STONE_DEFAULT);
ItemIds.MINIUM_STONE = configuration.getItem(Strings.MINIUM_STONE_NAME, ItemIds.MINIUM_STONE_DEFAULT).getInt(ItemIds.MINIUM_STONE_DEFAULT);
ItemIds.PHILOSOPHER_STONE = configuration.getItem(Strings.PHILOSOPHERS_STONE_NAME, ItemIds.PHILOSOPHER_STONE_DEFAULT).getInt(ItemIds.PHILOSOPHER_STONE_DEFAULT);
ItemIds.ALCHEMY_DUST = configuration.getItem(Strings.ALCHEMY_DUST_NAME, ItemIds.ALCHEMY_DUST_DEFAULT).getInt(ItemIds.ALCHEMY_DUST_DEFAULT);
ItemIds.ALCHEMY_BAG = configuration.getItem(Strings.ALCHEMY_BAG_NAME, ItemIds.ALCHEMY_BAG_DEFAULT).getInt(ItemIds.ALCHEMY_BAG_DEFAULT);
ItemIds.PHILOSOPHERS_STONE = configuration.getItem(Strings.PHILOSOPHERS_STONE_NAME, ItemIds.PHILOSOPHERS_STONE_DEFAULT).getInt(ItemIds.PHILOSOPHERS_STONE_DEFAULT);
ItemIds.ALCHEMICAL_DUST = configuration.getItem(Strings.ALCHEMICAL_DUST_NAME, ItemIds.ALCHEMICAL_DUST_DEFAULT).getInt(ItemIds.ALCHEMICAL_DUST_DEFAULT);
ItemIds.ALCHEMICAL_BAG = configuration.getItem(Strings.ALCHEMICAL_BAG_NAME, ItemIds.ALCHEMICAL_BAG_DEFAULT).getInt(ItemIds.ALCHEMICAL_BAG_DEFAULT);
/* Item durability configs */
ConfigurationSettings.MINIUM_STONE_MAX_DURABILITY = configuration.get(CATEGORY_DURABILITY, ConfigurationSettings.MINIUM_STONE_MAX_DURABILITY_CONFIGNAME, ConfigurationSettings.MINIUM_STONE_MAX_DURABILITY_DEFAULT).getInt(ConfigurationSettings.MINIUM_STONE_MAX_DURABILITY_DEFAULT);

View file

@ -30,8 +30,8 @@ public class ItemEventHandler {
else if (NBTHelper.hasTag(event.item.getEntityItem(), Strings.NBT_ITEM_TRANSMUTATION_GUI_OPEN)) {
NBTHelper.removeTag(event.item.getEntityItem(), Strings.NBT_ITEM_TRANSMUTATION_GUI_OPEN);
}
else if (NBTHelper.hasTag(event.item.getEntityItem(), Strings.NBT_ITEM_ALCHEMY_BAG_GUI_OPEN)) {
NBTHelper.removeTag(event.item.getEntityItem(), Strings.NBT_ITEM_ALCHEMY_BAG_GUI_OPEN);
else if (NBTHelper.hasTag(event.item.getEntityItem(), Strings.NBT_ITEM_ALCHEMICAL_BAG_GUI_OPEN)) {
NBTHelper.removeTag(event.item.getEntityItem(), Strings.NBT_ITEM_ALCHEMICAL_BAG_GUI_OPEN);
}
}
@ -44,8 +44,8 @@ public class ItemEventHandler {
else if (NBTHelper.hasTag(event.entityItem.getEntityItem(), Strings.NBT_ITEM_TRANSMUTATION_GUI_OPEN)) {
NBTHelper.removeTag(event.entityItem.getEntityItem(), Strings.NBT_ITEM_TRANSMUTATION_GUI_OPEN);
}
else if (NBTHelper.hasTag(event.entityItem.getEntityItem(), Strings.NBT_ITEM_ALCHEMY_BAG_GUI_OPEN)) {
NBTHelper.removeTag(event.entityItem.getEntityItem(), Strings.NBT_ITEM_ALCHEMY_BAG_GUI_OPEN);
else if (NBTHelper.hasTag(event.entityItem.getEntityItem(), Strings.NBT_ITEM_ALCHEMICAL_BAG_GUI_OPEN)) {
NBTHelper.removeTag(event.entityItem.getEntityItem(), Strings.NBT_ITEM_ALCHEMICAL_BAG_GUI_OPEN);
}
}
@ -59,8 +59,8 @@ public class ItemEventHandler {
else if (NBTHelper.hasTag(entityItem.getEntityItem(), Strings.NBT_ITEM_TRANSMUTATION_GUI_OPEN)) {
NBTHelper.removeTag(entityItem.getEntityItem(), Strings.NBT_ITEM_TRANSMUTATION_GUI_OPEN);
}
else if (NBTHelper.hasTag(entityItem.getEntityItem(), Strings.NBT_ITEM_ALCHEMY_BAG_GUI_OPEN)) {
NBTHelper.removeTag(entityItem.getEntityItem(), Strings.NBT_ITEM_ALCHEMY_BAG_GUI_OPEN);
else if (NBTHelper.hasTag(entityItem.getEntityItem(), Strings.NBT_ITEM_ALCHEMICAL_BAG_GUI_OPEN)) {
NBTHelper.removeTag(entityItem.getEntityItem(), Strings.NBT_ITEM_ALCHEMICAL_BAG_GUI_OPEN);
}
}
}

View file

@ -73,7 +73,7 @@ public class AlchemicalBagSavedData extends WorldSavedData implements IInventory
@Override
public String getInvName() {
return "worldsaveddata" + "." + Strings.ALCHEMY_BAG_NAME;
return "worldsaveddata" + "." + Strings.ALCHEMICAL_BAG_NAME;
}
@Override

View file

@ -41,8 +41,8 @@ public class ContainerAlchemicalBag extends Container {
InventoryPlayer invPlayer = player.inventory;
for (ItemStack itemStack : invPlayer.mainInventory) {
if (itemStack != null) {
if (NBTHelper.hasTag(itemStack, Strings.NBT_ITEM_ALCHEMY_BAG_GUI_OPEN)) {
NBTHelper.removeTag(itemStack, Strings.NBT_ITEM_ALCHEMY_BAG_GUI_OPEN);
if (NBTHelper.hasTag(itemStack, Strings.NBT_ITEM_ALCHEMICAL_BAG_GUI_OPEN)) {
NBTHelper.removeTag(itemStack, Strings.NBT_ITEM_ALCHEMICAL_BAG_GUI_OPEN);
}
}
}

View file

@ -1,5 +1,6 @@
package com.pahimar.ee3.item;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.util.Icon;
@ -8,25 +9,41 @@ import net.minecraft.world.World;
import com.pahimar.ee3.EquivalentExchange3;
import com.pahimar.ee3.core.helper.NBTHelper;
import com.pahimar.ee3.lib.GuiIds;
import com.pahimar.ee3.lib.Reference;
import com.pahimar.ee3.lib.Strings;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class ItemAlchemyBag extends ItemEE {
public class ItemAlchemicalBag extends ItemEE {
public ItemAlchemyBag(int id) {
private static final String[] ALCHEMICAL_BAG_SUBTYPES = new String[] { "Open", "OpenDrawString", "Closed", "ClosedDrawString" };
@SideOnly(Side.CLIENT)
private Icon[] icons;
public ItemAlchemicalBag(int id) {
super(id);
this.setUnlocalizedName(Strings.ALCHEMY_BAG_NAME);
this.setUnlocalizedName(Strings.ALCHEMICAL_BAG_NAME);
this.setCreativeTab(EquivalentExchange3.tabsEE3);
}
@SideOnly(Side.CLIENT)
public void func_94581_a(IconRegister iconRegister) {
this.icons = new Icon[ALCHEMICAL_BAG_SUBTYPES.length];
for (int i = 0; i < ALCHEMICAL_BAG_SUBTYPES.length; ++i) {
this.icons[i] = iconRegister.func_94245_a(Reference.MOD_ID.toLowerCase() + ":" + Strings.ALCHEMICAL_BAG_NAME + ALCHEMICAL_BAG_SUBTYPES[i]);
}
}
@Override
public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer entityPlayer) {
if (!world.isRemote) {
NBTHelper.setBoolean(itemStack, Strings.NBT_ITEM_ALCHEMY_BAG_GUI_OPEN, true);
NBTHelper.setBoolean(itemStack, Strings.NBT_ITEM_ALCHEMICAL_BAG_GUI_OPEN, true);
entityPlayer.openGui(EquivalentExchange3.instance, GuiIds.ALCHEMICAL_BAG, entityPlayer.worldObj, (int) entityPlayer.posX, (int) entityPlayer.posY, (int) entityPlayer.posZ);
}
@ -46,25 +63,24 @@ public class ItemAlchemyBag extends ItemEE {
}
@Override
@SideOnly(Side.CLIENT)
public Icon getIcon(ItemStack itemStack, int renderPass) {
// If the bag is open
if (NBTHelper.hasTag(itemStack, Strings.NBT_ITEM_ALCHEMY_BAG_GUI_OPEN)) {
if (NBTHelper.hasTag(itemStack, Strings.NBT_ITEM_ALCHEMICAL_BAG_GUI_OPEN)) {
if (renderPass == 0) {
return this.iconIndex;
return icons[0];
}
else {
return this.iconIndex;
return icons[1];
}
}
// Else, the bag is closed
else {
if (renderPass == 0) {
return this.iconIndex;
return icons[2];
}
else {
return this.iconIndex;
return icons[3];
}
}
}

View file

@ -2,13 +2,16 @@ package com.pahimar.ee3.item;
import java.util.List;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.EnumRarity;
import net.minecraft.item.ItemStack;
import net.minecraft.util.Icon;
import net.minecraft.util.MathHelper;
import com.pahimar.ee3.EquivalentExchange3;
import com.pahimar.ee3.lib.CustomItemRarity;
import com.pahimar.ee3.lib.Reference;
import com.pahimar.ee3.lib.Strings;
import cpw.mods.fml.relauncher.Side;
@ -23,24 +26,47 @@ import cpw.mods.fml.relauncher.SideOnly;
* @license Lesser GNU Public License v3 (http://www.gnu.org/licenses/lgpl.html)
*
*/
public class ItemAlchemyDust extends ItemEE {
public class ItemAlchemicalDust extends ItemEE {
public static final String[] alchemyDustNames = new String[] { "ash", "minium", "verdant", "azure", "amaranthine", "iridescent" };
private static final String[] ALCHEMICAL_DUST_NAMES = new String[] { "Ash", "Minium", "Verdant", "Azure", "Amaranthine", "Iridescent" };
public ItemAlchemyDust(int id) {
@SideOnly(Side.CLIENT)
private Icon[] icons;
public ItemAlchemicalDust(int id) {
super(id);
this.setHasSubtypes(true);
this.setUnlocalizedName(Strings.ALCHEMY_DUST_NAME);
this.setUnlocalizedName(Strings.ALCHEMICAL_DUST_NAME);
this.setCreativeTab(EquivalentExchange3.tabsEE3);
maxStackSize = 64;
}
@SideOnly(Side.CLIENT)
public String getItemNameIS(ItemStack stack) {
@Override
public String getUnlocalizedName(ItemStack itemStack) {
int meta = MathHelper.clamp_int(stack.getItemDamage(), 0, 5);
return super.getUnlocalizedName() + "." + alchemyDustNames[meta];
int meta = MathHelper.clamp_int(itemStack.getItemDamage(), 0, 5);
return (super.getUnlocalizedName() + ALCHEMICAL_DUST_NAMES[meta]);
}
@SideOnly(Side.CLIENT)
/**
* Gets an icon index based on an item's damage value
*/
public Icon getIconFromDamage(int meta) {
int j = MathHelper.clamp_int(meta, 0, 5);
return this.icons[j];
}
@SideOnly(Side.CLIENT)
public void func_94581_a(IconRegister iconRegister) {
this.icons = new Icon[ALCHEMICAL_DUST_NAMES.length];
for (int i = 0; i < ALCHEMICAL_DUST_NAMES.length; ++i) {
this.icons[i] = iconRegister.func_94245_a(Reference.MOD_ID.toLowerCase() + ":" + Strings.ALCHEMICAL_DUST_NAME + ALCHEMICAL_DUST_NAMES[i]);
}
}
@SideOnly(Side.CLIENT)
@ -87,5 +113,4 @@ public class ItemAlchemyDust extends ItemEE {
list.add(new ItemStack(id, 1, meta));
}
}
}

View file

@ -29,12 +29,12 @@ import cpw.mods.fml.relauncher.SideOnly;
* @license Lesser GNU Public License v3 (http://www.gnu.org/licenses/lgpl.html)
*
*/
public class ItemPhilosopherStone extends ItemEE
public class ItemPhilosophersStone extends ItemEE
implements ITransmutationStone, IChargeable, IKeyBound {
private int maxChargeLevel;
public ItemPhilosopherStone(int id) {
public ItemPhilosophersStone(int id) {
super(id);
this.setUnlocalizedName(Strings.PHILOSOPHERS_STONE_NAME);

View file

@ -24,8 +24,8 @@ public class ModItems {
public static Item inertStone;
public static Item miniumStone;
public static Item philStone;
public static Item alchemyDust;
public static Item alchemyBag;
public static Item alchemicalDust;
public static Item alchemicalBag;
public static void init() {
@ -33,9 +33,9 @@ public class ModItems {
miniumShard = new ItemMiniumShard(ItemIds.MINIUM_SHARD);
inertStone = new ItemInertStone(ItemIds.INERT_STONE);
miniumStone = new ItemMiniumStone(ItemIds.MINIUM_STONE);
philStone = new ItemPhilosopherStone(ItemIds.PHILOSOPHER_STONE);
//alchemyDust = new ItemAlchemyDust(ItemIds.ALCHEMY_DUST);
//alchemyBag = new ItemAlchemyBag(ItemIds.ALCHEMY_BAG);
philStone = new ItemPhilosophersStone(ItemIds.PHILOSOPHERS_STONE);
alchemicalDust = new ItemAlchemicalDust(ItemIds.ALCHEMICAL_DUST);
alchemicalBag = new ItemAlchemicalBag(ItemIds.ALCHEMICAL_BAG);
miniumStone.setContainerItem(miniumStone);
philStone.setContainerItem(philStone);

View file

@ -15,16 +15,16 @@ public class ItemIds {
public static int MINIUM_SHARD_DEFAULT = 27000;
public static int INERT_STONE_DEFAULT = 27001;
public static int MINIUM_STONE_DEFAULT = 27002;
public static int PHILOSOPHER_STONE_DEFAULT = 27003;
public static int ALCHEMY_DUST_DEFAULT = 27004;
public static int ALCHEMY_BAG_DEFAULT = 27005;
public static int PHILOSOPHERS_STONE_DEFAULT = 27003;
public static int ALCHEMICAL_DUST_DEFAULT = 27004;
public static int ALCHEMICAL_BAG_DEFAULT = 27005;
/* Current item ids */
public static int MINIUM_SHARD;
public static int INERT_STONE;
public static int MINIUM_STONE;
public static int PHILOSOPHER_STONE;
public static int ALCHEMY_DUST;
public static int ALCHEMY_BAG;
public static int PHILOSOPHERS_STONE;
public static int ALCHEMICAL_DUST;
public static int ALCHEMICAL_BAG;
}

View file

@ -26,7 +26,7 @@ public class Strings {
public static final String NBT_ITEM_MODE_KEY = "itemMode";
public static final String NBT_ITEM_CRAFTING_GUI_OPEN = "itemCraftingGuiOpen";
public static final String NBT_ITEM_TRANSMUTATION_GUI_OPEN = "itemTransmutationGuiOpen";
public static final String NBT_ITEM_ALCHEMY_BAG_GUI_OPEN = "itemAlchemyBagGuiOpen";
public static final String NBT_ITEM_ALCHEMICAL_BAG_GUI_OPEN = "itemAlchemicalBagGuiOpen";
public static final String NBT_TE_OWNER_KEY = "teOwner";
public static final String NBT_TE_STATE_KEY = "teState";
public static final String NBT_TE_DIRECTION_KEY = "teDirection";
@ -43,8 +43,8 @@ public class Strings {
public static final String INERT_STONE_NAME = "stoneInert";
public static final String MINIUM_STONE_NAME = "stoneMinium";
public static final String PHILOSOPHERS_STONE_NAME = "stonePhilosophers";
public static final String ALCHEMY_DUST_NAME = "dustAlchemy";
public static final String ALCHEMY_BAG_NAME = "alchemyBag";
public static final String ALCHEMICAL_DUST_NAME = "dustAlchemical";
public static final String ALCHEMICAL_BAG_NAME = "alchemicalBag";
/* TileEntity name constants */
public static final String TE_CALCINATOR_NAME = "tileCalcinator";

View file

@ -10,13 +10,13 @@
<entry key="item.stoneInert.name">Inert Stone</entry>
<entry key="item.stoneMinium.name">Minium Stone</entry>
<entry key="item.stonePhilosophers.name">Philosopher's Stone</entry>
<entry key="item.alchemyDust.ash.name">Ash</entry>
<entry key="item.alchemyDust.minium.name">Minium Dust</entry>
<entry key="item.alchemyDust.verdant.name">Verdant Dust</entry>
<entry key="item.alchemyDust.azure.name">Azure Dust</entry>
<entry key="item.alchemyDust.amaranthine.name">Amaranthine Dust</entry>
<entry key="item.alchemyDust.iridescent.name">Iridescent Dust</entry>
<entry key="item.alchemyBag.name">Alchemical Bag</entry>
<entry key="item.dustAlchemicalAsh.name">Ash</entry>
<entry key="item.dustAlchemicalMinium.name">Minium Dust</entry>
<entry key="item.dustAlchemicalVerdant.name">Verdant Dust</entry>
<entry key="item.dustAlchemicalAzure.name">Azure Dust</entry>
<entry key="item.dustAlchemicalAmaranthine.name">Amaranthine Dust</entry>
<entry key="item.dustAlchemicalIridescent.name">Iridescent Dust</entry>
<entry key="item.alchemicalBag.name">Alchemical Bag</entry>
<entry key="tile.redWaterStill.name">Red Water (Still)</entry>
<entry key="tile.redWaterFlowing.name">Red Water (Flowing)</entry>
<entry key="tile.calcinator.name">Calcinator</entry>

View file

Before

Width:  |  Height:  |  Size: 525 B

After

Width:  |  Height:  |  Size: 525 B

View file

Before

Width:  |  Height:  |  Size: 218 B

After

Width:  |  Height:  |  Size: 218 B

View file

Before

Width:  |  Height:  |  Size: 532 B

After

Width:  |  Height:  |  Size: 532 B

View file

Before

Width:  |  Height:  |  Size: 231 B

After

Width:  |  Height:  |  Size: 231 B

View file

Before

Width:  |  Height:  |  Size: 574 B

After

Width:  |  Height:  |  Size: 574 B

View file

Before

Width:  |  Height:  |  Size: 548 B

After

Width:  |  Height:  |  Size: 548 B

View file

Before

Width:  |  Height:  |  Size: 514 B

After

Width:  |  Height:  |  Size: 514 B

View file

Before

Width:  |  Height:  |  Size: 556 B

After

Width:  |  Height:  |  Size: 556 B

View file

Before

Width:  |  Height:  |  Size: 471 B

After

Width:  |  Height:  |  Size: 471 B

View file

Before

Width:  |  Height:  |  Size: 449 B

After

Width:  |  Height:  |  Size: 449 B