diff options
author | Draknyte1 <Draknyte1@hotmail.com> | 2016-05-24 14:59:49 +1000 |
---|---|---|
committer | Draknyte1 <Draknyte1@hotmail.com> | 2016-05-24 14:59:49 +1000 |
commit | 2859490274895866f864e66ba7ac18882b0dfb53 (patch) | |
tree | 8d9159b619c87dc99386ef4ae9d3a6f2e5c1867f /src/Java/miscutil/gregtech/api | |
parent | 83595f2379850fadcd17d91dfec49c87fdfd02a3 (diff) | |
download | GT5-Unofficial-2859490274895866f864e66ba7ac18882b0dfb53.tar.gz GT5-Unofficial-2859490274895866f864e66ba7ac18882b0dfb53.tar.bz2 GT5-Unofficial-2859490274895866f864e66ba7ac18882b0dfb53.zip |
+Industrial Press
+New Coke Oven GUI
+Changed casings internally.
+3 Coke Oven Recipes.
Diffstat (limited to 'src/Java/miscutil/gregtech/api')
8 files changed, 149 insertions, 20 deletions
diff --git a/src/Java/miscutil/gregtech/api/enums/GregtechItemList.java b/src/Java/miscutil/gregtech/api/enums/GregtechItemList.java index 79ebcd3576..9a2d8c23df 100644 --- a/src/Java/miscutil/gregtech/api/enums/GregtechItemList.java +++ b/src/Java/miscutil/gregtech/api/enums/GregtechItemList.java @@ -52,7 +52,10 @@ public enum GregtechItemList implements GregtechItemContainer { Industrial_Centrifuge, Casing_Centrifuge1, //Coke Oven - Industrial_CokeOven, Casing_CokeOven, Casing_CokeOven_Coil1, Casing_CokeOven_Coil2; + Industrial_CokeOven, Casing_CokeOven, Casing_CokeOven_Coil1, Casing_CokeOven_Coil2, + + //Bending Maching // Plate Press // Press + Industrial_PlatePress; public static final GregtechItemList[] DYE_ONLY_ITEMS = { diff --git a/src/Java/miscutil/gregtech/api/gui/CONTAINER_MultiMachine.java b/src/Java/miscutil/gregtech/api/gui/CONTAINER_MultiMachine.java new file mode 100644 index 0000000000..417dae03f8 --- /dev/null +++ b/src/Java/miscutil/gregtech/api/gui/CONTAINER_MultiMachine.java @@ -0,0 +1,35 @@ +package miscutil.gregtech.api.gui; + +import gregtech.api.gui.GT_ContainerMetaTile_Machine; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import net.minecraft.entity.player.InventoryPlayer; + +/** + * NEVER INCLUDE THIS FILE IN YOUR MOD!!! + * <p/> + * The Container I use for all my Basic Machines + */ +public class CONTAINER_MultiMachine extends GT_ContainerMetaTile_Machine { + public CONTAINER_MultiMachine(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) { + super(aInventoryPlayer, aTileEntity); + } + + public CONTAINER_MultiMachine(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, boolean bindInventory) { + super(aInventoryPlayer, aTileEntity, bindInventory); + } + + /*@Override + public void addSlots(InventoryPlayer aInventoryPlayer) { + addSlotToContainer(new Slot(mTileEntity, 1, 152, 5)); + } + + @Override + public int getSlotCount() { + return 1; + } + + @Override + public int getShiftClickSlotCount() { + return 1; + }*/ +} diff --git a/src/Java/miscutil/gregtech/api/gui/GUI_MultiMachine.java b/src/Java/miscutil/gregtech/api/gui/GUI_MultiMachine.java new file mode 100644 index 0000000000..c56690ed76 --- /dev/null +++ b/src/Java/miscutil/gregtech/api/gui/GUI_MultiMachine.java @@ -0,0 +1,63 @@ +package miscutil.gregtech.api.gui; + +import gregtech.api.gui.GT_GUIContainerMetaTile_Machine; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import miscutil.core.lib.CORE; +import net.minecraft.entity.player.InventoryPlayer; + +/** + * NEVER INCLUDE THIS FILE IN YOUR MOD!!! + * <p/> + * The GUI-Container I use for all my Basic Machines + * <p/> + * As the NEI-RecipeTransferRect Handler can't handle one GUI-Class for all GUIs I needed to produce some dummy-classes which extend this class + */ +public class GUI_MultiMachine extends GT_GUIContainerMetaTile_Machine { + + String mName = ""; + + public GUI_MultiMachine(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName, String aTextureFile) { + super(new CONTAINER_MultiMachine(aInventoryPlayer, aTileEntity), CORE.RES_PATH_GUI + (aTextureFile == null ? "MultiblockDisplay" : aTextureFile)); + mName = aName; + } + + @Override + protected void drawGuiContainerForegroundLayer(int par1, int par2) { + fontRendererObj.drawString(mName, 10, 8, 16448255); + + if (mContainer != null) { + if ((((CONTAINER_MultiMachine) mContainer).mDisplayErrorCode & 1) != 0) + fontRendererObj.drawString("Pipe is loose.", 10, 16, 16448255); + if ((((CONTAINER_MultiMachine) mContainer).mDisplayErrorCode & 2) != 0) + fontRendererObj.drawString("Screws are missing.", 10, 24, 16448255); + if ((((CONTAINER_MultiMachine) mContainer).mDisplayErrorCode & 4) != 0) + fontRendererObj.drawString("Something is stuck.", 10, 32, 16448255); + if ((((CONTAINER_MultiMachine) mContainer).mDisplayErrorCode & 8) != 0) + fontRendererObj.drawString("Platings are dented.", 10, 40, 16448255); + if ((((CONTAINER_MultiMachine) mContainer).mDisplayErrorCode & 16) != 0) + fontRendererObj.drawString("Circuitry burned out.", 10, 48, 16448255); + if ((((CONTAINER_MultiMachine) mContainer).mDisplayErrorCode & 32) != 0) + fontRendererObj.drawString("That doesn't belong there.", 10, 56, 16448255); + if ((((CONTAINER_MultiMachine) mContainer).mDisplayErrorCode & 64) != 0) + fontRendererObj.drawString("Incomplete Structure.", 10, 64, 16448255); + + if (((CONTAINER_MultiMachine) mContainer).mDisplayErrorCode == 0) { + if (((CONTAINER_MultiMachine) mContainer).mActive == 0) { + fontRendererObj.drawString("Hit with Soft Hammer", 10, 16, 16448255); + fontRendererObj.drawString("to (re-)start the Machine", 10, 24, 16448255); + fontRendererObj.drawString("if it doesn't start.", 10, 32, 16448255); + } else { + fontRendererObj.drawString("Running perfectly.", 10, 16, 16448255); + } + } + } + } + + @Override + protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) { + super.drawGuiContainerBackgroundLayer(par1, par2, par3); + int x = (width - xSize) / 2; + int y = (height - ySize) / 2; + drawTexturedModalRect(x, y, 0, 0, xSize, ySize); + } +} diff --git a/src/Java/miscutil/gregtech/api/init/InitGregtech.java b/src/Java/miscutil/gregtech/api/init/InitGregtech.java index a1f1f1eb41..c610107d04 100644 --- a/src/Java/miscutil/gregtech/api/init/InitGregtech.java +++ b/src/Java/miscutil/gregtech/api/init/InitGregtech.java @@ -5,6 +5,7 @@ import miscutil.gregtech.api.init.machines.GregtechConduits; import miscutil.gregtech.api.init.machines.GregtechEnergyBuffer; import miscutil.gregtech.api.init.machines.GregtechIndustrialCentrifuge; import miscutil.gregtech.api.init.machines.GregtechIndustrialCokeOven; +import miscutil.gregtech.api.init.machines.GregtechIndustrialPlatePress; import miscutil.gregtech.api.init.machines.GregtechSafeBlock; import miscutil.gregtech.api.init.machines.GregtechSteamCondenser; @@ -18,6 +19,7 @@ public class InitGregtech { GregtechSafeBlock.run(); GregtechIndustrialCentrifuge.run(); GregtechIndustrialCokeOven.run(); + GregtechIndustrialPlatePress.run(); } } diff --git a/src/Java/miscutil/gregtech/api/init/machines/GregtechIndustrialCentrifuge.java b/src/Java/miscutil/gregtech/api/init/machines/GregtechIndustrialCentrifuge.java index a653bbce93..4bad285fd5 100644 --- a/src/Java/miscutil/gregtech/api/init/machines/GregtechIndustrialCentrifuge.java +++ b/src/Java/miscutil/gregtech/api/init/machines/GregtechIndustrialCentrifuge.java @@ -2,7 +2,7 @@ package miscutil.gregtech.api.init.machines; import miscutil.core.util.Utils; import miscutil.gregtech.api.enums.GregtechItemList; -import miscutil.gregtech.common.machines.multi.GregtechMetaLargeIndustrialCentrifuge; +import miscutil.gregtech.common.machines.multi.GregtechMetaTileEntityIndustrialCentrifuge; public class GregtechIndustrialCentrifuge { @@ -21,7 +21,7 @@ public class GregtechIndustrialCentrifuge private static void run1() { //Industrial Centrifuge Multiblock - GregtechItemList.Industrial_Centrifuge.set(new GregtechMetaLargeIndustrialCentrifuge(790, "industrialcentrifuge.controller.tier.single", "Industrial Centrifuge").getStackForm(1L)); + GregtechItemList.Industrial_Centrifuge.set(new GregtechMetaTileEntityIndustrialCentrifuge(790, "industrialcentrifuge.controller.tier.single", "Industrial Centrifuge").getStackForm(1L)); } } diff --git a/src/Java/miscutil/gregtech/api/init/machines/GregtechIndustrialPlatePress.java b/src/Java/miscutil/gregtech/api/init/machines/GregtechIndustrialPlatePress.java new file mode 100644 index 0000000000..78f05b157c --- /dev/null +++ b/src/Java/miscutil/gregtech/api/init/machines/GregtechIndustrialPlatePress.java @@ -0,0 +1,27 @@ +package miscutil.gregtech.api.init.machines; + +import miscutil.core.util.Utils; +import miscutil.gregtech.api.enums.GregtechItemList; +import miscutil.gregtech.common.machines.multi.GregtechMetaTileEntityIndustrialPlatePress; + +public class GregtechIndustrialPlatePress +{ + + + + public static void run() + { + if (miscutil.core.lib.LoadedMods.Gregtech){ + Utils.LOG_INFO("MiscUtils: Gregtech5u Content | Registering Industrial Press Multiblock."); + run1(); + } + + } + + private static void run1() + { + //Industrial Centrifuge Multiblock + GregtechItemList.Industrial_PlatePress.set(new GregtechMetaTileEntityIndustrialPlatePress(792, "industrialbender.controller.tier.single", "Industrial Material Press").getStackForm(1L)); + + } +}
\ No newline at end of file diff --git a/src/Java/miscutil/gregtech/api/metatileentity/implementations/GregtechMetaEnergyBuffer.java b/src/Java/miscutil/gregtech/api/metatileentity/implementations/GregtechMetaEnergyBuffer.java index 26a88067b7..a7db28154d 100644 --- a/src/Java/miscutil/gregtech/api/metatileentity/implementations/GregtechMetaEnergyBuffer.java +++ b/src/Java/miscutil/gregtech/api/metatileentity/implementations/GregtechMetaEnergyBuffer.java @@ -18,7 +18,6 @@ import gregtech.api.objects.GT_RenderedTexture; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_Utility; import ic2.api.item.IElectricItem; -import miscutil.core.handler.GuiHandler; import miscutil.core.util.Utils; import miscutil.gregtech.api.metatileentity.implementations.base.GregtechMetaTileEntity; import net.minecraft.entity.player.EntityPlayer; @@ -169,15 +168,15 @@ public class GregtechMetaEnergyBuffer extends GregtechMetaTileEntity { } private void showEnergy(World worldIn, EntityPlayer playerIn){ - Utils.LOG_WARNING("Begin Show Energy"); + //Utils.LOG_WARNING("Begin Show Energy"); final double c = ((double) getProgresstime() / maxProgresstime()) * 100; - Utils.LOG_WARNING(""+c); + //Utils.LOG_WARNING(""+c); final double roundOff = Math.round(c * 100.0) / 100.0; Utils.messagePlayer(playerIn, "Energy: " + getProgresstime() + " EU at "+V[mTier]+"v ("+roundOff+"%)"); - Utils.LOG_WARNING("Making new instance of Guihandler"); + /*Utils.LOG_WARNING("Making new instance of Guihandler"); GuiHandler block = new GuiHandler(); Utils.LOG_WARNING("Guihandler.toString(): "+block.toString()); - block.getClientGuiElement(1, playerIn, worldIn, (int) playerIn.posX, (int) playerIn.posY, (int) playerIn.posZ); + block.getClientGuiElement(1, playerIn, worldIn, (int) playerIn.posX, (int) playerIn.posY, (int) playerIn.posZ);*/ } diff --git a/src/Java/miscutil/gregtech/api/objects/GregtechRenderedTexture.java b/src/Java/miscutil/gregtech/api/objects/GregtechRenderedTexture.java index 88ef8f5fff..5c87109ef0 100644 --- a/src/Java/miscutil/gregtech/api/objects/GregtechRenderedTexture.java +++ b/src/Java/miscutil/gregtech/api/objects/GregtechRenderedTexture.java @@ -118,34 +118,34 @@ public class GregtechRenderedTexture implements ITexture, IColorModulationContai aRenderer.renderFaceZPos(aBlock, aX, aY, aZ, mIconContainer.getOverlayIcon()); } } catch (NullPointerException e){ - Utils.LOG_INFO("renderZPos failed."); + Utils.LOG_WARNING("renderZPos failed."); } } @Override public void renderZNeg(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) { try { - Utils.LOG_INFO("renderZNeg Method();."); - Utils.LOG_INFO("Setting RGBA of instance."); + Utils.LOG_WARNING("renderZNeg Method();."); + Utils.LOG_WARNING("Setting RGBA of instance."); Tessellator.instance.setColorRGBA((int) (mRGBa[0] * 0.8F), (int) (mRGBa[1] * 0.8F), (int) (mRGBa[2] * 0.8F), mAllowAlpha ? 255 - mRGBa[3] : 255); aRenderer.renderFaceZNeg(aBlock, aX, aY, aZ, mIconContainer.getIcon()); - Utils.LOG_INFO("Is mIconContainer null? "+mIconContainer.toString()); - Utils.LOG_INFO("mIconContainer.getIcon.getIconName(): "+mIconContainer.getIcon().getIconName()); - Utils.LOG_INFO("mIconContainer.getTextureFile().getResourceDomain()"+mIconContainer.getTextureFile().getResourceDomain()); - Utils.LOG_INFO("mIconContainer.getTextureFile().getResourcePath()"+mIconContainer.getTextureFile().getResourcePath()); + Utils.LOG_WARNING("Is mIconContainer null? "+mIconContainer.toString()); + Utils.LOG_WARNING("mIconContainer.getIcon.getIconName(): "+mIconContainer.getIcon().getIconName()); + Utils.LOG_WARNING("mIconContainer.getTextureFile().getResourceDomain()"+mIconContainer.getTextureFile().getResourceDomain()); + Utils.LOG_WARNING("mIconContainer.getTextureFile().getResourcePath()"+mIconContainer.getTextureFile().getResourcePath()); if (mIconContainer.getOverlayIcon() != null) { Tessellator.instance.setColorRGBA(204, 204, 204, 255); aRenderer.renderFaceZNeg(aBlock, aX, aY, aZ, mIconContainer.getOverlayIcon()); - Utils.LOG_INFO("Is miconContainer.getOverlayIcon null? "+mIconContainer.getOverlayIcon().toString()); - Utils.LOG_INFO("mIconContainer.getIcon.getIconName(): "+mIconContainer.getOverlayIcon().getIconName()); - Utils.LOG_INFO("mIconContainer.getTextureFile().getResourceDomain()"+mIconContainer.getTextureFile().getResourceDomain()); - Utils.LOG_INFO("mIconContainer.getTextureFile().getResourcePath()"+mIconContainer.getTextureFile().getResourcePath()); + Utils.LOG_WARNING("Is miconContainer.getOverlayIcon null? "+mIconContainer.getOverlayIcon().toString()); + Utils.LOG_WARNING("mIconContainer.getIcon.getIconName(): "+mIconContainer.getOverlayIcon().getIconName()); + Utils.LOG_WARNING("mIconContainer.getTextureFile().getResourceDomain()"+mIconContainer.getTextureFile().getResourceDomain()); + Utils.LOG_WARNING("mIconContainer.getTextureFile().getResourcePath()"+mIconContainer.getTextureFile().getResourcePath()); } } catch (NullPointerException e){ e.printStackTrace(); - Utils.LOG_INFO("renderZNeg failed."+e.getMessage()+"|"+e.getClass()+"|"+e.getLocalizedMessage()); + Utils.LOG_WARNING("renderZNeg failed."+e.getMessage()+"|"+e.getClass()+"|"+e.getLocalizedMessage()); Minecraft.getMinecraft().shutdown(); } } |