diff options
| author | Maxim <maxim235@gmx.de> | 2023-07-22 16:12:12 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-07-22 16:12:12 +0200 |
| commit | 2b424e8295b7071b85a2960a87da91bf0dd3df02 (patch) | |
| tree | 8ac7f89be7193dd0fe8e9b7b2919924fae34e860 /src/main/java/gtPlusPlus/xmod | |
| parent | dd025431efe8122bc316bc2f1b99a939c0ca149a (diff) | |
| download | GT5-Unofficial-2b424e8295b7071b85a2960a87da91bf0dd3df02.tar.gz GT5-Unofficial-2b424e8295b7071b85a2960a87da91bf0dd3df02.tar.bz2 GT5-Unofficial-2b424e8295b7071b85a2960a87da91bf0dd3df02.zip | |
Implement generic processing logic (#697)
* Migrated extruder
* Migrated alloy smelter
* Migrated arc furnace
* Migrated centrifuge
* Migrated ICO
* Migrated cutter
* Migrated dehydrator
* Migrated electrolyzer
* Migrated fluid heater
* Migrated forge hammer
* Forgot gtpp machines are cursed
* Migrated mac
* Migrated mixer
* Migrated molecular transformer
* Migrated bender
* Migrated sifter
* Migrated thermal centrifuge
* Migrated VF
* Migrated washer
* Migrated wiremill
* Migrated Volcanus
* Migrated adv implo compressor
* Migrated XL turbines
* Migrated chemplant
* Migrated MABS
* Migrated ABS
* Migrated cyclotron
* Migrated Zhuhai
* Migrated rock breaker
* Migrated rocketdyne
* Migrated semifluid generator
* Migrated QFT
* Minor optimization
* Migrate refinery
* Migrated solar tower
* Migrated TGS
* Migrated duplicator
* Migrated PSS
* Migrated algae pond
* Migrated froth flotation cell
* Migrated LTFR
* Migrated LPF
* Migrated sparge tower
* Migrated salt
* Migrated isamill
* Migrate DT
* Migrated HE
* Migrated mass fab
* Migrated chisel
* Migrated boiler
* Migrated steam machines
* Migrated amazon
* Disable batch mode button on XL turbines
* Update dependencies.gradle
* Updated dep
* Addressed first batch of reviews
* Migrated assembler
* Removed unused checkRecipe methods
* Forgot these
* Fix and cleanup chemplant
* Removed getAmounfOfOutputs
* Removed special multi behavior
* Migrated sound mostly
* Addressed new reviews
* Fix build fail and chisel sound
* Derp
* More reviews addressed
* Oversight on chemplant batchmode
* Fix DT speed bonus
* Removed iron blast furnace
* Removed generator array
* Removed
* Simplify rocket engine logic
* Removed left over artifacts
* Minor fixes
* Removed nerf chips
* Removed tesla tower
* Revert and fix chemplant recipe map
* Fix chemplant catalyst damaging
* Addressed reviews
* Derp
---------
Co-authored-by: Martin Robertz <dream-master@gmx.net>
Diffstat (limited to 'src/main/java/gtPlusPlus/xmod')
65 files changed, 1060 insertions, 5158 deletions
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/HANDLER_GT.java b/src/main/java/gtPlusPlus/xmod/gregtech/HANDLER_GT.java index efddb59ffb..370b286957 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/HANDLER_GT.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/HANDLER_GT.java @@ -22,11 +22,7 @@ import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Recipe.GT_Recipe_Map; import gregtech.api.util.GT_Utility; import gregtech.common.items.behaviors.Behaviour_DataOrb; -import gtPlusPlus.api.helpers.GregtechPlusPlus_API.Multiblock_API; import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.minecraft.multi.NoEUBonusMultiBehaviour; -import gtPlusPlus.api.objects.minecraft.multi.NoOutputBonusMultiBehaviour; -import gtPlusPlus.api.objects.minecraft.multi.NoSpeedBonusMultiBehaviour; import gtPlusPlus.core.handler.COMPAT_HANDLER; import gtPlusPlus.core.lib.CORE; import gtPlusPlus.core.recipe.common.CI; @@ -98,11 +94,6 @@ public class HANDLER_GT { // Register custom singles to the PA AddCustomMachineToPA.register(); - // Register the No-Bonus Special Behaviour. - Multiblock_API.registerSpecialMultiBehaviour(new NoOutputBonusMultiBehaviour()); - Multiblock_API.registerSpecialMultiBehaviour(new NoSpeedBonusMultiBehaviour()); - Multiblock_API.registerSpecialMultiBehaviour(new NoEUBonusMultiBehaviour()); - // Register some custom recipe maps for any enabled multiblocks. // MultiblockRecipeMapHandler.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 d1c8504e88..f7fc2712ce 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java @@ -209,11 +209,6 @@ public enum GregtechItemList implements GregtechItemContainer { Distillus_Upgrade_Chip, Maceration_Upgrade_Chip, - // Chips used to nerf my multis via custom behavioural attachments - Chip_MultiNerf_NoOutputBonus, - Chip_MultiNerf_NoSpeedBonus, - Chip_MultiNerf_NoEuBonus, - // Milling Balls Milling_Ball_Alumina, Milling_Ball_Soapstone, @@ -237,7 +232,6 @@ public enum GregtechItemList implements GregtechItemContainer { GTPP_Casing_MAX, // IronBlastFurnace Machine_Bronze_BlastFurnace - Machine_Iron_BlastFurnace, Casing_IronPlatedBricks, // Large Centrifuge @@ -363,17 +357,10 @@ public enum GregtechItemList implements GregtechItemContainer { Industrial_WashPlant, Casing_WashPlant, - // Generator Array - Generator_Array_Controller, - // Cutting Factory Controller Industrial_CuttingFactoryController, Casing_CuttingFactoryFrame, - // Tesla Tower - TelsaTower, - Casing_TeslaTower, - // Large Extruder Industrial_Extruder, Casing_Extruder, 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 9a2d6e7d81..f9af7d29a1 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 @@ -7,7 +7,6 @@ import java.lang.reflect.Method; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; -import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map.Entry; @@ -27,7 +26,6 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.ResourceLocation; import net.minecraft.util.StatCollector; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; @@ -59,6 +57,7 @@ import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.interfaces.tileentity.IHasWorldObjectAndCoords; import gregtech.api.items.GT_MetaGenerated_Tool; +import gregtech.api.logic.ProcessingLogic; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_ExtendedPowerMultiBlockBase; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; @@ -73,8 +72,6 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Outpu import gregtech.api.objects.GT_ItemStack; import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_OreDictUnificator; -import gregtech.api.util.GT_OverclockCalculator; -import gregtech.api.util.GT_ParallelHelper; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Recipe.GT_Recipe_Map; import gregtech.api.util.GT_Utility; @@ -82,13 +79,8 @@ import gregtech.api.util.IGT_HatchAdder; import gregtech.common.items.GT_MetaGenerated_Tool_01; import gtPlusPlus.GTplusplus; import gtPlusPlus.GTplusplus.INIT_PHASE; -import gtPlusPlus.api.helpers.GregtechPlusPlus_API.Multiblock_API; import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.data.AutoMap; import gtPlusPlus.api.objects.minecraft.BlockPos; -import gtPlusPlus.api.objects.minecraft.multi.SpecialMultiBehaviour; -import gtPlusPlus.core.recipe.common.CI; -import gtPlusPlus.core.util.math.MathUtils; import gtPlusPlus.core.util.minecraft.ItemUtils; import gtPlusPlus.core.util.minecraft.PlayerUtils; import gtPlusPlus.core.util.reflect.ReflectionUtils; @@ -112,7 +104,6 @@ public abstract class GregtechMeta_MultiBlockBase<T extends GT_MetaTileEntity_Ex public static final boolean DEBUG_DISABLE_CORES_TEMPORARILY = true; public GT_Recipe mLastRecipe; - private boolean mInternalCircuit = false; protected long mTotalRunTime = 0; public ArrayList<GT_MetaTileEntity_Hatch_ControlCore> mControlCoreBus = new ArrayList<>(); @@ -126,9 +117,6 @@ public abstract class GregtechMeta_MultiBlockBase<T extends GT_MetaTileEntity_Ex public ArrayList<GT_MetaTileEntity_Hatch> mAllEnergyHatches = new ArrayList<>(); public ArrayList<GT_MetaTileEntity_Hatch> mAllDynamoHatches = new ArrayList<>(); - // Custom Behaviour Map - private static final HashMap<String, SpecialMultiBehaviour> mCustomBehviours = new HashMap<>(); - public GregtechMeta_MultiBlockBase(final int aID, final String aName, final String aNameRegional) { super(aID, aName, aNameRegional); } @@ -153,9 +141,6 @@ public abstract class GregtechMeta_MultiBlockBase<T extends GT_MetaTileEntity_Ex return this.mTotalRunTime; } - protected float batchMultiplier = 1.0f; - protected static final int MAX_BATCH_SIZE = 128; - public abstract String getMachineType(); public String getMachineTooltip() { @@ -301,13 +286,6 @@ public abstract class GregtechMeta_MultiBlockBase<T extends GT_MetaTileEntity_Ex } mInfo.add( - StatCollector.translateToLocal("GTPP.CC.discount") + ": " - + EnumChatFormatting.GREEN - + (getEuDiscountForParallelism()) - + EnumChatFormatting.RESET - + "%"); - - mInfo.add( StatCollector.translateToLocal("GTPP.CC.parallel") + ": " + EnumChatFormatting.GREEN + (getMaxParallelRecipes()) @@ -407,14 +385,8 @@ public abstract class GregtechMeta_MultiBlockBase<T extends GT_MetaTileEntity_Ex public static final String TAG_HIDE_POLLUTION = "TAG_HIDE_POLLUTION"; public static final String TAG_HIDE_MACHINE_TYPE = "TAG_HIDE_MACHINE_TYPE"; - public int getAmountOfOutputs() { - return 1; - } - public abstract int getMaxParallelRecipes(); - public abstract int getEuDiscountForParallelism(); - @Override public boolean isCorrectMachinePart(final ItemStack paramItemStack) { return true; @@ -430,22 +402,6 @@ public abstract class GregtechMeta_MultiBlockBase<T extends GT_MetaTileEntity_Ex return false; } - @Override - public void startSoundLoop(final byte aIndex, final double aX, final double aY, final double aZ) { - super.startSoundLoop(aIndex, aX, aY, aZ); - if (aIndex == 1) { - GT_Utility.doSoundAtClient(new ResourceLocation(getSound()), 10, 1.0F, aX, aY, aZ); - } - } - - public void startProcess() { - if (GT_Utility.isStringValid(getSound())) this.sendLoopStart((byte) 1); - } - - public String getSound() { - return ""; - } - /** * A Static {@link Method} object which holds the current status of logging. */ @@ -461,58 +417,10 @@ public abstract class GregtechMeta_MultiBlockBase<T extends GT_MetaTileEntity_Ex } } - public boolean checkRecipeGeneric() { - return checkRecipeGeneric(1, 100, 0); - } - - public boolean checkRecipeGeneric(int aMaxParallelRecipes, long aEUPercent, int aSpeedBonusPercent) { - return checkRecipeGeneric(aMaxParallelRecipes, aEUPercent, aSpeedBonusPercent, 10000); - } - - public boolean checkRecipeGeneric(int aMaxParallelRecipes, long aEUPercent, int aSpeedBonusPercent, - int aOutputChanceRoll) { - ArrayList<ItemStack> tItems = getStoredInputs(); - ArrayList<FluidStack> tFluids = getStoredFluids(); - ItemStack[] tItemInputs = tItems.toArray(new ItemStack[tItems.size()]); - FluidStack[] tFluidInputs = tFluids.toArray(new FluidStack[tFluids.size()]); |
