From 76719d65a90d98e228a914774d3b11ed9f01ac8e Mon Sep 17 00:00:00 2001 From: Connor-Colenso <52056774+Connor-Colenso@users.noreply.github.com> Date: Mon, 4 Sep 2023 03:05:22 +0100 Subject: Clean-up v2 (#729) * Remove test items from NEI with no texture * Add number formatting to hand pumps * Remove heavy plates (no recipes & completely unused). * Remove helium generator (no texture, no recipe) * Remove fire pit and fire starter (no use, no recipe, no textures) * Remove giant chicken and associated unused stuff, has no texture and is unobtainable. Used to be relevant but isn't anymore. * Remove villagers with silly trades like 1 motor + 1 hull = 1 hull. Why? * Remove trade bench, no recipe, missing textures. Unused. * Remove farm processors, no texture, no recipe. Unused. * Remove MAX tier components, these exist in GT now, have no recipe here and are unused. * Hide untextured light block from NEI * Update buildscript * Remove unused backpacks, no recipe and contains dupe bugs. Bad. * Remove eatotronic, universal toolbox and magic tool bag. All 3 are missing textures and uncraftable. * Remove eatotronic, universal toolbox and magic tool bag. All 3 are missing textures and uncraftable. part 2 * Remove dragon catcher (what?), no texture, no recipe, unused. * Remove empty item, does nothing, has no recipe, no idea why it is here. * Empty item v2 removal * Revert "Empty item v2 removal" This reverts commit 75bcd3ccfaf55bbfe2c12b2e4167d5c37636030d. * Revert "Remove empty item, does nothing, has no recipe, no idea why it is here." This reverts commit e41a9f484392776331c58530ab1faa5ef978ef36. * Remove debug square. No recipe, unused. * Number formatting overflow covers * Remove JVM garbage collection block. Unused, no recipe. * Remove nanotubes, no recipe for them. Unused. * Remove "git" item, doesn't seem to work. Has no recipe. * Remove uncraftable food with awful textures. * Remove "bat king" mob, unused content. Does not spawn. * Remove uncraftable doors with bad textures. Unused content. * Remove uncraftable, unlocalised redstone stuff that crashes game when placed. * Remove weird spawner item. No recipe, does not exist in world. * Remove sunnarium bit, no recipe, no usage. * Remove unused modularity table and some misc uncraftable, unused items. * Remove Interconnecting Storage Crate, no recipe, unused. * Delete worse debug power gen, this already exists as part of GT. Unneeded duplication. * Delete unused placeholder circuit * Delete uncraftable generator hatches. * Spotless * Remove XP tank thing, unused and uncraftable. * Remove null item, this fluid registry only seemed to register one null fluid. All others exist? * Remove EU -> RF battery. Unused in GTNH. * Remove some shelf nonsense, why is this in this mod? * Remove some weird random tools. These have no realistic usage in GTNH. * Remove firemaker. Useless in GTNH. * Removed helium blob. Deprecated item, not used anymore, uncraftable. * spotlessApply (#730) Co-authored-by: GitHub GTNH Actions <> * Stop modulators generating unused blocks with no textures * Remove more unused untextured casings * Remove more unused untextured casings * Remove more unused untextured casings * Remove more unused untextured casings * Remove more unused untextured casings * Remove some weird methods and uncraftable mining parts, probably part of deprecated multiblock. * spotlessApply (#732) Co-authored-by: GitHub GTNH Actions <> * Remove gem shards, unused. * Remove unused atoms * Remove unused gum * Remove unused elements/materials * Bye bye * Remove some unused reflection stuff * Remove control cores, obsolete now. * Remove mob killing thing with no texture and no recipe. * Remove uncraftable covers * Remove pizza gloves * Net and rope removal, unused * Remove force crop * Removal of some old event stuff * Remove unused nuclear chem items * Remove player safe, mostly because of the horrible event code that was intercepting every block break. I can't see any real usage of this via discord. * Remove Force material and associated other nonsense. Also remove some nuclear chem stuff. * Remove force for realsies * Skookum Chooker purge. * Remove some enderio compat, these plates/dusts are added via GT5 anyway now. This is obsolete. * spotlessApply (#733) Co-authored-by: GitHub GTNH Actions <> * Unused textures * Bump dep * Revert "Remove force for realsies" This reverts commit 0d288912a99f9dabce56d2a2623d4d3510f4804e. * Revert "Remove Force material and associated other nonsense. Also remove some nuclear chem stuff." This reverts commit 3455e6e916defe1f2aef923be6f9696a6cf3095b. * Remove nuclear items that are unused * spotlessApply (#734) Co-authored-by: GitHub GTNH Actions <> --------- Co-authored-by: GTNH-Colen <54497873+GTNH-Colen@users.noreply.github.com> Co-authored-by: Connor Colenso Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .../xmod/bartcrops/LoaderOfTheCrops.java | 4 +- .../xmod/bartcrops/crops/Crop_Force.java | 61 --- .../gtPlusPlus/xmod/bartcrops/crops/Crop_Hemp.java | 31 +- .../java/gtPlusPlus/xmod/cofh/HANDLER_COFH.java | 15 - .../xmod/eio/handler/HandlerTooltip_EIO.java | 76 --- .../gtPlusPlus/xmod/eio/material/MaterialEIO.java | 109 ---- .../forestry/bees/registry/GTPP_BeeDefinition.java | 4 +- .../java/gtPlusPlus/xmod/gregtech/HANDLER_GT.java | 10 +- .../xmod/gregtech/api/enums/GregtechItemList.java | 48 -- .../gregtech/api/enums/GregtechOrePrefixes.java | 2 - .../gregtech/api/enums/GregtechToolDictNames.java | 1 - .../GT_MetaTileEntity_Hatch_ControlCore.java | 166 ------ .../GT_MetaTileEntity_Hatch_Energy_RTG.java | 289 ----------- .../base/GregtechMeta_MultiBlockBase.java | 98 +--- .../base/machines/GregtechMetaSafeBlockBase.java | 328 ------------ .../common/blocks/GregtechMetaCasingBlocks2.java | 31 +- .../common/blocks/GregtechMetaCasingBlocks4.java | 81 ++- .../common/blocks/GregtechMetaCasingBlocks6.java | 9 + .../blocks/GregtechMetaSpecialMachineCasings.java | 21 +- .../blocks/GregtechMetaSpecialMultiCasings2.java | 17 +- .../blocks/GregtechMetaTieredCasingBlocks1.java | 27 +- .../blocks/textures/TexturesGtCutomCovers.java | 40 -- .../common/blocks/textures/TexturesGtTools.java | 1 - .../xmod/gregtech/common/covers/CoverManager.java | 86 --- .../common/items/MetaGeneratedGregtechItems.java | 168 +----- .../common/items/MetaGeneratedGregtechTools.java | 15 - .../generators/GregtechMetaTileEntity_RTG.java | 2 - .../creative/GregtechMetaCreativeEnergyBuffer.java | 234 --------- .../basic/GregtechMetaGarbageCollector.java | 386 -------------- .../GT_MetaTileEntity_ConnectableCrate.java | 578 --------------------- .../storage/GregtechMetaSafeBlock.java | 77 --- .../storage/shelving/GT4Entity_Shelf.java | 365 ------------- .../shelving/GT4Entity_Shelf_Compartment.java | 40 -- .../storage/shelving/GT4Entity_Shelf_Desk.java | 49 -- .../shelving/GT4Entity_Shelf_FileCabinet.java | 60 --- .../storage/shelving/GT4Entity_Shelf_Iron.java | 47 -- .../storage/shelving/GT4Entity_Shelf_Large.java | 276 ---------- .../common/tools/TOOL_Gregtech_Choocher.java | 231 -------- .../loaders/ProcessingToolHeadChoocher.java | 124 ----- .../loaders/recipe/RecipeLoader_Nuclear.java | 15 - .../xmod/gregtech/recipes/GregtechRecipeAdder.java | 5 - .../registration/gregtech/Gregtech4Content.java | 38 -- .../registration/gregtech/GregtechConduits.java | 8 +- .../gregtech/GregtechCustomHatches.java | 35 -- .../gregtech/GregtechEnergyBuffer.java | 10 - .../registration/gregtech/GregtechSafeBlock.java | 137 ----- .../registration/gregtech/GregtechSuperChests.java | 8 - src/main/java/gtPlusPlus/xmod/sc2/HANDLER_SC2.java | 14 - .../xmod/sc2/modules/ModuleExoticSeeds.java | 108 ---- .../gtPlusPlus/xmod/sol/HANDLER_SpiceOfLife.java | 49 -- 50 files changed, 135 insertions(+), 4499 deletions(-) delete mode 100644 src/main/java/gtPlusPlus/xmod/bartcrops/crops/Crop_Force.java delete mode 100644 src/main/java/gtPlusPlus/xmod/cofh/HANDLER_COFH.java delete mode 100644 src/main/java/gtPlusPlus/xmod/eio/handler/HandlerTooltip_EIO.java delete mode 100644 src/main/java/gtPlusPlus/xmod/eio/material/MaterialEIO.java delete mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_ControlCore.java delete mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Energy_RTG.java delete mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/machines/GregtechMetaSafeBlockBase.java delete mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtCutomCovers.java delete mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/creative/GregtechMetaCreativeEnergyBuffer.java delete mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaGarbageCollector.java delete mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_ConnectableCrate.java delete mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GregtechMetaSafeBlock.java delete mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf.java delete mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_Compartment.java delete mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_Desk.java delete mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_FileCabinet.java delete mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_Iron.java delete mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_Large.java delete mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_Choocher.java delete mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/loaders/ProcessingToolHeadChoocher.java delete mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechSafeBlock.java delete mode 100644 src/main/java/gtPlusPlus/xmod/sc2/HANDLER_SC2.java delete mode 100644 src/main/java/gtPlusPlus/xmod/sc2/modules/ModuleExoticSeeds.java delete mode 100644 src/main/java/gtPlusPlus/xmod/sol/HANDLER_SpiceOfLife.java (limited to 'src/main/java/gtPlusPlus/xmod') diff --git a/src/main/java/gtPlusPlus/xmod/bartcrops/LoaderOfTheCrops.java b/src/main/java/gtPlusPlus/xmod/bartcrops/LoaderOfTheCrops.java index c44620e5da..e1b1d53b45 100644 --- a/src/main/java/gtPlusPlus/xmod/bartcrops/LoaderOfTheCrops.java +++ b/src/main/java/gtPlusPlus/xmod/bartcrops/LoaderOfTheCrops.java @@ -8,7 +8,6 @@ import net.minecraft.item.ItemStack; import cpw.mods.fml.common.event.FMLPreInitializationEvent; import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.xmod.bartcrops.crops.Crop_Force; import gtPlusPlus.xmod.bartcrops.crops.Crop_Hemp; import ic2.api.crops.CropCard; import ic2.api.crops.Crops; @@ -46,11 +45,10 @@ public class LoaderOfTheCrops { return new LoaderOfTheCrops(cropObj, ItemUtils.getItemStackOfAmountFromOreDict("crop" + cropObj.name(), 0)); } - public static final List cropLoader() { + public static List cropLoader() { List p = new ArrayList(); p.add(new LoaderOfTheCrops(new Crop_Hemp(), new ItemStack(Item.getItemById(111), 3))); - p.add(new LoaderOfTheCrops(new Crop_Force(), new ItemStack(Item.getItemById(111), 3))); return p; } diff --git a/src/main/java/gtPlusPlus/xmod/bartcrops/crops/Crop_Force.java b/src/main/java/gtPlusPlus/xmod/bartcrops/crops/Crop_Force.java deleted file mode 100644 index da29ca7f50..0000000000 --- a/src/main/java/gtPlusPlus/xmod/bartcrops/crops/Crop_Force.java +++ /dev/null @@ -1,61 +0,0 @@ -package gtPlusPlus.xmod.bartcrops.crops; - -import net.minecraft.item.ItemStack; - -import gtPlusPlus.core.material.ELEMENT.STANDALONE; -import gtPlusPlus.core.util.math.MathUtils; -import gtPlusPlus.preloader.CORE_Preloader; -import gtPlusPlus.xmod.bartcrops.abstracts.BaseAestheticCrop; -import ic2.api.crops.ICropTile; - -public class Crop_Force extends BaseAestheticCrop { - - @Override - public int tier() { - return 4; - } - - @Override - public String name() { - return "Force"; - } - - @Override - public String discoveredBy() { - return "Alkalus"; - } - - @Override - public int growthDuration(ICropTile crop) { - int ret = 800; - - /* - * if (crop.isBlockBelow(Blocks.dirt) || crop.isBlockBelow(Blocks.flowing_water)) { ret = 225; } - */ - - if (CORE_Preloader.DEBUG_MODE) { - ret = 1; - } - - return ret; - } - - @Override - public String[] attributes() { - return new String[] { "Power", "Soil", "Yellow", "Gold" }; - } - - @Override - public ItemStack getGain(ICropTile crop) { - ItemStack ret = this.getDisplayItem(); - if (MathUtils.randInt(0, 10) > 8) { - ret = STANDALONE.FORCE.getNugget(MathUtils.randInt(4, 8)); - } - return ret; - } - - @Override - public ItemStack getDisplayItem() { - return STANDALONE.FORCE.getNugget(0); - } -} diff --git a/src/main/java/gtPlusPlus/xmod/bartcrops/crops/Crop_Hemp.java b/src/main/java/gtPlusPlus/xmod/bartcrops/crops/Crop_Hemp.java index 66f0d19fd2..f5bf252edb 100644 --- a/src/main/java/gtPlusPlus/xmod/bartcrops/crops/Crop_Hemp.java +++ b/src/main/java/gtPlusPlus/xmod/bartcrops/crops/Crop_Hemp.java @@ -1,11 +1,9 @@ package gtPlusPlus.xmod.bartcrops.crops; +import net.minecraft.init.Items; import net.minecraft.item.ItemStack; -import gtPlusPlus.core.item.ModItems; import gtPlusPlus.core.util.math.MathUtils; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.preloader.CORE_Preloader; import gtPlusPlus.xmod.bartcrops.abstracts.BaseAestheticCrop; import ic2.api.crops.ICropTile; @@ -21,24 +19,9 @@ public class Crop_Hemp extends BaseAestheticCrop { return "Hemp"; } - @Override - public String discoveredBy() { - return "Alkalus"; - } - @Override public int growthDuration(ICropTile crop) { - int ret = 550; - - /* - * if (crop.isBlockBelow(Blocks.dirt) || crop.isBlockBelow(Blocks.flowing_water)) { ret = 225; } - */ - - if (CORE_Preloader.DEBUG_MODE) { - ret = 1; - } - - return ret; + return 550; } @Override @@ -48,17 +31,11 @@ public class Crop_Hemp extends BaseAestheticCrop { @Override public ItemStack getGain(ICropTile crop) { - - ItemStack ret = this.getDisplayItem(); - if (MathUtils.randInt(0, 10) > 8) { - ret = ItemUtils.getSimpleStack(ModItems.itemRope, MathUtils.randInt(1, 3)); - } - - return ret; + return new ItemStack(Items.string, MathUtils.randInt(1, 3), 0); } @Override public ItemStack getDisplayItem() { - return ItemUtils.getSimpleStack(ModItems.itemRope, 0); + return new ItemStack(Items.string, 1, 0); } } diff --git a/src/main/java/gtPlusPlus/xmod/cofh/HANDLER_COFH.java b/src/main/java/gtPlusPlus/xmod/cofh/HANDLER_COFH.java deleted file mode 100644 index 1c13f16a4b..0000000000 --- a/src/main/java/gtPlusPlus/xmod/cofh/HANDLER_COFH.java +++ /dev/null @@ -1,15 +0,0 @@ -package gtPlusPlus.xmod.cofh; - -import static gregtech.api.enums.Mods.COFHCore; - -import gtPlusPlus.core.item.ModItems; -import gtPlusPlus.core.item.general.RF2EU_Battery; - -public class HANDLER_COFH { - - public static void initItems() { - if (COFHCore.isModLoaded()) { - ModItems.RfEuBattery = new RF2EU_Battery(); - } - } -} diff --git a/src/main/java/gtPlusPlus/xmod/eio/handler/HandlerTooltip_EIO.java b/src/main/java/gtPlusPlus/xmod/eio/handler/HandlerTooltip_EIO.java deleted file mode 100644 index caa49973d7..0000000000 --- a/src/main/java/gtPlusPlus/xmod/eio/handler/HandlerTooltip_EIO.java +++ /dev/null @@ -1,76 +0,0 @@ -package gtPlusPlus.xmod.eio.handler; - -import static gregtech.api.enums.Mods.EnderIO; -import static gtPlusPlus.core.lib.CORE.ConfigSwitches.disableEnderIOIngotTooltips; - -import java.lang.reflect.Field; - -import net.minecraft.item.Item; -import net.minecraftforge.event.entity.player.ItemTooltipEvent; - -import cpw.mods.fml.common.eventhandler.SubscribeEvent; -import gregtech.api.enums.Materials; -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import gtPlusPlus.xmod.eio.material.MaterialEIO; - -public class HandlerTooltip_EIO { - - private static Item mIngot; - Class oMainClass; - Class oIngotClass; - - @SubscribeEvent - public void onItemTooltip(ItemTooltipEvent event) { - // Is EIO loaded? - if (!disableEnderIOIngotTooltips && EnderIO.isModLoaded()) { - - // Is the EIO Ingot Item null? - // If it is, reflect in. - if (mIngot == null) { - try { - oMainClass = ReflectionUtils.getClass("crazypants.enderio.EnderIO"); - oIngotClass = ReflectionUtils.getClass("crazypants.enderio.material.ItemAlloy"); - if (oMainClass != null && oIngotClass != null) { - Field oAlloyField = ReflectionUtils.getField(oMainClass, "itemAlloy"); - Object oAlloy = oAlloyField.get(oMainClass); - if (oAlloy != null) { - if (oIngotClass.isInstance(oAlloy) || Item.class.isInstance(oAlloy)) { - mIngot = (Item) oAlloy; - } - } - } - } catch (Throwable e) {} - } - - if (mIngot != null) { - // If the Item is an instance of ItemAlloy.class then proceed - if (event.itemStack.getItem() == mIngot || oIngotClass.isInstance(event.itemStack.getItem()) - || event.itemStack.getUnlocalizedName().toLowerCase().contains("item.itemAlloy")) { - - // If stacks match, add a tooltip. - if (mIngot != null) { - if (event.itemStack.getItem() == mIngot) { - if (event.itemStack.getItemDamage() == 0) { - event.toolTip.add(MaterialEIO.ELECTRICAL_STEEL.vChemicalFormula); - } else if (event.itemStack.getItemDamage() == 1) { - event.toolTip.add(MaterialEIO.ENERGETIC_ALLOY.vChemicalFormula); - } else if (event.itemStack.getItemDamage() == 2) { - event.toolTip.add(MaterialEIO.VIBRANT_ALLOY.vChemicalFormula); - } else if (event.itemStack.getItemDamage() == 3) { - event.toolTip.add(MaterialEIO.REDSTONE_ALLOY.vChemicalFormula); - } else if (event.itemStack.getItemDamage() == 4) { - event.toolTip.add(MaterialEIO.CONDUCTIVE_IRON.vChemicalFormula); - } else if (event.itemStack.getItemDamage() == 5) { - event.toolTip.add(MaterialEIO.PULSATING_IRON.vChemicalFormula); - } else if (event.itemStack.getItemDamage() == 6) { - event.toolTip.add(Materials.DarkSteel.mChemicalFormula); - } else if (event.itemStack.getItemDamage() == 7) { - event.toolTip.add(MaterialEIO.SOULARIUM.vChemicalFormula); - } - } - } - } - } - } - } -} diff --git a/src/main/java/gtPlusPlus/xmod/eio/material/MaterialEIO.java b/src/main/java/gtPlusPlus/xmod/eio/material/MaterialEIO.java deleted file mode 100644 index 0d07901310..0000000000 --- a/src/main/java/gtPlusPlus/xmod/eio/material/MaterialEIO.java +++ /dev/null @@ -1,109 +0,0 @@ -package gtPlusPlus.xmod.eio.material; - -import gtPlusPlus.core.material.ALLOY; -import gtPlusPlus.core.material.ELEMENT; -import gtPlusPlus.core.material.Material; -import gtPlusPlus.core.material.MaterialStack; -import gtPlusPlus.core.material.NONMATERIAL; -import gtPlusPlus.core.material.state.MaterialState; - -public class MaterialEIO { - - public static final Material SOULARIUM = new Material( - "Soularium", // Material Name - MaterialState.SOLID, // State - new short[] { 95, 90, 54, 0 }, // Material Colour - 10, // Melting Point in C - 10, - 10, - 10, - false, // Uses Blast furnace? - false, // Generates a cell - // Material Stacks with Percentage of required elements. - new MaterialStack[] { new MaterialStack(ELEMENT.getInstance().GOLD, 1), - new MaterialStack(NONMATERIAL.SOULSAND, 1) }); - - public static final Material CONDUCTIVE_IRON = new Material( - "Conductive Iron", // Material Name - MaterialState.SOLID, // State - new short[] { 164, 109, 100, 0 }, // Material Colour - 10, // Melting Point in C - 10, - 10, - 10, - false, // Uses Blast furnace? - false, // Generates a cell - // Material Stacks with Percentage of required elements. - new MaterialStack[] { new MaterialStack(ELEMENT.getInstance().IRON, 1), - new MaterialStack(NONMATERIAL.REDSTONE, 1) }); - - public static final Material PULSATING_IRON = new Material( - "Pulsating Iron", // Material Name - MaterialState.SOLID, // State - new short[] { 50, 91, 21, 0 }, // Material Colour - 10, // Melting Point in C - 10, - 10, - 10, - false, // Uses Blast furnace? - false, // Generates a cell - // Material Stacks with Percentage of required elements. - new MaterialStack[] { new MaterialStack(ELEMENT.getInstance().IRON, 1), - new MaterialStack(NONMATERIAL.ENDERPEARL, 1) }); - - public static final Material ELECTRICAL_STEEL = new Material( - "Electrical Steel", // Material Name - MaterialState.SOLID, // State - new short[] { 194, 194, 194, 0 }, // Material Colour - 10, // Melting Point in C - 10, - 10, - 10, - true, // Uses Blast furnace? - false, // Generates a cell - // Material Stacks with Percentage of required elements. - new MaterialStack[] { new MaterialStack(ALLOY.STEEL, 3), - new MaterialStack(ELEMENT.getInstance().SILICON, 1) }); - - public static final Material ENERGETIC_ALLOY = new Material( - "Energetic Alloy", // Material Name - MaterialState.SOLID, // State - new short[] { 252, 151, 45, 0 }, // Material Colour - 10, // Melting Point in C - 10, - 10, - 10, - true, // Uses Blast furnace? - false, // Generates a cell - // Material Stacks with Percentage of required elements. - new MaterialStack[] { new MaterialStack(ELEMENT.getInstance().GOLD, 1), - new MaterialStack(NONMATERIAL.REDSTONE, 1), new MaterialStack(NONMATERIAL.GLOWSTONE, 1) }); - - public static final Material VIBRANT_ALLOY = new Material( - "Vibrant Alloy", // Material Name - MaterialState.SOLID, // State - new short[] { 204, 242, 142, 0 }, // Material Colour - 10, // Melting Point in C - 10, - 10, - 10, - true, // Uses Blast furnace? - false, // Generates a cell - // Material Stacks with Percentage of required elements. - new MaterialStack[] { new MaterialStack(ENERGETIC_ALLOY, 1), - new MaterialStack(NONMATERIAL.ENDERPEARL, 1) }); - - public static final Material REDSTONE_ALLOY = new Material( - "Redstone Alloy", // Material Name - MaterialState.SOLID, // State - new short[] { 178, 34, 34, 0 }, // Material Colour - 10, // Melting Point in C - 10, - 10, - 10, - false, // Uses Blast furnace? - false, // Generates a cell - // Material Stacks with Percentage of required elements. - new MaterialStack[] { new MaterialStack(ELEMENT.getInstance().SILICON, 1), - new MaterialStack(NONMATERIAL.REDSTONE, 1) }); -} diff --git a/src/main/java/gtPlusPlus/xmod/forestry/bees/registry/GTPP_BeeDefinition.java b/src/main/java/gtPlusPlus/xmod/forestry/bees/registry/GTPP_BeeDefinition.java index ee3d8d05ef..6fea628473 100644 --- a/src/main/java/gtPlusPlus/xmod/forestry/bees/registry/GTPP_BeeDefinition.java +++ b/src/main/java/gtPlusPlus/xmod/forestry/bees/registry/GTPP_BeeDefinition.java @@ -14,7 +14,7 @@ import java.util.Locale; import java.util.function.Consumer; import net.minecraft.item.ItemStack; -import net.minecraftforge.common.BiomeDictionary.Type; +import net.minecraftforge.common.BiomeDictionary; import org.apache.commons.lang3.text.WordUtils; @@ -85,7 +85,7 @@ public enum GTPP_BeeDefinition implements IBeeDefinition { }, dis -> { IBeeMutationCustom tMutation = dis.registerMutation("STEEL", "GOLD", 10); tMutation.restrictHumidity(ARID); - tMutation.restrictBiomeType(Type.HOT); + tMutation.restrictBiomeType(BiomeDictionary.Type.HOT); }),; private final GTPP_BranchDefinition branch; diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/HANDLER_GT.java b/src/main/java/gtPlusPlus/xmod/gregtech/HANDLER_GT.java index 370b286957..977eb8a2c9 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/HANDLER_GT.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/HANDLER_GT.java @@ -24,7 +24,6 @@ import gregtech.api.util.GT_Utility; import gregtech.common.items.behaviors.Behaviour_DataOrb; import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.handler.COMPAT_HANDLER; -import gtPlusPlus.core.lib.CORE; import gtPlusPlus.core.recipe.common.CI; import gtPlusPlus.core.util.minecraft.RecipeUtils; import gtPlusPlus.everglades.gen.gt.WorldGen_GT; @@ -41,7 +40,6 @@ import gtPlusPlus.xmod.gregtech.loaders.ProcessingAngleGrinder; import gtPlusPlus.xmod.gregtech.loaders.ProcessingElectricButcherKnife; import gtPlusPlus.xmod.gregtech.loaders.ProcessingElectricLighter; import gtPlusPlus.xmod.gregtech.loaders.ProcessingElectricSnips; -import gtPlusPlus.xmod.gregtech.loaders.ProcessingToolHeadChoocher; import gtPlusPlus.xmod.gregtech.loaders.misc.AddCustomMachineToPA; import gtPlusPlus.xmod.gregtech.loaders.recipe.RecipeLoader_AlgaeFarm; import gtPlusPlus.xmod.gregtech.loaders.recipe.RecipeLoader_MolecularTransformer; @@ -74,18 +72,12 @@ public class HANDLER_GT { // Register Tile Entities COMPAT_HANDLER.registerGregtechMachines(); - // Only loads if the config option is true (default: true) - if (CORE.ConfigSwitches.enableSkookumChoochers) { - sMetaGeneratedToolInstance = MetaGeneratedGregtechTools.getInstance(); - } + sMetaGeneratedToolInstance = MetaGeneratedGregtechTools.getInstance(); } public static void postInit() { // Only loads if the config option is true (default: true) - if (CORE.ConfigSwitches.enableSkookumChoochers) { - new ProcessingToolHeadChoocher().run(); - } new ProcessingAngleGrinder().run(); new ProcessingElectricSnips().run(); new ProcessingElectricButcherKnife().run(); diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java index f7fc2712ce..90fd1e2358 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java @@ -31,35 +31,27 @@ public enum GregtechItemList implements GregtechItemContainer { Electric_Motor_LuV, Electric_Motor_ZPM, Electric_Motor_UV, - Electric_Motor_MAX, Electric_Pump_LuV, Electric_Pump_ZPM, Electric_Pump_UV, - Electric_Pump_MAX, Conveyor_Module_LuV, Conveyor_Module_ZPM, Conveyor_Module_UV, - Conveyor_Module_MAX, Electric_Piston_LuV, Electric_Piston_ZPM, Electric_Piston_UV, - Electric_Piston_MAX, Robot_Arm_LuV, Robot_Arm_ZPM, Robot_Arm_UV, - Robot_Arm_MAX, Field_Generator_LuV, Field_Generator_ZPM, Field_Generator_UV, - Field_Generator_MAX, Emitter_LuV, Emitter_ZPM, Emitter_UV, - Emitter_MAX, Sensor_LuV, Sensor_ZPM, Sensor_UV, - Sensor_MAX, // ULV Components Electric_Motor_ULV, @@ -179,10 +171,6 @@ public enum GregtechItemList implements GregtechItemContainer { Compressed_Fusion_Reactor, // Carbon Materials - NanoTube_Base_Substrate, - NanoTube_Finished, - Carbyne_Tube_Finished, - Carbyne_Sheet_Finished, // End Game Laser Engraver Lens Laser_Lens_WoodsGlass, @@ -198,13 +186,6 @@ public enum GregtechItemList implements GregtechItemContainer { // Pellet Mold Pellet_Mold, - // Charged Items for Tree Farms - Farm_Processor_EV, - Farm_Processor_IV, - Farm_Processor_LuV, - Farm_Processor_ZPM, - Farm_Processor_UV, - // Upgrade chip for Distillus Distillus_Upgrade_Chip, Maceration_Upgrade_Chip, @@ -532,9 +513,6 @@ public enum GregtechItemList implements GregtechItemContainer { // Standard Turbine Rotor Hatch Hatch_Input_TurbineHousing, - // Control Core - Hatch_Control_Core, - // Milling Ball Bus Bus_Milling_Balls, @@ -555,9 +533,6 @@ public enum GregtechItemList implements GregtechItemContainer { Hatch_Input_Elemental_Duplicator, // RTG Hatch - Hatch_RTG_LV, - Hatch_RTG_MV, - Hatch_RTG_HV, // Battery hatches for PSS Hatch_Input_Battery_MV, @@ -709,7 +684,6 @@ public enum GregtechItemList implements GregtechItemContainer { // Debug machine Pollution_Creator, - Garbage_Collector_Debug_Machine, // Basically is an automatic Cauldron SimpleDustWasher_ULV, @@ -764,8 +738,6 @@ public enum GregtechItemList implements GregtechItemContainer { GT_Solar_UV, GT_Solar_MAX, - // 512v Creative Buffer - Energy_Buffer_CREATIVE, // Variable voltage RF convertor Energy_Buffer_RF_Convertor, // Energy Buffers @@ -795,31 +767,11 @@ public enum GregtechItemList implements GregtechItemContainer { // The max Steam condenser Condensor_MAX, - // Player owned Safes - GT_Safe_ULV, - GT_Safe_LV, - GT_Safe_MV, - GT_Safe_HV, - GT_Safe_EV, - GT_Safe_IV, - GT_Safe_LuV, - GT_Safe_ZPM, - GT_Safe_UV, - GT_Safe_MAX, - // Rocket Engines Rocket_Engine_EV, Rocket_Engine_IV, Rocket_Engine_LuV, - // GT4 Shelves - GT4_Shelf, - GT4_Shelf_Iron, - GT4_Shelf_FileCabinet, - GT4_Shelf_Desk, - GT4_Shelf_Compartment, - GT4_Shelf_Large, - // Hi Amp Transformers Transformer_HA_LV_ULV, Transformer_HA_MV_LV, diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechOrePrefixes.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechOrePrefixes.java index 695474e5ec..61abc48a18 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechOrePrefixes.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechOrePrefixes.java @@ -90,8 +90,6 @@ public enum GregtechOrePrefixes { type2("16x Wires", "16x ", " Wire", true, true, false, false, false, false, true, false, false, false, 0, M * 8, 64, -1), - toolSkookumChoocher("Skookum Choocher", "", " Skookum Choocher", true, true, false, false, false, false, true, true, - false, false, B[6], M * 6, 16, 37), // consisting out of 6 Ingots. toolAngleGrinder("Angle Grinder", "", "Angle Grinder", true, true, false, false, false, false, true, true, false, false, B[6], M * 6, 16, 37), // consisting out of 6 Ingots. toolElectricSnips("Electric Snips", "", "Electric Snips", true, true, false, false, false, false, true, true, false, diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechToolDictNames.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechToolDictNames.java index bae91b53fe..0a116b1b9f 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechToolDictNames.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechToolDictNames.java @@ -1,7 +1,6 @@ package gtPlusPlus.xmod.gregtech.api.enums; public enum GregtechToolDictNames { - craftingToolSkookumChoocher, craftingToolHandPump, craftingToolAngleGrinder, craftingToolElectricSnips, diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_ControlCore.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_ControlCore.java deleted file mode 100644 index e85cc1f6c2..0000000000 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_ControlCore.java +++ /dev/null @@ -1,166 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraftforge.common.util.ForgeDirection; - -import org.apache.commons.lang3.ArrayUtils; - -import com.gtnewhorizons.modularui.api.screen.ModularWindow; -import com.gtnewhorizons.modularui.api.screen.UIBuildContext; - -import gregtech.api.gui.modularui.GT_UIInfos; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_Recipe.GT_Recipe_Map; -import gregtech.api.util.GT_Utility; -import gtPlusPlus.api.objects.minecraft.BlockPos; -import gtPlusPlus.core.item.general.ItemControlCore; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; - -public class GT_MetaTileEntity_Hatch_ControlCore extends GT_MetaTileEntity_Hatch { - - public GT_Recipe_Map mRecipeMap = null; - - public BlockPos mControllerLocation; - - public GT_MetaTileEntity_Hatch_ControlCore(int aID, String aName, String aNameRegional, int aTier) { - super( - aID, - aName, - aNameRegional, - aTier, - getSlots(aTier), - "Core determines maximum tier machine will operate at"); - } - - public GT_MetaTileEntity_Hatch_ControlCore(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { - super(aName, aTier, aTier < 1 ? 1 : aTier == 1 ? 4 : aTier == 2 ? 9 : 16, aDescription, aTextures); - } - - public GT_MetaTileEntity_Hatch_ControlCore(String aName, int aTier, String[] aDescription, - ITexture[][][] aTextures) { - super(aName, aTier, aTier < 1 ? 1 : aTier == 1 ? 4 : aTier == 2 ? 9 : 16, aDescription[0], aTextures); - } - - @Override - public String[] getDescription() { - return ArrayUtils.add(this.mDescriptionArray, CORE.GT_Tooltip.get()); - } - - @Override - public ITexture[] getTexturesActive(ITexture aBaseTexture) { - return new ITexture[] { aBaseTexture, new GT_RenderedTexture(TexturesGtBlock.Overlay_Hatch_Control_Core) }; - } - - @Override - public ITexture[] getTexturesInactive(ITexture aBaseTexture) { - return new ITexture[] { aBaseTexture, new GT_RenderedTexture(TexturesGtBlock.Overlay_Hatch_Control_Core) }; - } - - @Override - public boolean isSimpleMachine() { - return true; - } - - @Override - public boolean isFacingValid(ForgeDirection facing) { - return true; - } - - @Override - public boolean isAccessAllowed(EntityPlayer aPlayer) { - return true; - } - - @Override - public boolean isValidSlot(int aIndex) { - return true; - } - - @Override - public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_Hatch_ControlCore(mName, mTier, mDescriptionArray, mTextures); - } - - @Override - public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) { - GT_UIInfos.openGTTileEntityUI(aBaseMetaTileEntity, aPlayer); - return true; - } - - @Override - public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTimer) { - if (aBaseMetaTileEntity.isServerSide() && aBaseMetaTileEntity.hasInventoryBeenModified()) { - fillStacksIntoFirstSlots(); - } - } - - public void updateSlots() { - for (int i = 0; i < mInventory.length; i++) - if (mInventory[i] != null && mInventory[i].stackSize <= 0) mInventory[i] = null; - fillStacksIntoFirstSlots(); - } - - protected void fillStacksIntoFirstSlots() { - for (int i = 0; i < mInventory.length; i++) - for (int j = i + 1; j < mInventory.length; j++) if (mInventory[j] != null - && (mInventory[i] == null || GT_Utility.areStacksEqual(mInventory[i], mInventory[j]))) { - GT_Utility.moveStackFromSlotAToSlotB( - getBaseMetaTileEntity(), - getBaseMetaTileEntity(), - j, - i, - (byte) 64, - (byte) 1, - (byte) 64, - (byte) 1); - } - } - - @Override - public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, ForgeDirection side, - ItemStack aStack) { - return false; - } - - @Override - public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, ForgeDirection side, - ItemStack aStack) { - return side == getBaseMetaTileEntity().getFrontFacing() - && (aStack != null && aStack.getItem() instanceof ItemControlCore); - } - - public boolean setOwner(TileEntity aTileEntity) { - if (mControllerLocation != null) { - return false; - } else { - mControllerLocation = new BlockPos(aTileEntity); - return true; - } - } - - public boolean setOwner(IGregTechTileEntity aTileEntity) { - if (mControllerLocation != null) { - return false; - } else { - mControllerLocation = new BlockPos(aTileEntity); - return true; - } - } - - @Override - public boolean useModularUI() { - return true; - } - - @Override - public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) { - getBaseMetaTileEntity().add1by1Slot(builder); - } -} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Energy_RTG.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Energy_RTG.java deleted file mode 100644 index 3fd3c7a82b..0000000000 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Energy_RTG.java +++ /dev/null @@ -1,289 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations; - -import static gregtech.api.enums.GT_Values.V; - -import java.util.HashMap; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraftforge.common.util.ForgeDirection; - -import com.gtnewhorizons.modularui.api.screen.ModularWindow; -import com.gtnewhorizons.modularui.api.screen.UIBuildContext; - -import gregtech.api.gui.modularui.GT_UIInfos; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Energy; -import gregtech.api.util.GT_Utility; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.minecraft.InventoryUtils; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; - -public class GT_MetaTileEntity_Hatch_Energy_RTG extends GT_MetaTileEntity_Hatch_Energy { - - public GT_MetaTileEntity_Hatch_Energy_RTG(int aID, String aName, String aNameRegional, int aTier, - int aInvSlotCount) { - super( - aID, - aName, - aNameRegional, - aTier, - aInvSlotCount, - new String[] { "Energy Injector for Multiblocks", "Accepts up to 2 Amps" }); - } - - public GT_MetaTileEntity_Hatch_Energy_RTG(String aName, int aTier, int aInvSlotCount, String[] aDescription, - ITexture[][][] aTextures) { - super(aName, aTier, aInvSlotCount, aDescription, aTextures); - } - - @Override - public String[] getDescription() { - String[] S = super.getDescription(); - final String[] desc = new String[S.length + 1]; - System.arraycopy(S, 0, desc, 0, S.length); - desc[S.length] = CORE.GT_Tooltip.get(); - return desc; - } - - @Override - public ITexture[] getTexturesActive(ITexture aBaseTexture) { - return new ITexture[] { aBaseTexture, TexturesGtBlock - .getTextureFromIcon(TexturesGtBlock.Overlay_Hatch_RTG_On, new short[] { 220, 220, 220, 0 }) }; - } - - @Override - public ITexture[] getTexturesInactive(ITexture aBaseTexture) { - return new ITexture[] { aBaseTexture, TexturesGtBlock - .getTextureFromIcon(TexturesGtBlock.Overlay_Hatch_RTG_Off, new short[] { 220, 220, 220, 0 }) }; - } - - @Override - public boolean isSimpleMachine() { - return true; - } - - @Override - public boolean isFacingValid(ForgeDirection facing) { - return true; - } - - @Override - public boolean isAccessAllowed(EntityPlayer aPlayer) { - return true; - } - - @Override - public boolean isEnetInput() { - return false; - } - - @Override - public boolean isInputFacing(ForgeDirection side) { - return side == getBaseMetaTileEntity().getFrontFacing(); - } - - @Override - public boolean isValidSlot(int aIndex) { - return true; - } - - @Override - public long getMinimumStoredEU() { - return 0; - } - - @Override - public long maxEUInput() { - return V[mTier]; - } - - @Override - public long maxEUStore() { - return Long.MAX_VALUE / (Short.MAX_VALUE * Byte.MAX_VALUE); - } - - @Override - public long maxAmperesIn() { - return 0; - } - - @Override - public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_Hatch_Energy_RTG(mName, mTier, 9, mDescriptionArray, mTextures); - } - - @Override - public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, ForgeDirection side, - ItemStack aStack) { - return false; - } - - @Override - public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, ForgeDirection side, - ItemStack aStack) { - return true; - } - - @Override - public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) { - GT_UIInfos.openGTTileEntityUI(aBaseMetaTileEntity, aPlayer); - return true; - } - - private static class Dat { - - protected final String mUniqueDataTag; - private final ItemStack mStack; - private final NBTTagCompound mNBT; - - public Dat(ItemStack aStack) { - mStack = aStack; - mNBT = (aStack.getTagCompound() != null ? aStack.getTagCompound() : new NBTTagCompound()); - mUniqueDataTag = "" + Item - .getIdFromItem(aStack.getItem()) + "" + aStack.getItemDamage() + "" + 1 + "" + mNBT.getId(); - } - - public int getKey() { - return Item.getIdFromItem(mStack.getItem()) + mStack.getItemDamage(); - } - } - - private static final HashMap mFuelInstanceMap = new HashMap(); - private static final HashMap mFuelValueMap = new HashMap(); - private static final HashMap mFuelTypeMap = new HashMap(); - private static final HashMap mFuelTypeMapReverse = new HashMap(); - - public static boolean registerPelletForHatch(ItemStack aStack, long aFuelValue) { - if (!ItemUtils.checkForInvalidItems(aStack)) { - return false; - } - ItemStack aTemp = aStack.copy(); - aTemp.stackSize = 1; - Dat aDat = new Dat(aTemp); - String aKey = aDat.mUniqueDataTag; - mFuelInstanceMap.put(aKey, aTemp); - mFuelValueMap.put(aKey, aFuelValue); - mFuelTypeMap.put(aKey, aDat.getKey()); - mFuelTypeMapReverse.put(aDat.getKey(), aKey); - Logger.INFO( - "RTG Hatch: Registered Fuel Pellet: " + ItemUtils.getItemName( - aTemp) + ", Fuel Value: " + aFuelValue + ", Key: " + aKey + ", Key2: " + aDat.getKey()); - return true; - } - - @Override - public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTimer) { - if (aBaseMetaTileEntity.isServerSide() && aBaseMetaTileEntity.hasInventoryBeenModified()) { - InventoryUtils.sortInventoryItems(this); - } - if (aTimer % 100 == 0 && aBaseMetaTileEntity.isServerSide()) { - if (hasPellet(this)) { - Logger.INFO("Has Pellet"); - tryConsumePellet(this); - } - } - } - - private static void tryConsumePellet(GT_MetaTileEntity_Hatch_Energy_RTG aTile) { - ItemStack aPellet = getPelletToConsume(aTile); - if (aPellet != null) { - Logger.INFO("Found Pellet"); - long aFuel = getFuelValueOfPellet(aPellet); - if (aFuel > 0) { - Logger.INFO("Has Fuel Value: " + aFuel); - if (hasSpaceForEnergy(aTile, aFuel)) { - Logger.INFO("Can buffer"); - aPellet.stackSize = 0; - Logger.INFO("Stack set to 0"); - aPellet = null; - Logger.INFO("null stack"); - addEnergyToInternalStorage(aTile, aFuel); - Logger.INFO("Consumed"); - } - } - } - aTile.updateSlots(); - Logger.INFO("updating slots"); - } - - private static void addEnergyToInternalStorage(GT_MetaTileEntity_Hatch_Energy_RTG aTile, long aFuel) { - aTile.getBaseMetaTileEntity().increaseStoredEnergyUnits(aFuel, true); - } - - public static boolean hasSpaceForEnergy(GT_MetaTileEntity_Hatch_Energy_RTG aTile, long aAmount) { - long aMax = aTile.maxEUStore(); - long aCurrent = aTile.getEUVar(); - if ((aMax - aCurrent) >= aAmount) { - return true; - } - return false; - } - - public void updateSlots() { - for (int i = 0; i < mInventory.length; i++) { - if (mInventory[i] != null && mInventory[i].stackSize <= 0) { - mInventory[i] = null; - } - } - InventoryUtils.sortInventoryItems(this); - } - - public static boolean hasPellet(GT_MetaTileEntity_Hatch_Energy_RTG aTile) { - for (ItemStack o : aTile.mInventory) { - if (o != null) { - for (ItemStack i : mFuelInstanceMap.values()) { - if (GT_Utility.areStacksEqual(o, i)) { - return true; - } - } - } - } - return false; - } - - public static String getPelletType(ItemStack o) { - if (o == null) { - return "error"; - } - Dat aDat = new Dat(o); - return mFuelTypeMapReverse.get(aDat.getKey()); - } - - public static long getFuelValueOfPellet(ItemStack aPellet) { - String aType = getPelletType(aPellet); - if (mFuelValueMap.containsKey(aType)) { - return mFuelValueMap.get(aType); - } - return 0; - } - - public static ItemStack getPelletToConsume(GT_MetaTileEntity_Hatch_Energy_RTG aTile) { - for (ItemStack o : aTile.mInventory) { - if (o != null) { - for (ItemStack i : mFuelInstanceMap.values()) { - if (GT_Utility.areStacksEqual(o, i)) { - return o; - } - } - } - } - return null; - } - - @Override - public boolean useModularUI() { - return true; - } - - @Override - public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) { - getBaseMetaTileEntity().add3by3Slots(builder); - } -} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java index 3c567db889..194729a4a2 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java @@ -83,7 +83,6 @@ import gtPlusPlus.core.util.reflect.ReflectionUtils; import gtPlusPlus.preloader.CORE_Preloader; import gtPlusPlus.preloader.asm.AsmConfig; import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_AirIntake; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_ControlCore; import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_InputBattery; import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_OutputBattery; import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Steam_BusInput; @@ -102,7 +101,6 @@ public abstract class GregtechMeta_MultiBlockBase mControlCoreBus = new ArrayList<>(); /** * Don't use this for recipe input check, otherwise you'll get duplicated fluids */ @@ -168,7 +166,8 @@ public abstract class GregtechMeta_MultiBlockBase 0) { - int tTier = this.getControlCoreTier(); - mInfo.add( - StatCollector.translateToLocal("GTPP.CC.machinetier") + ": " - + EnumChatFormatting.GREEN - + tTier - + EnumChatFormatting.RESET); - } - mInfo.add( StatCollector.translateToLocal("GTPP.CC.parallel") + ": " + EnumChatFormatting.GREEN @@ -448,7 +438,6 @@ public abstract class GregtechMeta_MultiBlockBase t) { - return t.mControlCoreBus.size(); - } - }, TTDynamo(GregtechMeta_MultiBlockBase::addMultiAmpDynamoToMachineList, "com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_DynamoMulti") { diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/machines/GregtechMetaSafeBlockBase.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/machines/GregtechMetaSafeBlockBase.java deleted file mode 100644 index a53915b3d6..0000000000 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/machines/GregtechMetaSafeBlockBase.java +++ /dev/null @@ -1,328 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.machines; - -import static gregtech.api.enums.GT_Values.V; - -import java.util.UUID; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraftforge.common.util.ForgeDirection; - -import gregtech.api.enums.Textures; -import gregtech.api.gui.modularui.GT_UIInfos; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_TieredMachineBlock; -import gregtech.api.objects.GT_RenderedTexture; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.util.minecraft.PlayerUtils; -import gtPlusPlus.core.util.player.PlayerCache; - -public abstract class GregtechMetaSafeBlockBase extends GT_MetaTileEntity_TieredMachineBlock { - - public boolean bOutput = false, bRedstoneIfFull = false, bInvert = false, bUnbreakable = false; - public int mSuccess = 0, mTargetStackSize = 0; - public UUID ownerUUID; - - public GregtechMetaSafeBlockBase(final int aID, final String aName, final String aNameRegional, final int aTier, - final int aInvSlotCount, final String aDescription) { - super(aID, aName, aNameRegional, aTier, aInvSlotCount, aDescription); - } - - public GregtechMetaSafeBlockBase(final String aName, final int aTier, final int aInvSlotCount, - final String[] aDescription, final ITexture[][][] aTextures) { - super(aName, aTier, aInvSlotCount, aDescription, aTextures); - } - - @Override - public ITexture[][][] getTextureSet(final ITexture[] aTextures) { - final ITexture[][][] rTextures = new ITexture[6][17][]; - final ITexture tIcon = this.getOverlayIcon(), tOut = new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_QCHEST), - tUp = new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_VENT); - for (byte i = -1; i < 16; i++) { - rTextures[0][i + 1] = new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][i + 1], tUp, tIcon }; // Back - rTextures[1][i + 1] = new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][i + 1], tIcon }; // Right, - // Strangely - // The - // top - // side - // as - // well - // when - // facing - // East? - rTextures[2][i + 1] = new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][i + 1], tIcon }; // Top - // And - // Bottom, - // When - // Facing - // South - // (What - // the - // hell?) - rTextures[3][i + 1] = new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][i + 1], tIcon }; // Left, - // Top - // if - // facing - // West - // and - // Bottom -