From b71931b66146d55df779642bb374ed3fa0e4bb09 Mon Sep 17 00:00:00 2001 From: cp Date: Wed, 19 Mar 2014 22:31:17 +0800 Subject: [PATCH] Started work on some items. --- .../config/AlloySmelterRecipes_Core.xml | 11 ++ resources/assets/enderio/lang/en_US.lang | 6 + .../enderio/textures/items/darkSteel.png | Bin 0 -> 429 bytes .../enderio/textures/items/darkSteel_axe.png | Bin 0 -> 260 bytes .../textures/items/darkSteel_boots.png | Bin 0 -> 240 bytes .../textures/items/darkSteel_chestplate.png | Bin 0 -> 262 bytes .../textures/items/darkSteel_helmet.png | Bin 0 -> 214 bytes .../enderio/textures/items/darkSteel_hoe.png | Bin 0 -> 247 bytes .../textures/items/darkSteel_leggings.png | Bin 0 -> 223 bytes .../textures/items/darkSteel_pickaxe.png | Bin 0 -> 318 bytes .../textures/items/darkSteel_shovel.png | Bin 0 -> 246 bytes .../textures/items/darkSteel_sword.png | Bin 0 -> 288 bytes .../models/armor/darkSteel_layer_1.png | Bin 0 -> 1118 bytes .../models/armor/darkSteel_layer_2.png | Bin 0 -> 673 bytes src/main/java/crazypants/enderio/EnderIO.java | 12 ++ .../enderio/item/DarkSteelController.java | 55 ++++++++ .../enderio/item/ItemDarkSteelArmor.java | 117 ++++++++++++++++++ .../crazypants/enderio/material/Alloy.java | 3 +- .../enderio/material/MaterialRecipes.java | 9 +- 19 files changed, 205 insertions(+), 8 deletions(-) create mode 100644 resources/assets/enderio/textures/items/darkSteel.png create mode 100644 resources/assets/enderio/textures/items/darkSteel_axe.png create mode 100644 resources/assets/enderio/textures/items/darkSteel_boots.png create mode 100644 resources/assets/enderio/textures/items/darkSteel_chestplate.png create mode 100644 resources/assets/enderio/textures/items/darkSteel_helmet.png create mode 100644 resources/assets/enderio/textures/items/darkSteel_hoe.png create mode 100644 resources/assets/enderio/textures/items/darkSteel_leggings.png create mode 100644 resources/assets/enderio/textures/items/darkSteel_pickaxe.png create mode 100644 resources/assets/enderio/textures/items/darkSteel_shovel.png create mode 100644 resources/assets/enderio/textures/items/darkSteel_sword.png create mode 100644 resources/assets/enderio/textures/models/armor/darkSteel_layer_1.png create mode 100644 resources/assets/enderio/textures/models/armor/darkSteel_layer_2.png create mode 100644 src/main/java/crazypants/enderio/item/DarkSteelController.java create mode 100644 src/main/java/crazypants/enderio/item/ItemDarkSteelArmor.java diff --git a/resources/assets/enderio/config/AlloySmelterRecipes_Core.xml b/resources/assets/enderio/config/AlloySmelterRecipes_Core.xml index f21d79fb..ab3359e0 100644 --- a/resources/assets/enderio/config/AlloySmelterRecipes_Core.xml +++ b/resources/assets/enderio/config/AlloySmelterRecipes_Core.xml @@ -93,6 +93,17 @@ sand/cobble/wood=0.1 + + + + + + + + + + + diff --git a/resources/assets/enderio/lang/en_US.lang b/resources/assets/enderio/lang/en_US.lang index 380d206d..46d26f80 100644 --- a/resources/assets/enderio/lang/en_US.lang +++ b/resources/assets/enderio/lang/en_US.lang @@ -36,6 +36,7 @@ enderio.itemMeConduit.name=ME Conduit //Materials enderio.itemMaterial.name=Materials enderio.silicon.name=Silicon +enderio.darkSteel.name=Dark Steel enderio.conduitBinder.name=Conduit Binder enderio.binderComposite.name=Binder Composite enderio.phasedIronNugget.name=Pulsating Iron Nugget @@ -118,6 +119,11 @@ enderio.itemEnderface.tooFar=EnderIO block is too distant. enderio.itemEnderface.destroyed=EnderIO block has been destroyed. enderio.itemEnderface.noSync=Enderface not synchronized with EnderIO. +item.darkSteel_helmet.name=Dark Helm +item.darkSteel_chestplate.name=Dark Plate +item.darkSteel_leggings.name=Dark Leggings +item.darkSteel_boots.name=Dark Boots + //------GUI diff --git a/resources/assets/enderio/textures/items/darkSteel.png b/resources/assets/enderio/textures/items/darkSteel.png new file mode 100644 index 0000000000000000000000000000000000000000..2934c638cced017233b27bbe404940f018af82ec GIT binary patch literal 429 zcmV;e0aE^nP)N2bPDNB8 zb~7$DE-^7j^FlWO00AjUL_t(IPt}kyi-SNAg)Obj9|&knhzdbs62w?&W#vDxuraNq z2!wPYjab-Nrtz=7@P^w6xxnSB;|3nHJIwoLceMW#hGBsEx_%au$pjRQhrOvPJ->a#2-P!Sg)q_j@Esf;3Gf(>$Ng z1x)id0G~*4!_1t-=SEQ^MrBt2R+1$$6olmEa`~L1^w#tmgmB9W@R8{?2>G??k3-WQ Xi)!BP+$31(00000NkvXXu0mjfV$iVp literal 0 HcmV?d00001 diff --git a/resources/assets/enderio/textures/items/darkSteel_axe.png b/resources/assets/enderio/textures/items/darkSteel_axe.png new file mode 100644 index 0000000000000000000000000000000000000000..6f0014cc0b36916122c819138fb701ea3658395a GIT binary patch literal 260 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85sBugD~Uq{1qucL8%hgh?3y^w370~qEv=}#LT=BJwMkFg)(D3 zQ$0gN_s>q|Kvl(_E{-7<{>cl(fAAkoY5ae@U!FZ#Kw8Pgh9UdRi4#BW-@WU*iLv0U z0gq5~(jtZ%3=_^OoXyJ0I?*P;dqB$OtjkGrmNhs1-|cUcF^@3zWNR=fU$(m0)VbB; yGS6m7Ef<>w5yrDNcd|358*@y^HBN14WMtSFkQVBp5Sa(Gp25@A&t;ucLK6V3F;ejW literal 0 HcmV?d00001 diff --git a/resources/assets/enderio/textures/items/darkSteel_boots.png b/resources/assets/enderio/textures/items/darkSteel_boots.png new file mode 100644 index 0000000000000000000000000000000000000000..d314d206aa10047e7b611e687d705fbfab693ae4 GIT binary patch literal 240 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85sBugD~Uq{1qucL8%hgh?3y^w370~qEv=}#LT=BJwMkFg)(D3 zQ$0gN_s>q|KvnUcE{-7<{&)Kw`3@*>uvGHCe>~l$yG`lZl&dBmFKn4yP#|XR_5Vnl z=Y-}N9TLXVn>zJptU3fF-|T;IwdwQx)lD+??fYIVjCW&wcTBcikoB(;m-OkmBC0z+ dmb|wXkj;8s&2sj$-6fz^44$rjF6*2UngE4-Qt$u( literal 0 HcmV?d00001 diff --git a/resources/assets/enderio/textures/items/darkSteel_chestplate.png b/resources/assets/enderio/textures/items/darkSteel_chestplate.png new file mode 100644 index 0000000000000000000000000000000000000000..2a5e26827c5224dd776b15175444baae52adf648 GIT binary patch literal 262 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85sBugD~Uq{1qucL8%hgh?3y^w370~qEv=}#LT=BJwMkFg)(D3 zQ$0gN_s>q|KvkulE{-7<{%89xavo6NVV!&I=bcL%b;NrwOfU)hb+Ng5(jM{Xx|0!6 zi+;K>t=$@!y)|*B^8M4&))QnozI|^vb?5d@c8N`I_I7VuGU+p41IxW>iT_nJ$g-U;Sv^0l|_ApaU2@UHx3vIVCg! E0HXn7q5uE@ literal 0 HcmV?d00001 diff --git a/resources/assets/enderio/textures/items/darkSteel_helmet.png b/resources/assets/enderio/textures/items/darkSteel_helmet.png new file mode 100644 index 0000000000000000000000000000000000000000..def672f53bfd57baeb2ff8527d5d95c7ca9cb1e8 GIT binary patch literal 214 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85sBugD~Uq{1qucL8%hgh?3y^w370~qEv=}#LT=BJwMkFg)(D3 zQ$0gN_s>q|Kvk}uE{-7<{>c*i9@z8wi2R5T2xw@$dgV%o5zCq%KR!NA=*eR+Y&*bv zVA;$JW(SEQZpTz485V7PxG<4{<3W(ilxGv!B_tSXGYc)EB9?yy8pz=3>gTe~DWM4f D{i8zG literal 0 HcmV?d00001 diff --git a/resources/assets/enderio/textures/items/darkSteel_hoe.png b/resources/assets/enderio/textures/items/darkSteel_hoe.png new file mode 100644 index 0000000000000000000000000000000000000000..2c54c64682bafb97f72504dcb1d8ddee7525a2a9 GIT binary patch literal 247 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85sBugD~Uq{1qucL8%hgh?3y^w370~qEv=}#LT=BJwMkFg)(D3 zQ$0gN_s>q|Kvij;E{-7<{>ckWfAqI_vi+w(k__>Kgr2xn7Djq((IGh lY*=#H7&qlE<1sK`V8~Yqo}3(cBnxOGgQu&X%Q~loCIGNRPwW5y literal 0 HcmV?d00001 diff --git a/resources/assets/enderio/textures/items/darkSteel_leggings.png b/resources/assets/enderio/textures/items/darkSteel_leggings.png new file mode 100644 index 0000000000000000000000000000000000000000..e11c0236bd827f64bf6c1f15b0d48eaa069dfe64 GIT binary patch literal 223 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85sBugD~Uq{1qucL8%hgh?3y^w370~qEv=}#LT=BJwMkFg)(D3 zQ$0gN_s>q|KvjO8E{-7<{>c(k9@sPXi2u>o&^XX}^~x0vDWq|Kvio!T^vI!{F5cFJg^t@G5Jyd=f}tYckkZ)Z){|AK;np)h{&J!nQFi6 z5Bv9N96qqk%fqAL<()fs{D;p8V$1{ zZrZtHheVEmwzhU*TZ2jYvenAg(lTlaQiqN*PsnZKYGk;<;O6G`hb>{FB-??wgruZH zxeR=>6B%TV0@b)OSLC>{?J#}3QPN)FQrew{oY|VpJUk4(zIkW22dI_-9nRqC>gTe~ HDWM4fF@JFB literal 0 HcmV?d00001 diff --git a/resources/assets/enderio/textures/items/darkSteel_shovel.png b/resources/assets/enderio/textures/items/darkSteel_shovel.png new file mode 100644 index 0000000000000000000000000000000000000000..ab07642a1841b33aa410c3eb7ab51f7d6abf6af4 GIT binary patch literal 246 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85sBugD~Uq{1qucL8%hgh?3y^w370~qEv=}#LT=BJwMkFg)(D3 zQ$0gN_s>q|Kvk)pE{-7<{>c(W5A221B>&jg{jrcpPf3}O!x52OUTz*?+`%i<>>bP0l+XkKz^zKe literal 0 HcmV?d00001 diff --git a/resources/assets/enderio/textures/items/darkSteel_sword.png b/resources/assets/enderio/textures/items/darkSteel_sword.png new file mode 100644 index 0000000000000000000000000000000000000000..e86ce9015c3b7d99b0e054b8a6d1bfda7936bffc GIT binary patch literal 288 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85sBugD~Uq{1qucL8%hgh?3y^w370~qEv=}#LT=BJwMkFg)(D3 zQ$0gN_s>q|Kvn&oE{-7<{&V{d@-`^&xbCdJx>)8SV~@53|1P$5NfJF9vmCtZM0h?- zYIFEqCpc9g#4u&8YO+tL!-Tsp-+ljVZ!<%6xzJ|wx!HwHdS1v-tv)78&qol`;+0PA65od5s; literal 0 HcmV?d00001 diff --git a/resources/assets/enderio/textures/models/armor/darkSteel_layer_1.png b/resources/assets/enderio/textures/models/armor/darkSteel_layer_1.png new file mode 100644 index 0000000000000000000000000000000000000000..93c12d33a022639c54cf7c4b32e6aa9f47345638 GIT binary patch literal 1118 zcmV-k1flzhP)<{98gxZibW?9;ba!ELWdKlNX>N2bPDNB8 zb~7$DE-^7j^FlWO00Y`dL_t(&L+#k-PGd0;1>n2^5-s%Jdq==)@cysj)o1xc*5^uEw9ApO=e^i!why z-+u?Judj~`zr4JxEc)6XQ3DwJ@bFM`9}2L(xgS#mllMUYM3_4{IqAOxRCq!CC|Lp9n_G4J~XP+AJ`1n{Ilv@NRg>n{0 zH8rM3qC&a*`}@j@Toe_hL{yvkz(21+`_+XMM}2Y-m38CsI^rsYj;6-+h>;Xh&?v|# z#)&?o$6?A4FmJ;F*}xeZIFn&G4loykwZ4Hl%QxCl(<4TT5?)+f{8S-G0O>aTkQhuZ zwZgfsQk?e$<1v}Gt-loKioW{65y!{J6*cCYSpNw!q)%>+HvLO8PvDw&z$`$PE_s7U zr#9UkfvaMs1>-h7HBzYEMglXDU!#hb+||y)+uyaUn9^q=FGC}KCenql*iJ_xQUI3tb8ZW`D7TZwJ){6b(*v3;aoELPCKqU z^4iN&H-*x8{FzHR51$k+>z>>c&;B6Ii!x{A>eR>j7ps{3P0j9zK`$>a zHFA^-1Sy0?g2GzPiNZ+A#w)`J)gmXDh zs`(D5w&iZgheQZNf{21RgGGw+iJ+WR8z6%0XAl)(DdBu|rA^NsiA=5!kqE3Y2QZQ` kNryzs{KTTv84U)10FRis=Ou>CJOBUy07*qoM6N<$f>mA=2LJ#7 literal 0 HcmV?d00001 diff --git a/resources/assets/enderio/textures/models/armor/darkSteel_layer_2.png b/resources/assets/enderio/textures/models/armor/darkSteel_layer_2.png new file mode 100644 index 0000000000000000000000000000000000000000..91af035902e488945c21dd3f8809393016ebf9cc GIT binary patch literal 673 zcmV;S0$%-zP)N2bPDNB8 zb~7$DE-^7j^FlWO00JFJL_t(&L+#gRZfY?Q1z>i7=q+>zL6n3hHp2e5;-}BD5qke4 zLGY1Ac652n*;xZQ5y za5x0cNYn3w)oK+kmrE4mH2pr1{)jIYiy#})^xs9N(+S;fH%umzu-R;4{V$ixNPaXL z#WENUhta0r??+*)Kj;%_o7V+0yWKAA_xnheZk+XxkB_+i_4O6UoI&4iw^2{qye=}q zpP!#dPUMY`$73854Ux`PRAXQDJ|Mai$2111eFI7ZMyZrU=Y5)zoT$Q+U9kE z$oYJ}NBl9u$f|t~v933$ea?~<`bFC2b&&}pDW&P0@~B(a@HnI0ZpSrF`x6du-HE2C zB1DWuy47mMu8*+q0vV8X>y1X^^&NneXkM?^c=zX90YMS3R;%%PB=npS`4&(%GQ};y zIkj3X{^sloGZrrB)X z59)9ZJDbh!&*e{N_V%D>$v29ukzH)ebE0v6{{Lr){nIg@7osRT5JHBNkU-d67JVf< zz?uwFVjRx?(JnvBHofL~Axg;Po{=3QBl3TWe9Ooh4zhMSonkg|O7203=l;V1$|Sw! zd7*?JBa9#tbY+7y@<_^%Y;R7@b0D45*wfh(d!^U>5-OE{VkVaA@%!|@00000NkvXX Hu0mjfZ9O&q literal 0 HcmV?d00001 diff --git a/src/main/java/crazypants/enderio/EnderIO.java b/src/main/java/crazypants/enderio/EnderIO.java index bf308260..3bfdef35 100644 --- a/src/main/java/crazypants/enderio/EnderIO.java +++ b/src/main/java/crazypants/enderio/EnderIO.java @@ -27,6 +27,7 @@ import crazypants.enderio.conduit.redstone.ItemRedstoneConduit; import crazypants.enderio.enderface.BlockEnderIO; import crazypants.enderio.enderface.EnderfaceRecipes; import crazypants.enderio.enderface.ItemEnderface; +import crazypants.enderio.item.ItemDarkSteelArmor; import crazypants.enderio.item.ItemRecipes; import crazypants.enderio.item.ItemYetaWrench; import crazypants.enderio.machine.MachineRecipes; @@ -127,9 +128,15 @@ public class EnderIO { public static BlockElectricLight blockElectricLight; public static BlockLightNode blockLightNode; + // // Items public static ItemYetaWrench itemYetaWench; public static ItemConduitProbe itemConduitProbe; + public static ItemDarkSteelArmor itemDarkSteelHelmet; + public static ItemDarkSteelArmor itemDarkSteelChestplate; + public static ItemDarkSteelArmor itemDarkSteelLeggings; + public static ItemDarkSteelArmor itemDarkSteelBoots; + // public static ITrigger triggerNoEnergy; // public static ITrigger triggerHasEnergy; // public static ITrigger triggerFullEnergy; @@ -193,6 +200,11 @@ public class EnderIO { itemTravelStaff = ItemTravelStaff.create(); itemConduitProbe = ItemConduitProbe.create(); + itemDarkSteelHelmet = ItemDarkSteelArmor.create(0); + itemDarkSteelChestplate = ItemDarkSteelArmor.create(1); + itemDarkSteelLeggings = ItemDarkSteelArmor.create(2); + itemDarkSteelBoots = ItemDarkSteelArmor.create(3); + MaterialRecipes.registerOresInDictionary(); } diff --git a/src/main/java/crazypants/enderio/item/DarkSteelController.java b/src/main/java/crazypants/enderio/item/DarkSteelController.java new file mode 100644 index 00000000..07914a66 --- /dev/null +++ b/src/main/java/crazypants/enderio/item/DarkSteelController.java @@ -0,0 +1,55 @@ +package crazypants.enderio.item; + +import java.util.UUID; + +import net.minecraft.entity.SharedMonsterAttributes; +import net.minecraft.entity.ai.attributes.AttributeModifier; +import net.minecraft.entity.ai.attributes.IAttributeInstance; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import cpw.mods.fml.common.eventhandler.SubscribeEvent; +import cpw.mods.fml.common.gameevent.TickEvent; +import crazypants.enderio.EnderIO; + +public class DarkSteelController { + + public static final DarkSteelController instance = new DarkSteelController(); + + private AttributeModifier walkModifier = new AttributeModifier(new UUID(12879874982l, 320981923), "generic.movementSpeed", 0.3, 1); + private AttributeModifier sprintModifier = new AttributeModifier(new UUID(6, 320981923), "generic.movementSpeed", 0.6, 1); + + private DarkSteelController() { + } + + @SubscribeEvent + public void onPlayerTick(TickEvent.PlayerTickEvent event) { + EntityPlayer player = event.player; + + //boots + ItemStack boots = player.getEquipmentInSlot(1); + if(boots != null && boots.getItem() == EnderIO.itemDarkSteelBoots) { + player.stepHeight = 1.001F; + } else if(player.stepHeight == 1.001F) { + player.stepHeight = 0.5001F; + } + + //leggings + IAttributeInstance moveInst = player.getAttributeMap().getAttributeInstance(SharedMonsterAttributes.movementSpeed); + moveInst.removeModifier(walkModifier); + moveInst.removeModifier(sprintModifier); + + walkModifier = new AttributeModifier(new UUID(12879874982l, 320981923), "generic.movementSpeed", 0.3, 1); + sprintModifier = new AttributeModifier(new UUID(6, 320981923), "generic.movementSpeed", 0.5, 1); + + ItemStack leggings = player.getEquipmentInSlot(2); + if(leggings != null && leggings.getItem() == EnderIO.itemDarkSteelLeggings) { + if(player.isSprinting()) { + moveInst.applyModifier(sprintModifier); + } else { + moveInst.applyModifier(walkModifier); + } + } + + } + +} diff --git a/src/main/java/crazypants/enderio/item/ItemDarkSteelArmor.java b/src/main/java/crazypants/enderio/item/ItemDarkSteelArmor.java new file mode 100644 index 00000000..c83434d1 --- /dev/null +++ b/src/main/java/crazypants/enderio/item/ItemDarkSteelArmor.java @@ -0,0 +1,117 @@ +package crazypants.enderio.item; + +import java.util.List; + +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemArmor; +import net.minecraft.item.ItemStack; +import net.minecraftforge.common.util.EnumHelper; +import cpw.mods.fml.common.FMLCommonHandler; +import cpw.mods.fml.common.registry.GameRegistry; +import crazypants.enderio.EnderIOTab; + +public class ItemDarkSteelArmor extends ItemArmor { + + public static final ArmorMaterial MATERIAL = EnumHelper.addArmorMaterial("darkSteel", 45, new int[] { 3, 8, 6, 3 }, 25); + + public static final String[] NAMES = new String[] { "helmet", "chestplate", "leggings", "boots" }; + + static { + FMLCommonHandler.instance().bus().register(DarkSteelController.instance); + } + + public static ItemDarkSteelArmor create(int armorType) { + ItemDarkSteelArmor res = new ItemDarkSteelArmor(armorType); + res.init(); + return res; + } + + protected ItemDarkSteelArmor(int armorType) { + super(MATERIAL, 0, armorType); + setCreativeTab(EnderIOTab.tabEnderIO); + + String str = "darkSteel_" + NAMES[armorType]; + setUnlocalizedName(str); + setTextureName("enderIO:" + str); + } + + protected void init() { + GameRegistry.registerItem(this, getUnlocalizedName()); + } + + @Override + public void addInformation(ItemStack itemstack, EntityPlayer entityplayer, List list, boolean flag) { + list.add("Durability: " + (itemstack.getMaxDamage() - itemstack.getItemDamage())); + } + + @Override + public String getArmorTexture(ItemStack itemStack, Entity entity, int slot, String layer) { + if(armorType == 2) { + return "enderio:textures/models/armor/darkSteel_layer_2.png"; + } + return "enderio:textures/models/armor/darkSteel_layer_1.png"; + } + + //Idea from Mekanism + // @ForgeSubscribe + // public void onLivingSpecialSpawn(LivingSpawnEvent event) + // { + // int chance = event.world.rand.nextInt(100); + // int armorType = event.world.rand.nextInt(4); + // + // if(chance < 3) + // { + // if(event.entityLiving instanceof EntityZombie || event.entityLiving instanceof EntitySkeleton) + // { + // int sword = event.world.rand.nextInt(100); + // int helmet = event.world.rand.nextInt(100); + // int chestplate = event.world.rand.nextInt(100); + // int leggings = event.world.rand.nextInt(100); + // int boots = event.world.rand.nextInt(100); + // + // if(armorType == 0) + // { + // if(event.entityLiving instanceof EntityZombie && sword < 50) event.entityLiving.setCurrentItemOrArmor(0, new ItemStack(GlowstoneSword)); + // if(helmet < 50) event.entityLiving.setCurrentItemOrArmor(1, new ItemStack(GlowstoneHelmet)); + // if(chestplate < 50) event.entityLiving.setCurrentItemOrArmor(2, new ItemStack(GlowstoneChestplate)); + // if(leggings < 50) event.entityLiving.setCurrentItemOrArmor(3, new ItemStack(GlowstoneLeggings)); + // if(boots < 50) event.entityLiving.setCurrentItemOrArmor(4, new ItemStack(GlowstoneBoots)); + // } + // else if(armorType == 1) + // { + // if(event.entityLiving instanceof EntityZombie && sword < 50) event.entityLiving.setCurrentItemOrArmor(0, new ItemStack(LazuliSword)); + // if(helmet < 50) event.entityLiving.setCurrentItemOrArmor(1, new ItemStack(LazuliHelmet)); + // if(chestplate < 50) event.entityLiving.setCurrentItemOrArmor(2, new ItemStack(LazuliChestplate)); + // if(leggings < 50) event.entityLiving.setCurrentItemOrArmor(3, new ItemStack(LazuliLeggings)); + // if(boots < 50) event.entityLiving.setCurrentItemOrArmor(4, new ItemStack(LazuliBoots)); + // } + // else if(armorType == 2) + // { + // if(event.entityLiving instanceof EntityZombie && sword < 50) event.entityLiving.setCurrentItemOrArmor(0, new ItemStack(OsmiumSword)); + // if(helmet < 50) event.entityLiving.setCurrentItemOrArmor(1, new ItemStack(OsmiumHelmet)); + // if(chestplate < 50) event.entityLiving.setCurrentItemOrArmor(2, new ItemStack(OsmiumChestplate)); + // if(leggings < 50) event.entityLiving.setCurrentItemOrArmor(3, new ItemStack(OsmiumLeggings)); + // if(boots < 50) event.entityLiving.setCurrentItemOrArmor(4, new ItemStack(OsmiumBoots)); + // } + // else if(armorType == 3) + // { + // if(event.entityLiving instanceof EntityZombie && sword < 50) event.entityLiving.setCurrentItemOrArmor(0, new ItemStack(SteelSword)); + // if(helmet < 50) event.entityLiving.setCurrentItemOrArmor(1, new ItemStack(SteelHelmet)); + // if(chestplate < 50) event.entityLiving.setCurrentItemOrArmor(2, new ItemStack(SteelChestplate)); + // if(leggings < 50) event.entityLiving.setCurrentItemOrArmor(3, new ItemStack(SteelLeggings)); + // if(boots < 50) event.entityLiving.setCurrentItemOrArmor(4, new ItemStack(SteelBoots)); + // } + // else if(armorType == 4) + // { + // if(event.entityLiving instanceof EntityZombie && sword < 50) event.entityLiving.setCurrentItemOrArmor(0, new ItemStack(BronzeSword)); + // if(helmet < 50) event.entityLiving.setCurrentItemOrArmor(1, new ItemStack(BronzeHelmet)); + // if(chestplate < 50) event.entityLiving.setCurrentItemOrArmor(2, new ItemStack(BronzeChestplate)); + // if(leggings < 50) event.entityLiving.setCurrentItemOrArmor(3, new ItemStack(BronzeLeggings)); + // if(boots < 50) event.entityLiving.setCurrentItemOrArmor(4, new ItemStack(BronzeBoots)); + // } + // } + // } + // } + +} diff --git a/src/main/java/crazypants/enderio/material/Alloy.java b/src/main/java/crazypants/enderio/material/Alloy.java index 170fd368..973d07f1 100644 --- a/src/main/java/crazypants/enderio/material/Alloy.java +++ b/src/main/java/crazypants/enderio/material/Alloy.java @@ -7,7 +7,8 @@ public enum Alloy { PHASED_GOLD("phasedGold"), REDSTONE_ALLOY("redstoneAlloy"), CONDUCTIVE_IRON("conductiveIron"), - PHASED_IRON("phasedIron"); + PHASED_IRON("phasedIron"), + DARK_STEEL("darkSteel"); public final String unlocalisedName; public final String iconKey; diff --git a/src/main/java/crazypants/enderio/material/MaterialRecipes.java b/src/main/java/crazypants/enderio/material/MaterialRecipes.java index 15f0fd43..34e5f170 100644 --- a/src/main/java/crazypants/enderio/material/MaterialRecipes.java +++ b/src/main/java/crazypants/enderio/material/MaterialRecipes.java @@ -26,11 +26,8 @@ public class MaterialRecipes { OreDictionary.registerOre("itemSilicon", new ItemStack(EnderIO.itemMaterial, 1, Material.SILICON.ordinal())); OreDictionary.registerOre("gearStone", new ItemStack(EnderIO.itemMachinePart, 1, MachinePart.BASIC_GEAR.ordinal())); - int oreId = OreDictionary.getOreID("glass"); - ArrayList ingots = OreDictionary.getOres(oreId); - if(ingots.isEmpty()) { - OreDictionary.registerOre("glass", Blocks.glass); - } + OreDictionary.registerOre("glass", Blocks.glass); + ItemStack pureGlass = new ItemStack(EnderIO.blockFusedQuartz, 1, BlockFusedQuartz.Type.GLASS.ordinal()); OreDictionary.registerOre("glass", pureGlass); OreDictionary.registerOre("glassHardened", new ItemStack(EnderIO.blockFusedQuartz, 1, BlockFusedQuartz.Type.FUSED_QUARTZ.ordinal())); @@ -40,8 +37,6 @@ public class MaterialRecipes { GameRegistry.addShapelessRecipe(new ItemStack(Blocks.glass), pureGlass); GameRegistry.addShapedRecipe(new ItemStack(Items.glass_bottle), " ", "g g", " g ", 'g', pureGlass); - OreDictionary.registerOre("glass", Blocks.glass); - } public static void addRecipes() {