diff options
Diffstat (limited to 'src')
25 files changed, 571 insertions, 337 deletions
diff --git a/src/main/java/gregtech/api/enums/ItemList.java b/src/main/java/gregtech/api/enums/ItemList.java index 6d11b48603..1d6ba0aea7 100644 --- a/src/main/java/gregtech/api/enums/ItemList.java +++ b/src/main/java/gregtech/api/enums/ItemList.java @@ -536,6 +536,7 @@ public enum ItemList implements IItemContainer { Machine_Bronze_Compressor, Machine_Bronze_AlloySmelter, Machine_Bronze_BlastFurnace, + Machine_Bricked_BlastFurnace, Machine_Steel_Boiler_Lava, Machine_Steel_Boiler, Machine_Steel_Furnace, @@ -554,6 +555,7 @@ public enum ItemList implements IItemContainer { Casing_Stripes_A, Casing_Stripes_B, Casing_RadioactiveHazard, Casing_BioHazard, Casing_ExplosionHazard, Casing_FireHazard, Casing_AcidHazard, Casing_MagicHazard, Casing_FrostHazard, Casing_NoiseHazard, Casing_Grate, Casing_Vent, Casing_RadiationProof, Casing_Firebox_Bronze, Casing_Firebox_Steel, Casing_Firebox_TungstenSteel, Casing_Chemically_Inert, Casing_MiningOsmiridium, Casing_RobustTungstenSteel, Casing_CleanStainlessSteel, Casing_StableTitanium, Casing_Firebox_Titanium, Hull_ULV, Hull_LV, Hull_MV, Hull_HV, Hull_EV, Hull_IV, Hull_LuV, Hull_ZPM, Hull_UV, Hull_MAX, + CompressedFireclay, Firebrick, Casing_Firebricks, Automation_Filter_ULV, Automation_Filter_LV, Automation_Filter_MV, Automation_Filter_HV, Automation_Filter_EV, Automation_Filter_IV, Automation_Filter_LuV, Automation_Filter_ZPM, Automation_Filter_UV, Automation_Filter_MAX, Automation_TypeFilter_ULV, Automation_TypeFilter_LV, Automation_TypeFilter_MV, Automation_TypeFilter_HV, Automation_TypeFilter_EV, Automation_TypeFilter_IV, Automation_TypeFilter_LuV, Automation_TypeFilter_ZPM, Automation_TypeFilter_UV, Automation_TypeFilter_MAX, diff --git a/src/main/java/gregtech/api/enums/Materials.java b/src/main/java/gregtech/api/enums/Materials.java index c158fab464..562a797b21 100644 --- a/src/main/java/gregtech/api/enums/Materials.java +++ b/src/main/java/gregtech/api/enums/Materials.java @@ -138,7 +138,6 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { public static Materials Metal = new Materials( -1, TextureSet.SET_METALLIC , 1.0F, 0, 2, false, "Metal" , "Metal" ); public static Materials Unknown = new Materials( -1, TextureSet.SET_DULL , 1.0F, 0, 2, false, "Unknown" , "Unknown" ); public static Materials Cobblestone = new Materials( -1, TextureSet.SET_DULL , 1.0F, 0, 1, false, "Cobblestone" , "Cobblestone" ); - public static Materials Brick = new Materials( -1, TextureSet.SET_DULL , 1.0F, 0, 1, false, "Brick" , "Brick" ); public static Materials BrickNether = new Materials( -1, TextureSet.SET_DULL , 1.0F, 0, 1, false, "BrickNether" , "BrickNether" ); /** @@ -534,6 +533,9 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { public static Materials HeavyFuel = new Materials(741, TextureSet.SET_FLUID, 1.0F, 0, 0, 16, 255, 255, 0, 0, "HeavyFuel", "Heavy Fuel", 3, 240, -1, 0, false, false, 1, 1, 1, Dyes.dyeBlack).setCanBeCracked(true); public static Materials LPG = new Materials( 742, TextureSet.SET_FLUID , 1.0F, 0, 0, 16 , 255, 255, 0, 0, "LPG" , "LPG" , 1, 320, -1, 0, false, false, 1, 1, 1, Dyes.dyeYellow ); + public static Materials Brick = new MaterialBuilder(625, TextureSet.SET_DULL, "Brick").addDustItems().setRGB(155, 86, 67).setColor(Dyes.dyeBrown).setMaterialList(new MaterialStack(Aluminium, 4), new MaterialStack(Silicon, 3), new MaterialStack(Oxygen, 12)).constructMaterial(); + public static Materials Fireclay = new MaterialBuilder(626, TextureSet.SET_DULL, "Fireclay").addDustItems().setRGB(173, 160, 155).setColor(Dyes.dyeBrown).setMaterialList(new MaterialStack(Brick, 1)).constructMaterial(); + public static Materials BioDiesel = new MaterialBuilder(627, TextureSet.SET_FLUID, "Bio Diesel").addCell().addFluid().setRGB(255, 128, 0).setColor(Dyes.dyeOrange).setFuelType(MaterialBuilder.DIESEL).setFuelPower(192).constructMaterial(); public static Materials NitrationMixture = new MaterialBuilder(628, TextureSet.SET_FLUID, "Nitration Mixture").addCell().setRGB(230, 226, 171).setColor(Dyes.dyeBrown).constructMaterial(); public static Materials Glycerol = new MaterialBuilder(629, TextureSet.SET_FLUID, "Glycerol").addCell().addFluid().setRGB(135, 222, 135).setColor(Dyes.dyeLime).setFuelType(MaterialBuilder.SEMIFLUID).setFuelType(164).setMaterialList(new MaterialStack(Carbon, 3), new MaterialStack(Hydrogen, 8), new MaterialStack(Oxygen, 3)).addElectrolyzerRecipe().constructMaterial(); @@ -1331,7 +1333,7 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { Teslatite .add(SubTag.STONE, SubTag.NO_SMASHING, SubTag.UNBURNABLE, SubTag.SMELTING_TO_FLUID); Netherrack .add(SubTag.STONE, SubTag.NO_SMASHING, SubTag.UNBURNABLE, SubTag.FLAMMABLE); Stone .add(SubTag.STONE, SubTag.NO_SMASHING, SubTag.NO_RECYCLING); - Brick .add(SubTag.STONE, SubTag.NO_SMASHING); + Brick .add(SubTag.STONE, SubTag.NO_SMASHING, SubTag.NO_SMELTING); NetherBrick .add(SubTag.STONE, SubTag.NO_SMASHING); Endstone .add(SubTag.STONE, SubTag.NO_SMASHING); Marble .add(SubTag.STONE, SubTag.NO_SMASHING); @@ -2176,5 +2178,11 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { public ItemStack getGems(int amount){ return GT_OreDictUnificator.get(OrePrefixes.gem, this, amount); } - + public ItemStack getIngots(int amount){ + return GT_OreDictUnificator.get(OrePrefixes.ingot, this, amount); + } + + public ItemStack getPlates(int amount){ + return GT_OreDictUnificator.get(OrePrefixes.plate, this, amount); + } }
\ No newline at end of file diff --git a/src/main/java/gregtech/api/enums/Textures.java b/src/main/java/gregtech/api/enums/Textures.java index 84b1d6bd18..9c05ea1262 100644 --- a/src/main/java/gregtech/api/enums/Textures.java +++ b/src/main/java/gregtech/api/enums/Textures.java @@ -54,8 +54,9 @@ public class Textures { MACHINE_CASING_GEARBOX_BRONZE, MACHINE_CASING_GEARBOX_STEEL, MACHINE_CASING_GEARBOX_TITANIUM, MACHINE_CASING_GEARBOX_TUNGSTENSTEEL, MACHINE_CASING_DATA_DRIVE, MACHINE_CASING_CONTAINMENT_FIELD, MACHINE_CASING_ASSEMBLER, MACHINE_CASING_PROCESSOR, MACHINE_CASING_STRIPES_A, MACHINE_CASING_STRIPES_B, MACHINE_CASING_RADIOACTIVEHAZARD, MACHINE_CASING_BIOHAZARD, MACHINE_CASING_EXPLOSIONHAZARD, MACHINE_CASING_FIREHAZARD, MACHINE_CASING_ACIDHAZARD, MACHINE_CASING_MAGICHAZARD, MACHINE_CASING_FROSTHAZARD, MACHINE_CASING_NOISEHAZARD, MACHINE_CASING_GRATE, MACHINE_CASING_VENT, - MACHINE_CASING_RADIATIONPROOF, MACHINE_CASING_FIREBOX_BRONZE, MACHINE_CASING_FIREBOX_STEEL, MACHINE_CASING_FIREBOX_TUNGSTENSTEEL, MACHINE_CASING_ENGINE_INTAKE, MACHINE_CASING_CHEMICALLY_INERT, MACHINE_COIL_CUPRONICKEL, - MACHINE_COIL_KANTHAL, MACHINE_COIL_NICHROME, MACHINE_COIL_TUNGSTENSTEEL, MACHINE_COIL_HSSG, MACHINE_COIL_NAQUADAH, MACHINE_COIL_NAQUADAHALLOY, BOILER_SOLAR, BOILER_FRONT, + MACHINE_CASING_RADIATIONPROOF, MACHINE_CASING_FIREBOX_BRONZE, MACHINE_CASING_FIREBOX_STEEL, MACHINE_CASING_FIREBOX_TUNGSTENSTEEL, MACHINE_CASING_ENGINE_INTAKE, MACHINE_CASING_CHEMICALLY_INERT, MACHINE_COIL_CUPRONICKEL, + MACHINE_CASING_DENSEBRICKS, MACHINE_CASING_BRICKEDBLASTFURNACE_ACTIVE, MACHINE_CASING_BRICKEDBLASTFURNACE_INACTIVE, + MACHINE_COIL_KANTHAL, MACHINE_COIL_NICHROME, MACHINE_COIL_TUNGSTENSTEEL, MACHINE_COIL_HSSG, MACHINE_COIL_NAQUADAH, MACHINE_COIL_NAQUADAHALLOY, BOILER_SOLAR, BOILER_FRONT, BOILER_FRONT_ACTIVE, BOILER_LAVA_FRONT, BOILER_LAVA_FRONT_ACTIVE, NAQUADAH_REACTOR_SOLID_BACK, NAQUADAH_REACTOR_SOLID_FRONT, NAQUADAH_REACTOR_SOLID_SIDE, NAQUADAH_REACTOR_SOLID_BOTTOM, NAQUADAH_REACTOR_SOLID_TOP, NAQUADAH_REACTOR_SOLID_BACK_ACTIVE, NAQUADAH_REACTOR_SOLID_FRONT_ACTIVE, NAQUADAH_REACTOR_SOLID_SIDE_ACTIVE, NAQUADAH_REACTOR_SOLID_BOTTOM_ACTIVE, NAQUADAH_REACTOR_SOLID_TOP_ACTIVE, NAQUADAH_REACTOR_FLUID_BACK, NAQUADAH_REACTOR_FLUID_FRONT, NAQUADAH_REACTOR_FLUID_SIDE, NAQUADAH_REACTOR_FLUID_BOTTOM, NAQUADAH_REACTOR_FLUID_TOP, diff --git a/src/main/java/gregtech/api/interfaces/internal/IGT_RecipeAdder.java b/src/main/java/gregtech/api/interfaces/internal/IGT_RecipeAdder.java index f5da19e597..5f55e2d6cb 100644 --- a/src/main/java/gregtech/api/interfaces/internal/IGT_RecipeAdder.java +++ b/src/main/java/gregtech/api/interfaces/internal/IGT_RecipeAdder.java @@ -196,6 +196,20 @@ public interface IGT_RecipeAdder { */ public boolean addBlastRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput1, ItemStack aOutput2, int aDuration, int aEUt, int aLevel); + /** + * Adds a Blast Furnace Recipe + * + * @param aInput1 must be != null if aInput2 == null + * @param aInput2 must be != null if aInput1 == null + * @param aCoalAmount must be > 0 + * @param aOutput1 must be != null if aOutput2 == null + * @param aOutput2 must be != null if aOutput1 == null + * @param aDuration must be > 0 + */ + + public boolean addPrimitiveBlastRecipe(ItemStack aInput1, ItemStack aInput2, int aCoalAmount, ItemStack aOutput1, ItemStack aOutput2, int aDuration); + + /** * Adds a Canning Machine Recipe * diff --git a/src/main/java/gregtech/api/util/GT_Recipe.java b/src/main/java/gregtech/api/util/GT_Recipe.java index 11c8126678..9ee560448e 100644 --- a/src/main/java/gregtech/api/util/GT_Recipe.java +++ b/src/main/java/gregtech/api/util/GT_Recipe.java @@ -544,6 +544,7 @@ public class GT_Recipe implements Comparable<GT_Recipe> { public static final GT_Recipe_Map sCentrifugeRecipes = new GT_Recipe_Map(new HashSet<GT_Recipe>(1000), "gt.recipe.centrifuge", "Centrifuge", null, RES_PATH_GUI + "basicmachines/Centrifuge", 2, 6, 0, 0, 1, E, 1, E, true, true); public static final GT_Recipe_Map sElectrolyzerRecipes = new GT_Recipe_Map(new HashSet<GT_Recipe>(200), "gt.recipe.electrolyzer", "Electrolyzer", null, RES_PATH_GUI + "basicmachines/Electrolyzer", 2, 6, 0, 0, 1, E, 1, E, true, true); public static final GT_Recipe_Map sBlastRecipes = new GT_Recipe_Map(new HashSet<GT_Recipe>(500), "gt.recipe.blastfurnace", "Blast Furnace", null, RES_PATH_GUI + "basicmachines/Default", 2, 2, 1, 0, 1, "Heat Capacity: ", 1, " K", false, true); + public static final GT_Recipe_Map sPrimitiveBlastRecipes = new GT_Recipe_Map(new HashSet<GT_Recipe>(500), "gt.recipe.primitiveblastfurnace", "Primitive Blast Furnace", null, RES_PATH_GUI + "basicmachines/Default", 3, 3, 1, 0, 1, E, 1, E, false, true); public static final GT_Recipe_Map sImplosionRecipes = new GT_Recipe_Map(new HashSet<GT_Recipe>(50), "gt.recipe.implosioncompressor", "Implosion Compressor", null, RES_PATH_GUI + "basicmachines/Default", 2, 2, 2, 0, 1, E, 1, E, true, true); public static final GT_Recipe_Map sVacuumRecipes = new GT_Recipe_Map(new HashSet<GT_Recipe>(100), "gt.recipe.vacuumfreezer", "Vacuum Freezer", null, RES_PATH_GUI + "basicmachines/Default", 1, 1, 1, 0, 1, E, 1, E, true, true); public static final GT_Recipe_Map sChemicalRecipes = new GT_Recipe_Map(new HashSet<GT_Recipe>(100), "gt.recipe.chemicalreactor", "Chemical Reactor", null, RES_PATH_GUI + "basicmachines/ChemicalReactor", 2, 2, 1, 0, 1, E, 1, E, true, true); diff --git a/src/main/java/gregtech/api/util/GT_RecipeRegistrator.java b/src/main/java/gregtech/api/util/GT_RecipeRegistrator.java index 18478f7dae..3c6c106b1c 100644 --- a/src/main/java/gregtech/api/util/GT_RecipeRegistrator.java +++ b/src/main/java/gregtech/api/util/GT_RecipeRegistrator.java @@ -263,8 +263,8 @@ public class GT_RecipeRegistrator { RA.addPulveriserRecipe(aStack, new ItemStack[]{GT_OreDictUnificator.getDust(aData.mMaterial), GT_OreDictUnificator.getDust(aData.getByProduct(0)), GT_OreDictUnificator.getDust(aData.getByProduct(1)), GT_OreDictUnificator.getDust(aData.getByProduct(2))}, null, aData.mMaterial.mMaterial==Materials.Marble ? 1 : (int) Math.max(16, tAmount / M), 4, tHide); if (aAllowHammer) for (MaterialStack tMaterial : aData.getAllMaterialStacks()) - if (tMaterial.mMaterial.contains(SubTag.CRYSTAL) && !tMaterial.mMaterial.contains(SubTag.METAL)) { - if (RA.addForgeHammerRecipe(GT_Utility.copyAmount(1, aStack), GT_OreDictUnificator.getDust(aData.mMaterial), 200, 32)) + if (tMaterial.mMaterial.contains(SubTag.CRYSTAL) && !tMaterial.mMaterial.contains(SubTag.METAL) && tMaterial.mMaterial != Materials.Glass) { + if (RA.addForgeHammerRecipe(GT_Utility.copyAmount(1, aStack), GT_OreDictUnificator.getDust(aData.mMaterial), 200, 30)) break; } ItemStack tDust = GT_OreDictUnificator.getDust(aData.mMaterial); diff --git a/src/main/java/gregtech/common/GT_RecipeAdder.java b/src/main/java/gregtech/common/GT_RecipeAdder.java index cdfc325569..8e8996afea 100644 --- a/src/main/java/gregtech/common/GT_RecipeAdder.java +++ b/src/main/java/gregtech/common/GT_RecipeAdder.java @@ -1,5 +1,6 @@ package gregtech.common; +import cpw.mods.fml.common.Loader; import gregtech.GT_Mod; import gregtech.api.GregTech_API; import gregtech.api.enums.GT_Values; @@ -13,6 +14,7 @@ import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Recipe.GT_Recipe_AssemblyLine; import gregtech.api.util.GT_Utility; +import mods.railcraft.common.items.RailcraftToolItems; import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; import net.minecraftforge.fluids.Fluid; @@ -167,6 +169,26 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return true; } + public boolean addPrimitiveBlastRecipe(ItemStack aInput1, ItemStack aInput2, int aCoalAmount, ItemStack aOutput1, ItemStack aOutput2, int aDuration) { + if ((aInput1 == null && aInput2 == null) || (aOutput1 == null && aOutput2 == null)) { + return false; + } + if (aCoalAmount <= 0) { + return false; + } + if ((aDuration = GregTech_API.sRecipeFile.get("primitiveblastfurnace", aInput1, aDuration)) <= 0) { + return false; + } + ItemStack[] coalStacks = new ItemStack[]{Materials.Coal.getGems(aCoalAmount), Materials.Coal.getDust(aCoalAmount), Materials.Charcoal.getGems(aCoalAmount), Materials.Charcoal.getDust(aCoalAmount)}; + for (ItemStack coalStack : coalStacks) { + GT_Recipe.GT_Recipe_Map.sPrimitiveBlastRecipes.addRecipe(true, new ItemStack[]{aInput1, aInput2, coalStack}, new ItemStack[]{aOutput1, aOutput2, Materials.Ash.getDustTiny(aCoalAmount)}, null, null, null, null, aDuration, 0, 0); + } + if (Loader.isModLoaded("Railcraft")) { + GT_Recipe.GT_Recipe_Map.sPrimitiveBlastRecipes.addRecipe(true, new ItemStack[]{aInput1, aInput2, RailcraftToolItems.getCoalCoke(aCoalAmount / 2)}, new ItemStack[]{aOutput1, aOutput2, Materials.Ash.getDustTiny(aCoalAmount / 2)}, null, null, null, null, aDuration * 2 / 3, 0, 0); + } + return true; + } + public boolean addCannerRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, ItemStack aOutput2, int aDuration, int aEUt) { if ((aInput1 == null) || (aOutput1 == null)) { return false; diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Casings4.java b/src/main/java/gregtech/common/blocks/GT_Block_Casings4.java index 81daf2c04a..d3b00fee79 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Casings4.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Casings4.java @@ -38,6 +38,7 @@ public class GT_Block_Casings4 GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".12.name", "Tungstensteel Turbine Casing"); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".13.name", "Engine Intake Casing"); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".14.name", "Mining Osmiridium Casing"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".15.name", "Firebricks"); ItemList.Casing_RobustTungstenSteel.set(new ItemStack(this, 1, 0)); ItemList.Casing_CleanStainlessSteel.set(new ItemStack(this, 1, 1)); @@ -54,6 +55,7 @@ public class GT_Block_Casings4 ItemList.Casing_Turbine3.set(new ItemStack(this, 1, 12)); ItemList.Casing_EngineIntake.set(new ItemStack(this, 1, 13)); ItemList.Casing_MiningOsmiridium.set(new ItemStack(this, 1, 14)); + ItemList.Casing_Firebricks.set(new ItemStack(this, 1, 15)); } public IIcon getIcon(int aSide, int aMeta) { @@ -89,7 +91,7 @@ public class GT_Block_Casings4 case 14: return Textures.BlockIcons.MACHINE_CASING_MINING_OSMIRIDIUM.getIcon(); case 15: - return Textures.BlockIcons.MACHINE_CASING_ROBUST_TUNGSTENSTEEL.getIcon(); + return Textures.BlockIcons.MACHINE_CASING_DENSEBRICKS.getIcon(); } return Textures.BlockIcons.MACHINE_CASING_SOLID_STEEL.getIcon(); } diff --git a/src/main/java/gregtech/common/gui/GT_Container_PrimitiveBlastFurnace.java b/src/main/java/gregtech/common/gui/GT_Container_PrimitiveBlastFurnace.java new file mode 100644 index 0000000000..5ef8441027 --- /dev/null +++ b/src/main/java/gregtech/common/gui/GT_Container_PrimitiveBlastFurnace.java @@ -0,0 +1,33 @@ +package gregtech.common.gui; + +import gregtech.api.gui.GT_ContainerMetaTile_Machine; +import gregtech.api.gui.GT_Slot_Output; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.common.tileentities.machines.multi.GT_MetaTileEntity_PrimitiveBlastFurnace; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.Slot; + +public class GT_Container_PrimitiveBlastFurnace extends GT_ContainerMetaTile_Machine { + + public GT_Container_PrimitiveBlastFurnace(InventoryPlayer inventoryPlayer, IGregTechTileEntity tileEntity) { + super(inventoryPlayer, tileEntity); + } + + public void addSlots(InventoryPlayer aInventoryPlayer) { + for (int i = 0; i < GT_MetaTileEntity_PrimitiveBlastFurnace.INPUT_SLOTS; i++) { + addSlotToContainer(new Slot(this.mTileEntity, i, 34, 16 + 18 * i)); + } + for (int i = 0; i < GT_MetaTileEntity_PrimitiveBlastFurnace.OUTPUT_SLOTS; i++) { + addSlotToContainer(new GT_Slot_Output(mTileEntity, GT_MetaTileEntity_PrimitiveBlastFurnace.INPUT_SLOTS + i, 86 + i * 18, 25)); + } + } + + public int getSlotCount() { + return GT_MetaTileEntity_PrimitiveBlastFurnace.INPUT_SLOTS + + GT_MetaTileEntity_PrimitiveBlastFurnace.OUTPUT_SLOTS; + } + + public int getShiftClickSlotCount() { + return GT_MetaTileEntity_PrimitiveBlastFurnace.INPUT_SLOTS; + } +}
\ No newline at end of file diff --git a/src/main/java/gregtech/common/gui/GT_GUIContainer_PrimitiveBlastFurnace.java b/src/main/java/gregtech/common/gui/GT_GUIContainer_PrimitiveBlastFurnace.java new file mode 100644 index 0000000000..9586b9eaf9 --- /dev/null +++ b/src/main/java/gregtech/common/gui/GT_GUIContainer_PrimitiveBlastFurnace.java @@ -0,0 +1,31 @@ +package gregtech.common.gui; + +import gregtech.api.gui.GT_GUIContainerMetaTile_Machine; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import net.minecraft.entity.player.InventoryPlayer; + +public class GT_GUIContainer_PrimitiveBlastFurnace extends GT_GUIContainerMetaTile_Machine { + private String name; + + public GT_GUIContainer_PrimitiveBlastFurnace(InventoryPlayer inventoryPlayer, IGregTechTileEntity tileEntity, String name) { + super(new GT_Container_PrimitiveBlastFurnace(inventoryPlayer, tileEntity), + String.format("gregtech:textures/gui/%s.png", name.replace(" ", ""))); + this.name = name; + } + + protected void drawGuiContainerForegroundLayer(int par1, int par2) { + this.fontRendererObj.drawString(name, 8, 4, 4210752); + } + + protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) { + super.drawGuiContainerBackgroundLayer(par1, par2, par3); + int x = (this.width - this.xSize) / 2; + int y = (this.height - this.ySize) / 2; + drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize); + if ((this.mContainer != null) && (this.mContainer.mProgressTime > 0)) { + drawTexturedModalRect(x + 58, y + 28, 176, 0, Math.max(0, Math.min(20, (1) + + this.mContainer.mProgressTime * 20 / (this.mContainer.mMaxProgressTime < 1 ? 1 : this.mContainer.mMaxProgressTime))), + 11); + } + } +}
\ No newline at end of file diff --git a/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_01.java b/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_01.java index a0941642c4..c8af6f9ab1 100644 --- a/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_01.java +++ b/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_01.java @@ -104,6 +104,9 @@ public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 { GT_ModHandler.addCraftingRecipe(ItemList.Component_Minecart_Wheels_Iron.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{" h ", "RSR", " w ", 'R', OrePrefixes.ring.get(Materials.AnyIron), 'S', OrePrefixes.stick.get(Materials.AnyIron)}); GT_ModHandler.addCraftingRecipe(ItemList.Component_Minecart_Wheels_Steel.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{" h ", "RSR", " w ", 'R', OrePrefixes.ring.get(Materials.Steel), 'S', OrePrefixes.stick.get(Materials.Steel)}); + ItemList.CompressedFireclay.set(addItem(tLastID = 110, "Compressed Fireclay", "Brick-shaped")); + ItemList.Firebrick.set(addItem(tLastID = 111, "Firebrick", "Heat resistant")); + ItemList.Arrow_Head_Glass_Emtpy.set(addItem(tLastID = 200, "Empty Glass Arrow Head", "Fill with Potions before use", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L)})); ItemList.Arrow_Head_Glass_Poison.set(addItem(tLastID = 201, "Poison Glass Arrow Head", "Glass Arrow filled with Poison", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L)})); ItemList.Arrow_Head_Glass_Poison_Long.set(addItem(tLastID = 202, "Poison Glass Arrow Head", "Glass Arrow filled with stretched Poison", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L)})); diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BrickedBlastFurnace.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BrickedBlastFurnace.java new file mode 100644 index 0000000000..e966b8794a --- /dev/null +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BrickedBlastFurnace.java @@ -0,0 +1,57 @@ +package gregtech.common.tileentities.machines.multi; + +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.objects.GT_RenderedTexture; +import net.minecraft.block.Block; + +public class GT_MetaTileEntity_BrickedBlastFurnace extends GT_MetaTileEntity_PrimitiveBlastFurnace{ + private static final ITexture[] FACING_SIDE = {new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_DENSEBRICKS)}; + private static final ITexture[] FACING_FRONT = {new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_BRICKEDBLASTFURNACE_INACTIVE)}; + private static final ITexture[] FACING_ACTIVE = {new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_BRICKEDBLASTFURNACE_ACTIVE)}; + + public GT_MetaTileEntity_BrickedBlastFurnace(int aID, String aName, String aNameRegional) { + super(aID, aName, aNameRegional); + } + + public GT_MetaTileEntity_BrickedBlastFurnace(String aName) { + super(aName); + } + + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_BrickedBlastFurnace(this.mName); + } + + public String[] getDescription() { + return new String[]{ + "Controller Block for the Bricked Blast Furnace", + "Useable for Steel and general Pyrometallurgy", + "Size(WxHxD): 3x4x3 (Hollow, with opening on top)", + "Built from 32 Bricks", + "Causes 50 Pollution per second"}; + } + + public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { + if (aSide == aFacing) { + return aActive ? FACING_ACTIVE : FACING_FRONT; + } + return FACING_SIDE; + } + + @Override + protected boolean isCorrectCasingBlock(Block block) { + return true; + } + + @Override + protected boolean isCorrectCasingMetaID(int metaID) { + return true; + } + + @Override + public String getName() { + return "Bricked Blast Furnace"; + } +}
\ No newline at end of file diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BronzeBlastFurnace.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BronzeBlastFurnace.java index c46ad5e7bc..a6c6ea939c 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BronzeBlastFurnace.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BronzeBlastFurnace.java @@ -1,48 +1,24 @@ package gregtech.common.tileentities.machines.multi;
-import gregtech.GT_Mod;
import gregtech.api.GregTech_API;
-import gregtech.api.enums.Materials;
-import gregtech.api.enums.OrePrefixes;
import gregtech.api.enums.Textures;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.metatileentity.MetaTileEntity;
-import gregtech.api.objects.GT_ItemStack;
import gregtech.api.objects.GT_RenderedTexture;
-import gregtech.api.objects.XSTR;
-import gregtech.api.util.GT_OreDictUnificator;
-import gregtech.api.util.GT_Utility;
-import gregtech.common.GT_Pollution;
-import gregtech.common.gui.GT_Container_BronzeBlastFurnace;
-import gregtech.common.gui.GT_GUIContainer_BronzeBlastFurnace;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.init.Blocks;
-import net.minecraft.init.Items;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.world.World;
-import net.minecraftforge.common.util.ForgeDirection;
+import net.minecraft.block.Block;
public class GT_MetaTileEntity_BronzeBlastFurnace
- extends MetaTileEntity {
+ extends GT_MetaTileEntity_PrimitiveBlastFurnace {
private static final ITexture[] FACING_SIDE = {new GT_RenderedTexture(Textures.BlockIcons.MACHINE_BRONZEPLATEDBRICKS)};
private static final ITexture[] FACING_FRONT = {new GT_RenderedTexture(Textures.BlockIcons.MACHINE_BRONZEBLASTFURNACE)};
private static final ITexture[] FACING_ACTIVE = {new GT_RenderedTexture(Textures.BlockIcons.MACHINE_BRONZEBLASTFURNACE_ACTIVE)};
- public int mMaxProgresstime = 0;
- public int mUpdate = 5;
- public int mProgresstime = 0;
- public boolean mMachine = false;
- public ItemStack mOutputItem1;
- public ItemStack mOutputItem2;
public GT_MetaTileEntity_BronzeBlastFurnace(int aID, String aName, String aNameRegional) {
- super(aID, aName, aNameRegional, 4);
+ super(aID, aName, aNameRegional);
}
public GT_MetaTileEntity_BronzeBlastFurnace(String aName) {
- super(aName, 4);
+ super(aName);
}
public String[] getDescription() {
@@ -61,296 +37,20 @@ public class GT_MetaTileEntity_BronzeBlastFurnace return FACING_SIDE;
}
- public boolean isSteampowered() {
- return false;
+ @Override
+ protected boolean isCorrectCasingBlock(Block block) {
+ return block == GregTech_API.sBlockCasings1;
}
- public boolean isElectric() {
- return false;
+ @Override
+ protected boolean isCorrectCasingMetaID(int metaID) {
+ return metaID == 10;
}
- public boolean isPneumatic() {
- return false;
+ @Override
+ public String getName() {
+ return "Bronze Blast Furnace";
}
- public boolean isEnetInput() {
- return false;
- }
-
- public boolean isEnetOutput() {
- return false;
- }
-
- public boolean isInputFacing(byte aSide) {
- return false;
- }
-
- public boolean isOutputFacing(byte aSide) {
- return false;
- }
-
- public boolean isTeleporterCompatible() {
- return false;
- }
-
- public boolean isFacingValid(byte aFacing) {
- return aFacing > 1;
- }
-
- public boolean isAccessAllowed(EntityPlayer aPlayer) {
- return true;
- }
-
- public int getProgresstime() {
- return this.mProgresstime;
- }
-
- public int maxProgresstime() {
- return this.mMaxProgresstime;
- }
-
- public int increaseProgress(int aProgress) {
- this.mProgresstime += aProgress;
- return this.mMaxProgresstime - this.mProgresstime;
- }
-
- public boolean allowCoverOnSide(byte aSide, GT_ItemStack aCoverID) {
- return (GregTech_API.getCoverBehavior(aCoverID.toStack()).isSimpleCover()) && (super.allowCoverOnSide(aSide, aCoverID));
- }
-
- public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
- return new GT_MetaTileEntity_BronzeBlastFurnace(this.mName);
- }
-
- public void saveNBTData(NBTTagCompound aNBT) {
- aNBT.setInteger("mProgresstime", this.mProgresstime);
- aNBT.setInteger("mMaxProgresstime", this.mMaxProgresstime);
- if (this.mOutputItem1 != null) {
- NBTTagCompound tNBT = new NBTTagCompound();
- this.mOutputItem1.writeToNBT(tNBT);
- aNBT.setTag("mOutputItem1", tNBT);
- }
- if (this.mOutputItem2 != null) {
- NBTTagCompound tNBT = new NBTTagCompound();
- this.mOutputItem2.writeToNBT(tNBT);
- aNBT.setTag("mOutputItem2", tNBT);
- }
- }
-
- public void loadNBTData(NBTTagCompound aNBT) {
- this.mUpdate = 5;
- this.mProgresstime = aNBT.getInteger("mProgresstime");
- this.mMaxProgresstime = aNBT.getInteger("mMaxProgresstime");
- this.mOutputItem1 = GT_Utility.loadItem(aNBT, "mOutputItem1");
- this.mOutputItem2 = GT_Utility.loadItem(aNBT, "mOutputItem2");
- }
-
- public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) {
- if (aBaseMetaTileEntity.isClientSide()) {
- return true;
- }
- aBaseMetaTileEntity.openGUI(aPlayer);
- return true;
- }
-
- public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- return new GT_Container_BronzeBlastFurnace(aPlayerInventory, aBaseMetaTileEntity);
- }
-
- public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- return new GT_GUIContainer_BronzeBlastFurnace(aPlayerInventory, aBaseMetaTileEntity);
- }
-
- private boolean checkMachine() {
- int xDir = ForgeDirection.getOrientation(getBaseMetaTileEntity().getBackFacing()).offsetX;
- int zDir = ForgeDirection.getOrientation(getBaseMetaTileEntity().getBackFacing()).offsetZ;
- for (int i = -1; i < 2; i++) {
- for (int j = -1; j < 3; j++) {
- for (int k = -1; k < 2; k++) {
- if ((xDir + i != 0) || (j != 0) || (zDir + k != 0)) {
- if ((i != 0) || (j == -1) || (k != 0)) {
- if ((getBaseMetaTileEntity().getBlockOffset(xDir + i, j, zDir + k) != GregTech_API.sBlockCasings1) || (getBaseMetaTileEntity().getMetaIDOffset(xDir + i, j, zDir + k) != 10)) {
- return false;
- }
- } else if ((!GT_Utility.arrayContains(getBaseMetaTileEntity().getBlockOffset(xDir + i, j, zDir + k), new Object[]{Blocks.lava, Blocks.flowing_lava, null})) && (!getBaseMetaTileEntity().getAirOffset(xDir + i, j, zDir + k))) {
- return false;
- }
- }
- }
- }
- }
- return true;
- }
- public void onMachineBlockUpdate() {
- this.mUpdate = 5;
- }
-
- public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTimer) {
- if (aBaseMetaTileEntity.isServerSide()) {
- if (this.mUpdate-- == 0) {
- this.mMachine = checkMachine();
- }
- if (this.mMachine) {
- if (this.mMaxProgresstime > 0) {
- if (++this.mProgresstime >= this.mMaxProgresstime) {
- addOutputProducts();
- this.mOutputItem1 = null;
- this.mOutputItem2 = null;
- this.mProgresstime = 0;
- this.mMaxProgresstime = 0;
- GT_Mod.instance.achievements.issueAchievement(aBaseMetaTileEntity.getWorld().getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()), "steel");
- }
- } else if (aBaseMetaTileEntity.isAllowedToWork()) {
- checkRecipe();
- }
- }
- if(this.mMaxProgresstime>0 && (aTimer % 20L == 0L)){
- GT_Pollution.addPollution(getBaseMetaTileEntity(), 200);
- }
-
- aBaseMetaTileEntity.setActive((this.mMaxProgresstime > 0) && (this.mMachine));
- if (aBaseMetaTileEntity.isActive()) {
- if (aBaseMetaTileEntity.getAir(aBaseMetaTileEntity.getOffsetX(aBaseMetaTileEntity.getBackFacing(), 1), aBaseMetaTileEntity.getYCoord(), aBaseMetaTileEntity.getOffsetZ(aBaseMetaTileEntity.getBackFacing(), 1))) {
- aBaseMetaTileEntity.getWorld().setBlock(aBaseMetaTileEntity.getOffsetX(aBaseMetaTileEntity.getBackFacing(), 1), aBaseMetaTileEntity.getYCoord(), aBaseMetaTileEntity.getOffsetZ(aBaseMetaTileEntity.getBackFacing(), 1), Blocks.lava, 1, 2);
- this.mUpdate = 1;
- }
- if (aBaseMetaTileEntity.getAir(aBaseMetaTileEntity.getOffsetX(aBaseMetaTileEntity.getBackFacing(), 1), aBaseMetaTileEntity.getYCoord() + 1, aBaseMetaTileEntity.getOffsetZ(aBaseMetaTileEntity.getBackFacing(), 1))) {
- aBaseMetaTileEntity.getWorld().setBlock(aBaseMetaTileEntity.getOffsetX(aBaseMetaTileEntity.getBackFacing(), 1), aBaseMetaTileEntity.getYCoord() + 1, aBaseMetaTileEntity.getOffsetZ(aBaseMetaTileEntity.getBackFacing(), 1), Blocks.lava, 1, 2);
- this.mUpdate = 1;
- }
- } else {
- if (aBaseMetaTileEntity.getBlock(aBaseMetaTileEntity.getOffsetX(aBaseMetaTileEntity.getBackFacing(), 1), aBaseMetaTileEntity.getYCoord(), aBaseMetaTileEntity.getOffsetZ(aBaseMetaTileEntity.getBackFacing(), 1)) == Blocks.lava) {
- aBaseMetaTileEntity.getWorld().setBlock(aBaseMetaTileEntity.getOffsetX(aBaseMetaTileEntity.getBackFacing(), 1), aBaseMetaTileEntity.getYCoord(), aBaseMetaTileEntity.getOffsetZ(aBaseMetaTileEntity.getBackFacing(), 1), Blocks.air, 0, 2);
- this.mUpdate = 1;
- }
- if (aBaseMetaTileEntity.getBlock(aBaseMetaTileEntity.getOffsetX(aBaseMetaTileEntity.getBackFacing(), 1), aBaseMetaTileEntity.getYCoord() + 1, aBaseMetaTileEntity.getOffsetZ(aBaseMetaTileEntity.getBackFacing(), 1)) == Blocks.lava) {
- aBaseMetaTileEntity.getWorld().setBlock(aBaseMetaTileEntity.getOffsetX(aBaseMetaTileEntity.getBackFacing(), 1), aBaseMetaTileEntity.getYCoord() + 1, aBaseMetaTileEntity.getOffsetZ(aBaseMetaTileEntity.getBackFacing(), 1), Blocks.air, 0, 2);
- this.mUpdate = 1;
- }
- }
- }else if(aBaseMetaTileEntity.isActive()){
- World aWorld=aBaseMetaTileEntity.getWorld();
- double xPos=aBaseMetaTileEntity.getOffsetX(aBaseMetaTileEntity.getBackFacing(), 1);
- double yPos=aBaseMetaTileEntity.getOffsetY(aBaseMetaTileEntity.getBackFacing(), 1)+0.05F;
- double zPos=aBaseMetaTileEntity.getOffsetZ(aBaseMetaTileEntity.getBackFacing(), 1);
- XSTR floatGen=new XSTR();
- aWorld.spawnParticle("largesmoke", xPos + floatGen.nextFloat(), yPos, zPos + floatGen.nextFloat(), 0.0D, 0.3D, 0.0D);
- //Pollution particles intensify
- if(GT_Pollution.getPollution(getBaseMetaTileEntity())>GT_Mod.gregtechproxy.mPollutionSmogLimit){
- aWorld.spawnParticle("largesmoke", xPos + floatGen.nextFloat(), yPos, zPos + floatGen.nextFloat(), 0.0D, 0.45D, 0.0D);
- aWorld.spawnParticle("largesmoke", xPos + floatGen.nextFloat(), yPos, zPos + floatGen.nextFloat(), 0.0D, 0.6D, 0.0D);
- }
- }
- }
-
- private void addOutputProducts() {
- if (this.mOutputItem1 != null) {
- if (this.mInventory[2] == null) {
- this.mInventory[2] = GT_Utility.copy(new Object[]{this.mOutputItem1});
- } else if (GT_Utility.areStacksEqual(this.mInventory[2], this.mOutputItem1)) {
- this.mInventory[2].stackSize = Math.min(this.mOutputItem1.getMaxStackSize(), this.mOutputItem1.stackSize + this.mInventory[2].stackSize);
- }
- }
- if (this.mOutputItem2 != null) {
- if (this.mInventory[3] == null) {
- this.mInventory[3] = GT_Utility.copy(new Object[]{this.mOutputItem2});
- } else if (GT_Utility.areStacksEqual(this.mInventory[3], this.mOutputItem2)) {
- this.mInventory[3].stackSize = Math.min(this.mOutputItem2.getMaxStackSize(), this.mOutputItem2.stackSize + this.mInventory[3].stackSize);
- }
- }
- }
-
- private boolean spaceForOutput(ItemStack aStack1, ItemStack aStack2) {
- if (((this.mInventory[2] == null) || (aStack1 == null) || ((this.mInventory[2].stackSize + aStack1.stackSize <= this.mInventory[2].getMaxStackSize()) && (GT_Utility.areStacksEqual(this.mInventory[2], aStack1)))) && (
- (this.mInventory[3] == null) || (aStack2 == null) || ((this.mInventory[3].stackSize + aStack2.stackSize <= this.mInventory[3].getMaxStackSize()) && (GT_Utility.areStacksEqual(this.mInventory[3], aStack2))))) {
- return true;
- }
- return false;
- }
-
- private boolean checkRecipe() {
- if (!this.mMachine) {
- return false;
- }
- if ((this.mInventory[0] != null) && (this.mInventory[1] != null) && (this.mInventory[0].stackSize >= 1)) {
- if ((GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[0], "dustIron")) || (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[0], "ingotIron"))) {
- if ((this.mInventory[1].getItem() == Items.coal) && (this.mInventory[1].stackSize >= 4) && (spaceForOutput(this.mOutputItem1 = GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 1L), this.mOutputItem2 = GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.DarkAsh, 4L)))) {
- getBaseMetaTileEntity().decrStackSize(0, 1);
- getBaseMetaTileEntity().decrStackSize(1, 4);
- this.mMaxProgresstime = 7200;
- return true;
- }
- if ((GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[1], "fuelCoke")) && (this.mInventory[1].stackSize >= 2) && (spaceForOutput(this.mOutputItem1 = GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 1L), this.mOutputItem2 = GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Ash, 4L)))) {
- getBaseMetaTileEntity().decrStackSize(0, 1);
- getBaseMetaTileEntity().decrStackSize(1, 2);
- this.mMaxProgresstime = 4800;
- return true;
- }
- if ((this.mInventory[0].stackSize >= 9) && ((GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[1], "blockCoal")) || (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[1], "blockCharcoal"))) && (this.mInventory[1].stackSize >= 4) && (spaceForOutput(this.mOutputItem1 = GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 9L), this.mOutputItem2 = GT_OreDictUnificator.get(OrePrefixes.dust, Materials.DarkAsh, 4L)))) {
- getBaseMetaTileEntity().decrStackSize(0, 9);
- getBaseMetaTileEntity().decrStackSize(1, 4);
- this.mMaxProgresstime = 64800;
- return true;
- }
- } else if (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[0], "dustSteel")) {
- if ((this.mInventory[1].getItem() == Items.coal) && (this.mInventory[1].stackSize >= 2) && (spaceForOutput(this.mOutputItem1 = GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 1L), this.mOutputItem2 = GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.DarkAsh, 2L)))) {
- getBaseMetaTileEntity().decrStackSize(0, 1);
- getBaseMetaTileEntity().decrStackSize(1, 2);
- this.mMaxProgresstime = 3600;
- return true;
- }
- if ((GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[1], "fuelCoke")) && (this.mInventory[1].stackSize >= 1) && (spaceForOutput(this.mOutputItem1 = GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 1L), this.mOutputItem2 = GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Ash, 2L)))) {
- getBaseMetaTileEntity().decrStackSize(0, 1);
- getBaseMetaTileEntity().decrStackSize(1, 1);
- this.mMaxProgresstime = 2400;
- return true;
- }
- if ((this.mInventory[0].stackSize >= 9) && ((GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[1], "blockCoal")) || (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[1], "blockCharcoal"))) && (this.mInventory[1].stackSize >= 2) && (spaceForOutput(this.mOutputItem1 = GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 9L), this.mOutputItem2 = GT_OreDictUnificator.get(OrePrefixes.dust, Materials.DarkAsh, 2L)))) {
- getBaseMetaTileEntity().decrStackSize(0, 9);
- getBaseMetaTileEntity().decrStackSize(1, 2);
- this.mMaxProgresstime = 32400;
- return true;
- }
- } else if (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[0], "blockIron")) {
- if ((this.mInventory[1].getItem() == Items.coal) && (this.mInventory[1].stackSize >= 36) && (spaceForOutput(this.mOutputItem1 = GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 9L), this.mOutputItem2 = GT_OreDictUnificator.get(OrePrefixes.dust, Materials.DarkAsh, 4L)))) {
- getBaseMetaTileEntity().decrStackSize(0, 1);
- getBaseMetaTileEntity().decrStackSize(1, 36);
- this.mMaxProgresstime = 64800;
- return true;
- }
- if ((GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[1], "fuelCoke")) && (this.mInventory[1].stackSize >= 18) && (spaceForOutput(this.mOutputItem1 = GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 9L), this.mOutputItem2 = GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Ash, 4L)))) {
- getBaseMetaTileEntity().decrStackSize(0, 1);
- getBaseMetaTileEntity().decrStackSize(1, 18);
- this.mMaxProgresstime = 43200;
- return true;
- }
- if (((GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[1], "blockCoal")) || (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[1], "blockCharcoal"))) && (this.mInventory[1].stackSize >= 4) && (spaceForOutput(this.mOutputItem1 = GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 9L), this.mOutputItem2 = GT_OreDictUnificator.get(OrePrefixes.dust, Materials.DarkAsh, 4L)))) {
- getBaseMetaTileEntity().decrStackSize(0, 1);
- getBaseMetaTileEntity().decrStackSize(1, 4);
- this.mMaxProgresstime = 64800;
- return true;
- }
- }
- }
- this.mOutputItem1 = null;
- this.mOutputItem2 = null;
- return false;
- }
-
- public boolean isGivingInformation() {
- return false;
- }
-
- public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
- return aIndex > 1;
- }
-
- public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
- return !GT_Utility.areStacksEqual(aStack, this.mInventory[0]);
- }
-
- public byte getTileEntityBaseType() {
- return 0;
- }
-}
+}
\ No newline at end of file diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PrimitiveBlastFurnace.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PrimitiveBlastFurnace.java new file mode 100644 index 0000000000..769688f43b --- /dev/null +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PrimitiveBlastFurnace.java @@ -0,0 +1,326 @@ +package gregtech.common.tileentities.machines.multi; + +import gregtech.GT_Mod; +import gregtech.api.GregTech_API; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.objects.GT_ItemStack; +import gregtech.api.objects.XSTR; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Utility; +import gregtech.common.GT_Pollution; +import gregtech.common.gui.GT_Container_PrimitiveBlastFurnace; +import gregtech.common.gui.GT_GUIContainer_PrimitiveBlastFurnace; +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.world.ChunkPosition; +import net.minecraftforge.common.util.ForgeDirection; + +public abstract class GT_MetaTileEntity_PrimitiveBlastFurnace extends MetaTileEntity { + public static final int INPUT_SLOTS = 3, OUTPUT_SLOTS = 3; + + public int mMaxProgresstime = 0; + public int mUpdate = 5; + public int mProgresstime = 0; + public boolean mMachine = false; + + public ItemStack[] mOutputItems = new ItemStack[OUTPUT_SLOTS]; + + @Deprecated + public ItemStack mOutputItem1; + @Deprecated + public ItemStack mOutputItem2; + + public GT_MetaTileEntity_PrimitiveBlastFurnace(int aID, String aName, String aNameRegional) { + super(aID, aName, aNameRegional, INPUT_SLOTS + OUTPUT_SLOTS); + } + + public GT_MetaTileEntity_PrimitiveBlastFurnace(String aName) { + super(aName, INPUT_SLOTS + OUTPUT_SLOTS); + } + + public boolean isSteampowered() { + return false; + } + + public boolean isElectric() { + return false; + } + + public boolean isPneumatic() { + return false; + } + + public boolean isEnetInput() { + return false; + } + + public boolean isEnetOutput() { + return false; + } + + public boolean isInputFacing(byte aSide) { + return false; + } + + public boolean isOutputFacing(byte aSide) { + return false; + } + + public boolean isTeleporterCompatible() { + return false; + } + + public boolean isFacingValid(byte aFacing) { + return aFacing > 1; + } + + public boolean isAccessAllowed(EntityPlayer aPlayer) { + return true; + } + + public int getProgresstime() { + return this.mProgresstime; + } + + public int maxProgresstime() { + return this.mMaxProgresstime; + } + + public int increaseProgress(int aProgress) { + this.mProgresstime += aProgress; + return this.mMaxProgresstime - this.mProgresstime; + } + + public boolean allowCoverOnSide(byte aSide, GT_ItemStack aCoverID) { + return (GregTech_API.getCoverBehavior(aCoverID.toStack()).isSimpleCover()) && (super.allowCoverOnSide(aSide, aCoverID)); + } + + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_BronzeBlastFurnace(this.mName); + } + + public void saveNBTData(NBTTagCompound aNBT) { + aNBT.setInteger("mProgresstime", this.mProgresstime); + aNBT.setInteger("mMaxProgresstime", this.mMaxProgresstime); + if (this.mOutputItems != null) { + for (int i = 0; i < mOutputItems.length; i++) { + if (this.mOutputItems[i] != null) { + NBTTagCompound tNBT = new NBTTagCompound(); + this.mOutputItems[i].writeToNBT(tNBT); + aNBT.setTag("mOutputItem" + i, tNBT); + } + } + } + } + + public void loadNBTData(NBTTagCompound aNBT) { + this.mUpdate = 5; + this.mProgresstime = aNBT.getInteger("mProgresstime"); + this.mMaxProgresstime = aNBT.getInteger("mMaxProgresstime"); + this.mOutputItems = new ItemStack[OUTPUT_SLOTS]; + for (int i = 0; i < OUTPUT_SLOTS; i++) { + this.mOutputItems[i] = GT_Utility.loadItem(aNBT, "mOutputItem" + i); + } + } + + public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) { + if (aBaseMetaTileEntity.isClientSide()) { + return true; + } + aBaseMetaTileEntity.openGUI(aPlayer); + return true; + } + + public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + return new GT_Container_PrimitiveBlastFurnace(aPlayerInventory, aBaseMetaTileEntity); + } + + public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + return new GT_GUIContainer_PrimitiveBlastFurnace(aPlayerInventory, aBaseMetaTileEntity, getName()); + } + + private boolean checkMachine() { + int xDir = ForgeDirection.getOrientation(getBaseMetaTileEntity().getBackFacing()).offsetX; + int zDir = ForgeDirection.getOrientation(getBaseMetaTileEntity().getBackFacing()).offsetZ; + for (int i = -1; i < 2; i++) { + for (int j = -1; j < 3; j++) { + for (int k = -1; k < 2; k++) { + if ((xDir + i != 0) || (j != 0) || (zDir + k != 0)) { + if ((i != 0) || (j == -1) || (k != 0)) { + if (!isCorrectCasingBlock(getBaseMetaTileEntity().getBlockOffset(xDir + i, j, zDir + k)) + || !isCorrectCasingMetaID(getBaseMetaTileEntity().getMetaIDOffset(xDir + i, j, zDir + k))) { + return false; + } + } else if ((!GT_Utility.arrayContains(getBaseMetaTileEntity().getBlockOffset(xDir + i, j, zDir + k), + new Object[] { Blocks.lava, Blocks.flowing_lava, null })) + && (!getBaseMetaTileEntity().getAirOffset(xDir + i, j, zDir + k))) { + return false; + } + } + } + } + } + return true; + } + + protected abstract boolean isCorrectCasingBlock(Block block); + + protected abstract boolean isCorrectCasingMetaID(int metaID); + + public void onMachineBlockUpdate() { + this.mUpdate = 5; + } + + public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTimer) { + if ((aBaseMetaTileEntity.isClientSide()) && (aBaseMetaTileEntity.isActive())) { + aBaseMetaTileEntity.getWorld().spawnParticle("largesmoke", + aBaseMetaTileEntity.getOffsetX(aBaseMetaTileEntity.getBackFacing(), 1) + (new XSTR()).nextFloat(), + aBaseMetaTileEntity.getOffsetY(aBaseMetaTileEntity.getBackFacing(), 1), + aBaseMetaTileEntity.getOffsetZ(aBaseMetaTileEntity.getBackFacing(), 1) + (new XSTR()).nextFloat(), 0.0D, 0.3D, 0.0D); + } + if (aBaseMetaTileEntity.isServerSide()) { + if (this.mUpdate-- == 0) { + this.mMachine = checkMachine(); + } + if (this.mMachine) { + if (this.mMaxProgresstime > 0) { + if (++this.mProgresstime >= this.mMaxProgresstime) { + addOutputProducts(); + this.mOutputItems = null; + this.mProgresstime = 0; + this.mMaxProgresstime = 0; + GT_Mod.achievements.issueAchievement( + aBaseMetaTileEntity.getWorld().getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()), "steel"); + } + } else if (aBaseMetaTileEntity.isAllowedToWork()) { + checkRecipe(); + } + } + if (this.mMaxProgresstime > 0 && (aTimer % 20L == 0L)) { + GT_Pollution.addPollution(this.getBaseMetaTileEntity().getWorld(), + new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), + this.getBaseMetaTileEntity().getZCoord()), + 50); + } + + aBaseMetaTileEntity.setActive((this.mMaxProgresstime > 0) && (this.mMachine)); + if (aBaseMetaTileEntity.isActive()) { + if (aBaseMetaTileEntity.getAir(aBaseMetaTileEntity.getOffsetX(aBaseMetaTileEntity.getBackFacing(), 1), + aBaseMetaTileEntity.getYCoord(), aBaseMetaTileEntity.getOffsetZ(aBaseMetaTileEntity.getBackFacing(), 1))) { + aBaseMetaTileEntity.getWorld().setBlock(aBaseMetaTileEntity.getOffsetX(aBaseMetaTileEntity.getBackFacing(), 1), + aBaseMetaTileEntity.getYCoord(), aBaseMetaTileEntity.getOffsetZ(aBaseMetaTileEntity.getBackFacing(), 1), + Blocks.lava, 1, 2); + this.mUpdate = 1; + } + if (aBaseMetaTileEntity.getAir(aBaseMetaTileEntity.getOffsetX(aBaseMetaTileEntity.getBackFacing(), 1), + aBaseMetaTileEntity.getYCoord() + 1, aBaseMetaTileEntity.getOffsetZ(aBaseMetaTileEntity.getBackFacing(), 1))) { + aBaseMetaTileEntity.getWorld().setBlock(aBaseMetaTileEntity.getOffsetX(aBaseMetaTileEntity.getBackFacing(), 1), + aBaseMetaTileEntity.getYCoord() + 1, aBaseMetaTileEntity.getOffsetZ(aBaseMetaTileEntity.getBackFacing(), 1), + Blocks.lava, 1, 2); + this.mUpdate = 1; + } + } else { + if (aBaseMetaTileEntity.getBlock(aBaseMetaTileEntity.getOffsetX(aBaseMetaTileEntity.getBackFacing(), 1), + aBaseMetaTileEntity.getYCoord(), + aBaseMetaTileEntity.getOffsetZ(aBaseMetaTileEntity.getBackFacing(), 1)) == Blocks.lava) { + aBaseMetaTileEntity.getWorld().setBlock(aBaseMetaTileEntity.getOffsetX(aBaseMetaTileEntity.getBackFacing(), 1), + aBaseMetaTileEntity.getYCoord(), aBaseMetaTileEntity.getOffsetZ(aBaseMetaTileEntity.getBackFacing(), 1), + Blocks.air, 0, 2); + this.mUpdate = 1; + } + if (aBaseMetaTileEntity.getBlock(aBaseMetaTileEntity.getOffsetX(aBaseMetaTileEntity.getBackFacing(), 1), + aBaseMetaTileEntity.getYCoord() + 1, + aBaseMetaTileEntity.getOffsetZ(aBaseMetaTileEntity.getBackFacing(), 1)) == Blocks.lava) { + aBaseMetaTileEntity.getWorld().setBlock(aBaseMetaTileEntity.getOffsetX(aBaseMetaTileEntity.getBackFacing(), 1), + aBaseMetaTileEntity.getYCoord() + 1, aBaseMetaTileEntity.getOffsetZ(aBaseMetaTileEntity.getBackFacing(), 1), + Blocks.air, 0, 2); + this.mUpdate = 1; + } + } + } + } + + private void addOutputProducts() { + if (this.mOutputItems == null) { + return; + } + int limit = Math.min(mOutputItems.length, OUTPUT_SLOTS); + for (int i = 0; i < limit; i++) { + int absi = INPUT_SLOTS + i; + if (this.mInventory[absi] == null) { + this.mInventory[absi] = GT_Utility.copy(this.mOutputItems[i]); + } else if (GT_Utility.areStacksEqual(this.mInventory[absi], this.mOutputItems[i])) { + this.mInventory[absi].stackSize = Math.min(this.mInventory[absi].getMaxStackSize(), + this.mInventory[absi].stackSize + this.mOutputItems[i].stackSize); + } + } + } + + private boolean spaceForOutput(ItemStack outputStack, int relativeOutputSlot) { + int absoluteSlot = relativeOutputSlot + INPUT_SLOTS; + if (this.mInventory[absoluteSlot] == null || outputStack == null) { + return true; + } + if (((this.mInventory[absoluteSlot].stackSize + outputStack.stackSize <= this.mInventory[absoluteSlot].getMaxStackSize()) + && (GT_Utility.areStacksEqual(this.mInventory[absoluteSlot], outputStack)))) { + return true; + } + return false; + } + + private boolean checkRecipe() { + if (!this.mMachine) { + return false; + } + ItemStack[] inputs = new ItemStack[INPUT_SLOTS]; + System.arraycopy(mInventory, 0, inputs, 0, INPUT_SLOTS); + GT_Recipe recipe = GT_Recipe.GT_Recipe_Map.sPrimitiveBlastRecipes.findRecipe(getBaseMetaTileEntity(), false, 0, null, inputs); + if (recipe == null) { + this.mOutputItems = null; + return false; + } + for (int i = 0; i < OUTPUT_SLOTS; i++) { + if (!spaceForOutput(recipe.getOutput(i), i)) { + this.mOutputItems = null; + return false; + } + } + + if (!recipe.isRecipeInputEqual(true, null, inputs)) { + this.mOutputItems = null; + return false; + } + for (int i = 0; i < INPUT_SLOTS; i++) { + if (mInventory[i] != null && mInventory[i].stackSize == 0) { + mInventory[i] = null; + } + } + + this.mMaxProgresstime = recipe.mDuration; + this.mOutputItems = recipe.mOutputs; + return true; + } + + public boolean isGivingInformation() { + return false; + } + + public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + return aIndex > INPUT_SLOTS; + } + + public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + return !GT_Utility.areStacksEqual(aStack, this.mInventory[0]); + } + + public byte getTileEntityBaseType() { + return 0; + } + + public abstract String getName(); +}
\ No newline at end of file diff --git a/src/main/java/gregtech/loaders/postload/GT_CraftingRecipeLoader.java b/src/main/java/gregtech/loaders/postload/GT_CraftingRecipeLoader.java index 6d30688e12..3957c64688 100644 --- a/src/main/java/gregtech/loaders/postload/GT_CraftingRecipeLoader.java +++ b/src/main/java/gregtech/loaders/postload/GT_CraftingRecipeLoader.java @@ -807,11 +807,16 @@ public class GT_CraftingRecipeLoader implements Runnable { } if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, "QBoots", false)) { GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item("quantumBoots", 1L)); + + + } if (Loader.isModLoaded("GraviSuite")) { GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getModItem("GraviSuite", "advNanoChestPlate", 1, GT_Values.W)); GT_ModHandler.addCraftingRecipe(GT_ModHandler.getModItem("GraviSuite", "advNanoChestPlate", 1, GT_Values.W), new Object[]{"CJC", "CNC", "WPW", 'C', OrePrefixes.plateAlloy.get(Materials.Carbon), 'J', GT_ModHandler.getModItem("GraviSuite", "advJetpack", 1, GT_Values.W), 'N', GT_ModHandler.getIC2Item("nanoBodyarmor", 1L), 'W', OrePrefixes.wireGt04.get(Materials.Platinum), 'P', OrePrefixes.circuit.get(Materials.Data)}); } - } + + GT_ModHandler.addShapelessCraftingRecipe(Materials.Fireclay.getDust(2), new Object[]{Materials.Brick.getDust(1), Materials.Clay.getDust(1)}); + } } diff --git a/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java b/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java index 1e1d923e81..62cb0f674f 100644 --- a/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java +++ b/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java @@ -94,6 +94,7 @@ public class GT_MachineRecipeLoader implements Runnable { GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(tPrefix, Materials.Saltpeter, 2L), GT_OreDictUnificator.get(tPrefix, Materials.Sulfur, 1L), GT_OreDictUnificator.get(tPrefix, Materials.Carbon, 3L), GT_Values.NI, GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.Gunpowder, 6L * tPrefix.mMaterialAmount), (int) (600L * tPrefix.mMaterialAmount / 3628800L), 8); GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(tPrefix, Materials.Indium, 1L), GT_OreDictUnificator.get(tPrefix, Materials.Gallium, 1L), GT_OreDictUnificator.get(tPrefix, Materials.Phosphor, 1L), null, GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.IndiumGalliumPhosphide, 3L * tPrefix.mMaterialAmount), (int) (200L * tPrefix.mMaterialAmount / 3628800L), 8); + GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(tPrefix, Materials.Brick, 1L), GT_OreDictUnificator.get(tPrefix, Materials.Clay, 1L), GT_Values.NI, GT_Values.NI, GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.Fireclay, 2L * tPrefix.mMaterialAmount), (int) (200L * tPrefix.mMaterialAmount / 3628800L), 8); GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(tPrefix, Materials.Nickel, 4L), GT_OreDictUnificator.get(tPrefix, Materials.Chrome, 1L), GT_Values.NI, GT_Values.NI, GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.Nichrome, 5L * tPrefix.mMaterialAmount), (int) (500L * tPrefix.mMaterialAmount / 3628800L), 120); GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(tPrefix, Materials.Osmium, 1L), GT_OreDictUnificator.get(tPrefix, Materials.Iridium, 3L), GT_Values.NI, GT_Values.NI, GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.Osmiridium, 4L * tPrefix.mMaterialAmount), (int) (400L * tPrefix.mMaterialAmount / 3628800L), 2000); @@ -1015,6 +1016,10 @@ public class GT_MachineRecipeLoader implements Runnable { GT_ModHandler.addCompressionRecipe(new ItemStack(Items.quartz, 4, 0), new ItemStack(Blocks.quartz_block, 1, 0)); //GT_ModHandler.addCompressionRecipe(new ItemStack(Items.wheat, 9, 0), new ItemStack(Blocks.hay_block, 1, 0)); GT_ModHandler.addCompressionRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Glowstone, 4L), new ItemStack(Blocks.glowstone, 1)); + + GT_ModHandler.addCompressionRecipe(Materials.Fireclay.getDust(1), ItemList.CompressedFireclay.get(1)); + GameRegistry.addSmelting(ItemList.CompressedFireclay.get(1, new Object[0]), ItemList.Firebrick.get(1, new Object[0]), 0); + GT_Values.RA.addCutterRecipe(GT_OreDictUnificator.get(OrePrefixes.block, Materials.Graphite, 1L), GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Graphite, 9L), GT_Values.NI, 500, 48); GT_ModHandler.removeFurnaceSmelting(GT_OreDictUnificator.get(OrePrefixes.ore, Materials.Graphite, 1L)); GT_ModHandler.addSmeltingRecipe(GT_OreDictUnificator.get(OrePrefixes.ore, Materials.Graphite, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Graphite, 1L)); @@ -1036,22 +1041,32 @@ public class GT_MachineRecipeLoader implements Runnable { GT_ModHandler.addPulverisationRecipe(new ItemStack(Items.item_frame, 1, 32767), new ItemStack(Items.leather, 1), GT_OreDictUnificator.getDust(Materials.Wood, OrePrefixes.stick.mMaterialAmount * 4L), 95, false); GT_ModHandler.addPulverisationRecipe(new ItemStack(Items.bow, 1, 0), new ItemStack(Items.string, 3), GT_OreDictUnificator.getDust(Materials.Wood, OrePrefixes.stick.mMaterialAmount * 3L), 95, false); - GT_Values.RA.addForgeHammerRecipe(new ItemStack(Blocks.stonebrick, 1, 0), new ItemStack(Blocks.stonebrick, 1, 2), 16, 10); - GT_Values.RA.addForgeHammerRecipe(new ItemStack(Blocks.stone, 1, 0), new ItemStack(Blocks.cobblestone, 1, 0), 16, 10); - GT_Values.RA.addForgeHammerRecipe(new ItemStack(Blocks.cobblestone, 1, 0), new ItemStack(Blocks.gravel, 1, 0), 16, 10); - GT_Values.RA.addForgeHammerRecipe(new ItemStack(Blocks.gravel, 1, 0), new ItemStack(Blocks.sand, 1, 0), 16, 10); + GT_Values.RA.addForgeHammerRecipe(new ItemStack(Blocks.stonebrick, 1, 0), new ItemStack(Blocks.stonebrick, 1, 2), 10, 16); + GT_Values.RA.addForgeHammerRecipe(new ItemStack(Blocks.stone, 1, 0), new ItemStack(Blocks.cobblestone, 1, 0), 10, 16); + GT_Values.RA.addForgeHammerRecipe(new ItemStack(Blocks.cobblestone, 1, 0), new ItemStack(Blocks.gravel, 1, 0), 10, 16); + GT_Values.RA.addForgeHammerRecipe(new ItemStack(Blocks.gravel, 1, 0), new ItemStack(Blocks.sand, 1, 0), 10, 16); GT_Values.RA.addSifterRecipe(new ItemStack(Blocks.gravel, 1, 0), new ItemStack[] {new ItemStack(Items.flint, 1, 0)}, new int[] {10000}, 800, 16); - GT_Values.RA.addForgeHammerRecipe(new ItemStack(Blocks.sandstone, 1, 32767), new ItemStack(Blocks.sand, 1, 0), 16, 10); - GT_Values.RA.addForgeHammerRecipe(new ItemStack(Blocks.ice, 1, 0), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Ice, 1L), 16, 10); - GT_Values.RA.addForgeHammerRecipe(new ItemStack(Blocks.packed_ice, 1, 0), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Ice, 2L), 16, 10); + GT_Values.RA.addForgeHammerRecipe(new ItemStack(Blocks.sandstone, 1, 32767), new ItemStack(Blocks.sand, 1, 0), 10, 16); + GT_Values.RA.addForgeHammerRecipe(new ItemStack(Blocks.ice, 1, 0), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Ice, 1L), 10, 16); + GT_Values.RA.addForgeHammerRecipe(new ItemStack(Blocks.packed_ice, 1, 0), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Ice, 2L), 10, 16); //GT_Values.RA.addForgeHammerRecipe(new ItemStack(Blocks.hardened_clay, 1, 0), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Clay, 1L), 16, 10); //GT_Values.RA.addForgeHammerRecipe(new ItemStack(Blocks.stained_hardened_clay, 1, 32767), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Clay, 1L), 16, 10); - GT_Values.RA.addForgeHammerRecipe(new ItemStack(Blocks.brick_block, 1, 0), new ItemStack(Items.brick, 3, 0), 16, 10); - GT_Values.RA.addForgeHammerRecipe(new ItemStack(Blocks.nether_brick, 1, 0), new ItemStack(Items.netherbrick, 3, 0), 16, 10); - GT_Values.RA.addForgeHammerRecipe(new ItemStack(Blocks.stained_glass, 1, 32767), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Glass, 1L), 16, 10); - GT_Values.RA.addForgeHammerRecipe(new ItemStack(Blocks.glass, 1, 32767), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Glass, 1L), 16, 10); - GT_Values.RA.addForgeHammerRecipe(new ItemStack(Blocks.stained_glass_pane, 1, 32767), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Glass, 3L), 16, 10); - GT_Values.RA.addForgeHammerRecipe(new ItemStack(Blocks.glass_pane, 1, 32767), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Glass, 3L), 16, 10); + GT_Values.RA.addForgeHammerRecipe(new ItemStack(Blocks.brick_block, 1, 0), new ItemStack(Items.brick, 3, 0), 10, 16); + GT_Values.RA.addForgeHammerRecipe(new ItemStack(Blocks.nether_brick, 1, 0), new ItemStack(Items.netherbrick, 3, 0), 10, 16); + GT_Values.RA.addForgeHammerRecipe(new ItemStack(Blocks.stained_glass, 1, 32767), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Glass, 1L), 10, 16); + GT_Values.RA.addForgeHammerRecipe(new ItemStack(Blocks.glass, 1, 32767), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Glass, 1L), 10, 10); + GT_Values.RA.addForgeHammerRecipe(new ItemStack(Blocks.stained_glass_pane, 1, 32767), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Glass, 3L), 10, 16); + GT_Values.RA.addForgeHammerRecipe(new ItemStack(Blocks.glass_pane, 1, 32767), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Glass, 3L), 10, 16); + + GT_Values.RA.addForgeHammerRecipe(Materials.Brick.getIngots(1), Materials.Brick.getDustSmall(1), 10, 16); + GT_Values.RA.addForgeHammerRecipe(ItemList.Firebrick.get(1, new Object[0]), Materials.Brick.getDust(1), 10, 16); + GT_Values.RA.addForgeHammerRecipe(ItemList.Casing_Firebricks.get(1, new Object[0]), ItemList.Firebrick.get(3, new Object[0]), 10, 16); + + GT_ModHandler.addPulverisationRecipe(Materials.Brick.getIngots(1), Materials.Brick.getDustSmall(1)); + GT_ModHandler.addPulverisationRecipe(ItemList.CompressedFireclay.get(1, new Object[0]), Materials.Fireclay.getDustSmall(1)); + GT_ModHandler.addPulverisationRecipe(ItemList.Firebrick.get(1, new Object[0]), Materials.Brick.getDust(1)); + GT_ModHandler.addPulverisationRecipe(ItemList.Casing_Firebricks.get(1, new Object[0]), Materials.Brick.getDust(4)); + GT_ModHandler.addPulverisationRecipe(ItemList.Machine_Bricked_BlastFurnace.get(1, new Object[0]), Materials.Brick.getDust(8), Materials.Iron.getDust(1), true); GT_Values.RA.addForgeHammerRecipe(GT_ModHandler.getModItem("HardcoreEnderExpansion", "endium_ore", 1), GT_OreDictUnificator.get(OrePrefixes.crushed, Materials.HeeEndium, 1), 16, 10); GT_ModHandler.addPulverisationRecipe(GT_ModHandler.getModItem("HardcoreEnderExpansion", "endium_ore", 1), GT_OreDictUnificator.get(OrePrefixes.crushed, Materials.HeeEndium, 2), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Endstone, 1), 50, GT_Values.NI, 0, true); @@ -1809,6 +1824,7 @@ public class GT_MachineRecipeLoader implements Runnable { GT_Values.RA.addAutoclaveRecipe(Materials.SiliconDioxide.getDust(1), GT_ModHandler.getDistilledWater(200L), Materials.Quartzite.getGems(1), 1000, 1500, 24); addRecipesMay2017OilRefining(); + addPrimitiveBlastFurnaceRecipes(); } public void addProcess(ItemStack tCrop, Materials aMaterial, int chance, boolean aMainOutput) { @@ -3011,4 +3027,12 @@ public class GT_MachineRecipeLoader implements Runnable { if(!(FluidRegistry.getFluid("potion."+aName+".long")==null||FluidRegistry.getFluid("potion."+aName+".long.splash")==null)) GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Gunpowder, 1L), null, null, null, new FluidStack(FluidRegistry.getFluid("potion."+aName+".long"),750), new FluidStack(FluidRegistry.getFluid("potion."+aName+".long.splash"),750), null, 200, 24); } + + private void addPrimitiveBlastFurnaceRecipes() { + GT_Values.RA.addPrimitiveBlastRecipe(Materials.Iron.getIngots(1), GT_Values.NI, 4, Materials.Steel.getIngots(1), GT_Values.NI, 7200); + GT_Values.RA.addPrimitiveBlastRecipe(Materials.Iron.getDust(1), GT_Values.NI, 4, Materials.Steel.getIngots(1), GT_Values.NI, 7200); + GT_Values.RA.addPrimitiveBlastRecipe(GT_OreDictUnificator.get(OrePrefixes.block, Materials.Iron, 1), GT_Values.NI, 36, Materials.Steel.getIngots(9), GT_Values.NI, 7200); + GT_Values.RA.addPrimitiveBlastRecipe(Materials.Steel.getDust(1), GT_Values.NI, 2, Materials.Steel.getIngots(1), GT_Values.NI, 7200); + + } } diff --git a/src/main/java/gregtech/loaders/preload/GT_Loader_ItemData.java b/src/main/java/gregtech/loaders/preload/GT_Loader_ItemData.java index c010c055f6..8c76d63991 100644 --- a/src/main/java/gregtech/loaders/preload/GT_Loader_ItemData.java +++ b/src/main/java/gregtech/loaders/preload/GT_Loader_ItemData.java @@ -47,7 +47,7 @@ public class GT_Loader_ItemData GT_OreDictUnificator.addItemData(new ItemStack(Blocks.clay, 1, 32767), new ItemData(Materials.Clay, 7257600L, new MaterialStack[0]));
GT_OreDictUnificator.addItemData(new ItemStack(Blocks.hardened_clay, 1, 32767), new ItemData(Materials.Clay, 3628800L, new MaterialStack[0]));
GT_OreDictUnificator.addItemData(new ItemStack(Blocks.stained_hardened_clay, 1, 32767), new ItemData(Materials.Clay, 3628800L, new MaterialStack[0]));
- GT_OreDictUnificator.addItemData(new ItemStack(Blocks.brick_block, 1, 32767), new ItemData(Materials.Clay, 3628800L, new MaterialStack[0]));
+ GT_OreDictUnificator.addItemData(new ItemStack(Blocks.brick_block, 1, 32767), new ItemData(Materials.Brick, 3628800L, new MaterialStack[0]));
GT_OreDictUnificator.addItemData(GT_ModHandler.getIC2Item("Uran238", 1L), new ItemData(Materials.Uranium, 3628800L, new MaterialStack[0]));
GT_OreDictUnificator.addItemData(GT_ModHandler.getIC2Item("Uran235", 1L), new ItemData(Materials.Uranium235, 3628800L, new MaterialStack[0]));
GT_OreDictUnificator.addItemData(GT_ModHandler.getIC2Item("Plutonium", 1L), new ItemData(Materials.Plutonium, 3628800L, new MaterialStack[0]));
diff --git a/src/main/java/gregtech/loaders/preload/GT_Loader_MetaTileEntities.java b/src/main/java/gregtech/loaders/preload/GT_Loader_MetaTileEntities.java index dcef0d7dee..1b7ac5a5ae 100644 --- a/src/main/java/gregtech/loaders/preload/GT_Loader_MetaTileEntities.java +++ b/src/main/java/gregtech/loaders/preload/GT_Loader_MetaTileEntities.java @@ -116,6 +116,11 @@ public class GT_Loader_MetaTileEntities implements Runnable {//TODO CHECK CIRCUI //GT_ModHandler.addShapelessCraftingRecipe(ItemList.Casing_Coil_Kanthal.get(1L, new Object[0]), bits, new Object[] {ItemList.Casing_Coil_Kanthal_Deprecated}); //GT_ModHandler.addShapelessCraftingRecipe(ItemList.Casing_Coil_Nichrome.get(1L, new Object[0]), bits, new Object[] {ItemList.Casing_Coil_Nichrome_Deprecated}); + GT_ModHandler.addCraftingRecipe(ItemList.Casing_Firebricks.get(1L, new Object[0]), bits, new Object[] {"BB", "BB", 'B', ItemList.Firebrick.get(1, new Object[0])}); + + ItemList.Machine_Bricked_BlastFurnace.set(new GT_MetaTileEntity_BrickedBlastFurnace(140, "multimachine.brickedblastfurnace", "Bricked Blast Furnace").getStackForm(1L)); + GT_ModHandler.addCraftingRecipe(ItemList.Machine_Bricked_BlastFurnace.get(1L, new Object[0]), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"BBB", "BPB", "BBB", 'B', ItemList.Firebrick, 'P', Materials.Iron.getPlates(1)}); + ItemList.Hull_Bronze.set(new GT_MetaTileEntity_BasicHull_Bronze(1, "hull.bronze", "Bronze Hull", 0, "For your first Steam Machines").getStackForm(1L)); ItemList.Hull_Bronze_Bricks.set(new GT_MetaTileEntity_BasicHull_BronzeBricks(2, "hull.bronze_bricked", "Bricked Bronze Hull", 0, "For your first Steam Machines").getStackForm(1L)); ItemList.Hull_Steel.set(new GT_MetaTileEntity_BasicHull_Steel(3, "hull.steel", "Steel Hull", 0, "For improved Steam Machines").getStackForm(1L)); diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/MACHINE_CASING_BRICKEDBLASTFURNACE_ACTIVE.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/MACHINE_CASING_BRICKEDBLASTFURNACE_ACTIVE.png Binary files differnew file mode 100644 index 0000000000..c3b3523c8d --- /dev/null +++ b/src/main/resources/assets/gregtech/textures/blocks/iconsets/MACHINE_CASING_BRICKEDBLASTFURNACE_ACTIVE.png diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/MACHINE_CASING_BRICKEDBLASTFURNACE_INACTIVE.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/MACHINE_CASING_BRICKEDBLASTFURNACE_INACTIVE.png Binary files differnew file mode 100644 index 0000000000..8a09b069f3 --- /dev/null +++ b/src/main/resources/assets/gregtech/textures/blocks/iconsets/MACHINE_CASING_BRICKEDBLASTFURNACE_INACTIVE.png diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/MACHINE_CASING_DENSEBRICKS.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/MACHINE_CASING_DENSEBRICKS.png Binary files differnew file mode 100644 index 0000000000..a5e7b0e3d1 --- /dev/null +++ b/src/main/resources/assets/gregtech/textures/blocks/iconsets/MACHINE_CASING_DENSEBRICKS.png diff --git a/src/main/resources/assets/gregtech/textures/gui/BrickedBlastFurnace.png b/src/main/resources/assets/gregtech/textures/gui/BrickedBlastFurnace.png Binary files differnew file mode 100644 index 0000000000..558db61062 --- /dev/null +++ b/src/main/resources/assets/gregtech/textures/gui/BrickedBlastFurnace.png diff --git a/src/main/resources/assets/gregtech/textures/gui/BronzeBlastFurnace.png b/src/main/resources/assets/gregtech/textures/gui/BronzeBlastFurnace.png Binary files differindex bac737bde8..9642624d6e 100644 --- a/src/main/resources/assets/gregtech/textures/gui/BronzeBlastFurnace.png +++ b/src/main/resources/assets/gregtech/textures/gui/BronzeBlastFurnace.png diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/110.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/110.png Binary files differnew file mode 100644 index 0000000000..f834df88be --- /dev/null +++ b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/110.png diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/111.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/111.png Binary files differnew file mode 100644 index 0000000000..0182e14739 --- /dev/null +++ b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/111.png |