diff --git a/changelog b/changelog index b99450d57..a3f93e205 100644 --- a/changelog +++ b/changelog @@ -1,16 +1,3 @@ -## Changed -* To address certain balancing concerns, the RF to HE conversion rate is now 2:5. The HE to RF rate however is still 5:1 - * Because of this, using chains of converters as batteries becomes exponentially lossy with size, therefore the input decay has been removed - * Input decay can still be configured if desired - * No input decay also means that converters are no longer infinite energy sinks -* Power converter recipes have been updated -* Soldering stations will no longer work if the recipe requires no input fluid while fluid is present - * While this does complicate using the soldering station manually, as switching from milgrade to standard ICs requires emptying the solderer with a siphon, it does make automating easier, since soldering stations will no longer treat incomplete milgrade circuits as ICs -* Cement is now edible -* Derricks have been remodeled, the port configuration has changed so existing derricks need to be replaced -* Derricks no longer spawn oil spills -* Metal deco blocks are now crafted in batches of 4, as well as recycled in batches of 4. Each block is therefore still worth 25% of an ingot, but recycling your own deco blocks is no longer lossy - ## Fixed -* Fixed some machines not sending fluid gauge syncs properly -* Fixed refinery GUI crashing when invalid input is used \ No newline at end of file +* Fixed pumpjack gauges not syncing properly +* Fixed some concrete variants not being revertable into uncolored concrete \ No newline at end of file diff --git a/src/main/java/com/hbm/handler/ArmorModHandler.java b/src/main/java/com/hbm/handler/ArmorModHandler.java index 9beabfb46..f7b8780ca 100644 --- a/src/main/java/com/hbm/handler/ArmorModHandler.java +++ b/src/main/java/com/hbm/handler/ArmorModHandler.java @@ -18,6 +18,9 @@ public class ArmorModHandler { public static final int cladding = 5; public static final int kevlar = 6; public static final int extra = 7; + public static final int battery = 8; + + public static final int MOD_SLOTS = 9; public static final UUID[] UUIDs = new UUID[] { UUID.fromString("8d6e5c77-133e-4056-9c80-a9e42a1a0b65"), @@ -146,7 +149,7 @@ public class ArmorModHandler { public static ItemStack[] pryMods(ItemStack armor) { - ItemStack[] slots = new ItemStack[8]; + ItemStack[] slots = new ItemStack[MOD_SLOTS]; if(!hasMods(armor)) return slots; @@ -154,7 +157,7 @@ public class ArmorModHandler { NBTTagCompound nbt = armor.getTagCompound(); NBTTagCompound mods = nbt.getCompoundTag(MOD_COMPOUND_KEY); - for(int i = 0; i < 8; i++) { + for(int i = 0; i < MOD_SLOTS; i++) { NBTTagCompound cmp = mods.getCompoundTag(MOD_SLOT_KEY + i); diff --git a/src/main/java/com/hbm/inventory/container/ContainerArmorTable.java b/src/main/java/com/hbm/inventory/container/ContainerArmorTable.java index f8da90d3d..d63fcad3b 100644 --- a/src/main/java/com/hbm/inventory/container/ContainerArmorTable.java +++ b/src/main/java/com/hbm/inventory/container/ContainerArmorTable.java @@ -19,20 +19,21 @@ import net.minecraft.util.IIcon; public class ContainerArmorTable extends Container { - public InventoryBasic upgrades = new InventoryBasic("Upgrades", false, 8); + public InventoryBasic upgrades = new InventoryBasic("Upgrades", false, ArmorModHandler.MOD_SLOTS); public IInventory armor = new InventoryCraftResult(); public ContainerArmorTable(InventoryPlayer inventory) { EntityPlayer player = inventory.player; this.addSlotToContainer(new UpgradeSlot(upgrades, ArmorModHandler.helmet_only, 26 + 22, 27)); // helmet only - this.addSlotToContainer(new UpgradeSlot(upgrades, ArmorModHandler.plate_only, 62 + 22, 27)); // chestplate only + this.addSlotToContainer(new UpgradeSlot(upgrades, ArmorModHandler.plate_only, 62 + 22, 27)); // chestplate only this.addSlotToContainer(new UpgradeSlot(upgrades, ArmorModHandler.legs_only, 98 + 22, 27)); // leggins only this.addSlotToContainer(new UpgradeSlot(upgrades, ArmorModHandler.boots_only, 134 + 22, 45)); // boots only this.addSlotToContainer(new UpgradeSlot(upgrades, ArmorModHandler.servos, 134 + 22, 81)); //servos/frame this.addSlotToContainer(new UpgradeSlot(upgrades, ArmorModHandler.cladding, 98 + 22, 99)); //radiation cladding - this.addSlotToContainer(new UpgradeSlot(upgrades, ArmorModHandler.kevlar, 62 + 22, 99)); //kevlar/sapi/(ERA? :) ) + this.addSlotToContainer(new UpgradeSlot(upgrades, ArmorModHandler.kevlar, 62 + 22, 99)); //kevlar/sapi/(ERA? :) ) this.addSlotToContainer(new UpgradeSlot(upgrades, ArmorModHandler.extra, 26 + 22, 99)); //special parts + this.addSlotToContainer(new UpgradeSlot(upgrades, ArmorModHandler.battery, 8 + 22, 63)); //special parts this.addSlotToContainer(new Slot(armor, 0, 44 + 22, 63) { @@ -48,7 +49,7 @@ public class ContainerArmorTable extends Container { if(stack != null) { ItemStack[] mods = ArmorModHandler.pryMods(stack); - for(int i = 0; i < 8; i++) { + for(int i = 0; i < ArmorModHandler.MOD_SLOTS; i++) { if(mods != null) upgrades.setInventorySlotContents(i, mods[i]); @@ -65,7 +66,7 @@ public class ContainerArmorTable extends Container { //if the armor piece is taken, absorb all armor pieces - for(int i = 0; i < 8; i++) { + for(int i = 0; i < ArmorModHandler.MOD_SLOTS; i++) { ItemStack mod = upgrades.getStackInSlot(i); @@ -126,19 +127,19 @@ public class ContainerArmorTable extends Container { ItemStack var5 = var4.getStack(); var3 = var5.copy(); - if(par2 <= 8) { - if(par2 != 8 || !InventoryUtil.mergeItemStack(this.inventorySlots, var5, 9, 13, false)) - if(!this.mergeItemStack(var5, 13, this.inventorySlots.size(), true)) + if(par2 <= ArmorModHandler.MOD_SLOTS) { + if(par2 != ArmorModHandler.MOD_SLOTS || !InventoryUtil.mergeItemStack(this.inventorySlots, var5, ArmorModHandler.MOD_SLOTS + 1, ArmorModHandler.MOD_SLOTS + 5, false)) + if(!this.mergeItemStack(var5, ArmorModHandler.MOD_SLOTS + 5, this.inventorySlots.size(), true)) return null; var4.onPickupFromSlot(p_82846_1_, var5); } else { if(var5.getItem() instanceof ItemArmor) { - if(!this.mergeItemStack(var5, 8, 9, false)) + if(!this.mergeItemStack(var5, ArmorModHandler.MOD_SLOTS, ArmorModHandler.MOD_SLOTS + 1, false)) return null; - } else if(this.inventorySlots.get(8) != null && var5.getItem() instanceof ItemArmorMod) { + } else if(this.inventorySlots.get(ArmorModHandler.MOD_SLOTS) != null && var5.getItem() instanceof ItemArmorMod) { ItemArmorMod mod = (ItemArmorMod)var5.getItem(); int slot = mod.type; diff --git a/src/main/java/com/hbm/inventory/gui/GUIArmorTable.java b/src/main/java/com/hbm/inventory/gui/GUIArmorTable.java index e255586cf..250b9711f 100644 --- a/src/main/java/com/hbm/inventory/gui/GUIArmorTable.java +++ b/src/main/java/com/hbm/inventory/gui/GUIArmorTable.java @@ -46,15 +46,16 @@ public class GUIArmorTable extends GuiInfoContainer { "armorMod.type.cladding", "armorMod.type.insert", "armorMod.type.special", + "armorMod.type.battery", "armorMod.insertHere" }; - for(int i = 0; i < 9; ++i) { + for(int i = 0; i < ArmorModHandler.MOD_SLOTS + 1; ++i) { Slot slot = (Slot) this.inventorySlots.inventorySlots.get(i); if(this.isMouseOverSlot(slot, x, y) && !slot.getHasStack()) { - this.drawCreativeTabHoveringText((i < 8 ? EnumChatFormatting.LIGHT_PURPLE : EnumChatFormatting.YELLOW) + I18nUtil.resolveKey(unloc[i]), x, y); + this.drawCreativeTabHoveringText((i < ArmorModHandler.MOD_SLOTS ? EnumChatFormatting.LIGHT_PURPLE : EnumChatFormatting.YELLOW) + I18nUtil.resolveKey(unloc[i]), x, y); } } } @@ -75,7 +76,7 @@ public class GUIArmorTable extends GuiInfoContainer { this.drawTexturedModalRect(guiLeft + 22, guiTop, 0, 0, this.xSize - 22, this.ySize); this.drawTexturedModalRect(guiLeft, guiTop + 31, 176, 96, 22, 100); - ItemStack armor = this.inventorySlots.getSlot(8).getStack(); + ItemStack armor = this.inventorySlots.getSlot(ArmorModHandler.MOD_SLOTS).getStack(); if(armor != null) { @@ -89,7 +90,7 @@ public class GUIArmorTable extends GuiInfoContainer { this.drawTexturedModalRect(guiLeft + 41 + 22, guiTop + 60, 176, 52, 22, 22); } - for(int i = 0; i < 8; i++) { + for(int i = 0; i < ArmorModHandler.MOD_SLOTS; i++) { Slot slot = this.inventorySlots.getSlot(i); drawIndicator(i, slot.xDisplayPosition - 1, slot.yDisplayPosition - 1); } @@ -98,7 +99,7 @@ public class GUIArmorTable extends GuiInfoContainer { private void drawIndicator(int index, int x, int y) { ItemStack mod = this.inventorySlots.getSlot(index).getStack(); - ItemStack armor = this.inventorySlots.getSlot(8).getStack(); + ItemStack armor = this.inventorySlots.getSlot(ArmorModHandler.MOD_SLOTS).getStack(); if(mod == null) return; diff --git a/src/main/java/com/hbm/items/armor/ItemArmorMod.java b/src/main/java/com/hbm/items/armor/ItemArmorMod.java index 505028648..cc6666e4f 100644 --- a/src/main/java/com/hbm/items/armor/ItemArmorMod.java +++ b/src/main/java/com/hbm/items/armor/ItemArmorMod.java @@ -64,6 +64,7 @@ public class ItemArmorMod extends Item { case ArmorModHandler.cladding: list.add(" " + I18nUtil.resolveKey("armorMod.type.cladding")); break; case ArmorModHandler.kevlar: list.add(" " + I18nUtil.resolveKey("armorMod.type.insert")); break; case ArmorModHandler.extra: list.add(" " + I18nUtil.resolveKey("armorMod.type.special")); break; + case ArmorModHandler.battery: list.add(" " + I18nUtil.resolveKey("armorMod.type.battery")); break; } } diff --git a/src/main/java/com/hbm/items/armor/ItemModBattery.java b/src/main/java/com/hbm/items/armor/ItemModBattery.java new file mode 100644 index 000000000..22193e17b --- /dev/null +++ b/src/main/java/com/hbm/items/armor/ItemModBattery.java @@ -0,0 +1,13 @@ +package com.hbm.items.armor; + +import com.hbm.handler.ArmorModHandler; + +public class ItemModBattery extends ItemArmorMod { + + public double mod; + + public ItemModBattery(double mod) { + super(ArmorModHandler.battery, true, true, true, true); + this.mod = mod; + } +} diff --git a/src/main/java/com/hbm/main/CraftingManager.java b/src/main/java/com/hbm/main/CraftingManager.java index f3ba05a9c..ae3372886 100644 --- a/src/main/java/com/hbm/main/CraftingManager.java +++ b/src/main/java/com/hbm/main/CraftingManager.java @@ -408,8 +408,8 @@ public class CraftingManager { String dyeName = "dye" + dyes[15 - i]; addRecipeAuto(new ItemStack(ModBlocks.concrete_colored, 8, i), new Object[] { "CCC", "CDC", "CCC", 'C', ModBlocks.concrete_smooth, 'D', dyeName }); } - addShapelessAuto(new ItemStack(ModBlocks.concrete_smooth, 1), new Object[] { ModBlocks.concrete_colored }); - addShapelessAuto(new ItemStack(ModBlocks.concrete_smooth, 1), new Object[] { ModBlocks.concrete_colored_ext }); + addShapelessAuto(new ItemStack(ModBlocks.concrete_smooth, 1), new Object[] { new ItemStack(ModBlocks.concrete_colored, 1, OreDictionary.WILDCARD_VALUE) }); + addShapelessAuto(new ItemStack(ModBlocks.concrete_smooth, 1), new Object[] { new ItemStack(ModBlocks.concrete_colored_ext, 1, OreDictionary.WILDCARD_VALUE) }); addRecipeAuto(new ItemStack(ModBlocks.concrete_colored_ext, 6, EnumConcreteType.MACHINE.ordinal()), new Object[] { "CCC", "1 2", "CCC", 'C', ModBlocks.concrete_smooth, '1', KEY_BROWN, '2', KEY_GRAY }); addRecipeAuto(new ItemStack(ModBlocks.concrete_colored_ext, 6, EnumConcreteType.MACHINE_STRIPE.ordinal()), new Object[] { "CCC", "1 2", "CCC", 'C', ModBlocks.concrete_smooth, '1', KEY_BROWN, '2', KEY_BLACK }); diff --git a/src/main/resources/assets/hbm/textures/gui/machine/gui_armor_modifier.png b/src/main/resources/assets/hbm/textures/gui/machine/gui_armor_modifier.png index 2834d3569..b1c313de4 100644 Binary files a/src/main/resources/assets/hbm/textures/gui/machine/gui_armor_modifier.png and b/src/main/resources/assets/hbm/textures/gui/machine/gui_armor_modifier.png differ diff --git a/src/main/resources/assets/hbm/textures/items/arc_electrode_burnt.png b/src/main/resources/assets/hbm/textures/items/arc_electrode_burnt.png deleted file mode 100644 index 5d278eded..000000000 Binary files a/src/main/resources/assets/hbm/textures/items/arc_electrode_burnt.png and /dev/null differ diff --git a/src/main/resources/assets/hbm/textures/items/arc_electrode_desh.png b/src/main/resources/assets/hbm/textures/items/arc_electrode_desh.png deleted file mode 100644 index 007f2a98e..000000000 Binary files a/src/main/resources/assets/hbm/textures/items/arc_electrode_desh.png and /dev/null differ diff --git a/src/main/resources/assets/hbm/textures/items/ingot_beskar_double.png b/src/main/resources/assets/hbm/textures/items/ingot_beskar_double.png new file mode 100644 index 000000000..e2072d2c1 Binary files /dev/null and b/src/main/resources/assets/hbm/textures/items/ingot_beskar_double.png differ diff --git a/src/main/resources/assets/hbm/textures/items/ingot_beskar_single.png b/src/main/resources/assets/hbm/textures/items/ingot_beskar_single.png new file mode 100644 index 000000000..94127d22b Binary files /dev/null and b/src/main/resources/assets/hbm/textures/items/ingot_beskar_single.png differ