aboutsummaryrefslogtreecommitdiff
path: root/src/Java/miscutil
diff options
context:
space:
mode:
authorDraknyte1 <Draknyte1@hotmail.com>2016-05-30 07:53:03 +1000
committerDraknyte1 <Draknyte1@hotmail.com>2016-05-30 07:53:03 +1000
commit15a270851304fd3204bfbc2cf2c6268f3a6b06c8 (patch)
treefc5d13969279acdac75c2922a93e9044101272c8 /src/Java/miscutil
parent9a1352dac23c09cb333edf7b2db7cce07c15ee91 (diff)
downloadGT5-Unofficial-15a270851304fd3204bfbc2cf2c6268f3a6b06c8.tar.gz
GT5-Unofficial-15a270851304fd3204bfbc2cf2c6268f3a6b06c8.tar.bz2
GT5-Unofficial-15a270851304fd3204bfbc2cf2c6268f3a6b06c8.zip
+Cleaned up Helium Generator GUI
+Rewrote portions of the HG from scratch
Diffstat (limited to 'src/Java/miscutil')
-rw-r--r--src/Java/miscutil/core/block/HeliumGenerator.java8
-rw-r--r--src/Java/miscutil/core/gui/ContainerHeliumGenerator.java133
-rw-r--r--src/Java/miscutil/core/gui/GUIHeliumGenerator.java8
-rw-r--r--src/Java/miscutil/core/handler/InvSlotRadiation.java73
-rw-r--r--src/Java/miscutil/core/item/ModItems.java358
-rw-r--r--src/Java/miscutil/core/item/base/BaseItemGeneric.java1
-rw-r--r--src/Java/miscutil/core/item/base/BaseMetaItemTool.java5
-rw-r--r--src/Java/miscutil/core/tileentities/TileEntityHeliumGenerator.java711
-rw-r--r--src/Java/miscutil/core/util/UtilsItems.java5
9 files changed, 853 insertions, 449 deletions
diff --git a/src/Java/miscutil/core/block/HeliumGenerator.java b/src/Java/miscutil/core/block/HeliumGenerator.java
index 0df56d0022..da3f3b8041 100644
--- a/src/Java/miscutil/core/block/HeliumGenerator.java
+++ b/src/Java/miscutil/core/block/HeliumGenerator.java
@@ -98,16 +98,16 @@ public class HeliumGenerator extends BlockContainer {
int l = MathHelper.floor_double((double) (player.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3;
if (l == 0)
- machine.setFacing(2);
+ machine.setFacing((short) 2);
if (l == 1)
- machine.setFacing(5);
+ machine.setFacing((short) 5);
if (l == 2)
- machine.setFacing(3);
+ machine.setFacing((short) 3);
if (l == 3)
- machine.setFacing(4);
+ machine.setFacing((short) 4);
}
}
diff --git a/src/Java/miscutil/core/gui/ContainerHeliumGenerator.java b/src/Java/miscutil/core/gui/ContainerHeliumGenerator.java
index ae8e2d3176..8acf0313fd 100644
--- a/src/Java/miscutil/core/gui/ContainerHeliumGenerator.java
+++ b/src/Java/miscutil/core/gui/ContainerHeliumGenerator.java
@@ -1,95 +1,72 @@
package miscutil.core.gui;
+import ic2.core.ContainerBase;
+import ic2.core.slot.SlotInvSlot;
+
+import java.util.List;
+
import miscutil.core.tileentities.TileEntityHeliumGenerator;
-import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.inventory.Container;
import net.minecraft.inventory.Slot;
import net.minecraft.inventory.SlotFurnace;
-import net.minecraft.item.ItemStack;
-
-public class ContainerHeliumGenerator extends Container {
- private TileEntityHeliumGenerator tileThis;
- public ContainerHeliumGenerator(InventoryPlayer player, TileEntityHeliumGenerator machine)
+public class ContainerHeliumGenerator
+ extends ContainerBase<TileEntityHeliumGenerator>
+{
+ public short size;
+
+ public ContainerHeliumGenerator(InventoryPlayer player, TileEntityHeliumGenerator machine)
+ {
+ super(machine);
+ this.addSlotToContainer(new SlotFurnace(player.player, machine, 2, 80, 35));
+ this.size = machine.getReactorSize();
+ int startX = 16;
+ int startY = 16;
+ int i = 0;
+ for (i = 0; i < 9; i++)
{
- this.tileThis = machine;
- this.addSlotToContainer(new SlotFurnace(player.player, machine, 2, 80, 35));
- int i;
-
- for (i = 0; i < 3; ++i)
- {
- for (int j = 0; j < 9; ++j)
- {
- this.addSlotToContainer(new Slot(player, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
- }
- }
-
- for (i = 0; i < 9; ++i)
- {
- this.addSlotToContainer(new Slot(player, i, 8 + i * 18, 142));
- }
+ int x = i % this.size;
+ int y = i / this.size;
+
+ addSlotToContainer(new SlotInvSlot(machine.reactorSlot, i, startX + 18 * x, startY + 18 * y));
}
-
- public boolean canInteractWith(EntityPlayer player)
+ startX = 108;
+ startY = 16;
+ for (i = 9; i < 18; i++)
{
- return this.tileThis.isUseableByPlayer(player);
+ int x = i % this.size;
+ int y = (i-9) / this.size;
+
+ addSlotToContainer(new SlotInvSlot(machine.reactorSlot, i, startX + 18 * x, startY + 18 * y));
}
-
- /**
- * Called when a player shift-clicks on a slot. You must override this or you will crash when someone does that.
- */
- public ItemStack transferStackInSlot(EntityPlayer player, int slotNumber)
+ for (i = 0; i < 3; ++i)
{
- ItemStack itemstack = null;
- Slot slot = (Slot)this.inventorySlots.get(slotNumber);
-
- if (slot != null && slot.getHasStack())
+ for (int j = 0; j < 9; ++j)
{
- ItemStack itemstack1 = slot.getStack();
- itemstack = itemstack1.copy();
-
- if (slotNumber == 0)
- {
- if (!this.mergeItemStack(itemstack1, 1, 37, true))
- {
- return null;
- }
-
- slot.onSlotChange(itemstack1, itemstack);
- }
- else
- {
- if (slotNumber >= 1 && slotNumber < 28)
- {
- if (!this.mergeItemStack(itemstack1, 28, 37, false))
- {
- return null;
- }
- }
- else if (slotNumber >= 28 && slotNumber < 37 && !this.mergeItemStack(itemstack1, 1, 28, false))
- {
- return null;
- }
- }
-
- if (itemstack1.stackSize == 0)
- {
- slot.putStack((ItemStack)null);
- }
- else
- {
- slot.onSlotChanged();
- }
-
- if (itemstack1.stackSize == itemstack.stackSize)
- {
- return null;
- }
-
- slot.onPickupFromSlot(player, itemstack1);
+ this.addSlotToContainer(new Slot(player, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
}
+ }
- return itemstack;
+ for (i = 0; i < 9; ++i)
+ {
+ this.addSlotToContainer(new Slot(player, i, 8 + i * 18, 142));
}
+ // addSlotToContainer(new SlotInvSlot(machine.coolantinputSlot, 0, 8, 25));
+ //addSlotToContainer(new SlotInvSlot(machine.hotcoolinputSlot, 0, 188, 25));
+ //addSlotToContainer(new SlotInvSlot(machine.coolantoutputSlot, 0, 8, 115));
+ //addSlotToContainer(new SlotInvSlot(machine.hotcoolantoutputSlot, 0, 188, 115));
+ }
+
+ public List<String> getNetworkedFields()
+ {
+ List<String> ret = super.getNetworkedFields();
+
+ ret.add("heat");
+ ret.add("maxHeat");
+ ret.add("EmitHeat");
+ /*ret.add("inputTank");
+ ret.add("outputTank");
+ ret.add("fluidcoolreactor");*/
+ return ret;
+ }
} \ No newline at end of file
diff --git a/src/Java/miscutil/core/gui/GUIHeliumGenerator.java b/src/Java/miscutil/core/gui/GUIHeliumGenerator.java
index 6510f7480f..8188176c83 100644
--- a/src/Java/miscutil/core/gui/GUIHeliumGenerator.java
+++ b/src/Java/miscutil/core/gui/GUIHeliumGenerator.java
@@ -25,14 +25,16 @@ public class GUIHeliumGenerator extends GuiContainer
/**
* Draw the foreground layer for the GuiContainer (everything in front of the items)
*/
- protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_)
+ @Override
+ protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_)
{
- String s = StatCollector.translateToLocal("container.helium_collector");
+ String s = StatCollector.translateToLocal("container.radiation_collector");
this.fontRendererObj.drawString(s, this.xSize / 2 - this.fontRendererObj.getStringWidth(s) / 2, 6, 4210752);
this.fontRendererObj.drawString(StatCollector.translateToLocal("container.inventory"), 8, this.ySize - 96 + 2, 4210752);
}
- protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_)
+ @Override
+ protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_)
{
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
this.mc.getTextureManager().bindTexture(collectorGuiTexture);
diff --git a/src/Java/miscutil/core/handler/InvSlotRadiation.java b/src/Java/miscutil/core/handler/InvSlotRadiation.java
new file mode 100644
index 0000000000..cafb71f00c
--- /dev/null
+++ b/src/Java/miscutil/core/handler/InvSlotRadiation.java
@@ -0,0 +1,73 @@
+package miscutil.core.handler;
+
+import ic2.core.block.invslot.InvSlot;
+import miscutil.core.tileentities.TileEntityHeliumGenerator;
+import net.minecraft.item.ItemStack;
+
+public class InvSlotRadiation extends InvSlot
+{
+ public InvSlotRadiation(TileEntityHeliumGenerator base, String name1, int oldStartIndex1, int count)
+ {
+ super(base, name1, oldStartIndex1, InvSlot.Access.IO, count);
+
+ setStackSizeLimit(1);
+ }
+
+ public boolean accepts(ItemStack itemStack)
+ {
+ return ((TileEntityHeliumGenerator)this.base).isUsefulItem(itemStack, true);
+ }
+
+ public int size()
+ {
+ return ((TileEntityHeliumGenerator)this.base).getReactorSize() * 6;
+ }
+
+ public int rawSize()
+ {
+ return super.size();
+ }
+
+ public ItemStack get(int index)
+ {
+ return super.get(mapIndex(index));
+ }
+
+ public ItemStack get(int x, int y)
+ {
+ return super.get(y * 9 + x);
+ }
+
+ public void put(int index, ItemStack content)
+ {
+ super.put(mapIndex(index), content);
+ }
+
+ public void put(int x, int y, ItemStack content)
+ {
+ super.put(y * 9 + x, content);
+ }
+
+ private int mapIndex(int index)
+ {
+ int size = size();
+ int cols = size / 6;
+ if (index < size)
+ {
+ int row = index / cols;
+ int col = index % cols;
+
+ return row * 9 + col;
+ }
+ index -= size;
+ int remCols = 9 - cols;
+
+ int row = index / remCols;
+ int col = cols + index % remCols;
+
+ return row * 9 + col;
+ }
+
+ private final int rows = 6;
+ private final int maxCols = 9;
+}
diff --git a/src/Java/miscutil/core/item/ModItems.java b/src/Java/miscutil/core/item/ModItems.java
index ab97e89edc..49abc71cbc 100644
--- a/src/Java/miscutil/core/item/ModItems.java
+++ b/src/Java/miscutil/core/item/ModItems.java
@@ -1,7 +1,8 @@
package miscutil.core.item;
-
+import static miscutil.core.creative.AddToCreativeTab.tabMisc;
import static miscutil.core.lib.CORE.LOAD_ALL_CONTENT;
import miscutil.core.creative.AddToCreativeTab;
+import miscutil.core.item.effects.RarityUncommon;
import miscutil.core.item.general.BufferCore;
import miscutil.core.item.tool.misc.SandstoneHammer;
import miscutil.core.item.tool.staballoy.StaballoyAxe;
@@ -9,55 +10,50 @@ import miscutil.core.item.tool.staballoy.StaballoyPickaxe;
import miscutil.core.lib.CORE;
import miscutil.core.lib.LoadedMods;
import miscutil.core.util.Utils;
-import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.item.Item.ToolMaterial;
import net.minecraftforge.common.util.EnumHelper;
import cpw.mods.fml.common.registry.GameRegistry;
-
public final class ModItems {
- private static int totalGenerated = 0;
- /* A name for the material. This should be the same as the name of the variable we use to store the material (in this case "TUTORIAL").
- A harvest level for pickaxes. This is a value between 0 and 3 and defines which blocks can be mined with this tool. Its also possible to create blocks which need a higher harvest level than 3, but then you are not able to mine them with vanilla tools.
- Common values for the harvest level are:
- Wood/Gold Tool: 0
- Stone Tool: 1
- Iron Tool: 2
- Diamond Tool: 3
- The durability of the tool or sword. This value defines how often you can use a tool until it breaks. The tools always last one use longer than the entered value.
- Common values for the durability are:
- Wood Tool: 59
- Stone Tool: 131
- Iron Tool: 250
- Diamond Tool: 1561
- Gold Tool: 32
- The mining speed of the tool. This value defines how much faster you are with this tool than with your hand.
- Common values for the mining speed are:
- Wood Tool: 2.0F
- Stone Tool: 4.0F
- Iron Tool: 6.0F
- Diamond Tool: 8.0F
- Gold Tool: 12.0F
- The damage versus Entites. This value is used to calculate the damage an entity takes if you hit it with this tool/sword. This value defines the basic damage to which different values are added, depending on the type of tool. A sword always causes 4 more damage than written in the ToolMaterial. So, if you want to create a sword which adds 10 damage to your normal damage, the value in the ToolMaterial needs to be 6.0F. Of course the values can be below zero.
- Common values for the damage versus Entities are:
- Wood Tool: 0.0F (Sword adds 4.0 damage)
- Stone Tool: 1.0F (Sword adds 5.0 damage)
- Iron Tool: 2.0F (Sword adds 6.0 damage)
- Diamond Tool: 3.0F (Sword adds 7.0 damage)
- Gold Tool: 0.0F (Sword adds 4.0 damage)
- The enchantability of this tool. This value is quite complex to understand and I have to admit that I don't quite know how it is calculated. Basically you can say that a higher enchantability leads to better enchantements with the same amount of XP.
- Common values for the enchantability are:
- Wood Tool: 15
- Stone Tool: 5
- Iron Tool: 14
- Diamond Tool: 10
- Gold Tool: 22*/
-
+ /* A name for the material. This should be the same as the name of the variable we use to store the material (in this case "TUTORIAL").
+A harvest level for pickaxes. This is a value between 0 and 3 and defines which blocks can be mined with this tool. Its also possible to create blocks which need a higher harvest level than 3, but then you are not able to mine them with vanilla tools.
+Common values for the harvest level are:
+Wood/Gold Tool: 0
+Stone Tool: 1
+Iron Tool: 2
+Diamond Tool: 3
+The durability of the tool or sword. This value defines how often you can use a tool until it breaks. The tools always last one use longer than the entered value.
+Common values for the durability are:
+Wood Tool: 59
+Stone Tool: 131
+Iron Tool: 250
+Diamond Tool: 1561
+Gold Tool: 32
+The mining speed of the tool. This value defines how much faster you are with this tool than with your hand.
+Common values for the mining speed are:
+Wood Tool: 2.0F
+Stone Tool: 4.0F
+Iron Tool: 6.0F
+Diamond Tool: 8.0F
+Gold Tool: 12.0F
+The damage versus Entites. This value is used to calculate the damage an entity takes if you hit it with this tool/sword. This value defines the basic damage to which different values are added, depending on the type of tool. A sword always causes 4 more damage than written in the ToolMaterial. So, if you want to create a sword which adds 10 damage to your normal damage, the value in the ToolMaterial needs to be 6.0F. Of course the values can be below zero.
+Common values for the damage versus Entities are:
+Wood Tool: 0.0F (Sword adds 4.0 damage)
+Stone Tool: 1.0F (Sword adds 5.0 damage)
+Iron Tool: 2.0F (Sword adds 6.0 damage)
+Diamond Tool: 3.0F (Sword adds 7.0 damage)
+Gold Tool: 0.0F (Sword adds 4.0 damage)
+The enchantability of this tool. This value is quite complex to understand and I have to admit that I don't quite know how it is calculated. Basically you can say that a higher enchantability leads to better enchantements with the same amount of XP.
+Common values for the enchantability are:
+Wood Tool: 15
+Stone Tool: 5
+Iron Tool: 14
+Diamond Tool: 10
+Gold Tool: 22*/
//Tool Materials
//public static ToolMaterial TUTORIAL = EnumHelper.addToolMaterial("TUTORIAL", harvestLevel, durability, miningSpeed, damageVsEntities, enchantability);
- public static ToolMaterial tutMaterial = EnumHelper.addToolMaterial("BloodSteel Tool Material", 3, 200, 15.0F, 4.0F, 10);
public static ToolMaterial STABALLOY = EnumHelper.addToolMaterial("Staballoy", 3, 2500, 7, 1.0F, 18);
-
+
//EnderIO
public static Item itemPlateSoularium;
public static Item itemPlateRedstoneAlloy;
@@ -67,310 +63,190 @@ public final class ModItems {
public static Item itemPlateVibrantAlloy;
public static Item itemPlateConductiveIron;
public static Item itemPlateDarkSteel;
-
//Big Reactors
public static Item itemPlateBlutonium;
public static Item itemPlateCyanite;
public static Item itemPlateLudicrite;
-
//Thaumcraft
public static Item itemPlateVoidMetal;
-
//ExtraUtils
public static Item itemPlateBedrockium;
-
//Pneumaticraft
public static Item itemPlateCompressedIron;
-
//SimplyJetpacks
public static Item itemPlateEnrichedSoularium;
-
//rfTools
public static Item itemPlateDimensionShard;
-
//Blood Steel Items
public static Item itemIngotBloodSteel;
public static Item itemPlateBloodSteel;
-
//Staballoy
public static Item itemStaballoyPickaxe;
public static Item itemStaballoyAxe;
public static Item itemPlateStaballoy;
public static Item itemIngotStaballoy;
-
//Tools
public static Item itemSandstoneHammer;
-
-
//Machine Related
public static Item itemBufferCore0;
-
//Material related
public static Item itemStickyRubber;
public static Item itemIngotBatteryAlloy;
public static Item itemPlateBatteryAlloy;
public static Item itemHeliumBlob;
public static Item item_PLEASE_FACTOR_ME_4;
-
+ //@SuppressWarnings("unused")
public static final void init(){
//EnderIO Resources
if (LoadedMods.EnderIO || LOAD_ALL_CONTENT){
- Utils.LOG_INFO("EnderIO Found - Loading Resources.");
- GenerateItem(itemPlateSoularium, "itemPlateSoularium", AddToCreativeTab.tabMisc, 64, 0);
- GenerateItem(itemPlateRedstoneAlloy, "itemPlateRedstoneAlloy", AddToCreativeTab.tabMisc, 64, 0);
- GenerateItem(itemPlateElectricalSteel, "itemPlateElectricalSteel", AddToCreativeTab.tabMisc, 64, 0);
- GenerateItem(itemPlatePulsatingIron, "itemPlatePulsatingIron", AddToCreativeTab.tabMisc, 64, 0);
- GenerateItem(itemPlateEnergeticAlloy, "itemPlateEnergeticAlloy", AddToCreativeTab.tabMisc, 64, 0);
- GenerateItem(itemPlateVibrantAlloy, "itemPlateVibrantAlloy", AddToCreativeTab.tabMisc, 64, 0);
- GenerateItem(itemPlateConductiveIron, "itemPlateConductiveIron", AddToCreativeTab.tabMisc, 64, 0);
- GenerateItem(itemPlateDarkSteel, "itemPlateDarkSteel", AddToCreativeTab.tabMisc, 64, 0);
+ Utils.LOG_INFO("EnderIO Found - Loading Resources.");
+ //Item Init
+ itemPlateSoularium = new Item().setUnlocalizedName("itemPlateSoularium").setCreativeTab(AddToCreativeTab.tabMisc).setTextureName(CORE.MODID + ":itemPlateSoularium");
+ itemPlateRedstoneAlloy = new Item().setUnlocalizedName("itemPlateRedstoneAlloy").setCreativeTab(AddToCreativeTab.tabMisc).setTextureName(CORE.MODID + ":itemPlateRedstoneAlloy");
+ itemPlateElectricalSteel = new Item().setUnlocalizedName("itemPlateElectricalSteel").setCreativeTab(AddToCreativeTab.tabMisc).setTextureName(CORE.MODID + ":itemPlateElectricalSteel");
+ itemPlatePulsatingIron = new Item().setUnlocalizedName("itemPlatePulsatingIron").setCreativeTab(AddToCreativeTab.tabMisc).setTextureName(CORE.MODID + ":itemPlatePulsatingIron");
+ itemPlateEnergeticAlloy = new Item().setUnlocalizedName("itemPlateEnergeticAlloy").setCreativeTab(AddToCreativeTab.tabMisc).setTextureName(CORE.MODID + ":itemPlateEnergeticAlloy");
+ itemPlateVibrantAlloy = new Item().setUnlocalizedName("itemPlateVibrantAlloy").setCreativeTab(AddToCreativeTab.tabMisc).setTextureName(CORE.MODID + ":itemPlateVibrantAlloy");
+ itemPlateConductiveIron = new Item().setUnlocalizedName("itemPlateConductiveIron").setCreativeTab(AddToCreativeTab.tabMisc).setTextureName(CORE.MODID + ":itemPlateConductiveIron");
+ itemPlateDarkSteel = new Item().setUnlocalizedName("itemPlateDarkSteel").setCreativeTab(AddToCreativeTab.tabMisc).setTextureName(CORE.MODID + ":itemPlateDarkSteel");
+ //Registry
+ GameRegistry.registerItem(itemPlateSoularium, "itemPlateSoularium");
+ GameRegistry.registerItem(itemPlateRedstoneAlloy, "itemPlateRedstoneAlloy");
+ GameRegistry.registerItem(itemPlateElectricalSteel, "itemPlateElectricalSteel");
+ GameRegistry.registerItem(itemPlatePulsatingIron, "itemPlatePulsatingIron");
+ GameRegistry.registerItem(itemPlateEnergeticAlloy, "itemPlateEnergeticAlloy");
+ GameRegistry.registerItem(itemPlateVibrantAlloy, "itemPlateVibrantAlloy");
+ GameRegistry.registerItem(itemPlateConductiveIron, "itemPlateConductiveIron");
+ GameRegistry.registerItem(itemPlateDarkSteel, "itemPlateDarkSteel");
}
else {
Utils.LOG_WARNING("EnderIO not Found - Skipping Resources.");
}
-
//Big Reactors
if (LoadedMods.Big_Reactors|| LOAD_ALL_CONTENT){
- Utils.LOG_INFO("BigReactors Found - Loading Resources.");
- GenerateItem(itemPlateBlutonium, "itemPlateBlutonium", AddToCreativeTab.tabMisc, 64, 0);
- GenerateItem(itemPlateCyanite, "itemPlateCyanite", AddToCreativeTab.tabMisc, 64, 0);
- GenerateItem(itemPlateLudicrite, "itemPlateLudicrite", AddToCreativeTab.tabMisc, 64, 0);
+ Utils.LOG_INFO("BigReactors Found - Loading Resources.");
+ //Item Init
+ itemPlateBlutonium = new Item().setUnlocalizedName("itemPlateBlutonium").setCreativeTab(AddToCreativeTab.tabMisc).setTextureName(CORE.MODID + ":itemPlateBlutonium");
+ itemPlateCyanite = new Item().setUnlocalizedName("itemPlateCyanite").setCreativeTab(AddToCreativeTab.tabMisc).setTextureName(CORE.MODID + ":itemPlateCyanite");
+ itemPlateLudicrite = new Item().setUnlocalizedName("itemPlateLudicrite").setCreativeTab(AddToCreativeTab.tabMisc).setTextureName(CORE.MODID + ":itemPlateLudicrite");
+ //Registry
+ GameRegistry.registerItem(itemPlateBlutonium, "itemPlateBlutonium");
+ GameRegistry.registerItem(itemPlateCyanite, "itemPlateCyanite");
+ GameRegistry.registerItem(itemPlateLudicrite, "itemPlateLudicrite");
}
else {
Utils.LOG_WARNING("BigReactors not Found - Skipping Resources.");
}
-
//Thaumcraft
if (LoadedMods.Thaumcraft|| LOAD_ALL_CONTENT){
- Utils.LOG_INFO("Thaumcraft Found - Loading Resources.");
- GenerateItem(itemPlateVoidMetal, "itemPlateVoidMetal", AddToCreativeTab.tabMisc, 64, 0);
+ Utils.LOG_INFO("Thaumcraft Found - Loading Resources.");
+ //Item Init
+ try {
+ itemPlateVoidMetal = new Item().setUnlocalizedName("itemPlateVoidMetal").setCreativeTab(AddToCreativeTab.tabMisc).setTextureName(CORE.MODID + ":itemPlateVoidMetal");
+ } catch (NullPointerException e){
+ e.getClass();
+ }
+ //Registry
+ GameRegistry.registerItem(itemPlateVoidMetal, "itemPlateVoidMetal");
}
else {
Utils.LOG_WARNING("Thaumcraft not Found - Skipping Resources.");
}
-
//ExtraUtils
if (LoadedMods.Extra_Utils|| LOAD_ALL_CONTENT){
- Utils.LOG_INFO("ExtraUtilities Found - Loading Resources.");
- GenerateItem(itemPlateBedrockium, "itemPlateBedrockium", AddToCreativeTab.tabMisc, 64, 0);
+ Utils.LOG_INFO("ExtraUtilities Found - Loading Resources.");
+ //Item Init
+ try {
+ itemPlateBedrockium = new Item().setUnlocalizedName("itemPlateBedrockium").setCreativeTab(AddToCreativeTab.tabMisc).setTextureName(CORE.MODID + ":itemPlateBedrockium");
+ } catch (NullPointerException e){
+ e.getClass();
+ }
+ //Registry
+ GameRegistry.registerItem(itemPlateBedrockium, "itemPlateBedrockium");
}
else {
Utils.LOG_WARNING("ExtraUtilities not Found - Skipping Resources.");
}
-
//Pneumaticraft
if (LoadedMods.PneumaticCraft|| LOAD_ALL_CONTENT){
- Utils.LOG_INFO("PneumaticCraft Found - Loading Resources.");
- GenerateItem(itemPlateCompressedIron, "itemPlateCompressedIron", AddToCreativeTab.tabMisc, 64, 0);
+ Utils.LOG_INFO("PneumaticCraft Found - Loading Resources.");
+ //Item Init
+ itemPlateCompressedIron = new Item().setUnlocalizedName("itemPlateCompressedIron").setCreativeTab(AddToCreativeTab.tabMisc).setTextureName(CORE.MODID + ":itemPlateCompressedIron");
+ //Registry
+ GameRegistry.registerItem(itemPlateCompressedIron, "itemPlateCompressedIron");
}
else {
Utils.LOG_WARNING("PneumaticCraft not Found - Skipping Resources.");
}
-
//Simply Jetpacks
if (LoadedMods.Simply_Jetpacks|| LOAD_ALL_CONTENT){
Utils.LOG_INFO("SimplyJetpacks Found - Loading Resources.");
- GenerateItem(itemPlateEnrichedSoularium, "itemPlateEnrichedSoularium", AddToCreativeTab.tabMisc, 64, 0);
+ //Item Init
+ itemPlateEnrichedSoularium = new RarityUncommon().setUnlocalizedName("itemPlateEnrichedSoularium").setCreativeTab(AddToCreativeTab.tabMisc).setTextureName(CORE.MODID + ":itemPlateSoularium");
+ //Registry
+ GameRegistry.registerItem(itemPlateEnrichedSoularium, "itemPlateEnrichedSoularium");
}
else {
Utils.LOG_WARNING("SimplyJetpacks not Found - Skipping Resources.");
}
-
-
//rfTools
if (LoadedMods.RFTools|| LOAD_ALL_CONTENT){
Utils.LOG_INFO("rfTools Found - Loading Resources.");
- GenerateItem(itemPlateDimensionShard, "itemPlateDimensionShard", AddToCreativeTab.tabMisc, 64, 0);
+ //Item Init
+ itemPlateDimensionShard = new Item().setUnlocalizedName("itemPlateDimensionShard").setCreativeTab(AddToCreativeTab.tabMisc).setTextureName(CORE.MODID + ":itemPlateDimensionShard");
+ //Registry
+ GameRegistry.registerItem(itemPlateDimensionShard, "itemPlateDimensionShard");
}
else {
Utils.LOG_WARNING("rfTools not Found - Skipping Resources.");
}
-
/*
* Misc Items
*/
-
//Staballoy Equipment
itemStaballoyPickaxe = new StaballoyPickaxe("itemStaballoyPickaxe", STABALLOY).setCreativeTab(AddToCreativeTab.tabTools);
GameRegistry.registerItem(itemStaballoyPickaxe, itemStaballoyPickaxe.getUnlocalizedName());
itemStaballoyAxe = new StaballoyAxe("itemStaballoyAxe", STABALLOY).setCreativeTab(AddToCreativeTab.tabTools);
GameRegistry.registerItem(itemStaballoyAxe, itemStaballoyAxe.getUnlocalizedName());
-
+ //Staballoy Ingot/Plate
+ itemIngotStaballoy = new Item().setUnlocalizedName("itemIngotStaballoy").setCreativeTab(tabMisc).setTextureName(CORE.MODID + ":itemIngotStaballoy");
+ GameRegistry.registerItem(itemIngotStaballoy, "itemIngotStaballoy");
+ itemPlateStaballoy = new Item().setUnlocalizedName("itemPlateStaballoy").setCreativeTab(tabMisc).setTextureName(CORE.MODID + ":itemPlateStaballoy");
+ GameRegistry.registerItem(itemPlateStaballoy, "itemPlateStaballoy");
+ //Blood Steel Ingot/Plate
+ itemIngotBloodSteel = new Item().setUnlocalizedName("itemIngotBloodSteel").setCreativeTab(tabMisc).setTextureName(CORE.MODID + ":itemIngotBloodSteel");
+ GameRegistry.registerItem(itemIngotBloodSteel, "itemIngotBloodSteel");
+ itemPlateBloodSteel = new Item().setUnlocalizedName("itemPlateBloodSteel").setCreativeTab(tabMisc).setTextureName(CORE.MODID + ":itemPlateBloodSteel");
+ GameRegistry.registerItem(itemPlateBloodSteel, "itemPlateBloodSteel");
//Sandstone Hammer
itemSandstoneHammer = new SandstoneHammer("itemSandstoneHammer").setCreativeTab(AddToCreativeTab.tabTools);
- GameRegistry.registerItem(itemSandstoneHammer, itemSandstoneHammer.getUnlocalizedName());
-
+ GameRegistry.registerItem(itemSandstoneHammer, itemSandstoneHammer.getUnlocalizedName());
//Buffer Cores!
Item itemBufferCore;
for(int i=1; i<=10; i++){
Utils.LOG_INFO(""+i);
itemBufferCore = new BufferCore("itemBufferCore", i).setCreativeTab(AddToCreativeTab.tabMisc);
GameRegistry.registerItem(itemBufferCore, itemBufferCore.getUnlocalizedName()+i);
- System.out.println("Buffer Core registration count is: "+i);
+ System.out.println("Buffer Core registration count is: "+i);
}
-
- GenerateItem(itemHeliumBlob, "itemHeliumBlob", AddToCreativeTab.tabMisc, 32, 2);
- GenerateItem(itemStickyRubber, "itemStickyRubber", AddToCreativeTab.tabMisc, 64, 0);
- GenerateItem(itemIngotBatteryAlloy, "itemIngotBatteryAlloy", AddToCreativeTab.tabMisc, 64, 0);
- GenerateItem(itemPlateBatteryAlloy, "itemPlateBatteryAlloy", AddToCreativeTab.tabMisc, 64, 0);
- GenerateItem(itemIngotStaballoy, "itemIngotStaballoy", AddToCreativeTab.tabMisc, 64, 0);
- GenerateItem(itemPlateStaballoy, "itemPlateStaballoy", AddToCreativeTab.tabMisc, 64, 0);
- GenerateItem(itemIngotBloodSteel, "itemIngotBloodSteel", AddToCreativeTab.tabMisc, 64, 0);
- GenerateItem(itemPlateBloodSteel, "itemPlateBloodSteel", AddToCreativeTab.tabMisc, 64, 0);
-
-
- /*GenerateItem(itemHeliumBlob, "heliumBlob", AddToCreativeTab.tabMisc);
- GenerateItem(itemHeliumBlob, "heliumBlob", AddToCreativeTab.tabMisc);
-
-//Armour Materials
- public static ArmorMaterial tutArmorMaterial = EnumHelper.addArmorMaterial("BloodSteel Armor Material", 33, new int[]{2, 5, 4, 2}, 10);
-
- //Base Classes For Items
- public static Item tutPickaxe;
- public static Item tutAxe;
- public static Item tutSword;
- public static Item tutHoe;
- public static Item tutSpade;
-
- //Base Classes For Armour
- public static Item tutHelmet;
- public static Item tutPlate;
- public static Item tutPants;
- public static Item tutBoots;
-
- itemPlateDimensionShard = new Item().setUnlocalizedName("itemPlateDimensionShard").setCreativeTab(AddToCreativeTab.tabMisc).setTextureName(CORE.MODID + ":itemPlateDimensionShard");
- GameRegistry.registerItem(itemPlateDimensionShard, "itemPlateDimensionShard");
-
-
- //Item Init
- itemPlateSoularium = new Item().setUnlocalizedName("itemPlateSoularium").setCreativeTab(AddToCreativeTab.tabMisc).setTextureName(CORE.MODID + ":itemPlateSoularium");
- itemPlateRedstoneAlloy = new Item().setUnlocalizedName("itemPlateRedstoneAlloy").setCreativeTab(AddToCreativeTab.tabMisc).setTextureName(CORE.MODID + ":itemPlateRedstoneAlloy");
- itemPlateElectricalSteel = new Item().setUnlocalizedName("itemPlateElectricalSteel").setCreativeTab(AddToCreativeTab.tabMisc).setTextureName(CORE.MODID + ":itemPlateElectricalSteel");
- itemPlatePulsatingIron = new Item().setUnlocalizedName("itemPlatePulsatingIron").setCreativeTab(AddToCreativeTab.tabMisc).setTextureName(CORE.MODID + ":itemPlatePulsatingIron");
- itemPlateEnergeticAlloy = new Item().setUnlocalizedName("itemPlateEnergeticAlloy").setCreativeTab(AddToCreativeTab.tabMisc).setTextureName(CORE.MODID + ":itemPlateEnergeticAlloy");
- itemPlateVibrantAlloy = new Item().setUnlocalizedName("itemPlateVibrantAlloy").setCreativeTab(AddToCreativeTab.tabMisc).setTextureName(CORE.MODID + ":itemPlateVibrantAlloy");
- itemPlateConductiveIron = new Item().setUnlocalizedName("itemPlateConductiveIron").setCreativeTab(AddToCreativeTab.tabMisc).setTextureName(CORE.MODID + ":itemPlateConductiveIron");
- itemPlateDarkSteel = new Item().setUnlocalizedName("itemPlateDarkSteel").setCreativeTab(AddToCreativeTab.tabMisc).setTextureName(CORE.MODID + ":itemPlateDarkSteel");
-
- //Blood Steel Equipment
-
- //Item Init
- tutPickaxe = new BloodSteelPickaxe(tutMaterial).setUnlocalizedName("BloodSteelPickaxe").setCreativeTab(TMCreativeTabs.tabTools).setTextureName(CORE.MODID + ":BloodSteelPickaxe");
- tutAxe = new BloodSteelAxe(tutMaterial).setUnlocalizedName("BloodSteelAxe").setCreativeTab(TMCreativeTabs.tabTools).setTextureName(CORE.MODID + ":BloodSteelAxe");
- tutSword = new BloodSteelSword(tutMaterial).setUnlocalizedName("BloodSteelSword").setCreativeTab(TMCreativeTabs.tabCombat).setTextureName(CORE.MODID + ":BloodSteelSword");
- tutHoe = new BloodSteelHoe(tutMaterial).setUnlocalizedName("BloodSteelHoe").setCreativeTab(TMCreativeTabs.tabTools).setTextureName(CORE.MODID + ":BloodSteelHoe");
- tutSpade = new BloodSteelSpade(tutMaterial).setUnlocalizedName("BloodSteelSpade").setCreativeTab(TMCreativeTabs.tabTools).setTextureName(CORE.MODID + ":BloodSteelSpade");
- tutHelmet = new BloodSteelArmor(tutArmorMaterial, MiscUtils.proxy.addArmor("BloodSteelArmor"), 0).setUnlocalizedName("BloodSteelHelmet").setCreativeTab(TMCreativeTabs.tabCombat).setTextureName(CORE.MODID + ":BloodSteelHelmet");
- tutPlate = new BloodSteelArmor(tutArmorMaterial, MiscUtils.proxy.addArmor("BloodSteelArmor"), 1).setUnlocalizedName("BloodSteelPlate").setCreativeTab(TMCreativeTabs.tabCombat).setTextureName(CORE.MODID + ":BloodSteelPlate");
- tutPants = new BloodSteelArmor(tutArmorMaterial, MiscUtils.proxy.addArmor("BloodSteelArmor"), 2).setUnlocalizedName("BloodSteelPants").setCreativeTab(TMCreativeTabs.tabCombat).setTextureName(CORE.MODID + ":BloodSteelPants");
- tutBoots = new BloodSteelArmor(tutArmorMaterial, MiscUtils.proxy.addArmor("BloodSteelArmor"), 3).setUnlocalizedName("BloodSteelBoots").setCreativeTab(TMCreativeTabs.tabCombat).setTextureName(CORE.MODID + ":BloodSteelBoots");
-
- //Registry
- GameRegistry.registerItem(tutPickaxe, tutPickaxe.getUnlocalizedName());
- GameRegistry.registerItem(tutAxe, tutAxe.getUnlocalizedName());
- GameRegistry.registerItem(tutSword, tutSword.getUnlocalizedName());
- GameRegistry.registerItem(tutHoe, tutHoe.getUnlocalizedName());
- GameRegistry.registerItem(tutSpade, tutSpade.getUnlocalizedName());
- GameRegistry.registerItem(tutHelmet, tutHelmet.getUnlocalizedName());
- GameRegistry.registerItem(tutPlate, tutPlate.getUnlocalizedName());
- GameRegistry.registerItem(tutPants, tutPants.getUnlocalizedName());
- GameRegistry.registerItem(tutBoots, tutBoots.getUnlocalizedName());
-
- //Registry
- GameRegistry.registerItem(itemPlateSoularium, "itemPlateSoularium");
- GameRegistry.registerItem(itemPlateRedstoneAlloy, "itemPlateRedstoneAlloy");
- GameRegistry.registerItem(itemPlateElectricalSteel, "itemPlateElectricalSteel");
- GameRegistry.registerItem(itemPlatePulsatingIron, "itemPlatePulsatingIron");
- GameRegistry.registerItem(itemPlateEnergeticAlloy, "itemPlateEnergeticAlloy");
- GameRegistry.registerItem(itemPlateVibrantAlloy, "itemPlateVibrantAlloy");
- GameRegistry.registerItem(itemPlateConductiveIron, "itemPlateConductiveIron");
- GameRegistry.registerItem(itemPlateDarkSteel, "itemPlateDarkSteel");
-
- //Item Init
- itemPlateEnrichedSoularium = new RarityUncommon().setUnlocalizedName("itemPlateEnrichedSoularium").setCreativeTab(AddToCreativeTab.tabMisc).setTextureName(CORE.MODID + ":itemPlateSoularium");
-
- //Registry
- GameRegistry.registerItem(itemPlateEnrichedSoularium, "itemPlateEnrichedSoularium");
- //Item Init
- itemPlateCompressedIron = new Item().setUnlocalizedName("itemPlateCompressedIron").setCreativeTab(AddToCreativeTab.tabMisc).setTextureName(CORE.MODID + ":itemPlateCompressedIron");
-
- //Registry
- GameRegistry.registerItem(itemPlateCompressedIron, "itemPlateCompressedIron");
-
- //Item Init
- itemPlateBlutonium = new Item().setUnlocalizedName("itemPlateBlutonium").setCreativeTab(AddToCreativeTab.tabMisc).setTextureName(CORE.MODID + ":itemPlateBlutonium");
- itemPlateCyanite = new Item().setUnlocalizedName("itemPlateCyanite").setCreativeTab(AddToCreativeTab.tabMisc).setTextureName(CORE.MODID + ":itemPlateCyanite");
- itemPlateLudicrite = new Item().setUnlocalizedName("itemPlateLudicrite").setCreativeTab(AddToCreativeTab.tabMisc).setTextureName(CORE.MODID + ":itemPlateLudicrite");
-
- //Registry
- GameRegistry.registerItem(itemPlateBlutonium, "itemPlateBlutonium");
- GameRegistry.registerItem(itemPlateCyanite, "itemPlateCyanite");
- GameRegistry.registerItem(itemPlateLudicrite, "itemPlateLudicrite");
-
- //Item Init
- try {
- itemPlateVoidMetal = new Item().setUnlocalizedName("itemPlateVoidMetal").setCreativeTab(AddToCreativeTab.tabMisc).setTextureName(CORE.MODID + ":itemPlateVoidMetal");
- } catch (NullPointerException e){
- e.getClass();
- }
-
- //Registry
- GameRegistry.registerItem(itemPlateVoidMetal, "itemPlateVoidMetal");
-
- //Item Init
- try {
- itemPlateBedrockium = new Item().setUnlocalizedName("itemPlateBedrockium").setCreativeTab(AddToCreativeTab.tabMisc).setTextureName(CORE.MODID + ":itemPlateBedrockium");
- } catch (NullPointerException e){
- e.getClass();
- }
- //Registry
- GameRegistry.registerItem(itemPlateBedrockium, "itemPlateBedrockium");
-
//Dev Items
itemStickyRubber = new Item().setUnlocalizedName("itemStickyRubber").setCreativeTab(tabMisc).setTextureName(CORE.MODID + ":itemDefault");
GameRegistry.registerItem(itemStickyRubber, "itemStickyRubber");
-
//Battery Alloy For cheap Niggers
itemIngotBatteryAlloy = new Item().setUnlocalizedName("itemIngotBatteryAlloy").setCreativeTab(tabMisc).setTextureName(CORE.MODID + ":itemDefault");
GameRegistry.registerItem(itemIngotBatteryAlloy, "itemIngotBatteryAlloy");
itemPlateBatteryAlloy = new Item().setUnlocalizedName("itemPlateBatteryAlloy").setCreativeTab(tabMisc).setTextureName(CORE.MODID + ":itemDefault");
- GameRegistry.registerItem(itemPlateBatteryAlloy, "itemPlateBatteryAlloy");*/
-
-
- /*//Staballoy Ingot/Plate
- itemIngotStaballoy = new Item().setUnlocalizedName("itemIngotStaballoy").setCreativeTab(tabMisc).setTextureName(CORE.MODID + ":itemIngotStaballoy");
- GameRegistry.registerItem(itemIngotStaballoy, "itemIngotStaballoy");
- itemPlateStaballoy = new Item().setUnlocalizedName("itemPlateStaballoy").setCreativeTab(tabMisc).setTextureName(CORE.MODID + ":itemPlateStaballoy");
- GameRegistry.registerItem(itemPlateStaballoy, "itemPlateStaballoy");
-
- //Blood Steel Ingot/Plate
- itemIngotBloodSteel = new Item().setUnlocalizedName("itemIngotBloodSteel").setCreativeTab(tabMisc).setTextureName(CORE.MODID + ":itemIngotBloodSteel");
- GameRegistry.registerItem(itemIngotBloodSteel, "itemIngotBloodSteel");
- itemPlateBloodSteel = new Item().setUnlocalizedName("itemPlateBloodSteel").setCreativeTab(tabMisc).setTextureName(CORE.MODID + ":itemPlateBloodSteel");