diff options
5 files changed, 44 insertions, 463 deletions
diff --git a/src/main/java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java b/src/main/java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java index 14b814be80..f483d1571c 100644 --- a/src/main/java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java +++ b/src/main/java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java @@ -540,17 +540,6 @@ public class RECIPES_GREGTECH { aTransParts[i].get(1), 20 * 5, MaterialUtils.getVoltageForTier(i)); - GT_Recipe.GT_Recipe_Map.sDisassemblerRecipes.addRecipe( - false, - new ItemStack[] { aTransParts[i].get(1) }, - new ItemStack[] { CI.getEmitter(i, 2), CI.getSensor(i, 2) }, - null, - null, - new FluidStack[] { GT_Values.NF }, - new FluidStack[] { GT_Values.NF }, - Math.max(300 >> Math.max(i - 1, 0), 1), - MaterialUtils.getVoltageForTier(i), - 0); } GT_Values.RA.addLaserEngraverRecipe( diff --git a/src/main/java/gtPlusPlus/core/recipe/RECIPES_Machines.java b/src/main/java/gtPlusPlus/core/recipe/RECIPES_Machines.java index 9c733141c1..1964777df8 100644 --- a/src/main/java/gtPlusPlus/core/recipe/RECIPES_Machines.java +++ b/src/main/java/gtPlusPlus/core/recipe/RECIPES_Machines.java @@ -18,7 +18,6 @@ import gregtech.api.enums.*; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; -import gregtech.common.tileentities.machines.basic.GT_MetaTileEntity_Disassembler; import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.block.ModBlocks; import gtPlusPlus.core.item.ModItems; @@ -3013,7 +3012,6 @@ public class RECIPES_Machines { ItemUtils.getSimpleStack(Dimension_Everglades.blockPortalFrame, 2), 45 * 20 * 1 * (6), MaterialUtils.getVoltageForTier(6)); - GT_MetaTileEntity_Disassembler.addBlacklist(ItemUtils.getSimpleStack(Dimension_Everglades.blockPortalFrame, 1)); // Player Doors ItemStack[] aDoorInputs = new ItemStack[] { ItemUtils.getSimpleStack(Blocks.log2), diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/autocrafter/AC_Helper_Utils.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/autocrafter/AC_Helper_Utils.java index 6a2175f151..3d54bcdf5f 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/autocrafter/AC_Helper_Utils.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/autocrafter/AC_Helper_Utils.java @@ -24,17 +24,6 @@ public class AC_Helper_Utils { return 0; } - // Remove Crafter - public static final boolean removeCrafter(int frequency) { - if (!sAutocrafterMap.isEmpty()) { - if (sAutocrafterMap.containsKey(frequency)) { - sAutocrafterMap.remove(frequency); - return true; - } - } - return false; - } - public static final boolean removeCrafter(GT4Entity_AutoCrafter AC) { if (!sAutocrafterMap.isEmpty()) { if (sAutocrafterMap.containsValue(AC)) { @@ -45,22 +34,6 @@ public class AC_Helper_Utils { return false; } - // Get Crafter - public static final GT4Entity_AutoCrafter getCrafterByID(int ID) { - if (!sAutocrafterMap.isEmpty()) { - Set<Entry<Integer, GT4Entity_AutoCrafter>> players = sAutocrafterMap.entrySet(); - Iterator<Entry<Integer, GT4Entity_AutoCrafter>> i = players.iterator(); - while (i.hasNext()) { - Entry<Integer, GT4Entity_AutoCrafter> current = i.next(); - if (current.getKey().equals(ID)) { - return current.getValue(); - } - } - } - Logger.WARNING("Failed. [getCrafterByID]"); - return null; - } - public static final int getIDByCrafter(GT4Entity_AutoCrafter AC) { if (!sAutocrafterMap.isEmpty()) { Set<Entry<Integer, GT4Entity_AutoCrafter>> players = sAutocrafterMap.entrySet(); diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GT4Entity_AutoCrafter.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GT4Entity_AutoCrafter.java index 9242389d50..925e161fbe 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GT4Entity_AutoCrafter.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GT4Entity_AutoCrafter.java @@ -10,8 +10,6 @@ import java.util.ArrayList; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.EnumChatFormatting; import net.minecraftforge.fluids.FluidStack; import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable; @@ -25,15 +23,11 @@ import gregtech.api.interfaces.IIconContainer; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_InputBus; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_OutputBus; import gregtech.api.util.GT_Multiblock_Tooltip_Builder; import gregtech.api.util.GT_Recipe; -import gregtech.api.util.GT_Recipe.GT_Recipe_Map; import gregtech.api.util.GT_Utility; -import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.block.ModBlocks; import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.minecraft.PlayerUtils; import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; import gtPlusPlus.xmod.gregtech.common.helpers.CraftingHelper; import gtPlusPlus.xmod.gregtech.common.helpers.autocrafter.AC_Helper_Utils; @@ -41,39 +35,14 @@ import gtPlusPlus.xmod.gregtech.common.helpers.autocrafter.AC_Helper_Utils; public class GT4Entity_AutoCrafter extends GregtechMeta_MultiBlockBase<GT4Entity_AutoCrafter> implements ISurvivalConstructable { - private MODE mMachineMode = MODE.ASSEMBLY; private byte mTier = 1; - protected GT_Recipe mLastRecipeToBuffer; - private int mCasing; + protected GT_Recipe lastRecipeToBuffer; + private int casing; private static IStructureDefinition<GT4Entity_AutoCrafter> STRUCTURE_DEFINITION = null; - /** The crafting matrix inventory (3x3). */ - public CraftingHelper mInventoryCrafter; + public CraftingHelper inventoryCrafter; - public enum MODE { - - CRAFTING("DISASSEMBLY", "ASSEMBLY"), - ASSEMBLY("CRAFTING", "DISASSEMBLY"), - DISASSEMBLY("ASSEMBLY", "CRAFTING"); - - private final String lastMode; - private final String nextMode; - - MODE(String previous, String next) { - this.lastMode = previous; - this.nextMode = next; - } - - public MODE nextMode() { - return MODE.valueOf(this.nextMode); - } - - public MODE lastMode() { - return MODE.valueOf(this.lastMode); - } - } - - public void onRightclick(EntityPlayer aPlayer) {} + public void onRightclick(EntityPlayer player) {} public GT4Entity_AutoCrafter(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional); @@ -85,11 +54,11 @@ public class GT4Entity_AutoCrafter extends GregtechMeta_MultiBlockBase<GT4Entity @Override public String getMachineType() { - return "Assembler, Disassembler"; + return "Assembler"; } @Override - public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + public MetaTileEntity newMetaEntity(IGregTechTileEntity tileEntity) { return new GT4Entity_AutoCrafter(this.mName); } @@ -106,7 +75,6 @@ public class GT4Entity_AutoCrafter extends GregtechMeta_MultiBlockBase<GT4Entity @Override public boolean onRunningTick(ItemStack aStack) { return super.onRunningTick(aStack); - // return true; } @Override @@ -115,7 +83,7 @@ public class GT4Entity_AutoCrafter extends GregtechMeta_MultiBlockBase<GT4Entity } @Override - public int getMaxEfficiency(ItemStack aStack) { + public int getMaxEfficiency(ItemStack itemStack) { return 10000; } @@ -131,8 +99,7 @@ public class GT4Entity_AutoCrafter extends GregtechMeta_MultiBlockBase<GT4Entity @Override protected GT_Multiblock_Tooltip_Builder createTooltip() { GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); - tt.addMachineType(getMachineType()).addInfo("Highly Advanced Autocrafter") - .addInfo("Right Click with a Screwdriver to change mode") + tt.addMachineType(getMachineType()).addInfo("Highly Advanced Assembling Machine") .addInfo("200% faster than using single block machines of the same voltage") .addInfo("Processes two items per voltage tier").addPollutionAmount(getPollutionPerSecond(null)) .addSeparator().beginStructureBlock(3, 3, 3, true).addController("Front Center") @@ -171,124 +138,66 @@ public class GT4Entity_AutoCrafter extends GregtechMeta_MultiBlockBase<GT4Entity buildHatchAdder(GT4Entity_AutoCrafter.class) .atLeast(InputBus, OutputBus, InputHatch, Maintenance, Energy, Muffler) .casingIndex(TAE.getIndexFromPage(0, 10)).dot(1).buildAndChain( - onElementPass(x -> ++x.mCasing, ofBlock(ModBlocks.blockCasings2Misc, 12)))) + onElementPass(x -> ++x.casing, ofBlock(ModBlocks.blockCasings2Misc, 12)))) .build(); } return STRUCTURE_DEFINITION; } @Override - public void construct(ItemStack stackSize, boolean hintsOnly) { - buildPiece(mName, stackSize, hintsOnly, 1, 1, 0); + public void construct(ItemStack itemStack, boolean hintsOnly) { + buildPiece(mName, itemStack, hintsOnly, 1, 1, 0); } @Override - public int survivalConstruct(ItemStack stackSize, int elementBudget, ISurvivalBuildEnvironment env) { + public int survivalConstruct(ItemStack itemStack, int elementBudget, ISurvivalBuildEnvironment env) { if (mMachine) return -1; - return survivialBuildPiece(mName, stackSize, 1, 1, 0, elementBudget, env, false, true); + return survivialBuildPiece(mName, itemStack, 1, 1, 0, elementBudget, env, false, true); } @Override - public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { - mCasing = 0; - if (checkPiece(mName, 1, 1, 0) && mCasing >= 10 && checkHatch()) { + public boolean checkMachine(IGregTechTileEntity baseMetaTileEntity, ItemStack itemStack) { + casing = 0; + if (checkPiece(mName, 1, 1, 0) && casing >= 10 && checkHatch()) { setTier(); return true; } else return false; } - private static GT_Recipe_Map fCircuitMap; - @Override public GT_Recipe.GT_Recipe_Map getRecipeMap() { - if (this.mMachineMode == MODE.ASSEMBLY) { - return GT_Recipe.GT_Recipe_Map.sAssemblerRecipes; - } else if (this.mMachineMode == MODE.DISASSEMBLY || this.mMachineMode == MODE.CRAFTING) { - return null; - } return GT_Recipe.GT_Recipe_Map.sAssemblerRecipes; } - @Override - public void onModeChangeByScrewdriver(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { - if (mMachineMode.nextMode() == MODE.CRAFTING) { - mMachineMode = MODE.ASSEMBLY; - } else { - mMachineMode = mMachineMode.nextMode(); - } - - if (mMachineMode == MODE.CRAFTING) { - PlayerUtils.messagePlayer( - aPlayer, - "You are now running the Auto-Crafter in mode: " + EnumChatFormatting.AQUA + "AutoCrafting"); - } else if (mMachineMode == MODE.ASSEMBLY) { - PlayerUtils.messagePlayer( - aPlayer, - "You are now running the Auto-Crafter in mode: " + EnumChatFormatting.GREEN + "Assembly"); - } else { - PlayerUtils.messagePlayer( - aPlayer, - "You are now running the Auto-Crafter in mode: " + EnumChatFormatting.RED + "Disassembly"); - } - } - - // @Override - // public boolean checkRecipe(final ItemStack aStack) { - // - // final long tVoltage = this.getMaxInputVoltage(); - // final byte tTier = this.mTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage)); - // - // if (mMachineMode == MODE.DISASSEMBLY) { - // return doDisassembly(); - // } else if (mMachineMode == MODE.CRAFTING) { - // return doCrafting(aStack); - // } else { - // return super.checkRecipeGeneric(getMaxParallelRecipes(), 100, 200); - // } - // } - private void setTier() { long tVoltage = getMaxInputVoltage(); this.mTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage)); } @Override - public boolean checkRecipe(final ItemStack aStack) { - if (mMachineMode == MODE.DISASSEMBLY) { - return doDisassembly(); - } else if (mMachineMode == MODE.CRAFTING) { - return doCrafting(aStack); - } else { - ArrayList<FluidStack> tFluids = getStoredFluids(); - // Logger.MACHINE_INFO("1"); - for (GT_MetaTileEntity_Hatch_InputBus tBus : mInputBusses) { - ArrayList<ItemStack> tBusItems = new ArrayList<ItemStack>(); - // Logger.MACHINE_INFO("2"); - if (isValidMetaTileEntity(tBus)) { - // Logger.MACHINE_INFO("3"); - for (int i = tBus.getBaseMetaTileEntity().getSizeInventory() - 1; i >= 0; i--) { - if (tBus.getBaseMetaTileEntity().getStackInSlot(i) != null) - tBusItems.add(tBus.getBaseMetaTileEntity().getStackInSlot(i)); + public boolean checkRecipe(final ItemStack itemStack) { + FluidStack[] properArray = getStoredFluids().toArray(new FluidStack[] {}); + + for (GT_MetaTileEntity_Hatch_InputBus bus : mInputBusses) { + ArrayList<ItemStack> tBusItems = new ArrayList<ItemStack>(); + if (isValidMetaTileEntity(bus)) { + for (int i = bus.getBaseMetaTileEntity().getSizeInventory() - 1; i >= 0; i--) { + if (bus.getBaseMetaTileEntity().getStackInSlot(i) != null) { + tBusItems.add(bus.getBaseMetaTileEntity().getStackInSlot(i)); } } - - Object[] tempArray = tFluids.toArray(new FluidStack[] {}); - FluidStack[] properArray; - properArray = ((tempArray != null && tempArray.length > 0) ? (FluidStack[]) tempArray - : new FluidStack[] {}); - - // Logger.MACHINE_INFO("4"); - if (checkRecipeGeneric( - tBusItems.toArray(new ItemStack[] {}), - properArray, - getMaxParallelRecipes(), - 100, - 200, - 10000)) - return true; } - return false; + + return checkRecipeGeneric( + tBusItems.toArray(new ItemStack[] {}), + properArray, + getMaxParallelRecipes(), + 100, + 200, + 10_000); + } + return false; } @Override @@ -301,171 +210,20 @@ public class GT4Entity_AutoCrafter extends GregtechMeta_MultiBlockBase<GT4Entity return 100; } - public boolean doDisassembly() { - - final ArrayList<ItemStack> tInputList = this.getStoredInputs(); - for (int tInputList_sS = tInputList.size(), i = 0; i < tInputList_sS - 1; ++i) { - for (int j = i + 1; j < tInputList_sS; ++j) { - if (GT_Utility.areStacksEqual(tInputList.get(i), tInputList.get(j))) { - if (tInputList.get(i).stackSize < tInputList.get(j).stackSize) { - tInputList.remove(i--); - tInputList_sS = tInputList.size(); - break; - } - tInputList.remove(j--); - tInputList_sS = tInputList.size(); - } - } - } - final ItemStack[] tInputs = tInputList.toArray(new ItemStack[tInputList.size()]); - - ItemStack inputItem = tInputs[0]; - if (tInputs[0].stackSize <= 0) { - tInputs[0] = null; - this.updateSlots(); - } - int outputSlots = this.mOutputBusses.get(0).getSizeInventory(); - - if (this.mOutputBusses.size() > 1) { - outputSlots = 0; - for (GT_MetaTileEntity_Hatch_OutputBus r : this.mOutputBusses) { - outputSlots += r.getSizeInventory(); - } - } - - this.mOutputItems = new ItemStack[outputSlots]; - if (inputItem != null && inputItem.stackSize > 0) { - NBTTagCompound tNBT = inputItem.getTagCompound(); - if (tNBT != null) { - tNBT = tNBT.getCompoundTag("GT.CraftingComponents"); - if (tNBT != null) { - this.lEUt = 16 * (1L << this.mTier - 1) * (1L << this.mTier - 1); - this.mMaxProgresstime = (100 - (8 * this.mTier)); - for (int i = 0; i < this.mOutputItems.length; ++i) { - if (this.getBaseMetaTileEntity().getRandomNumber(100) < 60 + 12 * this.mTier) { - this.mOutputItems[i] = GT_Utility.loadItem(tNBT, "Ingredient." + i); - if (this.mOutputItems[i] != null) { - this.mMaxProgresstime *= (int) 1.5; - } - } - } - - if (this.mTier > 5) { - this.mMaxProgresstime >>= this.mTier - 5; - } - if (this.lEUt > 0) this.lEUt = (-this.lEUt); - this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); - this.mEfficiencyIncrease = 10000; - inputItem.stackSize--; - if (inputItem.stackSize <= 0) { - tInputs[0] = null; - } - this.updateSlots(); - return true; - } - } - } - return false; - } - - private boolean doesCrafterHave9SlotInput() { - GT_MetaTileEntity_Hatch_InputBus craftingInput = null; - if (!this.mInputBusses.isEmpty()) { - for (GT_MetaTileEntity_Hatch_InputBus x : this.mInputBusses) { - if (x.mInventory.length == 9) { - craftingInput = x; - } - } - } - // Return if no input hatch set. - if (craftingInput == null) { - Logger.WARNING("Cannot do Auto-Crafting without a 9-slot Input Bus [MV]."); - return false; - - } else { - return true; - } - } - - private boolean doCrafting(ItemStack aStack) { - this.mMaxProgresstime = 0; - return false; // do nothing - /* - * try { // Set Crafting input hatch if (!doesCrafterHave9SlotInput()) { return false; } // Read stored data - * from encrypted data stick. ItemStack storedData_Output[] = NBTUtils.readItemsFromNBT(aStack, "Output"); - * ItemStack storedData_Input[] = NBTUtils.readItemsFromNBT(aStack); if (storedData_Output != null && - * storedData_Input != null) { ItemStack loadedData[] = new ItemStack[9]; if (storedData_Input.length >= 1) { - * int number = 0; for (ItemStack a : storedData_Input) { if (a.getItem() == ModItems.ZZZ_Empty) { // - * Utils.LOG_WARNING("Allocating free memory into crafting manager slot // "+number+"."); loadedData[number] = - * null; } else { // Utils.LOG_WARNING("Downloading "+a.getDisplayName()+" into crafting manager // slot - * "+number+"."); loadedData[number] = a; } number++; } } // Remove inputs here ArrayList<ItemStack> mInputArray - * = new ArrayList<ItemStack>(); ItemStack allInputs[]; for (GT_MetaTileEntity_Hatch_InputBus x : - * this.mInputBusses) { if (x.mInventory.length > 0) { for (ItemStack r : x.mInventory) { if (r != null) { - * mInputArray.add(r); } } } } if (mInputArray.isEmpty()) { return false; } else { List<ItemStack> list = - * mInputArray; allInputs = list.toArray(new ItemStack[list.size()]); if (allInputs != null && allInputs.length - * > 0) { this.mEUt = 8 * (1 << this.mTier - 1) * (1 << this.mTier - 1); this.mMaxProgresstime = - * MathUtils.roundToClosestInt((50 - (5 MathUtils.randDouble(((this.mTier - 2) <= 0 ? 1 : (this.mTier - 2)), - * this.mTier)))); Logger.WARNING("MPT: " + mMaxProgresstime + " | " + mEUt); - * this.getBaseMetaTileEntity().setActive(true); // Setup some vars int counter = 0; ItemStack toUse[] = new - * ItemStack[9]; outerloop: for (ItemStack inputItem : loadedData) { if (inputItem == null) { toUse[counter] = - * null; continue outerloop; } for (ItemStack r : allInputs) { if (r != null) { // - * Utils.LOG_WARNING("Input Bus Inventory Iteration - Found:" // +r.getDisplayName()+" | "+allInputs.length); if - * (GT_Utility.areStacksEqual(r, inputItem)) { if (this.getBaseMetaTileEntity().isServerSide()) { toUse[counter] - * = inputItem; counter++; continue outerloop; } } } } counter++; } int mCorrectInputs = 0; for (ItemStack - * isValid : toUse) { if (isValid == null || this.depleteInput(isValid)) { mCorrectInputs++; } else { - * Logger.WARNING("Input in Slot " + mCorrectInputs + " was not valid."); } } if (this.mTier > 5) { - * this.mMaxProgresstime >>= this.mTier - 5; } if (this.mEUt > 0) this.mEUt = (-this.mEUt); this.mEfficiency = - * (10000 - (getIdealStatus() - getRepairStatus()) * 1000); this.mEfficiencyIncrease = 10000; if (mCorrectInputs - * == 9) { ItemStack mOutputItem = storedData_Output[0]; NBTUtils.writeItemsToGtCraftingComponents(mOutputItem, - * loadedData, true); this.addOutput(mOutputItem); this.updateSlots(); return true; } else { return false; } } } - * } } // End Debug catch (Throwable t) { t.printStackTrace(); this.mMaxProgresstime = 0; } - * this.mMaxProgresstime = 0; return false; - */ - } - @Override public String[] getExtraInfoData() { - final String tRunning = (this.mMaxProgresstime > 0 ? "Auto-Crafter running" : "Auto-Crafter stopped"); - final String tMaintainance = (this.getIdealStatus() == this.getRepairStatus() ? "No Maintainance issues" - : "Needs Maintainance"); - String tSpecialText = "" + (60 + 12 * this.mTier) + "% chance to recover disassembled parts."; - String tMode; - if (mMachineMode == MODE.DISASSEMBLY) { - tMode = "§cDisassembly"; - tSpecialText = "" + (60 + 12 * this.mTier) + "% chance to recover disassembled parts."; - } else if (mMachineMode == MODE.ASSEMBLY) { - tMode = "§aAssembly"; - if (mLastRecipeToBuffer != null && mLastRecipeToBuffer.mOutputs[0].getDisplayName() != null) { - tSpecialText = "Currently processing: " + mLastRecipeToBuffer.mOutputs[0].getDisplayName(); - } else { - tSpecialText = "Currently processing: Nothing"; - } + final String running = (this.mMaxProgresstime > 0 ? "Auto-Crafter running" : "Auto-Crafter stopped"); + final String maintenance = (this.getIdealStatus() == this.getRepairStatus() ? "No Maintenance issues" + : "Needs Maintenance"); + String tSpecialText; + + if (lastRecipeToBuffer != null && lastRecipeToBuffer.mOutputs[0].getDisplayName() != null) { + tSpecialText = "Currently processing: " + lastRecipeToBuffer.mOutputs[0].getDisplayName(); } else { - tMode = "§dAuto-Crafting"; - tSpecialText = "Does Auto-Crafter have 9-slot input bus? " + doesCrafterHave9SlotInput(); + tSpecialText = "Currently processing: Nothing"; } - return new String[] { "Large Scale Auto-Asesembler v1.01c", tRunning, tMaintainance, "Mode: " + tMode, - tSpecialText }; - } - - private String getMode() { - return this.mMachineMode.name(); - } - - @Override - public void saveNBTData(NBTTagCompound aNBT) { - String mMode = getMode(); - aNBT.setString("mMode", mMode); - super.saveNBTData(aNBT); - } - - @Override - public void loadNBTData(NBTTagCompound aNBT) { - String modeString = aNBT.getString("mMode"); - MODE newMode = MODE.valueOf(modeString); - this.mMachineMode = newMode; - super.loadNBTData(aNBT); + return new String[] { "Large Scale Auto-Assembler v1.01c", running, maintenance, tSpecialText }; } @Override @@ -475,18 +233,6 @@ public class GT4Entity_AutoCrafter extends GregtechMeta_MultiBlockBase<GT4Entity } @Override - public void onExplosion() { - AC_Helper_Utils.removeCrafter(this); - super.onExplosion(); - } - - @Override - public void onRemoval() { - AC_Helper_Utils.removeCrafter(this); - super.onRemoval(); - } - - @Override public void doExplosion(long aExplosionPower) { AC_Helper_Utils.removeCrafter(this); super.doExplosion(aExplosionPower); diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechThreadedBuffers.java b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechThreadedBuffers.java index 737f585a56..444b5f5e9f 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechThreadedBuffers.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechThreadedBuffers.java @@ -1,9 +1,5 @@ package gtPlusPlus.xmod.gregtech.registration.gregtech; -import net.minecraft.item.ItemStack; - -import gregtech.api.enums.ItemList; -import gregtech.api.util.GT_Recipe; import gregtech.common.tileentities.automation.GT_MetaTileEntity_SuperBuffer; import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; import gtPlusPlus.xmod.gregtech.common.tileentities.storage.creative.GT_MetaTileEntity_InfiniteItemHolder; @@ -91,126 +87,5 @@ public class GregtechThreadedBuffers { deprecationNotice + "Highly Ultimate Voltage Super Buffer", 9)).getStackForm(1L)); - // These recipes are all 1 sec @ 32 EU/t - GT_Recipe.GT_Recipe_Map.sDisassemblerRecipes.addRecipe( - true, - new ItemStack[] { GregtechItemList.Automation_Threaded_SuperBuffer_ULV.get(1L, new Object[0]) }, - new ItemStack[] { ItemList.Automation_SuperBuffer_ULV.get(1L, new Object[0]), - ItemList.Tool_DataOrb.get(1L, new Object[0]), - ItemList.Conveyor_Module_LV.get(1L, new Object[0]), }, - null, - null, - null, - 20, - 32, - -100); - GT_Recipe.GT_Recipe_Map.sDisassemblerRecipes.addRecipe( - true, - new ItemStack[] { GregtechItemList.Automation_Threaded_SuperBuffer_LV.get(1L, new Object[0]) }, - new ItemStack[] { ItemList.Automation_SuperBuffer_LV.get(1L, new Object[0]), - ItemList.Tool_DataOrb.get(1L, new Object[0]), - ItemList.Conveyor_Module_LV.get(1L, new Object[0]), }, - null, - null, - null, - 20, - 32, - -100); - GT_Recipe.GT_Recipe_Map.sDisassemblerRecipes.addRecipe( - true, - new ItemStack[] { GregtechItemList.Automation_Threaded_SuperBuffer_MV.get(1L, new Object[0]) }, - new ItemStack[] { ItemList.Automation_SuperBuffer_MV.get(1L, new Object[0]), - ItemList.Tool_DataOrb.get(1L, new Object[0]), - ItemList.Conveyor_Module_MV.get(1L, new Object[0]), }, - null, - null, - null, - 20, - 32, - -100); - GT_Recipe.GT_Recipe_Map.sDisassemblerRecipes.addRecipe( - true, - new ItemStack[] { GregtechItemList.Automation_Threaded_SuperBuffer_HV.get(1L, new Object[0]) }, - new ItemStack[] { ItemList.Automation_SuperBuffer_HV.get(1L, new Object[0]), - ItemList.Tool_DataOrb.get(1L, new Object[0]), - ItemList.Conveyor_Module_HV.get(1L, new Object[0]), }, - null, - null, - null, - 20, - 32, - -100); - GT_Recipe.GT_Recipe_Map.sDisassemblerRecipes.addRecipe( - true, - new ItemStack[] { GregtechItemList.Automation_Threaded_SuperBuffer_EV.get(1L, new Object[0]) }, - new ItemStack[] { ItemList.Automation_SuperBuffer_EV.get(1L, new Object[0]), - ItemList.Tool_DataOrb.get(1L, new Object[0]), - ItemList.Conveyor_Module_EV.get(1L, new Object[0]), }, - null, - null, - null, - 20, - 32, - -100); - GT_Recipe.GT_Recipe_Map.sDisassemblerRecipes.addRecipe( - true, - new ItemStack[] { GregtechItemList.Automation_Threaded_SuperBuffer_IV.get(1L, new Object[0]) }, - new ItemStack[] { ItemList.Automation_SuperBuffer_IV.get(1L, new Object[0]), - ItemList.Tool_DataOrb.get(1L, new Object[0]), - ItemList.Conveyor_Module_IV.get(1L, new Object[0]), }, - null, - null, - null, - 20, - 32, - -100); - GT_Recipe.GT_Recipe_Map.sDisassemblerRecipes.addRecipe( - true, - new ItemStack[] { GregtechItemList.Automation_Threaded_SuperBuffer_LuV.get(1L, new Object[0]) }, - new ItemStack[] { ItemList.Automation_SuperBuffer_LuV.get(1L, new Object[0]), - ItemList.Tool_DataOrb.get(1L, new Object[0]), - ItemList.Conveyor_Module_LuV.get(1L, new Object[0]), }, - null, - null, - null, - 20, - 32, - -100); - GT_Recipe.GT_Recipe_Map.sDisassemblerRecipes.addRecipe( - true, - new ItemStack[] { GregtechItemList.Automation_Threaded_SuperBuffer_ZPM.get(1L, new Object[0]) }, - new ItemStack[] { ItemList.Automation_SuperBuffer_ZPM.get(1L, new Object[0]), - ItemList.Tool_DataOrb.get(1L, new Object[0]), - ItemList.Conveyor_Module_ZPM.get(1L, new Object[0]), }, - null, - null, - null, - 20, - 32, - -100); - GT_Recipe.GT_Recipe_Map.sDisassemblerRecipes.addRecipe( - true, - new ItemStack[] { GregtechItemList.Automation_Threaded_SuperBuffer_UV.get(1L, new Object[0]) }, - new ItemStack[] { ItemList.Automation_SuperBuffer_UV.get(1L, new Object[0]), - ItemList.Tool_DataOrb.get(1L, new Object[0]), - ItemList.Conveyor_Module_UV.get(1L, new Object[0]), }, - null, - null, - null, - 20, - 32, - -100); - GT_Recipe.GT_Recipe_Map.sDisassemblerRecipes.addRecipe( - true, - new ItemStack[] { GregtechItemList.Automation_Threaded_SuperBuffer_MAX.get(1L, new Object[0]) }, - new ItemStack[] { ItemList.Automation_SuperBuffer_MAX.get(1L, new Object[0]), - ItemList.Tool_DataOrb.get(1L, new Object[0]), - GregtechItemList.Conveyor_Module_MAX.get(1L, new Object[0]), }, - null, - null, - null, - 20, - 32, - -100); } } |