From 838335ca692be32fe25d5ea6b6e3373cffaf8d8c Mon Sep 17 00:00:00 2001 From: pahimar Date: Fri, 25 May 2012 15:12:52 -0400 Subject: [PATCH] Some P Stone work --- ee3_common/ee3/item/ItemPhilosopherStone.java | 27 +++++++++++++++++- ee3_common/ee3/lib/Reference.java | 2 +- resources/ee3/art/sprites/ee3_items.png | Bin 0 -> 1426 bytes 3 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 resources/ee3/art/sprites/ee3_items.png diff --git a/ee3_common/ee3/item/ItemPhilosopherStone.java b/ee3_common/ee3/item/ItemPhilosopherStone.java index 4310d6a3..093570e7 100644 --- a/ee3_common/ee3/item/ItemPhilosopherStone.java +++ b/ee3_common/ee3/item/ItemPhilosopherStone.java @@ -14,6 +14,7 @@ import net.minecraft.src.mod_EE3; */ public class ItemPhilosopherStone extends ItemEE implements IItemChargeable, IItemModal { + private byte type; private byte currentCharge; private byte maxCharge; private byte currentMode; @@ -21,12 +22,36 @@ public class ItemPhilosopherStone extends ItemEE implements IItemChargeable, IIt public ItemPhilosopherStone(int i) { super(i); + type = 1; maxCharge = 4; maxMode = 2; } + /** + * Gets an icon index based on an item's damage value + */ + public int getIconFromDamage(int par1) + { + return this.iconIndex + type; + } + + /* + * Returns the custom item rarity type for the item + * @see net.minecraft.src.Item#getRarity(net.minecraft.src.ItemStack) + */ public EnumRarity getRarity(ItemStack par1ItemStack) { - return mod_EE3.proxy.getCustomEnumRarityType(CustomItemRarity.RARE); + if (type == 1) + return mod_EE3.proxy.getCustomEnumRarityType(CustomItemRarity.RARE); + else + return mod_EE3.proxy.getCustomEnumRarityType(CustomItemRarity.MAGICAL); + } + + /* + * Gives the Philosopher Stone a nice visual effect + * @see net.minecraft.src.Item#hasEffect(net.minecraft.src.ItemStack) + */ + public boolean hasEffect(ItemStack par1ItemStack) { + return (this.type == 1); } @Override diff --git a/ee3_common/ee3/lib/Reference.java b/ee3_common/ee3/lib/Reference.java index 97cdc4dc..9ff3d594 100644 --- a/ee3_common/ee3/lib/Reference.java +++ b/ee3_common/ee3/lib/Reference.java @@ -14,7 +14,7 @@ public class Reference { public static final String CONFIG_DIR = "config/ee3/"; public static final String SPRITE_SHEET_LOCATION = "/ee3/art/sprites/"; - public static final String ITEM_SPRITE_SHEET = "eqexsheet.png"; + public static final String ITEM_SPRITE_SHEET = "ee3_items.png"; public static final String GUI_SHEET_LOCATION = "/ee3/art/gui/"; public static final String ARMOR_SHEET_LOCATION = "/ee3/art/armor/"; public static final String SOUND_RESOURCE_LOCATION = "/ee3/sound/"; diff --git a/resources/ee3/art/sprites/ee3_items.png b/resources/ee3/art/sprites/ee3_items.png new file mode 100644 index 0000000000000000000000000000000000000000..f3090f3898ce21b12988ab8354bb0c5e5494913a GIT binary patch literal 1426 zcmeAS@N?(olHy`uVBq!ia0y~yU<5K5893O0R7}x|G$18e;u=vBoS#-wo>-L1;Fyx1 zl&avFo0y&&l$w}QS$HzlhJk_A#M8wwq~g|_Tj#T9m&zRY`2KR)*26a&bb3}g+h!bn z_u$pF<^V^Isz`RDg;k#(Wd38^wcnxZL1@T_UCjnA7Y?iKn9R3pW2J=O(pRTSEG|q< zi=J%yQtorjWp(dM=>{J!tXMB@W8?o>MRQ5by~;Wh&&wtZ|NWJJ9{cj8F@aOmz14pSHHaY;qiIuUHmy~7cOGo{P6#p7{2^> zHw34PA3t_z-ouB7G)hjl+1#&7s@wE@W6qCyuElC{Y^Dsx#>R6W+6S&adR%Pw*@BH1 zJ8oC9q@|~G-(MqCcC6IwMgE?0t35&YX3x{@-*$bia?|l=-+moQY*6``SW(6mVDe|C z4a3gUuU{{mxy*w+OHy@y{D-fil;^D1 zD^vQA^Q-icKLc|SSAqWFcope?wZ&g|%;o)mVmJF^q2$8f=Pn*zcQLncubuhR)$(kb z4EiBjCx4sg{dxQF{Mp*AV*CGgrwHD#HIqBmcI@!JkG2mloSZ$kyXC+&NzJMcU)Dw^ ze*aML(O^5@|Lx!Je(yef$Lf2&{IB(G&!Xp-u+{$#$V{$Qy^hyMxU zy#Mb`v8zx&`R=p+)#;DV-^|@#bFzK^{|?3*QFH$@|5&@#W>aBR{K}9+k5&d3y4(E` z-~Ep3&#kJnhwtWZ`nap)<