From e5193543b16561e0f6b13ba0a347d94092d8a9b4 Mon Sep 17 00:00:00 2001 From: Alkalus <3060479+draknyte1@users.noreply.github.com> Date: Sun, 12 May 2019 11:09:03 +1000 Subject: + Thermal Boiler now pulls lava filters from an input bus. + Added some minor GUI functions to GregtechMeta_MultiBlockBase. + Added some new Reflection functions. --- .../base/GregtechMeta_MultiBlockBase.java | 52 +++++++++++++++++++++- .../multi/production/GT4Entity_ThermalBoiler.java | 29 +++++++++--- 2 files changed, 75 insertions(+), 6 deletions(-) (limited to 'src/Java/gtPlusPlus/xmod/gregtech') diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java index e352712138..e0f768830d 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java @@ -1,10 +1,10 @@ package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base; -import static gtPlusPlus.core.lib.CORE.ConfigSwitches.requireControlCores; import static gtPlusPlus.core.util.data.ArrayUtils.removeNulls; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; +import java.lang.reflect.ParameterizedType; import java.util.ArrayList; import java.util.Collection; import java.util.Iterator; @@ -48,6 +48,7 @@ import gtPlusPlus.core.lib.CORE; import gtPlusPlus.core.lib.LoadedMods; import gtPlusPlus.core.recipe.common.CI; import gtPlusPlus.core.util.math.MathUtils; +import gtPlusPlus.core.util.minecraft.ItemUtils; import gtPlusPlus.core.util.reflect.ReflectionUtils; import gtPlusPlus.xmod.gregtech.api.gui.CONTAINER_MultiMachine; import gtPlusPlus.xmod.gregtech.api.gui.GUI_MultiMachine; @@ -1136,6 +1137,47 @@ GT_MetaTileEntity_MultiBlockBase { ItemStack guiSlot = this.mInventory[1]; return guiSlot; } + + protected boolean setGUIItemStack(ItemStack aNewGuiSlotContents) { + boolean result = false; + if (this.mInventory[1] == null) { + this.mInventory[1] = aNewGuiSlotContents != null ? aNewGuiSlotContents.copy() : null; + aNewGuiSlotContents = null; + this.updateSlots(); + result = true; + } + return result; + } + + protected boolean clearGUIItemSlot() { + return setGUIItemStack(null); + } + + + public ItemStack findItemInInventory(Item aSearchStack) { + return findItemInInventory(aSearchStack, 0); + } + + public ItemStack findItemInInventory(Item aSearchStack, int aMeta) { + return findItemInInventory(ItemUtils.simpleMetaStack(aSearchStack, aMeta, 1)); + } + + public ItemStack findItemInInventory(ItemStack aSearchStack) { + if (aSearchStack != null && this.mInputBusses.size() > 0) { + for (GT_MetaTileEntity_Hatch_InputBus bus : this.mInputBusses) { + if (bus != null) { + for (ItemStack uStack : bus.mInventory) { + if (uStack != null) { + if (aSearchStack.getClass().isInstance(uStack.getItem())) { + return uStack; + } + } + } + } + } + } + return null; + } @Override public void updateSlots() { @@ -1208,6 +1250,14 @@ GT_MetaTileEntity_MultiBlockBase { if (aTileEntity == null) { return false; } + + //Check type + Class aHatchType = ReflectionUtils.getTypeOfGenericObject(aList); + if (!aHatchType.isInstance(aTileEntity)) { + return false; + } + + if (aList.isEmpty()) { if (aTileEntity instanceof GT_MetaTileEntity_Hatch) { if (GTplusplus.CURRENT_LOAD_PHASE == INIT_PHASE.STARTED) { diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GT4Entity_ThermalBoiler.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GT4Entity_ThermalBoiler.java index 5ab9cd9795..c55fe10829 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GT4Entity_ThermalBoiler.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GT4Entity_ThermalBoiler.java @@ -7,6 +7,7 @@ import gregtech.api.enums.Textures; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_InputBus; import gregtech.api.objects.GT_RenderedTexture; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_Recipe; @@ -19,6 +20,7 @@ import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.Gregtech import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.FluidStack; @@ -68,13 +70,29 @@ extends GregtechMeta_MultiBlockBase @Override public int getDamageToComponent(ItemStack aStack){ - Logger.INFO("Trying to damage component."); + //log("Trying to damage component."); return ItemList.Component_LavaFilter.get(1L).getClass().isInstance(aStack) ? 1 : 0; } + + private static Item mLavaFilter; @Override - public boolean checkRecipe(final ItemStack aStack) { + public boolean checkRecipe(ItemStack aStack) { this.mSuperEfficencyIncrease=0; + + if (mLavaFilter == null) { + mLavaFilter = ItemList.Component_LavaFilter.getItem(); + } + + //Try reload new Lava Filter + if (aStack == null) { + ItemStack uStack = this.findItemInInventory(mLavaFilter); + if (uStack != null) { + this.setGUIItemStack(uStack); + aStack = this.getGUIItemStack(); + } + } + for (GT_Recipe tRecipe : Recipe_GT.Gregtech_Recipe_Map.sThermalFuels.mRecipeList) { FluidStack tFluid = tRecipe.mFluidInputs[0]; @@ -85,7 +103,7 @@ extends GregtechMeta_MultiBlockBase this.mEfficiencyIncrease = (this.mMaxProgresstime * getEfficiencyIncrease()); int loot_MAXCHANCE = 100000; - if (ItemList.Component_LavaFilter.get(1L).getClass().isInstance(aStack)) { + if (mLavaFilter.getClass().isInstance(aStack.getItem())) { if ((tRecipe.getOutput(0) != null) && (getBaseMetaTileEntity().getRandomNumber(loot_MAXCHANCE) < tRecipe.getOutputChance(0))) { this.mOutputItems = new ItemStack[] { GT_Utility.copy(new Object[] { tRecipe.getOutput(0) }) }; @@ -199,8 +217,9 @@ extends GregtechMeta_MultiBlockBase "Size: 3x3x3 (Hollow)", "Thermal Containment Casings (10 at least!)", "Controller (front middle)", - "2x Input Hatch", + "2x Input Hatch (Water/Thermal Fluid)", "1x Output Hatch (Steam)", + "1x Input Bus (Supplies controller with Lava Filters, optional)", "1x Output Bus (Filter results, optional)", }; } @@ -234,7 +253,7 @@ extends GregtechMeta_MultiBlockBase if (!isValidBlockForStructure(tTileEntity, 1, true, aBlock, aMeta, ModBlocks.blockCasings2Misc, 11)) { - Logger.INFO("Bad Thermal Boiler casing"); + log("Bad Thermal Boiler casing"); return false; } ++tAmount; -- cgit From 051a002d043d9e307dda4d92732f5ef2832cf146 Mon Sep 17 00:00:00 2001 From: Alkalus <3060479+draknyte1@users.noreply.github.com> Date: Sun, 12 May 2019 11:28:26 +1000 Subject: $ Greatly improved Cape Handler, Prevents long delays upon first inventory open. --- .../gregtech/common/render/GTPP_CapeRenderer.java | 40 +++++++++++++++++----- 1 file changed, 31 insertions(+), 9 deletions(-) (limited to 'src/Java/gtPlusPlus/xmod/gregtech') diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/render/GTPP_CapeRenderer.java b/src/Java/gtPlusPlus/xmod/gregtech/common/render/GTPP_CapeRenderer.java index 7dd376759a..763a4a129d 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/render/GTPP_CapeRenderer.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/render/GTPP_CapeRenderer.java @@ -49,6 +49,7 @@ import net.minecraft.server.MinecraftServer; import net.minecraft.util.MathHelper; import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.event.RenderPlayerEvent; +import net.minecraftforge.common.UsernameCache; public class GTPP_CapeRenderer extends RenderPlayer { @@ -91,7 +92,7 @@ public class GTPP_CapeRenderer extends RenderPlayer { aEvent.setCanceled(true); Logger.WARNING("A2"); return; - } + } } // Make sure we don't keep checking on clients who dont have capes. @@ -100,14 +101,35 @@ public class GTPP_CapeRenderer extends RenderPlayer { // Time to Spliterate some data Map aPlayerData = new HashMap(); Map aNameMap = new HashMap(); - int i = 0; - for (String s : mData) { - String[] aSplit = s.split("@"); - int a[] = new int[] { 0, mCapes.length - 1 }; - int aID = Integer.parseInt(aSplit[1]); - String aPlayerName = this.getPlayerName("iteration-" + (i++), aSplit[0]); - aNameMap.put(aSplit[0], aPlayerName); - aPlayerData.put(aPlayerName, this.mCapes[Math.max(a[0], Math.min(aID, a[1]))]); + int i = 0; + if (!CORE.DEVENV) { + for (String s : mData) { + String[] aSplit = s.split("@"); + int a[] = new int[] { 0, mCapes.length - 1 }; + int aID = Integer.parseInt(aSplit[1]); + // Quick Check to prevent lag + Logger.WARNING("Trying to create UUID from - " + aSplit[0]); + UUID aPlayerID = UUID.fromString(aSplit[0]); + Logger.WARNING("Result: " + aPlayerID.toString()); + if (aPlayerID != null) { + if (UsernameCache.containsUUID(aPlayerID)) { + Logger.WARNING("UsernameCache contains a last known username for current players UUID."); + if (!UsernameCache.getLastKnownUsername(aPlayerID).toLowerCase() + .equals(ClientProxy.playerName)) { + Logger.WARNING("Last known name does not match current name. Checking next UUID."); + continue; + } else { + Logger.WARNING("Last known name does match current name."); + } + } else { + Logger.WARNING("UsernameCache did not hold results for current player, oops."); + continue; + } + } + String aPlayerName = this.getPlayerName("iteration-" + (i++), aSplit[0]); + aNameMap.put(aSplit[0], aPlayerName); + aPlayerData.put(aPlayerName, this.mCapes[Math.max(a[0], Math.min(aID, a[1]))]); + } } // Set flag to only render this event if player has a cape. -- cgit From d0dd7513435c54f17d800ec48cf50f75d1b8628b Mon Sep 17 00:00:00 2001 From: Alkalus <3060479+draknyte1@users.noreply.github.com> Date: Sun, 12 May 2019 12:55:27 +1000 Subject: + Added Strontium processing chains. + Added cutting machine recipes for Blocks -> Plates for GT++ materials. % Adjusted Rare Earth Sifting to no longer give Gd, Yb, Sm instead now provides small ore dust, which can be processed for Yb, Sm and Sr. % Adjusted Strontium RGB and texture set slightly. % Arceus Alloy 2B now requires Strontium as a component. --- .../GT_MetaTileEntity_SemiFluidGenerator.java | 12 ++--- .../generators/GregtechMetaTileEntity_RTG.java | 8 ++-- .../basic/GregtechMetaPollutionCreator.java | 2 +- ...regtechMetaTileEntity_CompactFusionReactor.java | 52 +++++++++++----------- .../basic/GregtechMetaTileEntity_PocketFusion.java | 52 +++++++++++----------- .../xmod/gregtech/loaders/RecipeGen_Plates.java | 15 +++++++ 6 files changed, 76 insertions(+), 65 deletions(-) (limited to 'src/Java/gtPlusPlus/xmod/gregtech') diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_SemiFluidGenerator.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_SemiFluidGenerator.java index ef3e06086e..9f50cf6d91 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_SemiFluidGenerator.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_SemiFluidGenerator.java @@ -1,9 +1,6 @@ package gtPlusPlus.xmod.gregtech.common.tileentities.generators; import cpw.mods.fml.common.registry.GameRegistry; - -import net.minecraft.item.ItemStack; - import gregtech.api.GregTech_API; import gregtech.api.enums.ConfigCategories; import gregtech.api.enums.ItemList; @@ -11,7 +8,6 @@ import gregtech.api.enums.Textures; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicGenerator; import gregtech.api.objects.GT_ItemStack; import gregtech.api.objects.GT_RenderedTexture; import gregtech.api.util.GT_ModHandler; @@ -19,8 +15,8 @@ import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility; import gregtech.api.util.Recipe_GT.Gregtech_Recipe_Map; import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.CORE; import gtPlusPlus.xmod.gregtech.api.metatileentity.custom.power.GTPP_MTE_BasicLosslessGenerator; +import net.minecraft.item.ItemStack; public class GT_MetaTileEntity_SemiFluidGenerator extends GTPP_MTE_BasicLosslessGenerator{ @@ -65,7 +61,7 @@ public class GT_MetaTileEntity_SemiFluidGenerator extends GTPP_MTE_BasicLossless @Override public GT_Recipe.GT_Recipe_Map getRecipes() { - //Logger.INFO("Fuel Count: "+Gregtech_Recipe_Map.sSemiFluidLiquidFuels.mRecipeList.size()); + //Logger.WARNING("Fuel Count: "+Gregtech_Recipe_Map.sSemiFluidLiquidFuels.mRecipeList.size()); return Gregtech_Recipe_Map.sSemiFluidLiquidFuels; } @@ -95,14 +91,14 @@ public class GT_MetaTileEntity_SemiFluidGenerator extends GTPP_MTE_BasicLossless @Override public int getFuelValue(ItemStack aStack) { if ((GT_Utility.isStackInvalid(aStack)) || (getRecipes() == null)) { - Logger.INFO("Bad Fuel?"); + Logger.WARNING("Bad Fuel?"); return 0; } int rValue = Math.max(GT_ModHandler.getFuelCanValue(aStack) * 6 / 5, super.getFuelValue(aStack)); if (ItemList.Fuel_Can_Plastic_Filled.isStackEqual(aStack, false, true)) { rValue = Math.max(rValue, GameRegistry.getFuelValue(aStack) * 3); } - Logger.INFO("Good Fuel: "+rValue); + Logger.WARNING("Good Fuel: "+rValue); return rValue; } diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntity_RTG.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntity_RTG.java index f3fd95f0c1..6f18b89c53 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntity_RTG.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntity_RTG.java @@ -338,22 +338,22 @@ public class GregtechMetaTileEntity_RTG extends GT_MetaTileEntity_BasicGenerator this.mNewTier = mTier2; //ReflectionUtils.setFinalStatic(mTier2, GT_Values.V[0]); } catch (Exception e) { - Logger.INFO("Failed setting mTier."); + Logger.WARNING("Failed setting mTier."); e.printStackTrace(); } this.mTicksToBurnFor = getTotalEUGenerated(convertDaysToTicks(tFuel.mSpecialValue), voltage); if (mTicksToBurnFor >= Integer.MAX_VALUE){ mTicksToBurnFor = Integer.MAX_VALUE; - Logger.INFO("Fuel went over Int limit, setting to MAX_VALUE."); + Logger.WARNING("Fuel went over Int limit, setting to MAX_VALUE."); } this.mDaysRemaining = MathUtils.roundToClosestInt(mTicksToBurnFor/20/60/3); - Logger.INFO("step | "+(int) (mTicksToBurnFor * getEfficiency() / 100L)); + Logger.WARNING("step | "+(int) (mTicksToBurnFor * getEfficiency() / 100L)); return (int) (mTicksToBurnFor * getEfficiency() / 100L); //return (int) (tFuel.mSpecialValue * 365L * getEfficiency() / 100L); //return tFuel.mEUt; } - Logger.INFO("Not sure"); + Logger.WARNING("Not sure"); return 0; } diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaPollutionCreator.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaPollutionCreator.java index c7f63e3bc2..4e5c296629 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaPollutionCreator.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaPollutionCreator.java @@ -379,7 +379,7 @@ public class GregtechMetaPollutionCreator extends GregtechMetaTileEntity { else { returnValue = getCurrentChunkPollution(); } - Logger.INFO("| DEBUG: "+returnValue +" | ArrayPos:"+this.mArrayPos+" | Counter:"+counter+" | Total:"+total+" |"); + //Logger.INFO("| DEBUG: "+returnValue +" | ArrayPos:"+this.mArrayPos+" | Counter:"+counter+" | Total:"+total+" |"); return returnValue; } diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_CompactFusionReactor.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_CompactFusionReactor.java index b4e819a459..477848a90f 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_CompactFusionReactor.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_CompactFusionReactor.java @@ -131,15 +131,15 @@ public class GregtechMetaTileEntity_CompactFusionReactor extends GT_MetaTileEnti @Override public int checkRecipe() { - Logger.INFO("Recipe Tick 1."); + Logger.MACHINE_INFO("Recipe Tick 1."); if (!this.mCanProcessRecipe) { - Logger.INFO("Recipe Tick 1.1 - Cannot Process Recipe."); + Logger.MACHINE_INFO("Recipe Tick 1.1 - Cannot Process Recipe."); if (this.mChargeConsumed < mFusionPoint) { - Logger.INFO("Recipe Tick 1.2 - Cannot Ignite Fusion, Charge too low."); + Logger.MACHINE_INFO("Recipe Tick 1.2 - Cannot Ignite Fusion, Charge too low."); this.mCharging = true; this.mCanProcessRecipe = false; if (this.getBaseMetaTileEntity().decreaseStoredEnergyUnits((mFusionPoint / 100), false)) { - Logger.INFO("Recipe Tick 1.3 - Charging Internal storage. " + (mFusionPoint / 100) + "/" + Logger.MACHINE_INFO("Recipe Tick 1.3 - Charging Internal storage. " + (mFusionPoint / 100) + "/" + mFusionPoint); mChargeConsumed += (mFusionPoint / 100); } @@ -152,13 +152,13 @@ public class GregtechMetaTileEntity_CompactFusionReactor extends GT_MetaTileEnti } } else { - Logger.INFO("Recipe Tick 1.1 - Try to Process Recipe."); + Logger.MACHINE_INFO("Recipe Tick 1.1 - Try to Process Recipe."); if (checkRecipeMulti()) { - Logger.INFO("Recipe Tick 1.2 - Process Recipe was Successful."); + Logger.MACHINE_INFO("Recipe Tick 1.2 - Process Recipe was Successful."); return 2; } } - Logger.INFO("Recipe Tick 2. - Process Recipe failed."); + Logger.MACHINE_INFO("Recipe Tick 2. - Process Recipe failed."); return 0; } @@ -196,7 +196,7 @@ public class GregtechMetaTileEntity_CompactFusionReactor extends GT_MetaTileEnti } if ((tRecipe == null && !mRunningOnLoad) || (tRecipe != null && maxEUStore() < tRecipe.mSpecialValue)) { this.mLastRecipe = null; - Logger.INFO("Just plain bad."); + Logger.MACHINE_INFO("Just plain bad."); return false; } if (mRunningOnLoad || tRecipe.isRecipeInputEqual(true, tFluids, new ItemStack[] {})) { @@ -397,38 +397,38 @@ public class GregtechMetaTileEntity_CompactFusionReactor extends GT_MetaTileEnti public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { // super.onPostTick(aBaseMetaTileEntity, aTick); if (aBaseMetaTileEntity.isServerSide()) { - // Logger.INFO("1"); + // Logger.MACHINE_INFO("1"); if (mEfficiency < 0) mEfficiency = 0; if (mRunningOnLoad) { - Logger.INFO("2"); + Logger.MACHINE_INFO("2"); this.mEUStore = (int) aBaseMetaTileEntity.getStoredEU(); checkRecipeMulti(); } if (--mUpdate == 0 || --mStartUpCheck == 0) { - Logger.INFO("3"); + Logger.MACHINE_INFO("3"); mMachine = true; } if (mStartUpCheck < 0) { - //Logger.INFO("4"); + //Logger.MACHINE_INFO("4"); if (mMachine) { - //Logger.INFO("5"); + //Logger.MACHINE_INFO("5"); if (aBaseMetaTileEntity.getStoredEU() + (2048 * tierOverclock()) < maxEUStore()) { if (aBaseMetaTileEntity.increaseStoredEnergyUnits(2048 * tierOverclock(), true)) { - //Logger.INFO("5.5 A"); + //Logger.MACHINE_INFO("5.5 A"); } else { - //Logger.INFO("5.5 B"); + //Logger.MACHINE_INFO("5.5 B"); } } if (this.mEUStore <= 0 && mMaxProgresstime > 0) { - Logger.INFO("6"); + Logger.MACHINE_INFO("6"); stopMachine(); this.mLastRecipe = null; } if (mMaxProgresstime > 0) { - Logger.INFO("7"); + Logger.MACHINE_INFO("7"); this.getBaseMetaTileEntity().decreaseStoredEnergyUnits(mEUt, true); if (mMaxProgresstime > 0 && ++mProgresstime >= mMaxProgresstime) { if (mOutputFluids != null) @@ -448,18 +448,18 @@ public class GregtechMetaTileEntity_CompactFusionReactor extends GT_MetaTileEnti } } else { - //Logger.INFO("8"); + //Logger.MACHINE_INFO("8"); this.mEUStore = (int) aBaseMetaTileEntity.getStoredEU(); if (aTick % 100 == 0 || aBaseMetaTileEntity.hasWorkJustBeenEnabled() || aBaseMetaTileEntity.hasInventoryBeenModified()) { - Logger.INFO("9"); + Logger.MACHINE_INFO("9"); // turnCasingActive(mMaxProgresstime > 0); if (aBaseMetaTileEntity.isAllowedToWork()) { - Logger.INFO("10"); + Logger.MACHINE_INFO("10"); if (checkRecipeMulti()) { - Logger.INFO("11"); + Logger.MACHINE_INFO("11"); if (this.mEUStore < this.mLastRecipe.mSpecialValue) { - Logger.INFO("12"); + Logger.MACHINE_INFO("12"); mMaxProgresstime = 0; // turnCasingActive(false); } @@ -473,12 +473,12 @@ public class GregtechMetaTileEntity_CompactFusionReactor extends GT_MetaTileEnti } else { // turnCasingActive(false); - Logger.INFO("Bad"); + Logger.MACHINE_INFO("Bad"); this.mLastRecipe = null; stopMachine(); } } - Logger.INFO("Good | "+mMaxProgresstime); + Logger.MACHINE_INFO("Good | "+mMaxProgresstime); aBaseMetaTileEntity.setActive(mMaxProgresstime > 0); } } @@ -489,14 +489,14 @@ public class GregtechMetaTileEntity_CompactFusionReactor extends GT_MetaTileEnti if (!drainEnergyInput(((long) -mEUt * 10000) / Math.max(1000, mEfficiency))) { this.mLastRecipe = null; stopMachine(); - Logger.INFO("a1"); + Logger.MACHINE_INFO("a1"); return false; } } if (this.mEUStore <= 0) { this.mLastRecipe = null; stopMachine(); - Logger.INFO("a2"); + Logger.MACHINE_INFO("a2"); return false; } } diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_PocketFusion.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_PocketFusion.java index 5a0f888ddb..8b3ada610d 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_PocketFusion.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_PocketFusion.java @@ -131,15 +131,15 @@ public class GregtechMetaTileEntity_PocketFusion extends GT_MetaTileEntity_Delux @Override public int checkRecipe() { - Logger.INFO("Recipe Tick 1."); + Logger.MACHINE_INFO("Recipe Tick 1."); if (!this.mCanProcessRecipe) { - Logger.INFO("Recipe Tick 1.1 - Cannot Process Recipe."); + Logger.MACHINE_INFO("Recipe Tick 1.1 - Cannot Process Recipe."); if (this.mChargeConsumed < mFusionPoint) { - Logger.INFO("Recipe Tick 1.2 - Cannot Ignite Fusion, Charge too low."); + Logger.MACHINE_INFO("Recipe Tick 1.2 - Cannot Ignite Fusion, Charge too low."); this.mCharging = true; this.mCanProcessRecipe = false; if (this.getBaseMetaTileEntity().decreaseStoredEnergyUnits((mFusionPoint / 100), false)) { - Logger.INFO("Recipe Tick 1.3 - Charging Internal storage. " + (mFusionPoint / 100) + "/" + Logger.MACHINE_INFO("Recipe Tick 1.3 - Charging Internal storage. " + (mFusionPoint / 100) + "/" + mFusionPoint); mChargeConsumed += (mFusionPoint / 100); } @@ -152,13 +152,13 @@ public class GregtechMetaTileEntity_PocketFusion extends GT_MetaTileEntity_Delux } } else { - Logger.INFO("Recipe Tick 1.1 - Try to Process Recipe."); + Logger.MACHINE_INFO("Recipe Tick 1.1 - Try to Process Recipe."); if (checkRecipeMulti()) { - Logger.INFO("Recipe Tick 1.2 - Process Recipe was Successful."); + Logger.MACHINE_INFO("Recipe Tick 1.2 - Process Recipe was Successful."); return 2; } } - Logger.INFO("Recipe Tick 2. - Process Recipe failed."); + Logger.MACHINE_INFO("Recipe Tick 2. - Process Recipe failed."); return 0; } @@ -198,7 +198,7 @@ public class GregtechMetaTileEntity_PocketFusion extends GT_MetaTileEntity_Delux if ((tRecipe == null && !mRunningOnLoad) || (tRecipe != null && maxEUStore() < tRecipe.mSpecialValue)) { this.mLastRecipe = null; - Logger.INFO("Just plain bad."); + Logger.MACHINE_INFO("Just plain bad."); return false; } if (mRunningOnLoad || tRecipe.isRecipeInputEqual(true, tFluids, new ItemStack[] {})) { @@ -399,38 +399,38 @@ public class GregtechMetaTileEntity_PocketFusion extends GT_MetaTileEntity_Delux public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { // super.onPostTick(aBaseMetaTileEntity, aTick); if (aBaseMetaTileEntity.isServerSide()) { - // Logger.INFO("1"); + // Logger.MACHINE_INFO("1"); if (mEfficiency < 0) mEfficiency = 0; if (mRunningOnLoad) { - Logger.INFO("2"); + Logger.MACHINE_INFO("2"); this.mEUStore = (int) aBaseMetaTileEntity.getStoredEU(); checkRecipeMulti(); } if (--mUpdate == 0 || --mStartUpCheck == 0) { - Logger.INFO("3"); + Logger.MACHINE_INFO("3"); mMachine = true; } if (mStartUpCheck < 0) { - //Logger.INFO("4"); + //Logger.MACHINE_INFO("4"); if (mMachine) { - //Logger.INFO("5"); + //Logger.MACHINE_INFO("5"); if (aBaseMetaTileEntity.getStoredEU() + (2048 * tierOverclock()) < maxEUStore()) { if (aBaseMetaTileEntity.increaseStoredEnergyUnits(2048 * tierOverclock(), true)) { - //Logger.INFO("5.5 A"); + //Logger.MACHINE_INFO("5.5 A"); } else { - //Logger.INFO("5.5 B"); + //Logger.MACHINE_INFO("5.5 B"); } } if (this.mEUStore <= 0 && mMaxProgresstime > 0) { - Logger.INFO("6"); + Logger.MACHINE_INFO("6"); stopMachine(); this.mLastRecipe = null; } if (mMaxProgresstime > 0) { - Logger.INFO("7"); + Logger.MACHINE_INFO("7"); this.getBaseMetaTileEntity().decreaseStoredEnergyUnits(mEUt, true); if (mMaxProgresstime > 0 && ++mProgresstime >= mMaxProgresstime) { if (mOutputFluids != null) @@ -450,18 +450,18 @@ public class GregtechMetaTileEntity_PocketFusion extends GT_MetaTileEntity_Delux } } else { - //Logger.INFO("8"); + //Logger.MACHINE_INFO("8"); this.mEUStore = (int) aBaseMetaTileEntity.getStoredEU(); if (aTick % 100 == 0 || aBaseMetaTileEntity.hasWorkJustBeenEnabled() || aBaseMetaTileEntity.hasInventoryBeenModified()) { - Logger.INFO("9"); + Logger.MACHINE_INFO("9"); // turnCasingActive(mMaxProgresstime > 0); if (aBaseMetaTileEntity.isAllowedToWork()) { - Logger.INFO("10"); + Logger.MACHINE_INFO("10"); if (checkRecipeMulti()) { - Logger.INFO("11"); + Logger.MACHINE_INFO("11"); if (this.mEUStore < this.mLastRecipe.mSpecialValue) { - Logger.INFO("12"); + Logger.MACHINE_INFO("12"); mMaxProgresstime = 0; // turnCasingActive(false); } @@ -475,12 +475,12 @@ public class GregtechMetaTileEntity_PocketFusion extends GT_MetaTileEntity_Delux } else { // turnCasingActive(false); - Logger.INFO("Bad"); + Logger.MACHINE_INFO("Bad"); this.mLastRecipe = null; stopMachine(); } } - Logger.INFO("Good | "+mMaxProgresstime); + Logger.MACHINE_INFO("Good | "+mMaxProgresstime); aBaseMetaTileEntity.setActive(mMaxProgresstime > 0); } } @@ -491,14 +491,14 @@ public class GregtechMetaTileEntity_PocketFusion extends GT_MetaTileEntity_Delux if (!drainEnergyInput(((long) -mEUt * 10000) / Math.max(1000, mEfficiency))) { this.mLastRecipe = null; stopMachine(); - Logger.INFO("a1"); + Logger.MACHINE_INFO("a1"); return false; } } if (this.mEUStore <= 0) { this.mLastRecipe = null; stopMachine(); - Logger.INFO("a2"); + Logger.MACHINE_INFO("a2"); return false; } } diff --git a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Plates.java b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Plates.java index f705ac9673..007f390112 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Plates.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Plates.java @@ -41,7 +41,9 @@ public class RecipeGen_Plates extends RecipeGen_Base { final ItemStack shape_Mold = ItemList.Shape_Mold_Plate.get(0); final ItemStack plate_Single = material.getPlate(1); final ItemStack plate_SingleTwo = material.getPlate(2); + final ItemStack plate_SingleNine = material.getPlate(9); final ItemStack plate_Double = material.getPlateDouble(1); + final ItemStack block = material.getBlock(1); Logger.WARNING("Generating Plate recipes for "+material.getLocalizedName()); @@ -82,6 +84,19 @@ public class RecipeGen_Plates extends RecipeGen_Base { else { Logger.WARNING("Alloy Smelter Recipe: "+material.getLocalizedName()+" - Failed"); } + //Cutting Machine + if (ItemUtils.checkForInvalidItems(block) && ItemUtils.checkForInvalidItems(plate_Single)) + if (GT_Values.RA.addCutterRecipe( + block, + null, + plate_SingleNine, + (int) Math.max(material.getMass() * 10L, 1L), + material.vVoltageMultiplier)){ + Logger.WARNING("Cutting Machine Recipe: "+material.getLocalizedName()+" - Success"); + } + else { + Logger.WARNING("ACutting Machine Recipe: "+material.getLocalizedName()+" - Failed"); + } //Making Double Plates -- cgit From 7933f8ad431fcf404cbd233c0c9f4b8364bef3d4 Mon Sep 17 00:00:00 2001 From: Alkalus <3060479+draknyte1@users.noreply.github.com> Date: Sun, 12 May 2019 13:33:30 +1000 Subject: - Removed Strontium compound fluid cells. % Expended output slots on ABS from 1 -> 9. $ Minor bug fixes regarding special dust mixer recipes. --- .../gtPlusPlus/xmod/gregtech/loaders/RecipeGen_DustGeneration.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/Java/gtPlusPlus/xmod/gregtech') diff --git a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_DustGeneration.java b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_DustGeneration.java index 461ac256f4..d8a5617b2e 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_DustGeneration.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_DustGeneration.java @@ -20,7 +20,6 @@ import gtPlusPlus.core.material.state.MaterialState; import gtPlusPlus.core.recipe.common.CI; import gtPlusPlus.core.util.math.MathUtils; import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.core.util.minecraft.MaterialUtils; import gtPlusPlus.core.util.minecraft.RecipeUtils; import net.minecraftforge.fluids.FluidStack; @@ -193,16 +192,18 @@ public class RecipeGen_DustGeneration extends RecipeGen_Base { if (x != null){ if (x.getStackMaterial() != null){ if (x.getStackMaterial().getDust(1) == null){ - if (x.getStackMaterial().getState() == MaterialState.GAS || x.getStackMaterial().getState() == MaterialState.LIQUID || x.getStackMaterial().getState() == MaterialState.PURE_LIQUID){ + if (x.getStackMaterial().getState() != MaterialState.SOLID && x.getStackMaterial().getState() != MaterialState.ORE && x.getStackMaterial().getState() != MaterialState.PLASMA){ oxygen = x.getStackMaterial().getFluid(1000); + break; } } } } } } - } + + input = ItemUtils.cleanItemStackArray(input); //Add mixer Recipe if (GT_Values.RA.addMixerRecipe( -- cgit From 3615baf8ffb7a2efc44d4770da97ce1337f7801e Mon Sep 17 00:00:00 2001 From: Alkalus <3060479+draknyte1@users.noreply.github.com> Date: Sun, 12 May 2019 13:58:15 +1000 Subject: + Properly implemented Air Filter requirements & a new GUI for Advanced Mufflers. --- .../api/gui/CONTAINER_Hatch_Muffler_Advanced.java | 66 +++++++++++++ .../gregtech/api/gui/CONTAINER_SuperChest.java | 11 +-- .../api/gui/GUI_Hatch_Muffler_Advanced.java | 40 ++++++++ .../GT_MetaTileEntity_Hatch_Muffler_Adv.java | 108 ++++++++++++++++----- .../GT_MetaTileEntity_Hatch_Plasma.java | 1 - .../GregtechMetaAtmosphericReconditioner.java | 7 -- 6 files changed, 194 insertions(+), 39 deletions(-) create mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_Hatch_Muffler_Advanced.java create mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/gui/GUI_Hatch_Muffler_Advanced.java (limited to 'src/Java/gtPlusPlus/xmod/gregtech') diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_Hatch_Muffler_Advanced.java b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_Hatch_Muffler_Advanced.java new file mode 100644 index 0000000000..30d0c3dcd6 --- /dev/null +++ b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_Hatch_Muffler_Advanced.java @@ -0,0 +1,66 @@ +package gtPlusPlus.xmod.gregtech.api.gui; + +import java.util.List; + +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.ICrafting; +import net.minecraft.inventory.Slot; +import gregtech.api.gui.GT_ContainerMetaTile_Machine; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Muffler_Adv; + + +public class CONTAINER_Hatch_Muffler_Advanced extends GT_ContainerMetaTile_Machine { + + public long maxEU = 0; + public long storedEU = 0; + + public CONTAINER_Hatch_Muffler_Advanced(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity) { + super(aInventoryPlayer, aTileEntity); + } + + public CONTAINER_Hatch_Muffler_Advanced(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity, final boolean bindInventory) { + super(aInventoryPlayer, aTileEntity, bindInventory); + } + + @Override + public void addSlots(final InventoryPlayer aInventoryPlayer) { + this.addSlotToContainer(new Slot(this.mTileEntity, 1, 80, 17)); + } + + @Override + public int getSlotCount() { + return 1; + } + + @Override + public int getShiftClickSlotCount() { + return 1; + } + + @Override + public void updateProgressBar(final int id, final int value) { + super.updateProgressBar(id, value); + switch (id) { + case 100: + this.maxEU = value; + return; + case 101: + this.storedEU = value; + break; + default: + break; + } + } + + @SuppressWarnings("unchecked") + @Override + public void detectAndSendChanges() { + super.detectAndSendChanges(); + for(final ICrafting crafting : (List)this.crafters) { + crafting.sendProgressBarUpdate(this, 100, (int) ((GT_MetaTileEntity_Hatch_Muffler_Adv) this.mTileEntity.getMetaTileEntity()).maxEUStore()); + crafting.sendProgressBarUpdate(this, 101, (int) ((GT_MetaTileEntity_Hatch_Muffler_Adv) this.mTileEntity.getMetaTileEntity()).getEUVar()); + } + } + +} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_SuperChest.java b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_SuperChest.java index 503b36e157..dcab57c380 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_SuperChest.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_SuperChest.java @@ -4,21 +4,16 @@ import java.util.Iterator; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.inventory.ICrafting; -import net.minecraft.inventory.Slot; -import net.minecraft.item.ItemStack; - import gregtech.api.gui.GT_ContainerMetaTile_Machine; import gregtech.api.gui.GT_Slot_Output; import gregtech.api.gui.GT_Slot_Render; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; - import gtPlusPlus.core.slots.SlotLockedInput; -import gtPlusPlus.core.util.reflect.ReflectionUtils; import gtPlusPlus.xmod.gregtech.common.tileentities.storage.GT_MetaTileEntity_TieredChest; import gtPlusPlus.xmod.gregtech.common.tileentities.storage.shelving.GT4Entity_Shelf_Large; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.ICrafting; +import net.minecraft.item.ItemStack; public class CONTAINER_SuperChest extends GT_ContainerMetaTile_Machine { diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/GUI_Hatch_Muffler_Advanced.java b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/GUI_Hatch_Muffler_Advanced.java new file mode 100644 index 0000000000..7aed0e60e1 --- /dev/null +++ b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/GUI_Hatch_Muffler_Advanced.java @@ -0,0 +1,40 @@ +package gtPlusPlus.xmod.gregtech.api.gui; + + +import net.minecraft.entity.player.InventoryPlayer; + +import gregtech.api.gui.GT_GUIContainerMetaTile_Machine; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; + +import gtPlusPlus.core.lib.CORE; + +public class GUI_Hatch_Muffler_Advanced extends GT_GUIContainerMetaTile_Machine { + + String mName = ""; + long maxPower = 0; + long storedPower = 0; + + public GUI_Hatch_Muffler_Advanced(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity, final String aName, final String aTextureFile) { + super(new CONTAINER_Hatch_Muffler_Advanced(aInventoryPlayer, aTileEntity), CORE.RES_PATH_GUI + (aTextureFile == null ? "MultiblockDisplay" : aTextureFile)); + this.mName = aName; + } + + @Override + protected void drawGuiContainerForegroundLayer(final int par1, final int par2) { + this.fontRendererObj.drawString(this.mName, 64, 6, 16448255); + if (this.mContainer != null) { + this.maxPower = ((CONTAINER_TreeFarmer)this.mContainer).maxEU; + this.storedPower = ((CONTAINER_TreeFarmer)this.mContainer).storedEU; + } + } + + @Override + protected void drawGuiContainerBackgroundLayer(final float par1, final int par2, final int par3) { + super.drawGuiContainerBackgroundLayer(par1, par2, par3); + this.maxPower = ((CONTAINER_TreeFarmer)this.mContainer).maxEU; + this.storedPower = ((CONTAINER_TreeFarmer)this.mContainer).storedEU; + final int x = (this.width - this.xSize) / 2; + final int y = (this.height - this.ySize) / 2; + this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize); + } +} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler_Adv.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler_Adv.java index 2832941bdd..0479914115 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler_Adv.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler_Adv.java @@ -1,11 +1,17 @@ package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Muffler; import gregtech.api.objects.GT_RenderedTexture; import gregtech.api.util.GT_Config; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.item.general.ItemAirFilter; import gtPlusPlus.core.lib.CORE; import gtPlusPlus.core.util.minecraft.gregtech.PollutionUtils; +import gtPlusPlus.xmod.gregtech.api.gui.CONTAINER_Hatch_Muffler_Advanced; +import gtPlusPlus.xmod.gregtech.api.gui.GUI_Hatch_Muffler_Advanced; import gtPlusPlus.xmod.gregtech.common.StaticFields59; import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; import net.minecraft.entity.player.EntityPlayer; @@ -13,11 +19,11 @@ import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; public class GT_MetaTileEntity_Hatch_Muffler_Adv extends GT_MetaTileEntity_Hatch_Muffler { + protected int SLOT_FILTER = 0; + @Override public void onConfigLoad(GT_Config aConfig) { super.onConfigLoad(aConfig); @@ -49,16 +55,15 @@ public class GT_MetaTileEntity_Hatch_Muffler_Adv extends GT_MetaTileEntity_Hatch } public String[] getDescription() { - if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK) { - - String[] mDescArray = StaticFields59.getDescriptionArray(this); - - String[] desc = new String[mDescArray.length + 4]; + if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK) { + String[] mDescArray = StaticFields59.getDescriptionArray(this); + String[] desc = new String[mDescArray.length + 5]; System.arraycopy(mDescArray, 0, desc, 0, mDescArray.length); desc[mDescArray.length] = "DO NOT OBSTRUCT THE OUTPUT!"; - desc[mDescArray.length + 1] = "Requires extra Air on the exhaust face"; - desc[mDescArray.length + 2] = "Reduces Pollution to " + this.calculatePollutionReduction(100) + "%"; - desc[mDescArray.length + 3] = "Recovers " + (105 - this.calculatePollutionReduction(100)) + desc[mDescArray.length + 1] = "Requires 3 Air on the exhaust face"; + desc[mDescArray.length + 2] = "Requires Air Filters"; + desc[mDescArray.length + 3] = "Reduces Pollution to " + this.calculatePollutionReduction(100) + "%"; + desc[mDescArray.length + 4] = "Recovers " + (105 - this.calculatePollutionReduction(100)) + "% of CO2/CO/SO2"; return desc; } @@ -88,24 +93,33 @@ public class GT_MetaTileEntity_Hatch_Muffler_Adv extends GT_MetaTileEntity_Hatch EntityPlayer aPlayer) { if (aBaseMetaTileEntity.isClientSide()) return true; - //aBaseMetaTileEntity.openGUI(aPlayer); + aBaseMetaTileEntity.openGUI(aPlayer); return true; } - @Override - public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, - IGregTechTileEntity aBaseMetaTileEntity) { - return null; + + + public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + return new CONTAINER_Hatch_Muffler_Advanced(aPlayerInventory, aBaseMetaTileEntity); } - @Override - public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, - IGregTechTileEntity aBaseMetaTileEntity) { - return null; + public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + return new GUI_Hatch_Muffler_Advanced(aPlayerInventory, aBaseMetaTileEntity, this.getLocalName(), "machine_Charger.png"); + } + + private boolean airCheck() { + if ( + this.getBaseMetaTileEntity().getAirAtSide(this.getBaseMetaTileEntity().getFrontFacing()) && + this.getBaseMetaTileEntity().getAirAtSideAndDistance(this.getBaseMetaTileEntity().getFrontFacing(), 1) && + this.getBaseMetaTileEntity().getAirAtSideAndDistance(this.getBaseMetaTileEntity().getFrontFacing(), 2) + ) { + return true; + } + return false; } public boolean polluteEnvironment() { - if (this.getBaseMetaTileEntity().getAirAtSide(this.getBaseMetaTileEntity().getFrontFacing()) && this.getBaseMetaTileEntity().getAirAtSideAndDistance(this.getBaseMetaTileEntity().getFrontFacing(), 1)) { + if (airCheck()) { int aEmission = this.calculatePollutionReduction(10000); PollutionUtils.addPollution(this.getBaseMetaTileEntity(), aEmission); //Logger.INFO("Outputting "+aEmission+"gbl"); @@ -117,15 +131,25 @@ public class GT_MetaTileEntity_Hatch_Muffler_Adv extends GT_MetaTileEntity_Hatch } public int calculatePollutionReduction(int aPollution) { - return (int) ((double) aPollution * Math.pow(0.64D, (double) (this.mTier - 1))); + double aVal1 = aPollution * Math.pow(0.64D, (double) (this.mTier - 1)); + int aVal2 = (int) aVal1; + if (!hasValidFilter()) { + aVal2 = 0; + } + return aVal2; } public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { - return true; + if (aIndex == this.SLOT_FILTER) { + if (isAirFilter(aStack)) { + return true; + } + } + return false; } public boolean hasValidFilter() { - return false; + return isAirFilter(this.mInventory[this.SLOT_FILTER]); } public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { @@ -139,8 +163,46 @@ public class GT_MetaTileEntity_Hatch_Muffler_Adv extends GT_MetaTileEntity_Hatch if (aBaseMetaTileEntity.isClientSide() && this.getBaseMetaTileEntity().isActive()) { this.pollutionParticles(this.getBaseMetaTileEntity().getWorld(), aParticleName); } + } + + public boolean isAirFilter(ItemStack filter){ + if (filter == null) { + return false; + } + if (filter.getItem() instanceof ItemAirFilter){ + return true; + } + return false; + } + + public boolean damageAirFilter(){ + ItemStack filter = this.mInventory[this.SLOT_FILTER]; + if (filter == null) { + return false; + } + if (isAirFilter(filter)){ + long currentUse = ItemAirFilter.getFilterDamage(filter); + //Remove broken Filter + if (filter.getItemDamage() == 0 && currentUse >= 50-1){ + this.mInventory[this.SLOT_FILTER] = null; + return false; + } + else if (filter.getItemDamage() == 1 && currentUse >= 2500-1){ + this.mInventory[this.SLOT_FILTER] = null; + return false; + } + else { + //Do Damage + ItemAirFilter.setFilterDamage(filter, currentUse+1); + Logger.WARNING("Filter Damage: "+currentUse); + return true; + } + } + return false; } + + public void pollutionParticles(World aWorld, String name) { float ran1 = CORE.RANDOM.nextFloat(); diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Plasma.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Plasma.java index bed80d8d13..b395bbbabe 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Plasma.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Plasma.java @@ -8,7 +8,6 @@ import gregtech.api.enums.Textures.BlockIcons; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Output; import gregtech.api.util.GT_Utility; import gtPlusPlus.api.objects.data.AutoMap; diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaAtmosphericReconditioner.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaAtmosphericReconditioner.java index c364fe5e9e..e277b671c6 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaAtmosphericReconditioner.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaAtmosphericReconditioner.java @@ -126,13 +126,6 @@ public class GregtechMetaAtmosphericReconditioner extends GT_MetaTileEntity_Basi return V[mTier]; } - @Override - public void onFirstTick(IGregTechTileEntity aBaseMetaTileEntity) { - if (getBaseMetaTileEntity().isServerSide()) { - - } - } - @Override public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { super.onPostTick(aBaseMetaTileEntity, aTick); -- cgit From d30f18947a5c5e275ef7f17323ac837939cb0135 Mon Sep 17 00:00:00 2001 From: Alkalus <3060479+draknyte1@users.noreply.github.com> Date: Sun, 12 May 2019 16:04:15 +1000 Subject: % More work on Advanced Mufflers. --- .../api/gui/CONTAINER_Hatch_Muffler_Advanced.java | 25 +---- .../api/gui/GUI_Hatch_Muffler_Advanced.java | 22 ++-- .../GT_MetaTileEntity_Hatch_Muffler_Adv.java | 118 ++++++++++++++++----- 3 files changed, 109 insertions(+), 56 deletions(-) (limited to 'src/Java/gtPlusPlus/xmod/gregtech') diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_Hatch_Muffler_Advanced.java b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_Hatch_Muffler_Advanced.java index 30d0c3dcd6..721fe053ae 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_Hatch_Muffler_Advanced.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_Hatch_Muffler_Advanced.java @@ -1,13 +1,9 @@ package gtPlusPlus.xmod.gregtech.api.gui; -import java.util.List; - -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.inventory.ICrafting; -import net.minecraft.inventory.Slot; import gregtech.api.gui.GT_ContainerMetaTile_Machine; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Muffler_Adv; +import gtPlusPlus.core.slots.SlotAirFilter; +import net.minecraft.entity.player.InventoryPlayer; public class CONTAINER_Hatch_Muffler_Advanced extends GT_ContainerMetaTile_Machine { @@ -25,7 +21,7 @@ public class CONTAINER_Hatch_Muffler_Advanced extends GT_ContainerMetaTile_Machi @Override public void addSlots(final InventoryPlayer aInventoryPlayer) { - this.addSlotToContainer(new Slot(this.mTileEntity, 1, 80, 17)); + this.addSlotToContainer(new SlotAirFilter(this.mTileEntity, 1, 80, 35)); } @Override @@ -41,26 +37,15 @@ public class CONTAINER_Hatch_Muffler_Advanced extends GT_ContainerMetaTile_Machi @Override public void updateProgressBar(final int id, final int value) { super.updateProgressBar(id, value); - switch (id) { - case 100: - this.maxEU = value; - return; - case 101: - this.storedEU = value; - break; + switch (id) { default: break; } } - @SuppressWarnings("unchecked") @Override public void detectAndSendChanges() { - super.detectAndSendChanges(); - for(final ICrafting crafting : (List)this.crafters) { - crafting.sendProgressBarUpdate(this, 100, (int) ((GT_MetaTileEntity_Hatch_Muffler_Adv) this.mTileEntity.getMetaTileEntity()).maxEUStore()); - crafting.sendProgressBarUpdate(this, 101, (int) ((GT_MetaTileEntity_Hatch_Muffler_Adv) this.mTileEntity.getMetaTileEntity()).getEUVar()); - } + super.detectAndSendChanges(); } } \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/GUI_Hatch_Muffler_Advanced.java b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/GUI_Hatch_Muffler_Advanced.java index 7aed0e60e1..4b998f6487 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/GUI_Hatch_Muffler_Advanced.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/GUI_Hatch_Muffler_Advanced.java @@ -1,12 +1,10 @@ package gtPlusPlus.xmod.gregtech.api.gui; -import net.minecraft.entity.player.InventoryPlayer; - import gregtech.api.gui.GT_GUIContainerMetaTile_Machine; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; - import gtPlusPlus.core.lib.CORE; +import net.minecraft.entity.player.InventoryPlayer; public class GUI_Hatch_Muffler_Advanced extends GT_GUIContainerMetaTile_Machine { @@ -21,18 +19,26 @@ public class GUI_Hatch_Muffler_Advanced extends GT_GUIContainerMetaTile_Machine @Override protected void drawGuiContainerForegroundLayer(final int par1, final int par2) { - this.fontRendererObj.drawString(this.mName, 64, 6, 16448255); + this.fontRendererObj.drawString(this.mName, 8, 8, 16448255); + /* + * ReflectionUtils.setField(this.fontRendererObj, "underlineStyle", true); + * ReflectionUtils.setField(this.fontRendererObj, "italicStyle", true); + * ReflectionUtils.setField(this.fontRendererObj, "boldStyle", true); boolean + * isBold = ReflectionUtils.getField(this.fontRendererObj, "boldStyle"); + * this.fontRendererObj.drawString("Insert Air Filters - Bold: "+isBold, 8, 18, + * 16448255); + */ if (this.mContainer != null) { - this.maxPower = ((CONTAINER_TreeFarmer)this.mContainer).maxEU; - this.storedPower = ((CONTAINER_TreeFarmer)this.mContainer).storedEU; + //this.maxPower = ((CONTAINER_TreeFarmer)this.mContainer).maxEU; + //this.storedPower = ((CONTAINER_TreeFarmer)this.mContainer).storedEU; } } @Override protected void drawGuiContainerBackgroundLayer(final float par1, final int par2, final int par3) { super.drawGuiContainerBackgroundLayer(par1, par2, par3); - this.maxPower = ((CONTAINER_TreeFarmer)this.mContainer).maxEU; - this.storedPower = ((CONTAINER_TreeFarmer)this.mContainer).storedEU; + //this.maxPower = ((CONTAINER_TreeFarmer)this.mContainer).maxEU; + //this.storedPower = ((CONTAINER_TreeFarmer)this.mContainer).storedEU; final int x = (this.width - this.xSize) / 2; final int y = (this.height - this.ySize) / 2; this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize); diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler_Adv.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler_Adv.java index 0479914115..4052a5c266 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler_Adv.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler_Adv.java @@ -1,5 +1,6 @@ package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations; +import gregtech.api.enums.GT_Values; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; @@ -10,6 +11,7 @@ import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.item.general.ItemAirFilter; import gtPlusPlus.core.lib.CORE; import gtPlusPlus.core.util.minecraft.gregtech.PollutionUtils; +import gtPlusPlus.core.util.reflect.ReflectionUtils; import gtPlusPlus.xmod.gregtech.api.gui.CONTAINER_Hatch_Muffler_Advanced; import gtPlusPlus.xmod.gregtech.api.gui.GUI_Hatch_Muffler_Advanced; import gtPlusPlus.xmod.gregtech.common.StaticFields59; @@ -44,26 +46,30 @@ public class GT_MetaTileEntity_Hatch_Muffler_Adv extends GT_MetaTileEntity_Hatch public GT_MetaTileEntity_Hatch_Muffler_Adv(int aID, String aName, String aNameRegional, int aTier) { super(aID, aName, aNameRegional, aTier); + ReflectionUtils.setField(this, "mInventory", new ItemStack[1]); } public GT_MetaTileEntity_Hatch_Muffler_Adv(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { super(aName, aTier, aDescription, aTextures); + ReflectionUtils.setField(this, "mInventory", new ItemStack[1]); } public GT_MetaTileEntity_Hatch_Muffler_Adv(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) { super(aName, aTier, aDescription[0], aTextures); + ReflectionUtils.setField(this, "mInventory", new ItemStack[1]); } public String[] getDescription() { if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK) { String[] mDescArray = StaticFields59.getDescriptionArray(this); - String[] desc = new String[mDescArray.length + 5]; + String[] desc = new String[mDescArray.length + 6]; System.arraycopy(mDescArray, 0, desc, 0, mDescArray.length); desc[mDescArray.length] = "DO NOT OBSTRUCT THE OUTPUT!"; desc[mDescArray.length + 1] = "Requires 3 Air on the exhaust face"; desc[mDescArray.length + 2] = "Requires Air Filters"; - desc[mDescArray.length + 3] = "Reduces Pollution to " + this.calculatePollutionReduction(100) + "%"; - desc[mDescArray.length + 4] = "Recovers " + (105 - this.calculatePollutionReduction(100)) + desc[mDescArray.length + 3] = "Mufflers require T2 Filters from IV-"+GT_Values.VN[9]; + desc[mDescArray.length + 4] = "Reduces Pollution to " + this.calculatePollutionReductionForTooltip(100) + "%"; + desc[mDescArray.length + 5] = "Recovers " + (105 - this.calculatePollutionReductionForTooltip(100)) + "% of CO2/CO/SO2"; return desc; } @@ -81,7 +87,7 @@ public class GT_MetaTileEntity_Hatch_Muffler_Adv extends GT_MetaTileEntity_Hatch } public boolean isValidSlot(int aIndex) { - return false; + return aIndex == SLOT_FILTER; } public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { @@ -104,7 +110,7 @@ public class GT_MetaTileEntity_Hatch_Muffler_Adv extends GT_MetaTileEntity_Hatch } public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - return new GUI_Hatch_Muffler_Advanced(aPlayerInventory, aBaseMetaTileEntity, this.getLocalName(), "machine_Charger.png"); + return new GUI_Hatch_Muffler_Advanced(aPlayerInventory, aBaseMetaTileEntity, "Advanced Muffler", "machine_Charger.png"); } private boolean airCheck() { @@ -119,7 +125,7 @@ public class GT_MetaTileEntity_Hatch_Muffler_Adv extends GT_MetaTileEntity_Hatch } public boolean polluteEnvironment() { - if (airCheck()) { + if (airCheck() && damageAirFilter()) { int aEmission = this.calculatePollutionReduction(10000); PollutionUtils.addPollution(this.getBaseMetaTileEntity(), aEmission); //Logger.INFO("Outputting "+aEmission+"gbl"); @@ -130,6 +136,11 @@ public class GT_MetaTileEntity_Hatch_Muffler_Adv extends GT_MetaTileEntity_Hatch } } + + public int calculatePollutionReductionForTooltip(int aPollution) { + return (int) (aPollution * Math.pow(0.64D, (double) (this.mTier - 1))); + } + public int calculatePollutionReduction(int aPollution) { double aVal1 = aPollution * Math.pow(0.64D, (double) (this.mTier - 1)); int aVal2 = (int) aVal1; @@ -148,21 +159,69 @@ public class GT_MetaTileEntity_Hatch_Muffler_Adv extends GT_MetaTileEntity_Hatch return false; } + private ItemStack getInventoryStack() { + if (this.mInventory != null && this.mInventory.length > 0) { + if (this.mInventory.length-1 >= this.SLOT_FILTER) { + return this.mInventory[this.SLOT_FILTER]; + } + } + return null; + } + + private void breakAirFilter() { + if (this.mInventory != null && this.mInventory.length > 0) { + if (this.mInventory.length-1 >= this.SLOT_FILTER) { + Logger.INFO("Breaking Filter"); + this.mInventory[this.SLOT_FILTER] = null; + } + } + } + public boolean hasValidFilter() { - return isAirFilter(this.mInventory[this.SLOT_FILTER]); + return isAirFilter(getInventoryStack()); } - public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + + //Logger.INFO("A1"); + super.onPostTick(aBaseMetaTileEntity, aTick); - String aParticleName; - if (hasValidFilter()) { - aParticleName = "cloud"; - } else { - aParticleName = "smoke"; + + //Logger.INFO("A2"); + + String aParticleName; + if ((aTick % 2) == 0){ + aParticleName = "cloud"; } - if (aBaseMetaTileEntity.isClientSide() && this.getBaseMetaTileEntity().isActive()) { - this.pollutionParticles(this.getBaseMetaTileEntity().getWorld(), aParticleName); + else { + aParticleName = "smoke"; + } + + //Logger.INFO("A3"); + + if (aBaseMetaTileEntity.isClientSide()) { + //Logger.INFO("B1"); + if (this.getBaseMetaTileEntity().isActive()) { + //Logger.INFO("C1"); + this.pollutionParticles(this.getBaseMetaTileEntity().getWorld(), aParticleName); + } + //return; + } + else { + //Logger.INFO("B2"); + if (this.getInventoryStack() == null) { + //Logger.INFO("D1"); + //Logger.INFO("Empty - "+this.mInventory.length); + } + else { + //Logger.INFO("D2"); + Logger.INFO("Has Item"); + } } + //Logger.INFO("A4"); + + + } public boolean isAirFilter(ItemStack filter){ @@ -170,39 +229,42 @@ public class GT_MetaTileEntity_Hatch_Muffler_Adv extends GT_MetaTileEntity_Hatch return false; } if (filter.getItem() instanceof ItemAirFilter){ - return true; + + if (this.mTier < 5) { + return true; + } + else { + if (filter.getItemDamage() == 1) { + return true; + } + } } return false; } - public boolean damageAirFilter(){ - ItemStack filter = this.mInventory[this.SLOT_FILTER]; + public boolean damageAirFilter(){ + ItemStack filter = getInventoryStack(); if (filter == null) { return false; } if (isAirFilter(filter)){ long currentUse = ItemAirFilter.getFilterDamage(filter); + Logger.INFO("Filter Damage: "+currentUse); //Remove broken Filter - if (filter.getItemDamage() == 0 && currentUse >= 50-1){ - this.mInventory[this.SLOT_FILTER] = null; + if ((filter.getItemDamage() == 0 && currentUse >= 50-1) || (filter.getItemDamage() == 1 && currentUse >= 2500-1)){ + breakAirFilter(); return false; - } - else if (filter.getItemDamage() == 1 && currentUse >= 2500-1){ - this.mInventory[this.SLOT_FILTER] = null; - return false; - } + } else { //Do Damage ItemAirFilter.setFilterDamage(filter, currentUse+1); - Logger.WARNING("Filter Damage: "+currentUse); + Logger.INFO("Filter Damage now: "+currentUse); return true; } } return false; } - - public void pollutionParticles(World aWorld, String name) { float ran1 = CORE.RANDOM.nextFloat(); -- cgit From f7390af19986b4e4370379bb46dee71f12b717e8 Mon Sep 17 00:00:00 2001 From: Alkalus <3060479+draknyte1@users.noreply.github.com> Date: Mon, 13 May 2019 15:45:29 +1000 Subject: + Added High Quality Industrial Diamond. + Added various material components. + Added a debug machine used for calling the Garbage Collector. + Added recipe to obtain Hot Water. + Added way to obtain Dragonsblood. + Added lots of quick access fluids directly to FluidUtils. % Updated English Locale. $ Fixed issue preventing all Multiblocks from forming. $ Fixed some minor texture issues. --- .../xmod/gregtech/api/enums/GregtechItemList.java | 1 + .../base/GregtechMeta_MultiBlockBase.java | 8 +- .../basic/GregtechMetaGarbageCollector.java | 318 +++++++++++++++++++++ 3 files changed, 323 insertions(+), 4 deletions(-) create mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaGarbageCollector.java (limited to 'src/Java/gtPlusPlus/xmod/gregtech') diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java b/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java index 68fe121081..6e9a099e72 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java @@ -427,6 +427,7 @@ public enum GregtechItemList implements GregtechItemContainer { //Debug machine Pollution_Creator, + Garbage_Collector_Debug_Machine, //Basically is an automatic Cauldron diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java index e0f768830d..e9f8546545 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java @@ -1252,10 +1252,10 @@ GT_MetaTileEntity_MultiBlockBase { } //Check type - Class aHatchType = ReflectionUtils.getTypeOfGenericObject(aList); - if (!aHatchType.isInstance(aTileEntity)) { - return false; - } + /* + * Class aHatchType = ReflectionUtils.getTypeOfGenericObject(aList); if + * (!aHatchType.isInstance(aTileEntity)) { return false; } + */ if (aList.isEmpty()) { diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaGarbageCollector.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic