From 1cc96a350a0321599253573275903d93b9ba4cf0 Mon Sep 17 00:00:00 2001 From: GlodBlock <1356392126@qq.com> Date: Sat, 21 Aug 2021 19:34:48 +0800 Subject: use hook as Glease suggested --- .../machines/multi/GT_MetaTileEntity_OilCracker.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/main/java/gregtech/common/tileentities') diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilCracker.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilCracker.java index a90e1948d0..fa6d9c8163 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilCracker.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilCracker.java @@ -20,6 +20,7 @@ import gregtech.api.util.GT_Utility; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; import java.util.ArrayList; @@ -126,7 +127,7 @@ public class GT_MetaTileEntity_OilCracker extends GT_MetaTileEntity_EnhancedMult @Override public GT_Recipe.GT_Recipe_Map getRecipeMap() { - return GT_Recipe.GT_Recipe_Map.sCrakingRecipes; + return GT_Recipe.GT_Recipe_Map.sCrackingRecipes; } @Override @@ -140,7 +141,7 @@ public class GT_MetaTileEntity_OilCracker extends GT_MetaTileEntity_EnhancedMult getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[tTier], - tFluidInputs , + tFluidInputs, mInventory[1] ); @@ -334,7 +335,7 @@ public class GT_MetaTileEntity_OilCracker extends GT_MetaTileEntity_EnhancedMult tHatch.mRecipeMap = getRecipeMap(); if (isValidMetaTileEntity(tHatch) && tHatch.getFillableStack() != null) { FluidStack tStack = tHatch.getFillableStack(); - if (tStack.isFluidEqual(GT_ModHandler.getSteam(1000)) || tStack.isFluidEqual(Materials.Hydrogen.getGas(1000))) { + if (GT_Recipe.GT_Recipe_Map.sCrackingRecipes.isValidCatalystFluid(tStack)) { rList.add(tStack); } } @@ -346,4 +347,4 @@ public class GT_MetaTileEntity_OilCracker extends GT_MetaTileEntity_EnhancedMult public void construct(ItemStack stackSize, boolean hintsOnly) { buildPiece(STRUCTURE_PIECE_MAIN, stackSize, hintsOnly, 2, 1, 0); } -} +} \ No newline at end of file -- cgit From dc2f6c3a41018626705390934a8758a837cc501c Mon Sep 17 00:00:00 2001 From: kuba6000 Date: Sat, 21 Aug 2021 17:38:11 +0200 Subject: Fix for Assembly line not taking power --- .../tileentities/machines/multi/GT_MetaTileEntity_AssemblyLine.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/main/java/gregtech/common/tileentities') diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AssemblyLine.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AssemblyLine.java index e9608fce29..3962cbc196 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AssemblyLine.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AssemblyLine.java @@ -248,6 +248,8 @@ public class GT_MetaTileEntity_AssemblyLine extends GT_MetaTileEntity_EnhancedMu if (!tTag.hasKey("eu")) continue; + if (GT_Values.D1) GT_FML_LOGGER.info("Check overclock"); + calculateOverclockedNessMulti(tTag.getInteger("eu"), tMaxProgressTime, 1, getMaxInputVoltage()); //In case recipe is too OP for that machine if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1) { @@ -277,8 +279,8 @@ public class GT_MetaTileEntity_AssemblyLine extends GT_MetaTileEntity_EnhancedMu mInputHatches.get(i).mFluid = null; } } - if (GT_Values.D1) GT_FML_LOGGER.info("Check overclock"); + this.mEUt = -this.mEUt; this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); this.mEfficiencyIncrease = 10000; updateSlots(); -- cgit From 36b8dea917e42f7c57625b2e6e6be350ebc62b31 Mon Sep 17 00:00:00 2001 From: kuba6000 Date: Sat, 21 Aug 2021 17:43:43 +0200 Subject: Add guard --- .../tileentities/machines/multi/GT_MetaTileEntity_AssemblyLine.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/main/java/gregtech/common/tileentities') diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AssemblyLine.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AssemblyLine.java index 3962cbc196..0a19536bf1 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AssemblyLine.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AssemblyLine.java @@ -280,7 +280,8 @@ public class GT_MetaTileEntity_AssemblyLine extends GT_MetaTileEntity_EnhancedMu } } - this.mEUt = -this.mEUt; + if (this.mEUt > 0) + this.mEUt = -this.mEUt; this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); this.mEfficiencyIncrease = 10000; updateSlots(); -- cgit From 2f9def7ada5436cc2b5ebf348e15c6385bb3e58d Mon Sep 17 00:00:00 2001 From: GlodBlock <60341015+GlodBlock@users.noreply.github.com> Date: Sun, 22 Aug 2021 17:50:32 +0800 Subject: make Catalyst Fluid can't be input at side --- .../tileentities/machines/multi/GT_MetaTileEntity_OilCracker.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/main/java/gregtech/common/tileentities') diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilCracker.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilCracker.java index fa6d9c8163..b9ade288c1 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilCracker.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilCracker.java @@ -328,7 +328,8 @@ public class GT_MetaTileEntity_OilCracker extends GT_MetaTileEntity_EnhancedMult for (GT_MetaTileEntity_Hatch_Input tHatch : mInputHatches) { tHatch.mRecipeMap = getRecipeMap(); if (isValidMetaTileEntity(tHatch) && tHatch.getFillableStack() != null) { - rList.add(tHatch.getFillableStack()); + if (!GT_Recipe.GT_Recipe_Map.sCrackingRecipes.isValidCatalystFluid(tHatch.getFillableStack())) + rList.add(tHatch.getFillableStack()); } } for (GT_MetaTileEntity_Hatch_Input tHatch : mMiddleInputHatches) { @@ -347,4 +348,4 @@ public class GT_MetaTileEntity_OilCracker extends GT_MetaTileEntity_EnhancedMult public void construct(ItemStack stackSize, boolean hintsOnly) { buildPiece(STRUCTURE_PIECE_MAIN, stackSize, hintsOnly, 2, 1, 0); } -} \ No newline at end of file +} -- cgit From 3e7c6ddbd51fb3d0495b06578d1fe8ecc96d31d2 Mon Sep 17 00:00:00 2001 From: kuba6000 Date: Wed, 25 Aug 2021 21:45:09 +0200 Subject: Remove random maintenance problem from fusion reactors --- .../multi/GT_MetaTileEntity_FusionComputer.java | 72 ++++++++++------------ 1 file changed, 33 insertions(+), 39 deletions(-) (limited to 'src/main/java/gregtech/common/tileentities') diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer.java index ca6495ea65..2cce5c7272 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer.java @@ -353,49 +353,44 @@ public abstract class GT_MetaTileEntity_FusionComputer extends GT_MetaTileEntity if (this.mEUStore <= 0 && mMaxProgresstime > 0) { stopMachine(); } - if (getRepairStatus() > 0) { - if (mMaxProgresstime > 0 && doRandomMaintenanceDamage()) { - this.getBaseMetaTileEntity().decreaseStoredEnergyUnits(mEUt, true); - if (mMaxProgresstime > 0 && ++mProgresstime >= mMaxProgresstime) { - if (mOutputItems != null) - for (ItemStack tStack : mOutputItems) if (tStack != null) addOutput(tStack); - if (mOutputFluids != null) - for (FluidStack tStack : mOutputFluids) if (tStack != null) addOutput(tStack); - mEfficiency = Math.max(0, Math.min(mEfficiency + mEfficiencyIncrease, getMaxEfficiency(mInventory[1]) - ((getIdealStatus() - getRepairStatus()) * 1000))); - mOutputItems = null; - mProgresstime = 0; - mMaxProgresstime = 0; - mEfficiencyIncrease = 0; - if (mOutputFluids != null && mOutputFluids.length > 0) { - try { - GT_Mod.achievements.issueAchivementHatchFluid(aBaseMetaTileEntity.getWorld().getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()), mOutputFluids[0]); - } catch (Exception ignored) { - } + if (mMaxProgresstime > 0) { + this.getBaseMetaTileEntity().decreaseStoredEnergyUnits(mEUt, true); + if (mMaxProgresstime > 0 && ++mProgresstime >= mMaxProgresstime) { + if (mOutputItems != null) + for (ItemStack tStack : mOutputItems) if (tStack != null) addOutput(tStack); + if (mOutputFluids != null) + for (FluidStack tStack : mOutputFluids) if (tStack != null) addOutput(tStack); + mEfficiency = Math.max(0, Math.min(mEfficiency + mEfficiencyIncrease, getMaxEfficiency(mInventory[1]) - (getIdealStatus() * 1000))); + mOutputItems = null; + mProgresstime = 0; + mMaxProgresstime = 0; + mEfficiencyIncrease = 0; + if (mOutputFluids != null && mOutputFluids.length > 0) { + try { + GT_Mod.achievements.issueAchivementHatchFluid(aBaseMetaTileEntity.getWorld().getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()), mOutputFluids[0]); + } catch (Exception ignored) { } - this.mEUStore = (int) aBaseMetaTileEntity.getStoredEU(); - if (aBaseMetaTileEntity.isAllowedToWork()) - checkRecipe(mInventory[1]); } - } else { - if (aTick % 100 == 0 || aBaseMetaTileEntity.hasWorkJustBeenEnabled() || aBaseMetaTileEntity.hasInventoryBeenModified()) { - turnCasingActive(mMaxProgresstime > 0); - if (aBaseMetaTileEntity.isAllowedToWork()) { - this.mEUStore = (int) aBaseMetaTileEntity.getStoredEU(); - if (checkRecipe(mInventory[1])) { - if (this.mEUStore < this.mLastRecipe.mSpecialValue - this.mEUt) { - mMaxProgresstime = 0; - turnCasingActive(false); - } - aBaseMetaTileEntity.decreaseStoredEnergyUnits(this.mLastRecipe.mSpecialValue - this.mEUt, true); + this.mEUStore = (int) aBaseMetaTileEntity.getStoredEU(); + if (aBaseMetaTileEntity.isAllowedToWork()) + checkRecipe(mInventory[1]); + } + } else { + if (aTick % 100 == 0 || aBaseMetaTileEntity.hasWorkJustBeenEnabled() || aBaseMetaTileEntity.hasInventoryBeenModified()) { + turnCasingActive(mMaxProgresstime > 0); + if (aBaseMetaTileEntity.isAllowedToWork()) { + this.mEUStore = (int) aBaseMetaTileEntity.getStoredEU(); + if (checkRecipe(mInventory[1])) { + if (this.mEUStore < this.mLastRecipe.mSpecialValue - this.mEUt) { + mMaxProgresstime = 0; + turnCasingActive(false); } + aBaseMetaTileEntity.decreaseStoredEnergyUnits(this.mLastRecipe.mSpecialValue - this.mEUt, true); } - if (mMaxProgresstime <= 0) - mEfficiency = Math.max(0, mEfficiency - 1000); } + if (mMaxProgresstime <= 0) + mEfficiency = Math.max(0, mEfficiency - 1000); } - } else { - this.mLastRecipe = null; - stopMachine(); } } else { turnCasingActive(false); @@ -403,8 +398,7 @@ public abstract class GT_MetaTileEntity_FusionComputer extends GT_MetaTileEntity stopMachine(); } } - aBaseMetaTileEntity.setErrorDisplayID((aBaseMetaTileEntity.getErrorDisplayID() & ~127) | (mWrench ? 0 : 1) | (mScrewdriver ? 0 : 2) | (mSoftHammer ? 0 : 4) | (mHardHammer ? 0 : 8) - | (mSolderingTool ? 0 : 16) | (mCrowbar ? 0 : 32) | (mMachine ? 0 : 64)); + aBaseMetaTileEntity.setErrorDisplayID((aBaseMetaTileEntity.getErrorDisplayID() & ~127) | (mMachine ? 0 : 64)); aBaseMetaTileEntity.setActive(mMaxProgresstime > 0); } } -- cgit From 1b1c6df5800999a30f1a5842e516be0d0b85ba9b Mon Sep 17 00:00:00 2001 From: kuba6000 Date: Wed, 25 Aug 2021 21:50:30 +0200 Subject: Small mistake --- .../tileentities/machines/multi/GT_MetaTileEntity_FusionComputer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/java/gregtech/common/tileentities') diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer.java index 2cce5c7272..3536030fe0 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer.java @@ -360,7 +360,7 @@ public abstract class GT_MetaTileEntity_FusionComputer extends GT_MetaTileEntity for (ItemStack tStack : mOutputItems) if (tStack != null) addOutput(tStack); if (mOutputFluids != null) for (FluidStack tStack : mOutputFluids) if (tStack != null) addOutput(tStack); - mEfficiency = Math.max(0, Math.min(mEfficiency + mEfficiencyIncrease, getMaxEfficiency(mInventory[1]) - (getIdealStatus() * 1000))); + mEfficiency = Math.max(0, Math.min(mEfficiency + mEfficiencyIncrease, getMaxEfficiency(mInventory[1]))); mOutputItems = null; mProgresstime = 0; mMaxProgresstime = 0; -- cgit From d4b50c0eb2de01cca2a41cae2e9395e05db4c656 Mon Sep 17 00:00:00 2001 From: Glease <4586901+Glease@users.noreply.github.com> Date: Sat, 28 Aug 2021 22:42:55 +0800 Subject: Fix PA not setting input filter properly Also slightly improved PA code quality because those IntelliJ warnings are too annoying. Signed-off-by: Glease <4586901+Glease@users.noreply.github.com> --- .../GT_MetaTileEntity_MultiBlockBase.java | 8 ++- .../multi/GT_MetaTileEntity_ProcessingArray.java | 76 ++++++++++++---------- 2 files changed, 47 insertions(+), 37 deletions(-) (limited to 'src/main/java/gregtech/common/tileentities') diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java index 0a1b2e8b02..7a2f1bedac 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java @@ -858,10 +858,14 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch) { ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex); } - if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) { + ((GT_MetaTileEntity_Hatch_Input) aMetaTileEntity).mRecipeMap = getRecipeMap(); return mInputHatches.add((GT_MetaTileEntity_Hatch_Input) aMetaTileEntity); - if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus) + } + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus) { + ((GT_MetaTileEntity_Hatch_InputBus) aMetaTileEntity).mRecipeMap = getRecipeMap(); return mInputBusses.add((GT_MetaTileEntity_Hatch_InputBus) aMetaTileEntity); + } if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output) return mOutputHatches.add((GT_MetaTileEntity_Hatch_Output) aMetaTileEntity); if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ProcessingArray.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ProcessingArray.java index 26cccb7819..ad0f5bd7f8 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ProcessingArray.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ProcessingArray.java @@ -12,6 +12,7 @@ import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_CubicMultiBlockBase; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Energy; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_InputBus; import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_Multiblock_Tooltip_Builder; @@ -26,12 +27,11 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.StatCollector; import net.minecraftforge.fluids.FluidStack; -import org.apache.commons.lang3.ArrayUtils; import java.util.ArrayList; import java.util.Arrays; -import java.util.Collections; -import java.util.List; +import java.util.Objects; +import java.util.stream.Stream; import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; import static gregtech.api.enums.GT_Values.VN; @@ -43,10 +43,12 @@ import static gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Basi public class GT_MetaTileEntity_ProcessingArray extends GT_MetaTileEntity_CubicMultiBlockBase { + private GT_Recipe_Map mLastRecipeMap; private GT_Recipe mLastRecipe; private int tTier = 0; private int mMult = 0; private boolean mSeparate = false; + private String mMachineName = ""; public GT_MetaTileEntity_ProcessingArray(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional); @@ -67,7 +69,7 @@ public class GT_MetaTileEntity_ProcessingArray extends GT_MetaTileEntity_CubicMu tt.addMachineType("Processing Array") .addInfo("Runs supplied machines as if placed in the world") .addInfo("Place up to 64 singleblock GT machines into the controller") - .addInfo("Note that tou still need to supply power to them all") + .addInfo("Note that you still need to supply power to them all") .addInfo("Use a screwdriver to enable separate input busses") .addInfo("Maximal overclockedness of machines inside: Tier 9") .addInfo("Doesn't work on certain machines, deal with it") @@ -142,8 +144,6 @@ public class GT_MetaTileEntity_ProcessingArray extends GT_MetaTileEntity_CubicMu return aStack != null && aStack.getUnlocalizedName().startsWith("gt.blockmachines.basicmachine."); } - private String mMachine = ""; - @Override public boolean checkRecipe(ItemStack aStack) { if (!isCorrectMachinePart(mInventory[1])) { @@ -152,18 +152,18 @@ public class GT_MetaTileEntity_ProcessingArray extends GT_MetaTileEntity_CubicMu GT_Recipe.GT_Recipe_Map map = getRecipeMap(); if (map == null) return false; - if (!mMachine.equals(mInventory[1].getUnlocalizedName())) { + if (!mMachineName.equals(mInventory[1].getUnlocalizedName())) { mLastRecipe = null; - mMachine = mInventory[1].getUnlocalizedName(); + mMachineName = mInventory[1].getUnlocalizedName(); } int machineTier = 0; if (mLastRecipe == null) { try { - int length = mMachine.length(); + int length = mMachineName.length(); - machineTier = Integer.parseInt(mMachine.substring(length - 2)); + machineTier = Integer.parseInt(mMachineName.substring(length - 2)); } catch (NumberFormatException ignored) { /* do nothing */ @@ -285,37 +285,43 @@ public class GT_MetaTileEntity_ProcessingArray extends GT_MetaTileEntity_CubicMu int tSize = tFOut.amount; tFOut.amount = tSize * i; } - tOut = clean(tOut); this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime); - List overStacks = new ArrayList<>(); - for (ItemStack itemStack : tOut) { - while (itemStack != null && itemStack.getMaxStackSize() < itemStack.stackSize) { - ItemStack tmp = itemStack.copy(); - tmp.stackSize = tmp.getMaxStackSize(); - itemStack.stackSize = itemStack.stackSize - itemStack.getMaxStackSize(); - overStacks.add(tmp); - } - } - if (!overStacks.isEmpty()) { - ItemStack[] tmp = new ItemStack[overStacks.size()]; - tmp = overStacks.toArray(tmp); - tOut = ArrayUtils.addAll(tOut, tmp); - } - List tSList = new ArrayList<>(); - for (ItemStack tS : tOut) { - if (tS.stackSize > 0) tSList.add(tS); - } - tOut = tSList.toArray(new ItemStack[0]); - this.mOutputItems = tOut; + this.mOutputItems = Arrays.stream(tOut) + .filter(Objects::nonNull) + .flatMap(GT_MetaTileEntity_ProcessingArray::splitOversizedStack) + .filter(is -> is.stackSize > 0) + .toArray(ItemStack[]::new); this.mOutputFluids = new FluidStack[]{tFOut}; updateSlots(); return true; } - public static ItemStack[] clean(final ItemStack[] v) { - List list = new ArrayList<>(Arrays.asList(v)); - list.removeAll(Collections.singleton(null)); - return list.toArray(new ItemStack[0]); + private static Stream splitOversizedStack(ItemStack aStack) { + int tMaxStackSize = aStack.getMaxStackSize(); + if (aStack.stackSize <= tMaxStackSize) return Stream.of(aStack); + int tRepeat = aStack.stackSize / tMaxStackSize; + aStack.stackSize = aStack.stackSize % tMaxStackSize; + Stream.Builder tBuilder = Stream.builder(); + tBuilder.add(aStack); + for (int i = 0; i < tRepeat; i++) { + ItemStack rStack = aStack.copy(); + rStack.stackSize = tMaxStackSize; + tBuilder.add(rStack); + } + return tBuilder.build(); + } + + @Override + public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + super.onPostTick(aBaseMetaTileEntity, aTick); + if (mMachine && aTick % 20 == 0) { + GT_Recipe_Map tCurrentMap = getRecipeMap(); + if (tCurrentMap != mLastRecipeMap) { + for (GT_MetaTileEntity_Hatch_InputBus tInputBus : mInputBusses) tInputBus.mRecipeMap = tCurrentMap; + for (GT_MetaTileEntity_Hatch_Input tInputHatch : mInputHatches) tInputHatch.mRecipeMap = tCurrentMap; + mLastRecipeMap = tCurrentMap; + } + } } @Override -- cgit From 24caf8c7f674deef1887d8d7dc1295ce567b561e Mon Sep 17 00:00:00 2001 From: DreamMasterXXL Date: Sun, 29 Aug 2021 22:10:39 +0200 Subject: create a MOD ID for Core Mod change all Core mod items match with ID Add Soldering function to Material list put all Railcraft recipes from Core mot to GT --- src/main/java/gregtech/api/enums/GT_Values.java | 3 +- src/main/java/gregtech/api/enums/Materials.java | 11 +- src/main/java/gregtech/common/items/ItemComb.java | 59 +++++---- src/main/java/gregtech/common/items/ItemDrop.java | 3 +- .../java/gregtech/common/items/ItemPropolis.java | 5 +- .../multi/GT_MetaTileEntity_PyrolyseOven.java | 5 +- .../materialprocessing/ProcessingModSupport.java | 4 +- .../gregtech/loaders/misc/GT_BeeDefinition.java | 133 +++++++++++---------- .../loaders/oreprocessing/ProcessingCrafting.java | 4 +- .../loaders/postload/GT_MachineRecipeLoader.java | 64 ++++++++-- .../loaders/preload/GT_Loader_ItemData.java | 4 +- .../loaders/preload/GT_Loader_OreDictionary.java | 20 ++-- 12 files changed, 187 insertions(+), 128 deletions(-) (limited to 'src/main/java/gregtech/common/tileentities') diff --git a/src/main/java/gregtech/api/enums/GT_Values.java b/src/main/java/gregtech/api/enums/GT_Values.java index 0c484d05e0..f30360ca58 100644 --- a/src/main/java/gregtech/api/enums/GT_Values.java +++ b/src/main/java/gregtech/api/enums/GT_Values.java @@ -174,7 +174,8 @@ public class GT_Values { MOD_ID_BC_CORE = "BuildCraft|Core", MOD_ID_GC_CORE = "GalacticraftCore", MOD_ID_GC_MARS = "GalacticraftMars", - MOD_ID_GC_PLANETS = "GalacticraftPlanets"; + MOD_ID_GC_PLANETS = "GalacticraftPlanets", + MOD_ID_DC = "dreamcraft"; /** * File Paths and Resource Paths */ diff --git a/src/main/java/gregtech/api/enums/Materials.java b/src/main/java/gregtech/api/enums/Materials.java index 840ffa06fa..dee3363245 100644 --- a/src/main/java/gregtech/api/enums/Materials.java +++ b/src/main/java/gregtech/api/enums/Materials.java @@ -24,6 +24,7 @@ import java.util.stream.Collectors; import java.util.stream.IntStream; import static gregtech.api.enums.GT_Values.M; +import static gregtech.api.enums.GT_Values.MOD_ID_DC; @SuppressWarnings("ALL") public class Materials implements IColorModulationContainer, ISubTagContainer { @@ -2094,7 +2095,7 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { initMaterialProperties(); //No more material addition or manipulation should be done past this point! MATERIALS_ARRAY = MATERIALS_MAP.values().toArray(new Materials[0]); //Generate standard object array. This is a lot faster to loop over. VALUES = Arrays.asList(MATERIALS_ARRAY); - if (!Loader.isModLoaded("dreamcraft") && !GT_Mod.gregtechproxy.mEnableAllComponents) + if (!Loader.isModLoaded(MOD_ID_DC) && !GT_Mod.gregtechproxy.mEnableAllComponents) OrePrefixes.initMaterialComponents(); else { OrePrefixes.ingotHot.mDisabledItems.addAll( @@ -2800,6 +2801,13 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { return new FluidStack(steamCrackedFluids[2], amount); } + /** Check that the material is a proper soldering fluid + ** @return true if Materials is a proper soldering fluid + */ + public boolean isProperSolderingFluid() { + return mStandardMoltenFluid != null && contains(SubTag.SOLDERING_MATERIAL) && !(GregTech_API.mUseOnlyGoodSolderingMaterials && !contains(SubTag.SOLDERING_MATERIAL_GOOD)); + } + public ItemStack getCells(int amount) { return GT_OreDictUnificator.get(OrePrefixes.cell, this, amount); } @@ -2835,4 +2843,5 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { public ItemStack getPlates(int amount) { return GT_OreDictUnificator.get(OrePrefixes.plate, this, amount); } + } diff --git a/src/main/java/gregtech/common/items/ItemComb.java b/src/main/java/gregtech/common/items/ItemComb.java index 5317bfca88..25d48d6231 100644 --- a/src/main/java/gregtech/common/items/ItemComb.java +++ b/src/main/java/gregtech/common/items/ItemComb.java @@ -28,12 +28,7 @@ import net.minecraftforge.fluids.FluidStack; import java.util.List; import java.util.Arrays; -import static gregtech.api.enums.GT_Values.MOD_ID; -import static gregtech.api.enums.GT_Values.L; -import static gregtech.api.enums.GT_Values.NF; -import static gregtech.api.enums.GT_Values.NI; -import static gregtech.api.enums.GT_Values.RA; -import static gregtech.api.enums.GT_Values.V; +import static gregtech.api.enums.GT_Values.*; public class ItemComb extends Item { @SideOnly(Side.CLIENT) @@ -128,7 +123,7 @@ public class ItemComb extends Item { //ic2 addCentrifugeToItemStack(CombType.COOLANT, new ItemStack[] { GT_Bees.drop.getStackForType(DropType.COOLANT), ItemList.FR_Wax.get(1) }, new int[] {100 * 100, 100 * 100}, Voltage.HV, 196); addCentrifugeToItemStack(CombType.ENERGY, new ItemStack[] {GT_Bees.drop.getStackForType(DropType.HOT_COOLANT), ItemList.IC2_Energium_Dust.get(1L), ItemList.FR_RefractoryWax.get(1)}, new int[] {20 * 100, 20 * 100, 50 * 100}, Voltage.HV, 196); - addCentrifugeToItemStack(CombType.LAPOTRON, new ItemStack[] {GT_Bees.drop.getStackForType(DropType.LAPIS), GT_ModHandler.getModItem("dreamcraft", "item.LapotronDust", 1, 0), GT_ModHandler.getModItem("MagicBees", "wax", 1, 2) }, new int[] {20 * 100, 15 * 100, 40 * 100}, Voltage.HV, 196); + addCentrifugeToItemStack(CombType.LAPOTRON, new ItemStack[] {GT_Bees.drop.getStackForType(DropType.LAPIS), GT_ModHandler.getModItem(MOD_ID_DC, "item.LapotronDust", 1, 0), GT_ModHandler.getModItem("MagicBees", "wax", 1, 2) }, new int[] {20 * 100, 15 * 100, 40 * 100}, Voltage.HV, 196); addCentrifugeToMaterial(CombType.PYROTHEUM, new Materials[] {Materials.Blaze, Materials.Pyrotheum}, new int[] { 25 * 100, 20 * 100}, new int[] {}, Voltage.HV, NI, 30 * 100); addCentrifugeToMaterial(CombType.CRYOTHEUM, new Materials[] {Materials.Blizz, Materials.Cryotheum}, new int[] { 25 * 100, 20 * 100}, new int[] {}, Voltage.HV, NI, 30 * 100); @@ -299,7 +294,7 @@ public class ItemComb extends Item { addProcessGT(CombType.SALT, new Materials[] {Materials.Salt, Materials.RockSalt, Materials.Saltpeter}, Voltage.MV); addProcessGT(CombType.ELECTROTINE, new Materials[] {Materials.Electrotine, Materials.Electrum, Materials.Redstone}, Voltage.MV); if(GT_Mod.gregtechproxy.mNerfedCombs) { - addCentrifugeToItemStack(CombType.SALT, new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Salt, 1), GT_ModHandler.getModItem("dreamcraft", "item.EdibleSalt", 1L, 0), ItemList.FR_Wax.get(1) }, new int[] {100 * 100, 50 * 100, 50 * 100}, Voltage.MV, 160); + addCentrifugeToItemStack(CombType.SALT, new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Salt, 1), GT_ModHandler.getModItem(MOD_ID_DC, "item.EdibleSalt", 1L, 0), ItemList.FR_Wax.get(1) }, new int[] {100 * 100, 50 * 100, 50 * 100}, Voltage.MV, 160); }else { addCentrifugeToMaterial(CombType.BAUXITE, new Materials[] {Materials.Bauxite, Materials.Aluminium}, new int[] { 75 * 100, 55 * 100}, new int[] {}, Voltage.ULV , NI, 30 * 100); addCentrifugeToMaterial(CombType.ALUMINIUM, new Materials[] {Materials.Aluminium, Materials.Bauxite}, new int[] { 60 * 100, 80 * 100}, new int[] {}, Voltage.ULV , NI, 30 * 100); @@ -313,7 +308,7 @@ public class ItemComb extends Item { addCentrifugeToMaterial(CombType.IRIDIUM, new Materials[] {Materials.Iridium, Materials.Osmium}, new int[] { 20 * 100, 15 * 100}, new int[] {}, Voltage.IV, NI, 30 * 100); addCentrifugeToMaterial(CombType.OSMIUM, new Materials[] {Materials.Osmium, Materials.Iridium}, new int[] { 25 * 100, 15 * 100}, new int[] {}, Voltage.IV, NI, 30 * 100); addCentrifugeToMaterial(CombType.LITHIUM, new Materials[] {Materials.Lithium, Materials.Aluminium}, new int[] { 85 * 100, 75 * 100}, new int[] {}, Voltage.MV, NI, 30 * 100); - addCentrifugeToItemStack(CombType.SALT, new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Salt, 1), GT_ModHandler.getModItem("dreamcraft", "item.EdibleSalt", 1L, 0),GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.RockSalt, 1), GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Saltpeter, 1), ItemList.FR_Wax.get(1) }, new int[] {100 * 100, 50 * 100, 75 * 100, 65 * 100, 50 * 100}, Voltage.MV, 160); + addCentrifugeToItemStack(CombType.SALT, new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Salt, 1), GT_ModHandler.getModItem(MOD_ID_DC, "item.EdibleSalt", 1L, 0),GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.RockSalt, 1), GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Saltpeter, 1), ItemList.FR_Wax.get(1) }, new int[] {100 * 100, 50 * 100, 75 * 100, 65 * 100, 50 * 100}, Voltage.MV, 160); addCentrifugeToMaterial(CombType.ELECTROTINE, new Materials[] {Materials.Electrotine, Materials.Electrum, Materials.Redstone}, new int[] { 80, 75, 65}, new int[] {}, Voltage.MV, NI, 30 * 100); } @@ -341,11 +336,11 @@ public class ItemComb extends Item { } // Twilight - addCentrifugeToItemStack(CombType.NAGA, new ItemStack[] { GT_ModHandler.getModItem("MagicBees", "propolis", 1L, 4), GT_ModHandler.getModItem("dreamcraft", "item.NagaScaleChip", 1L, 0), GT_ModHandler.getModItem("dreamcraft", "item.NagaScaleFragment", 1L, 0), ItemList.FR_Wax.get(1)}, new int[]{5 * 100, 33 * 100, 8 * 100, 30 * 100}, Voltage.MV); - addCentrifugeToItemStack(CombType.LICH, new ItemStack[] { GT_ModHandler.getModItem("MagicBees", "propolis", 1L, 5), GT_ModHandler.getModItem("dreamcraft", "item.LichBoneChip", 1L, 0), GT_ModHandler.getModItem("dreamcraft", "item.LichBoneFragment", 1L, 0), ItemList.FR_Wax.get(1)}, new int[]{5 * 100, 33 * 100, 8 * 100, 30 * 100}, Voltage.HV); - addCentrifugeToItemStack(CombType.HYDRA, new ItemStack[] { GT_ModHandler.getModItem("MagicBees", "propolis", 1L, 1), GT_ModHandler.getModItem("dreamcraft", "item.FieryBloodDrop", 1L, 0), GT_Bees.drop.getStackForType(DropType.HYDRA), ItemList.FR_Wax.get(1)}, new int[]{5 * 100, 33 * 100, 8 * 100, 30 * 100}, Voltage.HV); - addCentrifugeToItemStack(CombType.URGHAST, new ItemStack[] { GT_ModHandler.getModItem("MagicBees", "propolis", 1L, 2), GT_ModHandler.getModItem("dreamcraft", "item.CarminiteChip", 1L, 0), GT_ModHandler.getModItem("dreamcraft", "item.CarminiteFragment", 1L, 0), ItemList.FR_Wax.get(1)}, new int[]{5 * 100, 33 * 100, 8 * 100, 30 * 100}, Voltage.EV); - addCentrifugeToItemStack(CombType.SNOWQUEEN, new ItemStack[] { GT_ModHandler.getModItem("MagicBees", "propolis", 1L, 3), GT_ModHandler.getModItem("dreamcraft", "item.SnowQueenBloodDrop", 1L, 0), GT_Bees.drop.getStackForType(DropType.SNOW_QUEEN), ItemList.FR_Wax.get(1)}, new int[]{5 * 100, 33 * 100, 8 * 100, 30 * 100}, Voltage.EV); + addCentrifugeToItemStack(CombType.NAGA, new ItemStack[] { GT_ModHandler.getModItem("MagicBees", "propolis", 1L, 4), GT_ModHandler.getModItem(MOD_ID_DC, "item.NagaScaleChip", 1L, 0), GT_ModHandler.getModItem(MOD_ID_DC, "item.NagaScaleFragment", 1L, 0), ItemList.FR_Wax.get(1)}, new int[]{5 * 100, 33 * 100, 8 * 100, 30 * 100}, Voltage.MV); + addCentrifugeToItemStack(CombType.LICH, new ItemStack[] { GT_ModHandler.getModItem("MagicBees", "propolis", 1L, 5), GT_ModHandler.getModItem(MOD_ID_DC, "item.LichBoneChip", 1L, 0), GT_ModHandler.getModItem(MOD_ID_DC, "item.LichBoneFragment", 1L, 0), ItemList.FR_Wax.get(1)}, new int[]{5 * 100, 33 * 100, 8 * 100, 30 * 100}, Voltage.HV); + addCentrifugeToItemStack(CombType.HYDRA, new ItemStack[] { GT_ModHandler.getModItem("MagicBees", "propolis", 1L, 1), GT_ModHandler.getModItem(MOD_ID_DC, "item.FieryBloodDrop", 1L, 0), GT_Bees.drop.getStackForType(DropType.HYDRA), ItemList.FR_Wax.get(1)}, new int[]{5 * 100, 33 * 100, 8 * 100, 30 * 100}, Voltage.HV); + addCentrifugeToItemStack(CombType.URGHAST, new ItemStack[] { GT_ModHandler.getModItem("MagicBees", "propolis", 1L, 2), GT_ModHandler.getModItem(MOD_ID_DC, "item.CarminiteChip", 1L, 0), GT_ModHandler.getModItem(MOD_ID_DC, "item.CarminiteFragment", 1L, 0), ItemList.FR_Wax.get(1)}, new int[]{5 * 100, 33 * 100, 8 * 100, 30 * 100}, Voltage.EV); + addCentrifugeToItemStack(CombType.SNOWQUEEN, new ItemStack[] { GT_ModHandler.getModItem("MagicBees", "propolis", 1L, 3), GT_ModHandler.getModItem(MOD_ID_DC, "item.SnowQueenBloodDrop", 1L, 0), GT_Bees.drop.getStackForType(DropType.SNOW_QUEEN), ItemList.FR_Wax.get(1)}, new int[]{5 * 100, 33 * 100, 8 * 100, 30 * 100}, Voltage.EV); // HEE addCentrifugeToItemStack(CombType.ENDDUST, new ItemStack[] { GT_ModHandler.getModItem("MagicBees", "wax", 1L, 0), GT_Bees.propolis.getStackForType(PropolisType.End), GT_Bees.drop.getStackForType(DropType.ENDERGOO), }, new int[]{20 * 100, 15 * 100, 10 * 100}, Voltage.HV); @@ -359,12 +354,12 @@ public class ItemComb extends Item { if(!GT_Mod.gregtechproxy.mNerfedCombs) { addCentrifugeToMaterial(CombType.ENDIUM,new Materials[] {Materials.HeeEndium}, new int[] {50 * 100}, new int[] {}, Voltage.HV, GT_ModHandler.getModItem("MagicBees", "wax", 1L, 0), 20 * 100); } - addCentrifugeToItemStack(CombType.RUNEI, new ItemStack[] { GT_ModHandler.getModItem("MagicBees", "wax", 1L, 0), GT_ModHandler.getModItem("dreamcraft", "item.RuneOfPowerFragment", 1L, 0), GT_ModHandler.getModItem("dreamcraft", "item.RuneOfAgilityFragment", 1L, 0), GT_ModHandler.getModItem("dreamcraft", "item.RuneOfVigorFragment", 1L, 0), GT_ModHandler.getModItem("dreamcraft", "item.RuneOfDefenseFragment", 1L, 0), GT_ModHandler.getModItem("dreamcraft", "item.RuneOfMagicFragment", 1L, 0) }, new int[]{25 * 100, 5 * 100, 5 * 100, 5 * 100, 5 * 100, 5 * 100}, Voltage.IV); - addCentrifugeToItemStack(CombType.RUNEII, new ItemStack[] { GT_ModHandler.getModItem("MagicBees", "wax", 1L, 0), GT_ModHandler.getModItem("dreamcraft", "item.RuneOfVoidFragment", 1L, 0) }, new int[]{50 * 100, (int) (2.5 * 100)}, Voltage.IV); + addCentrifugeToItemStack(CombType.RUNEI, new ItemStack[] { GT_ModHandler.getModItem("MagicBees", "wax", 1L, 0), GT_ModHandler.getModItem(MOD_ID_DC, "item.RuneOfPowerFragment", 1L, 0), GT_ModHandler.getModItem(MOD_ID_DC, "item.RuneOfAgilityFragment", 1L, 0), GT_ModHandler.getModItem(MOD_ID_DC, "item.RuneOfVigorFragment", 1L, 0), GT_ModHandler.getModItem(MOD_ID_DC, "item.RuneOfDefenseFragment", 1L, 0), GT_ModHandler.getModItem(MOD_ID_DC, "item.RuneOfMagicFragment", 1L, 0) }, new int[]{25 * 100, 5 * 100, 5 * 100, 5 * 100, 5 * 100, 5 * 100}, Voltage.IV); + addCentrifugeToItemStack(CombType.RUNEII, new ItemStack[] { GT_ModHandler.getModItem("MagicBees", "wax", 1L, 0), GT_ModHandler.getModItem(MOD_ID_DC, "item.RuneOfVoidFragment", 1L, 0) }, new int[]{50 * 100, (int) (2.5 * 100)}, Voltage.IV); addCentrifugeToItemStack(CombType.FIREESSENSE, new ItemStack[] { GT_ModHandler.getModItem("MagicBees", "wax", 1L, 0), GT_Bees.propolis.getStackForType(PropolisType.Fireessence), GT_Bees.drop.getStackForType(DropType.ENDERGOO) }, new int[]{30 * 100, (int) (7.5 * 100), 20 * 100}, Voltage.IV); //Space Line - addCentrifugeToItemStack(CombType.SPACE, new ItemStack[] { ItemList.FR_Wax.get(1L), ItemList.FR_RefractoryWax.get(1L), GT_Bees.drop.getStackForType(DropType.OXYGEN), GT_ModHandler.getModItem("dreamcraft", "item.CoinSpace", 1L, 0)}, new int[]{50 * 100, 30 * 100, 15 * 100, 5 * 100}, Voltage.HV); + addCentrifugeToItemStack(CombType.SPACE, new ItemStack[] { ItemList.FR_Wax.get(1L), ItemList.FR_RefractoryWax.get(1L), GT_Bees.drop.getStackForType(DropType.OXYGEN), GT_ModHandler.getModItem(MOD_ID_DC, "item.CoinSpace", 1L, 0)}, new int[]{50 * 100, 30 * 100, 15 * 100, 5 * 100}, Voltage.HV); addProcessGT(CombType.METEORICIRON, new Materials[] {Materials.MeteoricIron, Materials.Iron}, Voltage.HV); addProcessGT(CombType.DESH, new Materials[] {Materials.Desh, Materials.Titanium}, Voltage.EV); addProcessGT(CombType.LEDOX, new Materials[] {Materials.Ledox, Materials.CallistoIce, Materials.Lead}, Voltage.EV); @@ -389,21 +384,21 @@ public class ItemComb extends Item { } //Planet Line - addCentrifugeToItemStack(CombType.MOON, new ItemStack[] {ItemList.FR_Wax.get(1L), GT_ModHandler.getModItem("dreamcraft", "item.MoonStoneDust", 1L, 0)}, new int[]{50 * 100, 30 * 100 }, Voltage.MV, 300); - addCentrifugeToItemStack(CombType.MARS, new ItemStack[] {ItemList.FR_Wax.get(1L), GT_ModHandler.getModItem("dreamcraft", "item.MarsStoneDust", 1L, 0)}, new int[]{50 * 100, 30 * 100 }, Voltage.HV, 300); - addCentrifugeToItemStack(CombType.JUPITER, new ItemStack[] { GT_ModHandler.getModItem("dreamcraft", "item.IoStoneDust", 1L, 0), GT_ModHandler.getModItem("dreamcraft", "item.EuropaIceDust", 1L, 0), GT_ModHandler.getModItem("dreamcraft", "item.EuropaStoneDust", 1L, 0), GT_ModHandler.getModItem("dreamcraft", "item.GanymedeStoneDust", 1L, 0), GT_ModHandler.getModItem("dreamcraft", "item.CallistoStoneDust", 1L, 0), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.CallistoIce, 1L), ItemList.FR_Wax.get(1L)}, new int[]{30 * 100, 30 * 100, 30 * 100, 30 * 100, 30 * 100, 5 * 100, 50 * 100 }, Voltage.HV, 300); - addCentrifugeToItemStack(CombType.MERCURY, new ItemStack[] {ItemList.FR_Wax.get(1L), GT_ModHandler.getModItem("dreamcraft", "item.MercuryCoreDust", 1L, 0), GT_ModHandler.getModItem("dreamcraft", "item.MercuryStoneDust", 1L, 0)}, new int[]{50 * 100, 30 * 100, 30 * 100 }, Voltage.EV, 300); - addCentrifugeToItemStack(CombType.VENUS, new ItemStack[] {ItemList.FR_Wax.get(1L), GT_ModHandler.getModItem("dreamcraft", "item.VenusStoneDust", 1L, 0)}, new int[]{50 * 100, 30 * 100 }, Voltage.EV, 300); - addCentrifugeToItemStack(CombType.SATURN, new ItemStack[] {ItemList.FR_Wax.get(1L), GT_ModHandler.getModItem("dreamcraft", "item.EnceladusStoneDust", 1L, 0), GT_ModHandler.getModItem("dreamcraft", "item.TitanStoneDust", 1L, 0)}, new int[]{50 * 100, 30 * 100, 30 * 100 }, Voltage.IV, 300); - addCentrifugeToItemStack(CombType.URANUS, new ItemStack[] {ItemList.FR_Wax.get(1L), GT_ModHandler.getModItem("dreamcraft", "item.MirandaStoneDust", 1L, 0), GT_ModHandler.getModItem("dreamcraft", "item.OberonStoneDust", 1L, 0)}, new int[]{50 * 100, 30 * 100, 30 * 100 }, Voltage.IV, 300); - addCentrifugeToItemStack(CombType.NEPTUN, new ItemStack[] {ItemList.FR_Wax.get(1L), GT_ModHandler.getModItem("dreamcraft", "item.ProteusStoneDust", 1L, 0), GT_ModHandler.getModItem("dreamcraft", "item.TritonStoneDust", 1L, 0)}, new int[]{50 * 100, 30 * 100, 30 * 100 }, Voltage.IV, 300); - addCentrifugeToItemStack(CombType.PLUTO, new ItemStack[] {ItemList.FR_Wax.get(1L), GT_ModHandler.getModItem("dreamcraft", "item.PlutoStoneDust", 1L, 0), GT_ModHandler.getModItem("dreamcraft", "item.PlutoIceDust", 1L, 0)}, new int[]{50 * 100, 30 * 100, 30 * 100 }, Voltage.LUV, 300); - addCentrifugeToItemStack(CombType.HAUMEA, new ItemStack[] {ItemList.FR_Wax.get(1L), GT_ModHandler.getModItem("dreamcraft", "item.HaumeaStoneDust", 1L, 0)}, new int[]{50 * 100, 30 * 100 }, Voltage.LUV, 300); - addCentrifugeToItemStack(CombType.MAKEMAKE, new ItemStack[] {ItemList.FR_Wax.get(1L), GT_ModHandler.getModItem("dreamcraft", "item.MakeMakeStoneDust", 1L, 0)}, new int[]{50 * 100, 30 * 100 }, Voltage.LUV, 300); - addCentrifugeToItemStack(CombType.CENTAURI, new ItemStack[] {ItemList.FR_Wax.get(1L), GT_ModHandler.getModItem("dreamcraft", "item.CentauriASurfaceDust", 1L, 0), GT_ModHandler.getModItem("dreamcraft", "item.CentauriAStoneDust", 1L, 0)}, new int[]{50 * 100, 30 * 100, 30 * 100 }, Voltage.ZPM, 300); - addCentrifugeToItemStack(CombType.TCETI, new ItemStack[] {ItemList.FR_Wax.get(1L), GT_ModHandler.getModItem("dreamcraft", "item.TCetiEStoneDust", 1L, 0)}, new int[]{50 * 100, 30 * 100 }, Voltage.ZPM, 300); - addCentrifugeToItemStack(CombType.BARNARDA, new ItemStack[] {ItemList.FR_Wax.get(1L), GT_ModHandler.getModItem("dreamcraft", "item.BarnardaEStoneDust", 1L, 0), GT_ModHandler.getModItem("dreamcraft", "item.BarnardaFStoneDust", 1L, 0)}, new int[]{50 * 100, 30 * 100, 30 * 100 }, Voltage.ZPM, 300); - addCentrifugeToItemStack(CombType.VEGA, new ItemStack[] {ItemList.FR_Wax.get(1L), GT_ModHandler.getModItem("dreamcraft", "item.VegaBStoneDust", 1L, 0)}, new int[]{50 * 100, 30 * 100 }, Voltage.ZPM, 300); + addCentrifugeToItemStack(CombType.MOON, new ItemStack[] {ItemList.FR_Wax.get(1L), GT_ModHandler.getModItem(MOD_ID_DC, "item.MoonStoneDust", 1L, 0)}, new int[]{50 * 100, 30 * 100 }, Voltage.MV, 300); + addCentrifugeToItemStack(CombType.MARS, new ItemStack[] {ItemList.FR_Wax.get(1L), GT_ModHandler.getModItem(MOD_ID_DC, "item.MarsStoneDust", 1L, 0)}, new int[]{50 * 100, 30 * 100 }, Voltage.HV, 300); + addCentrifugeToItemStack(CombType.JUPITER, new ItemStack[] { GT_ModHandler.getModItem(MOD_ID_DC, "item.IoStoneDust", 1L, 0), GT_ModHandler.getModItem(MOD_ID_DC, "item.EuropaIceDust", 1L, 0), GT_ModHandler.getModItem(MOD_ID_DC, "item.EuropaStoneDust", 1L, 0), GT_ModHandler.getModItem(MOD_ID_DC, "item.GanymedeStoneDust", 1L, 0), GT_ModHandler.getModItem(MOD_ID_DC, "item.CallistoStoneDust", 1L, 0), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.CallistoIce, 1L), ItemList.FR_Wax.get(1L)}, new int[]{30 * 100, 30 * 100, 30 * 100, 30 * 100, 30 * 100, 5 * 100, 50 * 100 }, Voltage.HV, 300); + addCentrifugeToItemStack(CombType.MERCURY, new ItemStack[] {ItemList.FR_Wax.get(1L), GT_ModHandler.getModItem(MOD_ID_DC, "item.MercuryCoreDust", 1L, 0), GT_ModHandler.getModItem(MOD_ID_DC, "item.MercuryStoneDust", 1L, 0)}, new int[]{50 * 100, 30 * 100, 30 * 100 }, Voltage.EV, 300); + addCentrifugeToItemStack(CombType.VENUS, new ItemStack[] {ItemList.FR_Wax.get(1L), GT_ModHandler.getModItem(MOD_ID_DC, "item.VenusStoneDust", 1L, 0)}, new int[]{50 * 100, 30 * 100 }, Voltage.EV, 300); + addCentrifugeToItemStack(CombType.SATURN, new ItemStack[] {ItemList.FR_Wax.get(1L), GT_ModHandler.getModItem(MOD_ID_DC, "item.EnceladusStoneDust", 1L, 0), GT_ModHandler.getModItem(MOD_ID_DC, "item.TitanStoneDust", 1L, 0)}, new int[]{50 * 100, 30 * 100, 30 * 100 }, Voltage.IV, 300); + addCentrifugeToItemStack(CombType.URANUS, new ItemStack[] {ItemList.FR_Wax.get(1L), GT_ModHandler.getModItem(MOD_ID_DC, "item.MirandaStoneDust", 1L, 0), GT_ModHandler.getModItem(MOD_ID_DC, "item.OberonStoneDust", 1L, 0)}, new int[]{50 * 100, 30 * 100, 30 * 100 }, Voltage.IV, 300); + addCentrifugeToItemStack(CombType.NEPTUN, new ItemStack[] {ItemList.FR_Wax.get(1L), GT_ModHandler.getModItem(MOD_ID_DC, "item.ProteusStoneDust", 1L, 0), GT_ModHandler.getModItem(MOD_ID_DC, "item.TritonStoneDust", 1L, 0)}, new int[]{50 * 100, 30 * 100, 30 * 100 }, Voltage.IV, 300); + addCentrifugeToItemStack(CombType.PLUTO, new ItemStack[] {ItemList.FR_Wax.get(1L), GT_ModHandler.getModItem(MOD_ID_DC, "item.PlutoStoneDust", 1L, 0), GT_ModHandler.getModItem(MOD_ID_DC, "item.PlutoIceDust", 1L, 0)}, new int[]{50 * 100, 30 * 100, 30 * 100 }, Voltage.LUV, 300); + addCentrifugeToItemStack(CombType.HAUMEA, new ItemStack[] {ItemList.FR_Wax.get(1L), GT_ModHandler.getModItem(MOD_ID_DC, "item.HaumeaStoneDust", 1L, 0)}, new int[]{50 * 100, 30 * 100 }, Voltage.LUV, 300); + addCentrifugeToItemStack(CombType.MAKEMAKE, new ItemStack[] {ItemList.FR_Wax.get(1L), GT_ModHandler.getModItem(MOD_ID_DC, "item.MakeMakeStoneDust", 1L, 0)}, new int[]{50 * 100, 30 * 100 }, Voltage.LUV, 300); + addCentrifugeToItemStack(CombType.CENTAURI, new ItemStack[] {ItemList.FR_Wax.get(1L), GT_ModHandler.getModItem(MOD_ID_DC, "item.CentauriASurfaceDust", 1L, 0), GT_ModHandler.getModItem(MOD_ID_DC, "item.CentauriAStoneDust", 1L, 0)}, new int[]{50 * 100, 30 * 100, 30 * 100 }, Voltage.ZPM, 300); + addCentrifugeToItemStack(CombType.TCETI, new ItemStack[] {ItemList.FR_Wax.get(1L), GT_ModHandler.getModItem(MOD_ID_DC, "item.TCetiEStoneDust", 1L, 0)}, new int[]{50 * 100, 30 * 100 }, Voltage.ZPM, 300); + addCentrifugeToItemStack(CombType.BARNARDA, new ItemStack[] {ItemList.FR_Wax.get(1L), GT_ModHandler.getModItem(MOD_ID_DC, "item.BarnardaEStoneDust", 1L, 0), GT_ModHandler.getModItem(MOD_ID_DC, "item.BarnardaFStoneDust", 1L, 0)}, new int[]{50 * 100, 30 * 100, 30 * 100 }, Voltage.ZPM, 300); + addCentrifugeToItemStack(CombType.VEGA, new ItemStack[] {ItemList.FR_Wax.get(1L), GT_ModHandler.getModItem(MOD_ID_DC, "item.VegaBStoneDust", 1L, 0)}, new int[]{50 * 100, 30 * 100 }, Voltage.ZPM, 300); //Infinity Line addCentrifugeToMaterial(CombType.COSMICNEUTRONIUM, new Materials[] {Materials.CosmicNeutronium, Materials.Neutronium}, new int[] {(int) (0.5 * 100), 1 * 100}, new int[] {}, Voltage.UHV, 12000, NI, 50 * 100); diff --git a/src/main/java/gregtech/common/items/ItemDrop.java b/src/main/java/gregtech/common/items/ItemDrop.java index 61a81c678a..d9b5db5bc7 100644 --- a/src/main/java/gregtech/common/items/ItemDrop.java +++ b/src/main/java/gregtech/common/items/ItemDrop.java @@ -20,6 +20,7 @@ import net.minecraftforge.fluids.FluidStack; import java.util.List; import static gregtech.api.enums.GT_Values.MOD_ID; +import static gregtech.api.enums.GT_Values.MOD_ID_DC; public class ItemDrop extends Item { @SideOnly(Side.CLIENT) @@ -104,7 +105,7 @@ public class ItemDrop extends Item { addProcessLV(tDrop, new FluidStack(FluidRegistry.getFluid("ic2hotcoolant"), 100), GT_ModHandler.getModItem("MagicBees", "propolis", 1L, 2), 3000, 8); RecipeManagers.squeezerManager.addRecipe(40, new ItemStack[]{tDrop}, new FluidStack(FluidRegistry.getFluid("ic2hotcoolant"), 100), GT_ModHandler.getModItem("MagicBees", "propolis", 1L, 2), 30); tDrop = getStackForType(DropType.SNOW_QUEEN); - addProcessMV(tDrop, Materials.FierySteel.getFluid(200L), GT_ModHandler.getModItem("dreamcraft", "SnowQueenBloodDrop", 1L, 0), 1500, 48); + addProcessMV(tDrop, Materials.FierySteel.getFluid(200L), GT_ModHandler.getModItem(MOD_ID_DC, "SnowQueenBloodDrop", 1L, 0), 1500, 48); tDrop = getStackForType(DropType.LAPIS); addProcessLV(tDrop,new FluidStack(FluidRegistry.getFluid("ic2coolant"), 200), GT_ModHandler.getModItem("MagicBees", "propolis", 1L, 3), 5000, 1200,2); RecipeManagers.squeezerManager.addRecipe(400, new ItemStack[]{tDrop}, new FluidStack(FluidRegistry.getFluid("ic2coolant"), 100), GT_ModHandler.getModItem("MagicBees", "propolis", 1L, 3), 30); diff --git a/src/main/java/gregtech/common/items/ItemPropolis.java b/src/main/java/gregtech/common/items/ItemPropolis.java index 289536c2aa..b6fe8b242e 100644 --- a/src/main/java/gregtech/common/items/ItemPropolis.java +++ b/src/main/java/gregtech/common/items/ItemPropolis.java @@ -19,6 +19,7 @@ import net.minecraftforge.fluids.FluidRegistry; import java.util.List; import static gregtech.api.enums.GT_Values.MOD_ID; +import static gregtech.api.enums.GT_Values.MOD_ID_DC; public class ItemPropolis extends Item { @SideOnly(Side.CLIENT) @@ -81,9 +82,9 @@ public class ItemPropolis extends Item { tPropolis = getStackForType(PropolisType.Stardust); addProcessHV(tPropolis, GT_ModHandler.getModItem("HardcoreEnderExpansion", "stardust", 1, 0)); tPropolis = getStackForType(PropolisType.Ectoplasma); - addProcessEV(tPropolis, GT_ModHandler.getModItem("dreamcraft", "item.EctoplasmaChip", 1, 0)); + addProcessEV(tPropolis, GT_ModHandler.getModItem(MOD_ID_DC, "item.EctoplasmaChip", 1, 0)); tPropolis = getStackForType(PropolisType.Arcaneshard); - addProcessEV(tPropolis, GT_ModHandler.getModItem("dreamcraft", "item.ArcaneShardChip", 1, 0)); + addProcessEV(tPropolis, GT_ModHandler.getModItem(MOD_ID_DC, "item.ArcaneShardChip", 1, 0)); tPropolis = getStackForType(PropolisType.Dragonessence); addProcessIV(tPropolis, GT_ModHandler.getModItem("HardcoreEnderExpansion", "essence", 16, 0)); tPropolis = getStackForType(PropolisType.Enderman); diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PyrolyseOven.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PyrolyseOven.java index 48da2c5dce..ae96b82a23 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PyrolyseOven.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PyrolyseOven.java @@ -27,6 +27,7 @@ import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlockUn import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofChain; import static com.gtnewhorizon.structurelib.structure.StructureUtility.onElementPass; import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; +import static gregtech.api.enums.GT_Values.MOD_ID_DC; import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_PYROLYSE_OVEN; import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_PYROLYSE_OVEN_ACTIVE; import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_PYROLYSE_OVEN_ACTIVE_GLOW; @@ -43,8 +44,8 @@ public class GT_MetaTileEntity_PyrolyseOven extends GT_MetaTileEntity_EnhancedMu private static IStructureDefinition createStructureDefinition() { IStructureElement tCasingElement = - Loader.isModLoaded("dreamcraft") ? - ofBlockUnlocalizedName("dreamcraft", "gt.blockcasingsNH", 2) : + Loader.isModLoaded(MOD_ID_DC) ? + ofBlockUnlocalizedName(MOD_ID_DC, "gt.blockcasingsNH", 2) : ofBlock(GregTech_API.sBlockCasings1, 0); return StructureDefinition.builder() diff --git a/src/main/java/gregtech/loaders/materialprocessing/ProcessingModSupport.java b/src/main/java/gregtech/loaders/materialprocessing/ProcessingModSupport.java index 3bceca3533..12299e3eca 100644 --- a/src/main/java/gregtech/loaders/materialprocessing/ProcessingModSupport.java +++ b/src/main/java/gregtech/loaders/materialprocessing/ProcessingModSupport.java @@ -5,8 +5,10 @@ import gregtech.api.enums.GT_Values; import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; +import static gregtech.api.enums.GT_Values.MOD_ID_DC; + public class ProcessingModSupport implements gregtech.api.interfaces.IMaterialHandler { - public static boolean aTGregSupport = Loader.isModLoaded("TGregworks") || Loader.isModLoaded("dreamcraft"); + public static boolean aTGregSupport = Loader.isModLoaded("TGregworks") || Loader.isModLoaded(MOD_ID_DC); public static boolean aEnableUBCMats = Loader.isModLoaded("UndergroundBiomes") || aTGregSupport; public static boolean aEnableThaumcraftMats = Loader.isModLoaded("Thaumcraft") || aTGregSupport; public static boolean aEnableRotaryCraftMats = Loader.isModLoaded("RotaryCraft") || aTGregSupport; diff --git a/src/main/java/gregtech/loaders/misc/GT_BeeDefinition.java b/src/main/java/gregtech/loaders/misc/GT_BeeDefinition.java index d2eab08786..e134014d5e 100644 --- a/src/main/java/gregtech/loaders/misc/GT_BeeDefinition.java +++ b/src/main/java/gregtech/loaders/misc/GT_BeeDefinition.java @@ -43,6 +43,7 @@ import static forestry.api.core.EnumHumidity.ARID; import static forestry.api.core.EnumHumidity.DAMP; import static forestry.api.core.EnumTemperature.*; import static forestry.core.genetics.alleles.EnumAllele.*; +import static gregtech.api.enums.GT_Values.MOD_ID_DC; import static gregtech.loaders.misc.GT_BeeDefinitionReference.*; @SuppressWarnings("ALL") @@ -1810,8 +1811,8 @@ public enum GT_BeeDefinition implements IBeeDefinition { @Override public void accept(GT_BeeDefinition dis) { IBeeMutationCustom tMutation = dis.registerMutation(CALLISTO, LEAD, 7); - if (Loader.isModLoaded("dreamcraft")) - tMutation.requireResource(GameRegistry.findBlock("dreamcraft", "tile.Ledox"), 0); + if (Loader.isModLoaded(MOD_ID_DC)) + tMutation.requireResource(GameRegistry.findBlock(MOD_ID_DC, "tile.Ledox"), 0); tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(35, "Europa"));//Europa Dim } } @@ -1829,8 +1830,8 @@ public enum GT_BeeDefinition implements IBeeDefinition { @Override public void accept(GT_BeeDefinition dis) { IBeeMutationCustom tMutation = dis.registerMutation(CALLISTO, getSpecies(EXTRABEES, "freezing"), 7); - if (Loader.isModLoaded("dreamcraft")) - tMutation.requireResource(GameRegistry.findBlock("dreamcraft", "tile.CallistoColdIce"), 0); + if (Loader.isModLoaded(MOD_ID_DC)) + tMutation.requireResource(GameRegistry.findBlock(MOD_ID_DC, "tile.CallistoColdIce"), 0); tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(45, "Callisto"));//Callisto Dim } } @@ -1850,8 +1851,8 @@ public enum GT_BeeDefinition implements IBeeDefinition { @Override public void accept(GT_BeeDefinition dis) { IBeeMutationCustom tMutation = dis.registerMutation(IO, MITHRIL, 6); - if (Loader.isModLoaded("dreamcraft")) - tMutation.requireResource(GameRegistry.findBlock("dreamcraft", "tile.Mytryl"), 0); + if (Loader.isModLoaded(MOD_ID_DC)) + tMutation.requireResource(GameRegistry.findBlock(MOD_ID_DC, "tile.Mytryl"), 0); tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(36, "IO"));//IO Dim } } @@ -1871,8 +1872,8 @@ public enum GT_BeeDefinition implements IBeeDefinition { @Override public void accept(GT_BeeDefinition dis) { IBeeMutationCustom tMutation = dis.registerMutation(VENUS, OSMIUM, 6); - if (Loader.isModLoaded("dreamcraft")) - tMutation.requireResource(GameRegistry.findBlock("dreamcraft", "tile.Quantinum"), 0); + if (Loader.isModLoaded(MOD_ID_DC)) + tMutation.requireResource(GameRegistry.findBlock(MOD_ID_DC, "tile.Quantinum"), 0); tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(39, "Venus"));//Venus Dim } } @@ -1912,8 +1913,8 @@ public enum GT_BeeDefinition implements IBeeDefinition { @Override public void accept(GT_BeeDefinition dis) { IBeeMutationCustom tMutation = dis.registerMutation(ENCELADUS, EMERALD, 3); - if (Loader.isModLoaded("dreamcraft")) - tMutation.requireResource(GameRegistry.findBlock("dreamcraft", "tile.MysteriousCrystal"), 0); + if (Loader.isModLoaded(MOD_ID_DC)) + tMutation.requireResource(GameRegistry.findBlock(MOD_ID_DC, "tile.MysteriousCrystal"), 0); tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(41, "Enceladus"));//Enceladus Dim } } @@ -1933,8 +1934,8 @@ public enum GT_BeeDefinition implements IBeeDefinition { @Override public void accept(GT_BeeDefinition dis) { IBeeMutationCustom tMutation = dis.registerMutation(PLUTO, PLUTONIUM, 2); - if (Loader.isModLoaded("dreamcraft")) - tMutation.requireResource(GameRegistry.findBlock("dreamcraft", "tile.BlackPlutonium"), 0); + if (Loader.isModLoaded(MOD_ID_DC)) + tMutation.requireResource(GameRegistry.findBlock(MOD_ID_DC, "tile.BlackPlutonium"), 0); tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(49, "Pluto"));//Pluto Dim } } @@ -1962,8 +1963,8 @@ public enum GT_BeeDefinition implements IBeeDefinition { MOON(GT_BranchDefinition.PLANET, "Moon", false, new Color(0x373735), new Color(0x7E7E78), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.MOON), 0.50f); - if (Loader.isModLoaded("dreamcraft")) - beeSpecies.addSpecialty(GT_ModHandler.getModItem("dreamcraft", "item.MoonStoneDust", 1, 0), 0.10f); + if (Loader.isModLoaded(MOD_ID_DC)) + beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.MoonStoneDust", 1, 0), 0.10f); beeSpecies.setHumidity(EnumHumidity.NORMAL); beeSpecies.setTemperature(COLD); beeSpecies.setNocturnal(); @@ -1980,7 +1981,7 @@ public enum GT_BeeDefinition implements IBeeDefinition { MARS(GT_BranchDefinition.PLANET, "Mars", false, new Color(0x220D05), new Color(0x3A1505), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.MARS), 0.50f); - beeSpecies.addSpecialty(GT_ModHandler.getModItem("dreamcraft", "item.MarsStoneDust", 1, 0), 0.10f); + beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.MarsStoneDust", 1, 0), 0.10f); beeSpecies.setHumidity(ARID); beeSpecies.setTemperature(HOT); beeSpecies.setNocturnal(); @@ -1997,8 +1998,8 @@ public enum GT_BeeDefinition implements IBeeDefinition { PHOBOS(GT_BranchDefinition.PLANET, "Phobos", true, new Color(0x220D05), new Color(0x7a5706), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.MARS), 0.25f); - if (Loader.isModLoaded("dreamcraft")) - beeSpecies.addSpecialty(GT_ModHandler.getModItem("dreamcraft", "item.PhobosStoneDust", 1, 0), 0.10f); + if (Loader.isModLoaded(MOD_ID_DC)) + beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.PhobosStoneDust", 1, 0), 0.10f); beeSpecies.setHumidity(ARID); beeSpecies.setTemperature(HOT); beeSpecies.setNocturnal(); @@ -2014,7 +2015,7 @@ public enum GT_BeeDefinition implements IBeeDefinition { DEIMOS(GT_BranchDefinition.PLANET, "Deimos", true, new Color(0x220D05), new Color(0x7a3206), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.MARS), 0.25f); - beeSpecies.addSpecialty(GT_ModHandler.getModItem("dreamcraft", "item.DeimosStoneDust", 1, 0), 0.10f); + beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.DeimosStoneDust", 1, 0), 0.10f); beeSpecies.setHumidity(DAMP); beeSpecies.setTemperature(HOT); beeSpecies.setNocturnal(); @@ -2030,7 +2031,7 @@ public enum GT_BeeDefinition implements IBeeDefinition { CERES(GT_BranchDefinition.PLANET, "Ceres", true, new Color(0x3ca5b7), new Color(0x1e7267), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.JUPITER), 0.25f); - beeSpecies.addSpecialty(GT_ModHandler.getModItem("dreamcraft", "item.CeresStoneDust", 1, 0), 0.10f); + beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.CeresStoneDust", 1, 0), 0.10f); beeSpecies.setHumidity(ARID); beeSpecies.setTemperature(HOT); beeSpecies.setNocturnal(); @@ -2046,12 +2047,12 @@ public enum GT_BeeDefinition implements IBeeDefinition { JUPITER(GT_BranchDefinition.PLANET, "Jupiter", false, new Color(0x734B2E), new Color(0xD0CBC4), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.JUPITER), 0.50f); - beeSpecies.addSpecialty(GT_ModHandler.getModItem("dreamcraft", "item.CallistoStoneDust", 1, 0), 0.05f); - beeSpecies.addSpecialty(GT_ModHandler.getModItem("dreamcraft", "item.CallistoIceDust", 1, 0), 0.05f); - beeSpecies.addSpecialty(GT_ModHandler.getModItem("dreamcraft", "item.IoStoneDust", 1, 0), 0.05f); - beeSpecies.addSpecialty(GT_ModHandler.getModItem("dreamcraft", "item.EuropaStoneDust", 1, 0), 0.05f); - beeSpecies.addSpecialty(GT_ModHandler.getModItem("dreamcraft", "item.EuropaIceDust", 1, 0), 0.05f); - beeSpecies.addSpecialty(GT_ModHandler.getModItem("dreamcraft", "item.GanymedeStoneDust", 1, 0), 0.05f); + beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.CallistoStoneDust", 1, 0), 0.05f); + beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.CallistoIceDust", 1, 0), 0.05f); + beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.IoStoneDust", 1, 0), 0.05f); + beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.EuropaStoneDust", 1, 0), 0.05f); + beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.EuropaIceDust", 1, 0), 0.05f); + beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.GanymedeStoneDust", 1, 0), 0.05f); beeSpecies.setHumidity(ARID); beeSpecies.setTemperature(HOT); beeSpecies.setNocturnal(); @@ -2060,15 +2061,15 @@ public enum GT_BeeDefinition implements IBeeDefinition { template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), dis -> { IBeeMutationCustom tMutation = dis.registerMutation(MARS, DESH, 15); - if (Loader.isModLoaded("dreamcraft")) - tMutation.requireResource(GameRegistry.findBlock("dreamcraft", "tile.Ledox"), 0); + if (Loader.isModLoaded(MOD_ID_DC)) + tMutation.requireResource(GameRegistry.findBlock(MOD_ID_DC, "tile.Ledox"), 0); tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(30, "Asteriods"));//Asteriods Dim } ), IO(GT_BranchDefinition.PLANET, "IO", true, new Color(0x734B2E), new Color(0xe5701b), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.JUPITER), 0.25f); - beeSpecies.addSpecialty(GT_ModHandler.getModItem("dreamcraft", "item.IoStoneDust", 1, 0), 0.10f); + beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.IoStoneDust", 1, 0), 0.10f); beeSpecies.setHumidity(ARID); beeSpecies.setTemperature(HELLISH); }, @@ -2084,8 +2085,8 @@ public enum GT_BeeDefinition implements IBeeDefinition { EUROPA(GT_BranchDefinition.PLANET, "Europa", true, new Color(0x5982ea), new Color(0x0b36a3), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.JUPITER), 0.25f); - beeSpecies.addSpecialty(GT_ModHandler.getModItem("dreamcraft", "item.EuropaStoneDust", 1, 0), 0.10f); - beeSpecies.addSpecialty(GT_ModHandler.getModItem("dreamcraft", "item.EuropaIceDust", 1, 0), 0.10f); + beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.EuropaStoneDust", 1, 0), 0.10f); + beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.EuropaIceDust", 1, 0), 0.10f); beeSpecies.setHumidity(EnumHumidity.NORMAL); beeSpecies.setTemperature(ICY); beeSpecies.setNocturnal(); @@ -2102,7 +2103,7 @@ public enum GT_BeeDefinition implements IBeeDefinition { GANYMEDE(GT_BranchDefinition.PLANET, "Ganymede", true, new Color(0x3d1b10), new Color(0x190c07), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.JUPITER), 0.25f); - beeSpecies.addSpecialty(GT_ModHandler.getModItem("dreamcraft", "item.GanymedeStoneDust", 1, 0), 0.10f); + beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.GanymedeStoneDust", 1, 0), 0.10f); beeSpecies.setHumidity(ARID); beeSpecies.setTemperature(COLD); }, @@ -2117,8 +2118,8 @@ public enum GT_BeeDefinition implements IBeeDefinition { CALLISTO(GT_BranchDefinition.PLANET, "Callisto", true, new Color(0x0f333d), new Color(0x0d84a5), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.JUPITER), 0.25f); - beeSpecies.addSpecialty(GT_ModHandler.getModItem("dreamcraft", "item.CallistoStoneDust", 1, 0), 0.10f); - beeSpecies.addSpecialty(GT_ModHandler.getModItem("dreamcraft", "item.CallistoIceDust", 1, 0), 0.10f); + beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.CallistoStoneDust", 1, 0), 0.10f); + beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.CallistoIceDust", 1, 0), 0.10f); beeSpecies.setHumidity(DAMP); beeSpecies.setTemperature(ICY); beeSpecies.setNocturnal(); @@ -2134,9 +2135,9 @@ public enum GT_BeeDefinition implements IBeeDefinition { SATURN(GT_BranchDefinition.PLANET, "Saturn", false, new Color(0xD2A472), new Color(0xF8C37B), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SATURN), 0.50f); - beeSpecies.addSpecialty(GT_ModHandler.getModItem("dreamcraft", "item.TitanStoneDust", 1, 0), 0.05f); - beeSpecies.addSpecialty(GT_ModHandler.getModItem("dreamcraft", "item.EnceladusStoneDust", 1, 0), 0.05f); - beeSpecies.addSpecialty(GT_ModHandler.getModItem("dreamcraft", "item.EnceladusIceDust", 1, 0), 0.05f); + beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.TitanStoneDust", 1, 0), 0.05f); + beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.EnceladusStoneDust", 1, 0), 0.05f); + beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.EnceladusIceDust", 1, 0), 0.05f); beeSpecies.setHumidity(EnumHumidity.NORMAL); beeSpecies.setTemperature(COLD); beeSpecies.setHasEffect(); @@ -2144,16 +2145,16 @@ public enum GT_BeeDefinition implements IBeeDefinition { template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), dis -> { IBeeMutationCustom tMutation = dis.registerMutation(JUPITER, LEDOX, 25, 2); - if (Loader.isModLoaded("dreamcraft")) - tMutation.requireResource(GameRegistry.findBlock("dreamcraft", "tile.Quantinum"), 0); + if (Loader.isModLoaded(MOD_ID_DC)) + tMutation.requireResource(GameRegistry.findBlock(MOD_ID_DC, "tile.Quantinum"), 0); tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(30, "Asteriods"));//Asteriods Dim } ), ENCELADUS(GT_BranchDefinition.PLANET, "Enceladus", true, new Color(0xD2A472), new Color(0x193fa0), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SATURN), 0.25f); - beeSpecies.addSpecialty(GT_ModHandler.getModItem("dreamcraft", "item.EnceladusStoneDust", 1, 0), 0.10f); - beeSpecies.addSpecialty(GT_ModHandler.getModItem("dreamcraft", "item.EnceladusIceDust", 1, 0), 0.10f); + beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.EnceladusStoneDust", 1, 0), 0.10f); + beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.EnceladusIceDust", 1, 0), 0.10f); beeSpecies.setHumidity(EnumHumidity.NORMAL); beeSpecies.setTemperature(ICY); beeSpecies.setHasEffect(); @@ -2169,7 +2170,7 @@ public enum GT_BeeDefinition implements IBeeDefinition { TITAN(GT_BranchDefinition.PLANET, "Titan", true, new Color(0xa0641b), new Color(0x7c1024), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SATURN), 0.25f); - beeSpecies.addSpecialty(GT_ModHandler.getModItem("dreamcraft", "item.TitanStoneDust", 1, 0), 0.10f); + beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.TitanStoneDust", 1, 0), 0.10f); beeSpecies.setHumidity(ARID); beeSpecies.setTemperature(HOT); }, @@ -2184,8 +2185,8 @@ public enum GT_BeeDefinition implements IBeeDefinition { URANUS(GT_BranchDefinition.PLANET, "Uranus", false, new Color(0x75C0C9), new Color(0x84D8EC), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.URANUS), 0.50f); - beeSpecies.addSpecialty(GT_ModHandler.getModItem("dreamcraft", "item.MirandaStoneDust", 1, 0), 0.05f); - beeSpecies.addSpecialty(GT_ModHandler.getModItem("dreamcraft", "item.OberonStoneDust", 1, 0), 0.05f); + beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.MirandaStoneDust", 1, 0), 0.05f); + beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.OberonStoneDust", 1, 0), 0.05f); beeSpecies.setHumidity(EnumHumidity.NORMAL); beeSpecies.setTemperature(ICY); beeSpecies.setHasEffect(); @@ -2201,7 +2202,7 @@ public enum GT_BeeDefinition implements IBeeDefinition { MIRANDA(GT_BranchDefinition.PLANET, "Miranda", true, new Color(0x75C0C9), new Color(0x0d211c), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.URANUS), 0.25f); - beeSpecies.addSpecialty(GT_ModHandler.getModItem("dreamcraft", "item.MirandaStoneDust", 1, 0), 0.10f); + beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.MirandaStoneDust", 1, 0), 0.10f); beeSpecies.setHumidity(ARID); beeSpecies.setTemperature(ICY); beeSpecies.setNocturnal(); @@ -2217,7 +2218,7 @@ public enum GT_BeeDefinition implements IBeeDefinition { OBERON(GT_BranchDefinition.PLANET, "Oberon", true, new Color(0x4A4033), new Color(0xB5A288), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.URANUS), 0.25f); - beeSpecies.addSpecialty(GT_ModHandler.getModItem("dreamcraft", "item.OberonStoneDust", 1, 0), 0.10f); + beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.OberonStoneDust", 1, 0), 0.10f); beeSpecies.setHumidity(ARID); beeSpecies.setTemperature(ICY); }, @@ -2232,8 +2233,8 @@ public enum GT_BeeDefinition implements IBeeDefinition { NEPTUNE(GT_BranchDefinition.PLANET, "Neptune", false, new Color(0x334CFF), new Color(0x576DFF), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.NEPTUN), 0.50f); - beeSpecies.addSpecialty(GT_ModHandler.getModItem("dreamcraft", "item.ProteusStoneDust", 1, 0), 0.05f); - beeSpecies.addSpecialty(GT_ModHandler.getModItem("dreamcraft", "item.TritonStoneDust", 1, 0), 0.05f); + beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.ProteusStoneDust", 1, 0), 0.05f); + beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.TritonStoneDust", 1, 0), 0.05f); beeSpecies.setHumidity(DAMP); beeSpecies.setTemperature(COLD); beeSpecies.setNocturnal(); @@ -2242,15 +2243,15 @@ public enum GT_BeeDefinition implements IBeeDefinition { template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), dis -> { IBeeMutationCustom tMutation = dis.registerMutation(URANUS, ORIHARUKON, 7); - if (Loader.isModLoaded("dreamcraft")) - tMutation.requireResource(GameRegistry.findBlock("dreamcraft", "tile.MysteriousCrystal"), 0); + if (Loader.isModLoaded(MOD_ID_DC)) + tMutation.requireResource(GameRegistry.findBlock(MOD_ID_DC, "tile.MysteriousCrystal"), 0); tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(30, "Asteroids"));//Asteroids Dim } ), PROTEUS(GT_BranchDefinition.PLANET, "Proteus", true, new Color(0x334CFF), new Color(0x592610), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.NEPTUN), 0.25f); - beeSpecies.addSpecialty(GT_ModHandler.getModItem("dreamcraft", "item.ProteusStoneDust", 1, 0), 0.10f); + beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.ProteusStoneDust", 1, 0), 0.10f); beeSpecies.setHumidity(EnumHumidity.NORMAL); beeSpecies.setTemperature(COLD); beeSpecies.setNocturnal(); @@ -2266,7 +2267,7 @@ public enum GT_BeeDefinition implements IBeeDefinition { TRITON(GT_BranchDefinition.PLANET, "Triton", true, new Color(0x334CFF), new Color(0x421118), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.NEPTUN), 0.25f); - beeSpecies.addSpecialty(GT_ModHandler.getModItem("dreamcraft", "item.TritonStoneDust", 1, 0), 0.10f); + beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.TritonStoneDust", 1, 0), 0.10f); beeSpecies.setHumidity(DAMP); beeSpecies.setTemperature(ICY); beeSpecies.setNocturnal(); @@ -2282,8 +2283,8 @@ public enum GT_BeeDefinition implements IBeeDefinition { PLUTO(GT_BranchDefinition.PLANET, "Pluto", false, new Color(0x34271E), new Color(0x69503D), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.PLUTO), 0.50f); - beeSpecies.addSpecialty(GT_ModHandler.getModItem("dreamcraft", "item.PlutoStoneDust", 1, 0), 0.10f); - beeSpecies.addSpecialty(GT_ModHandler.getModItem("dreamcraft", "item.PlutoIceDust", 1, 0), 0.10f); + beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.PlutoStoneDust", 1, 0), 0.10f); + beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.PlutoIceDust", 1, 0), 0.10f); beeSpecies.setHumidity(ARID); beeSpecies.setTemperature(ICY); beeSpecies.setNocturnal(); @@ -2300,7 +2301,7 @@ public enum GT_BeeDefinition implements IBeeDefinition { HAUMEA(GT_BranchDefinition.PLANET, "Haumea", false, new Color(0x1C1413), new Color(0x392B28), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.HAUMEA), 0.50f); - beeSpecies.addSpecialty(GT_ModHandler.getModItem("dreamcraft", "item.HaumeaStoneDust", 1, 0), 0.10f); + beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.HaumeaStoneDust", 1, 0), 0.10f); beeSpecies.setHumidity(ARID); beeSpecies.setTemperature(ICY); }, @@ -2315,7 +2316,7 @@ public enum GT_BeeDefinition implements IBeeDefinition { MAKEMAKE(GT_BranchDefinition.PLANET, "MakeMake", false, new Color(0x301811), new Color(0x120A07), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.MAKEMAKE), 0.50f); - beeSpecies.addSpecialty(GT_ModHandler.getModItem("dreamcraft", "item.MakeMakeStoneDust", 1, 0), 0.10f); + beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.MakeMakeStoneDust", 1, 0), 0.10f); beeSpecies.setHumidity(ARID); beeSpecies.setTemperature(HOT); }, @@ -2330,7 +2331,7 @@ public enum GT_BeeDefinition implements IBeeDefinition { CENTAURI(GT_BranchDefinition.PLANET, "Centauri", false, new Color(0x2F2A14), new Color(0xB06B32), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.CENTAURI), 0.50f); - beeSpecies.addSpecialty(GT_ModHandler.getModItem("dreamcraft", "item.CentauriASurfaceDust", 1, 0), 0.05f); + beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.CentauriASurfaceDust", 1, 0), 0.05f); beeSpecies.setHumidity(ARID); beeSpecies.setTemperature(HELLISH); beeSpecies.setHasEffect(); @@ -2346,7 +2347,7 @@ public enum GT_BeeDefinition implements IBeeDefinition { ACENTAURI(GT_BranchDefinition.PLANET, "aCentauri", false, new Color(0x2F2A14), new Color(0xa01e14), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.CENTAURI), 0.25f); - beeSpecies.addSpecialty(GT_ModHandler.getModItem("dreamcraft", "item.CentauriASurfaceDust", 1, 0), 0.10f); + beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.CentauriASurfaceDust", 1, 0), 0.10f); beeSpecies.setHumidity(ARID); beeSpecies.setTemperature(HELLISH); }, @@ -2364,7 +2365,7 @@ public enum GT_BeeDefinition implements IBeeDefinition { TCETI(GT_BranchDefinition.PLANET, "tCeti", false, new Color(0x46241A), new Color(0x7B412F), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.TCETI), 0.50f); - beeSpecies.addSpecialty(GT_ModHandler.getModItem("dreamcraft", "item.TCetiEStoneDust", 1, 0), 0.05f); + beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.TCetiEStoneDust", 1, 0), 0.05f); beeSpecies.setHumidity(DAMP); beeSpecies.setTemperature(EnumTemperature.NORMAL); beeSpecies.setNocturnal(); @@ -2381,7 +2382,7 @@ public enum GT_BeeDefinition implements IBeeDefinition { TCETIE(GT_BranchDefinition.PLANET, "tCetiE", false, new Color(0x2d561b), new Color(0x0c0f60), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.TCETI), 0.25f); - beeSpecies.addSpecialty(GT_ModHandler.getModItem("dreamcraft", "item.TCetiEStoneDust", 1, 0), 0.10f); + beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.TCetiEStoneDust", 1, 0), 0.10f); beeSpecies.setHumidity(DAMP); beeSpecies.setTemperature(EnumTemperature.NORMAL); beeSpecies.setHasEffect(); @@ -2397,8 +2398,8 @@ public enum GT_BeeDefinition implements IBeeDefinition { BARNARDA(GT_BranchDefinition.PLANET, "Barnarda", false, new Color(0x0D5A0D), new Color(0xE6C18D), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.BARNARDA), 0.50f); - beeSpecies.addSpecialty(GT_ModHandler.getModItem("dreamcraft", "item.BarnardaEStoneDust", 1, 0), 0.05f); - beeSpecies.addSpecialty(GT_ModHandler.getModItem("dreamcraft", "item.BarnardaFStoneDust", 1, 0), 0.05f); + beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.BarnardaEStoneDust", 1, 0), 0.05f); + beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.BarnardaFStoneDust", 1, 0), 0.05f); beeSpecies.setHumidity(ARID); beeSpecies.setTemperature(HOT); beeSpecies.setHasEffect(); @@ -2429,7 +2430,7 @@ public enum GT_BeeDefinition implements IBeeDefinition { BARNARDAE(GT_BranchDefinition.PLANET, "BarnardaE", false, new Color(0x0D5A0D), new Color(0x4c1f0a), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.BARNARDA), 0.25f); - beeSpecies.addSpecialty(GT_ModHandler.getModItem("dreamcraft", "item.BarnardaEStoneDust", 1, 0), 0.10f); + beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.BarnardaEStoneDust", 1, 0), 0.10f); beeSpecies.setHumidity(ARID); beeSpecies.setTemperature(HOT); }, @@ -2445,7 +2446,7 @@ public enum GT_BeeDefinition implements IBeeDefinition { BARNARDAF(GT_BranchDefinition.PLANET, "BarnardaF", false, new Color(0x0D5A0D), new Color(0x1e0b49), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.BARNARDA), 0.25f); - beeSpecies.addSpecialty(GT_ModHandler.getModItem("dreamcraft", "item.BarnardaFStoneDust", 1, 0), 0.10f); + beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.BarnardaFStoneDust", 1, 0), 0.10f); beeSpecies.setHumidity(ARID); beeSpecies.setTemperature(HOT); }, @@ -2461,7 +2462,7 @@ public enum GT_BeeDefinition implements IBeeDefinition { VEGA(GT_BranchDefinition.PLANET, "Vega", false, new Color(0x1A2036), new Color(0xB5C0DE), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.VEGA), 0.50f); - beeSpecies.addSpecialty(GT_ModHandler.getModItem("dreamcraft", "item.VegaBStoneDust", 1, 0), 0.05f); + beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.VegaBStoneDust", 1, 0), 0.05f); beeSpecies.setHumidity(ARID); beeSpecies.setTemperature(COLD); beeSpecies.setHasEffect(); @@ -2478,8 +2479,8 @@ public enum GT_BeeDefinition implements IBeeDefinition { VEGAB(GT_BranchDefinition.PLANET, "VegaB", false, new Color(0x1A2036), new Color(0x81e261), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.VEGA), 0.50f); - if (Loader.isModLoaded("dreamcraft")) - beeSpecies.addSpecialty(GT_ModHandler.getModItem("dreamcraft", "item.VegaBStoneDust", 1, 0), 0.10f); + if (Loader.isModLoaded(MOD_ID_DC)) + beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.VegaBStoneDust", 1, 0), 0.10f); beeSpecies.setHumidity(ARID); beeSpecies.setTemperature(COLD); }, diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingCrafting.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingCrafting.java index edaf2adcf4..29f416c9f4 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingCrafting.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingCrafting.java @@ -10,6 +10,8 @@ import gregtech.api.util.GT_Utility; import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; +import static gregtech.api.enums.GT_Values.MOD_ID_DC; + public class ProcessingCrafting implements gregtech.api.interfaces.IOreRecipeRegistrator { public ProcessingCrafting() { OrePrefixes.crafting.add(this); @@ -62,7 +64,7 @@ public class ProcessingCrafting implements gregtech.api.interfaces.IOreRecipeReg GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer.get(1), GT_Utility.copyAmount(0L, aStack), ItemList.Circuit_Wafer_ILC.get(1), 1200, 120, false); GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer2.get(1), GT_Utility.copyAmount(0L, aStack), ItemList.Circuit_Wafer_ILC.get(4), 900, 480, true); GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer3.get(1), GT_Utility.copyAmount(0L, aStack), ItemList.Circuit_Wafer_ILC.get(8), 600, 1920, true); - GT_Values.RA.addLaserEngraverRecipe(GT_OreDictUnificator.get(OrePrefixes.foil, Materials.RedAlloy, 1L), GT_Utility.copyAmount(0L, aStack), GT_ModHandler.getModItem("dreamcraft", "item.EtchedLowVoltageWiring", 1L, 0), 200, 16); + GT_Values.RA.addLaserEngraverRecipe(GT_OreDictUnificator.get(OrePrefixes.foil, Materials.RedAlloy, 1L), GT_Utility.copyAmount(0L, aStack), GT_ModHandler.getModItem(MOD_ID_DC, "item.EtchedLowVoltageWiring", 1L, 0), 200, 16); GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer4.get(1), GT_Utility.copyAmount(0L, aStack), ItemList.Circuit_Wafer_SoC2.get(2), 1800, 7680, true); GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer5.get(1), GT_Utility.copyAmount(0L, aStack), ItemList.Circuit_Wafer_SoC2.get(4), 1800, 30720, true); break; diff --git a/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java b/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java index e912177d8a..ba64e416c7 100644 --- a/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java +++ b/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java @@ -421,8 +421,8 @@ public class GT_MachineRecipeLoader implements Runnable { GT_Values.RA.addFluidExtractionRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Monazite, 1L), GT_Values.NI, Materials.Helium.getGas(200L), 10000, 64, 64); GT_Values.RA.addFluidExtractionRecipe(GT_ModHandler.getModItem("IC2","blockAlloyGlass", 1L, 0), GT_Values.NI, Materials.ReinforceGlass.getFluid(144), 10000, 100, 1920); - GT_Values.RA.addFluidExtractionRecipe(GT_ModHandler.getModItem("dreamcraft","item.ReinforcedGlassPLate", 2L, 0), GT_Values.NI, Materials.ReinforceGlass.getFluid(144), 10000, 75, 1920); - GT_Values.RA.addFluidExtractionRecipe(GT_ModHandler.getModItem("dreamcraft","item.ReinforcedGlassLense", 2L, 0), GT_Values.NI, Materials.ReinforceGlass.getFluid(144), 10000, 50, 1920); + GT_Values.RA.addFluidExtractionRecipe(GT_ModHandler.getModItem(MOD_ID_DC,"item.ReinforcedGlassPLate", 2L, 0), GT_Values.NI, Materials.ReinforceGlass.getFluid(144), 10000, 75, 1920); + GT_Values.RA.addFluidExtractionRecipe(GT_ModHandler.getModItem(MOD_ID_DC,"item.ReinforcedGlassLense", 2L, 0), GT_Values.NI, Materials.ReinforceGlass.getFluid(144), 10000, 50, 1920); GT_Values.RA.addFluidSmelterRecipe(new ItemStack(Items.snowball, 1, 0), GT_Values.NI, Materials.Water.getFluid(250L), 10000, 32, 4); GT_Values.RA.addFluidSmelterRecipe(new ItemStack(Blocks.snow, 1, 0), GT_Values.NI, Materials.Water.getFluid(1000L), 10000, 128, 4); @@ -565,7 +565,7 @@ public class GT_MachineRecipeLoader implements Runnable { GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Cylinder.get(0), Materials.Polystyrene.getMolten(36), ItemList.Circuit_Parts_PetriDish.get(1), 160, 16); GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Cylinder.get(0), Materials.BorosilicateGlass.getMolten(72), ItemList.Circuit_Parts_PetriDish.get(1), 160, 16); - GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Plate.get(0L), Materials.ReinforceGlass.getMolten(72), GT_ModHandler.getModItem("dreamcraft", "item.ReinforcedGlassPLate", 1L, 0),160, 1920); + GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Plate.get(0L), Materials.ReinforceGlass.getMolten(72), GT_ModHandler.getModItem(MOD_ID_DC, "item.ReinforcedGlassPLate", 1L, 0),160, 1920); GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Block.get(0L), Materials.ReinforceGlass.getMolten(144), GT_ModHandler.getModItem("IC2", "blockAlloyGlass", 1L), 160, 1920); GT_Values.RA.addChemicalRecipe(GT_ModHandler.getModItem("GalaxySpace","item.UnknowCrystal",4L), Materials.Osmiridium.getDust(2), Materials.GrowthMediumSterilized.getFluid(1000L), FluidRegistry.getFluidStack("bacterialsludge", 1000), ItemList.Circuit_Chip_Stemcell.get(64L), GT_Values.NI,600, 30720); @@ -591,7 +591,7 @@ public class GT_MachineRecipeLoader implements Runnable { GT_Values.RA.addFormingPressRecipe(ItemList.Food_Dough_Sugar.get(4L), ItemList.Shape_Mold_Cylinder.get(0L), ItemList.Food_Raw_Cake.get(1L), 384, 4); GT_Values.RA.addFormingPressRecipe(new ItemStack(Blocks.glass, 1, 32767), ItemList.Shape_Mold_Arrow.get(0L), ItemList.Arrow_Head_Glass_Emtpy.get(1L), 64, 4); for (Materials tMat : Materials.values()) { - if (tMat.mStandardMoltenFluid != null && tMat.contains(SubTag.SOLDERING_MATERIAL) && !(GregTech_API.mUseOnlyGoodSolderingMaterials && !tMat.contains(SubTag.SOLDERING_MATERIAL_GOOD))) { + if (tMat.isProperSolderingFluid()) { int tMultiplier = tMat.contains(SubTag.SOLDERING_MATERIAL_GOOD) ? 1 : tMat.contains(SubTag.SOLDERING_MATERIAL_BAD) ? 4 : 2; GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Coated_Basic.get(1L), GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Primitive, 2), GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Iron, 2), GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Iron, 4), GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Iron, 1),GT_Utility.getIntegratedCircuit(1)}, tMat.getMolten(1152L * tMultiplier / 2L), GT_ModHandler.getModItem("Forestry", "chipsets", 1L, 0), 200, 30); GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Coated_Basic.get(1L), GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Basic, 2), GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Bronze, 2), GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Bronze, 4), GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Bronze, 1),GT_Utility.getIntegratedCircuit(1)}, tMat.getMolten(1152L * tMultiplier / 2L), GT_ModHandler.getModItem("Forestry", "chipsets", 1L, 1), 200, 30); @@ -622,7 +622,7 @@ public class GT_MachineRecipeLoader implements Runnable { GT_Values.RA.addAssemblerRecipe(new ItemStack(Blocks.redstone_torch, 2, 32767), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 1L), Materials.Concrete.getMolten(144L), new ItemStack(Items.repeater, 1, 0), 80, 10); GT_Values.RA.addAssemblerRecipe(new ItemStack(Items.leather, 1, 32767), new ItemStack(Items.lead, 1, 32767), Materials.Glue.getFluid(72L), new ItemStack(Items.name_tag, 1, 0), 100, 8); - GT_Values.RA.addAssemblerRecipe(GT_ModHandler.getModItem("dreamcraft", "item.ArtificialLeather", 1L, 0), new ItemStack(Items.lead, 1, 32767), Materials.Glue.getFluid(72L), new ItemStack(Items.name_tag, 1, 0), 100, 8); + GT_Values.RA.addAssemblerRecipe(GT_ModHandler.getModItem(MOD_ID_DC, "item.ArtificialLeather", 1L, 0), new ItemStack(Items.lead, 1, 32767), Materials.Glue.getFluid(72L), new ItemStack(Items.name_tag, 1, 0), 100, 8); GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Paper, 8L), new ItemStack(Items.compass, 1, 32767), GT_Values.NF, new ItemStack(Items.map, 1, 0), 100, 8); GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Tantalum, 1L), GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Manganese, 1L), Materials.Plastic.getMolten(144L), ItemList.Battery_RE_ULV_Tantalum.get(8L), 100, 4); GT_Values.RA.addAssemblerRecipe(GT_ModHandler.getModItem("TwilightForest", "item.charmOfLife1", 4L, 0), ItemList.Circuit_Integrated.getWithDamage(0L, 4L), GT_Values.NF, GT_ModHandler.getModItem("TwilightForest", "item.charmOfLife2", 1L, 0), 100, 8); @@ -652,10 +652,10 @@ public class GT_MachineRecipeLoader implements Runnable { GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plate, Materials.StyreneButadieneRubber, 2L), GT_ModHandler.getIC2Item("carbonMesh", 2L), GT_Utility.getIntegratedCircuit(2)}, Materials.Glue.getFluid(200L), ItemList.Duct_Tape.get(1L), 100, 480); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Silicone, 1L), GT_ModHandler.getIC2Item("carbonMesh", 1L), GT_Utility.getIntegratedCircuit(3)}, Materials.Glue.getFluid(100L), ItemList.Duct_Tape.get(1L), 100, 1920); GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Paper, 3L), new ItemStack(Items.leather, 1, 32767), Materials.Glue.getFluid(20L), new ItemStack(Items.book, 1, 0), 32, 8); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Paper, 3L), GT_ModHandler.getModItem("dreamcraft", "item.ArtificialLeather", 1L, 0), Materials.Glue.getFluid(20L), new ItemStack(Items.book, 1, 0), 32, 8); + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Paper, 3L), GT_ModHandler.getModItem(MOD_ID_DC, "item.ArtificialLeather", 1L, 0), Materials.Glue.getFluid(20L), new ItemStack(Items.book, 1, 0), 32, 8); GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Paper, 3L), GT_OreDictUnificator.get(OrePrefixes.plateQuadruple, Materials.Paper, 1L), Materials.Glue.getFluid(20L), new ItemStack(Items.book, 1, 0), 32, 8); GT_Values.RA.addAssemblerRecipe(ItemList.Paper_Printed_Pages.get(1L), new ItemStack(Items.leather, 1, 32767), Materials.Glue.getFluid(20L), new ItemStack(Items.written_book, 1, 0), 32, 8); - GT_Values.RA.addAssemblerRecipe(ItemList.Paper_Printed_Pages.get(1L), GT_ModHandler.getModItem("dreamcraft", "item.ArtificialLeather", 1L, 0), Materials.Glue.getFluid(20L), new ItemStack(Items.written_book, 1, 0), 32, 8); + GT_Values.RA.addAssemblerRecipe(ItemList.Paper_Printed_Pages.get(1L), GT_ModHandler.getModItem(MOD_ID_DC, "item.ArtificialLeather", 1L, 0), Materials.Glue.getFluid(20L), new ItemStack(Items.written_book, 1, 0), 32, 8); GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.itemCasing, Materials.Tin, 4L), new ItemStack(Blocks.glass_pane, 1, 32767), GT_Values.NF, ItemList.Cell_Universal_Fluid.get(1L), 128, 8); GT_Values.RA.addAssemblerRecipe(ItemList.Food_Baked_Cake.get(1L), new ItemStack(Items.egg, 1, 0), Materials.Milk.getFluid(3000L), new ItemStack(Items.cake, 1, 0), 100, 8); GT_Values.RA.addAssemblerRecipe(ItemList.Food_Sliced_Bun.get(2L), ItemList.Circuit_Integrated.getWithDamage(0L, 2L), GT_Values.NF, ItemList.Food_Sliced_Buns.get(1L), 100, 4); @@ -681,7 +681,7 @@ public class GT_MachineRecipeLoader implements Runnable { GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plate, Materials.RedAlloy, 1L), GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.Gold, 2L), GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Copper, 2L), GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.WroughtIron, 2L)}, Materials.Glass.getMolten(576L), GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextForestry, "thermionicTubes", 4L, 3), 200, 30); GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plate, Materials.RedAlloy, 1L), GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.Gold, 2L), GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Copper, 2L), GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Gold, 2L)}, Materials.Glass.getMolten(576L), GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextForestry, "thermionicTubes", 4L, 4), 200, 30); GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plate, Materials.RedAlloy, 1L), GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.Gold, 2L), GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Copper, 2L), GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Diamond, 2L)}, Materials.Glass.getMolten(576L), GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextForestry, "thermionicTubes", 4L, 5), 200, 30); - GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plate, Materials.RedAlloy, 1L), GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.Gold, 2L), GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Copper, 2L), GT_ModHandler.getModItem("dreamcraft", "item.LongObsidianRod", 2L, 0)}, Materials.Glass.getMolten(576L), GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextForestry, "thermionicTubes", 4L, 6), 200, 30); + GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plate, Materials.RedAlloy, 1L), GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.Gold, 2L), GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Copper, 2L), GT_ModHandler.getModItem(MOD_ID_DC, "item.LongObsidianRod", 2L, 0)}, Materials.Glass.getMolten(576L), GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextForestry, "thermionicTubes", 4L, 6), 200, 30); GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plate, Materials.RedAlloy, 1L), GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.Gold, 2L), GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Copper, 2L), GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Blaze, 2L)}, Materials.Glass.getMolten(576L), GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextForestry, "thermionicTubes", 4L, 7), 200, 30); GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plate, Materials.RedAlloy, 1L), GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.Gold, 2L), GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Copper, 2L), GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Rubber, 2L)}, Materials.Glass.getMolten(576L), GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextForestry, "thermionicTubes", 4L, 8), 200, 30); GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plate, Materials.RedAlloy, 1L), GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.Gold, 2L), GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Copper, 2L), GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Emerald, 2L)}, Materials.Glass.getMolten(576L), GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextForestry, "thermionicTubes", 4L, 9), 200, 30); @@ -3477,7 +3477,7 @@ public class GT_MachineRecipeLoader implements Runnable { }; ItemStack[] chests = { - Loader.isModLoaded("dreamcraft") ? GT_ModHandler.getModItem("dreamcraft","BabyChest",1) : new ItemStack(Blocks.chest), + Loader.isModLoaded(MOD_ID_DC) ? GT_ModHandler.getModItem(MOD_ID_DC,"BabyChest",1) : new ItemStack(Blocks.chest), new ItemStack(Blocks.chest), Loader.isModLoaded("IronChest") ? GT_ModHandler.getModItem("IronChest","BlockIronChest",1,3) : new ItemStack(Blocks.chest), Loader.isModLoaded("IronChest") ? GT_ModHandler.getModItem("IronChest","BlockIronChest",1) : new ItemStack(Blocks.chest), @@ -3853,7 +3853,7 @@ public class GT_MachineRecipeLoader implements Runnable { } //Shunting Wire for (Materials tMat : Materials.values()) { - if (tMat.mStandardMoltenFluid != null && tMat.contains(SubTag.SOLDERING_MATERIAL) && !(GregTech_API.mUseOnlyGoodSolderingMaterials && !tMat.contains(SubTag.SOLDERING_MATERIAL_GOOD))) { + if (tMat.isProperSolderingFluid()) { int tMultiplier = tMat.contains(SubTag.SOLDERING_MATERIAL_GOOD) ? 1 : tMat.contains(SubTag.SOLDERING_MATERIAL_BAD) ? 4 : 2; GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Copper, 1L), GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Lead, 1L), GT_Utility.getIntegratedCircuit(1)}, tMat.getMolten(16L * tMultiplier / 2L), ItemList.RC_ShuntingWire.get(1L), 200, 16); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.AnnealedCopper, 1L), GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Lead, 1L), GT_Utility.getIntegratedCircuit(1)}, tMat.getMolten(16L * tMultiplier / 2L), ItemList.RC_ShuntingWire.get(1L), 200, 16); @@ -3862,10 +3862,47 @@ public class GT_MachineRecipeLoader implements Runnable { GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Titanium, 1L), GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Electrum, 1L), GT_Utility.getIntegratedCircuit(1)}, tMat.getMolten(16L * tMultiplier / 2L), ItemList.RC_ShuntingWire.get(16L), 200, 48); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Platinum, 1L), GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Titanium, 1L), GT_Utility.getIntegratedCircuit(1)}, tMat.getMolten(16L * tMultiplier / 2L), ItemList.RC_ShuntingWire.get(32L), 200, 64); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.VanadiumGallium, 1L), GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Platinum, 1L), GT_Utility.getIntegratedCircuit(1)}, tMat.getMolten(16L * tMultiplier / 2L), ItemList.RC_ShuntingWire.get(64L), 200, 120); + //Railcraft Circuits + GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Coated_Basic.get(1L), GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Basic, 1), ItemList.Cover_Controller.get(1L)}, tMat.getMolten(144L * tMultiplier / 2L), GT_ModHandler.getModItem(MOD_ID_RC, "part.circuit", 4L, 0), 300, 30); + GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Coated_Basic.get(1L), GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Basic, 1), ItemList.Sensor_LV.get(1L)}, tMat.getMolten(144L * tMultiplier / 2L), GT_ModHandler.getModItem(MOD_ID_RC, "part.circuit", 4L, 1), 300, 30); + GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Coated_Basic.get(1L), GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Basic, 1), GT_ModHandler.getModItem(MOD_ID_RC, "part.signal.lamp", 1L, 0)}, tMat.getMolten(144L * tMultiplier / 2L), GT_ModHandler.getModItem(MOD_ID_RC, "part.circuit", 4L, 2), 300, 30); + GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Phenolic_Good.get(1L), GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Good, 1), ItemList.Cover_Controller.get(1L)}, tMat.getMolten(144L * tMultiplier / 2L), GT_ModHandler.getModItem(MOD_ID_RC, "part.circuit", 8L, 0), 400, 30); + GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Phenolic_Good.get(1L), GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Good, 1), ItemList.Sensor_LV.get(1L)}, tMat.getMolten(144L * tMultiplier / 2L), GT_ModHandler.getModItem(MOD_ID_RC, "part.circuit", 8L, 1), 400, 30); + GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Phenolic_Good.get(1L), GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Good, 1), GT_ModHandler.getModItem(MOD_ID_RC, "part.signal.lamp", 1L, 0)}, tMat.getMolten(144L * tMultiplier / 2L), GT_ModHandler.getModItem(MOD_ID_RC, "part.circuit", 8L, 2), 400, 30); + GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Epoxy_Advanced.get(1L), GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Advanced, 1), ItemList.Cover_Controller.get(1L)}, tMat.getMolten(144L * tMultiplier / 2L), GT_ModHandler.getModItem(MOD_ID_RC, "part.circuit", 16L, 0), 500, 30); + GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Epoxy_Advanced.get(1L), GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Advanced, 1), ItemList.Sensor_LV.get(1L)}, tMat.getMolten(144L * tMultiplier / 2L), GT_ModHandler.getModItem(MOD_ID_RC, "part.circuit", 16L, 1), 500, 30); + GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Epoxy_Advanced.get(1L), GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Advanced, 1), GT_ModHandler.getModItem(MOD_ID_RC, "part.signal.lamp", 1L, 0)}, tMat.getMolten(144L * tMultiplier / 2L), GT_ModHandler.getModItem(MOD_ID_RC, "part.circuit", 16L, 2), 500, 30); + //chunkloader upgrade OC + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Plastic_Advanced.get(1L), GT_OreDictUnificator.get(OrePrefixes.itemCasing, Materials.Aluminium, 2L), GT_ModHandler.getModItem(MOD_ID_RC, "machine.alpha", 1L, 0), GT_ModHandler.getModItem("OpenComputers", "item", 1L, 26), GT_Utility.getIntegratedCircuit(1)}, tMat.getMolten(144L * tMultiplier / 2L), GT_ModHandler.getModItem("OpenComputers", "item", 1L, 62), 250, 256); } } - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{new ItemStack(Blocks.piston, 1, 0), ItemList.FR_Casing_Sturdy.get(1L), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Lapis, 1L), GT_Utility.getIntegratedCircuit(1)}, Materials.SeedOil.getFluid(250L), GT_ModHandler.getModItem("dreamcraft","item.EngineCore", 1L, 0), 100, 16); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{new ItemStack(Blocks.piston, 1, 0), ItemList.FR_Casing_Sturdy.get(1L), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Lapis, 1L), GT_Utility.getIntegratedCircuit(1)}, Materials.SeedOil.getFluid(250L), GT_ModHandler.getModItem(MOD_ID_DC,"item.EngineCore", 1L, 0), 100, 16); + + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.AnyIron, 2L), GT_Utility.getIntegratedCircuit(1), GT_ModHandler.getModItem(MOD_ID_RC, "machine.beta", 1L, 0), 600, 30); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plate, Materials.AnyIron, 2L), new ItemStack(Blocks.glass_pane, 2, 0), GT_Utility.getIntegratedCircuit(2)}, GT_Values.NF, GT_ModHandler.getModItem(MOD_ID_RC, "machine.beta", 2L, 1), 800, 30); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plate, Materials.AnyIron, 2L), GT_ModHandler.getModItem("TConstruct", "GlassPane", 2L, 0), GT_Utility.getIntegratedCircuit(2)}, GT_Values.NF, GT_ModHandler.getModItem(MOD_ID_RC, "machine.beta", 2L, 1), 800, 30); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.pipeLarge, Materials.Bronze, 2L), new ItemStack(Blocks.iron_bars, 2, 0), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, GT_ModHandler.getModItem(MOD_ID_RC, "machine.beta", 1L, 2), 800, 30); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Steel, 2L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, GT_ModHandler.getModItem(MOD_ID_RC, "machine.beta", 1L, 13), 200, 64); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Steel, 2L), new ItemStack(Blocks.glass_pane, 2, 0), GT_Utility.getIntegratedCircuit(3)}, GT_Values.NF, GT_ModHandler.getModItem(MOD_ID_RC, "machine.beta", 2L, 14), 400, 64); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Steel, 2L), GT_ModHandler.getModItem("TConstruct", "GlassPane", 2L, 0), GT_Utility.getIntegratedCircuit(3)}, GT_Values.NF, GT_ModHandler.getModItem(MOD_ID_RC, "machine.beta", 2L, 14), 400, 64); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.pipeLarge, Materials.Steel, 2L), GT_ModHandler.getModItem(MOD_ID_DC, "item.SteelBars", 2L), GT_Utility.getIntegratedCircuit(3)}, GT_Values.NF, GT_ModHandler.getModItem(MOD_ID_RC, "machine.beta", 1L, 15), 400, 64); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_ModHandler.getModItem("ExtraUtilities", "trashcan", 1L, 0), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Obsidian, 4L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, GT_ModHandler.getModItem(MOD_ID_RC, "machine.beta", 1L, 11), 200, 16); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_ModHandler.getModItem(MOD_ID_DC,"item.EngineCore", 1L), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.AnyCopper, 10L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, GT_ModHandler.getModItem(MOD_ID_RC, "machine.beta", 1L, 7), 200, 16); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_ModHandler.getModItem(MOD_ID_DC, "item.EngineCore", 1L), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Steel, 10L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, GT_ModHandler.getModItem(MOD_ID_RC, "machine.beta", 1L, 8), 200, 16); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_ModHandler.getModItem(MOD_ID_DC, "item.EngineCore", 1L), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Aluminium, 10L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, GT_ModHandler.getModItem(MOD_ID_RC, "machine.beta", 1L, 9), 200, 16); + + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Gold, 2L), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Diamond, 4L), GT_OreDictUnificator.get(OrePrefixes.gem, Materials.EnderPearl, 1L), GT_OreDictUnificator.get(OrePrefixes.plateDense, Materials.Obsidian, 2L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, GT_ModHandler.getModItem(MOD_ID_RC, "machine.alpha", 1, 0), 600, 480); + //Water Tank + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Iron, 1L), GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Wood, 2L)}, Materials.Glue.getFluid(36L), GT_ModHandler.getModItem(MOD_ID_RC, "machine.alpha", 1L, 14), 200, 8, false); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.stick, Materials.IronMagnetic, 1L), GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Wood, 2L)}, Materials.Glue.getFluid(36L), GT_ModHandler.getModItem(MOD_ID_RC, "machine.alpha", 1L, 14), 200, 8, false); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.stick, Materials.WroughtIron, 1L), GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Wood, 2L)}, Materials.Glue.getFluid(36L), GT_ModHandler.getModItem(MOD_ID_RC, "machine.alpha", 1L, 14), 200, 8, false); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.Steel, 4L), GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Wood, 4L)}, Materials.Glue.getFluid(72L), GT_ModHandler.getModItem(MOD_ID_RC, "machine.alpha", 3L, 14), 400, 30, false); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.Steel, 2L), GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.WoodSealed, 1L)}, Materials.Plastic.getMolten(36L), GT_ModHandler.getModItem(MOD_ID_RC, "machine.alpha", 3L, 14), 400, 30, false); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.StainlessSteel, 4L), GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.WoodSealed, 4L)}, Materials.Plastic.getMolten(72L), GT_ModHandler.getModItem(MOD_ID_RC, "machine.alpha", 9L, 14), 400, 120, false); + //Steam Boilers + GT_Values.RA.addAssemblerRecipe(ItemList.IC2_Item_Casing_Iron.get(6L), GT_Utility.getIntegratedCircuit(6), GT_ModHandler.getModItem(MOD_ID_RC, "machine.beta", 1L, 3), 400, 30); + GT_Values.RA.addAssemblerRecipe(ItemList.IC2_Item_Casing_Steel.get(6L), GT_Utility.getIntegratedCircuit(6), GT_ModHandler.getModItem(MOD_ID_RC, "machine.beta", 1L, 4), 400, 64); GT_Values.RA.addBenderRecipe(GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Aluminium, 20L), (GT_Utility.getIntegratedCircuit(10)), ItemList.RC_Rail_Standard.get(64L), 300, 30); GT_Values.RA.addBenderRecipe(GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Iron, 48L), (GT_Utility.getIntegratedCircuit(10)), ItemList.RC_Rail_Standard.get(64L), 300, 30); @@ -3901,6 +3938,11 @@ public class GT_MachineRecipeLoader implements Runnable { GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Anvil.get(0L), Materials.Steel.getMolten(4464L), GT_ModHandler.getModItem(MOD_ID_RC, "tile.railcraft.anvil", 1L, 0), 128, 16); GT_ModHandler.addPulverisationRecipe(GT_ModHandler.getModItem(MOD_ID_RC, "cube.crushed.obsidian", 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Obsidian, 1L), GT_Values.NI, 0, true); + //recycling Tanks + GT_Values.RA.addPulveriserRecipe(GT_ModHandler.getModItem(MOD_ID_RC, "machine.beta", 1L, 0), new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Iron, 2L)}, new int[]{10000}, 300, 2); + GT_Values.RA.addPulveriserRecipe(GT_ModHandler.getModItem(MOD_ID_RC, "machine.beta", 1L, 13), new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Steel, 2L)}, new int[]{10000}, 300, 2); + GT_Values.RA.addPulveriserRecipe(GT_ModHandler.getModItem(MOD_ID_RC, "machine.beta", 1L, 1), new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Iron, 2L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Glass, 3L)}, new int[]{10000, 10000}, 300, 2); + GT_Values.RA.addPulveriserRecipe(GT_ModHandler.getModItem(MOD_ID_RC, "machine.beta", 1L, 14), new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Steel, 2L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Glass, 3L)}, new int[]{10000, 10000}, 300, 2); GT_Values.RA.addPyrolyseRecipe(GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Coal, 16), GT_Values.NF, 1, RailcraftToolItems.getCoalCoke(16), Materials.Creosote.getFluid(8000), 640, 64); GT_Values.RA.addPyrolyseRecipe(GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Coal, 16), Materials.Nitrogen.getGas(1000), 2, RailcraftToolItems.getCoalCoke(16), Materials.Creosote.getFluid(8000), 320, 96); diff --git a/src/main/java/gregtech/loaders/preload/GT_Loader_ItemData.java b/src/main/java/gregtech/loaders/preload/GT_Loader_ItemData.java index f9d10e7bae..730074251c 100644 --- a/src/main/java/gregtech/loaders/preload/GT_Loader_ItemData.java +++ b/src/main/java/gregtech/loaders/preload/GT_Loader_ItemData.java @@ -13,6 +13,8 @@ import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; +import static gregtech.api.enums.GT_Values.MOD_ID_DC; + public class GT_Loader_ItemData implements Runnable { @Override public void run() { @@ -72,7 +74,7 @@ public class GT_Loader_ItemData implements Runnable { GT_OreDictUnificator.addItemData(new ItemStack(Items.iron_door, 1), new ItemData(Materials.Iron, 21772800L)); GT_OreDictUnificator.addItemData(new ItemStack(Items.cauldron, 1), new ItemData(Materials.Iron, 25401600L)); GT_OreDictUnificator.addItemData(new ItemStack(Blocks.iron_bars, 8, 32767), new ItemData(Materials.Iron, 10886400L)); - GT_OreDictUnificator.addItemData(GT_ModHandler.getModItem("dreamcraft", "item.SteelBars", 8L, 0), new ItemData(Materials.Steel, 10886400L)); + GT_OreDictUnificator.addItemData(GT_ModHandler.getModItem(MOD_ID_DC, "item.SteelBars", 8L, 0), new ItemData(Materials.Steel, 10886400L)); GT_OreDictUnificator.addItemData(GT_ModHandler.getIC2Item("ironFurnace", 1L), new ItemData(Materials.Iron, 18144000L)); GT_OreDictUnificator.addItemData(ItemList.IC2_Food_Can_Empty.get(1L), new ItemData(Materials.Tin, 1814400L)); GT_OreDictUnificator.addItemData(ItemList.IC2_Fuel_Rod_Empty.get(1L), new ItemData(Materials.Iron, 3628800L)); diff --git a/src/main/java/gregtech/loaders/preload/GT_Loader_OreDictionary.java b/src/main/java/gregtech/loaders/preload/GT_Loader_OreDictionary.java index 7165650072..c9a7b53c03 100644 --- a/src/main/java/gregtech/loaders/preload/GT_Loader_OreDictionary.java +++ b/src/main/java/gregtech/loaders/preload/GT_Loader_OreDictionary.java @@ -12,6 +12,8 @@ import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; +import static gregtech.api.enums.GT_Values.MOD_ID_DC; + public class GT_Loader_OreDictionary implements Runnable { @Override public void run() { @@ -214,14 +216,14 @@ public class GT_Loader_OreDictionary implements Runnable { GT_OreDictUnificator.registerOre(OrePrefixes.itemCasing, Materials.Steel, GT_ModHandler.getModItem("IC2","itemCasing", 1L, 5)); GT_OreDictUnificator.registerOre(OrePrefixes.itemCasing, Materials.Lead, GT_ModHandler.getModItem("IC2","itemCasing", 1L, 6)); - GT_OreDictUnificator.registerOre(OrePrefixes.itemCasing, Materials.Osmium, GT_ModHandler.getModItem("dreamcraft","item.OsmiumItemCasing", 1L, 0)); - GT_OreDictUnificator.registerOre(OrePrefixes.itemCasing, Materials.Aluminium, GT_ModHandler.getModItem("dreamcraft","item.AluminiumItemCasing", 1L, 0)); - GT_OreDictUnificator.registerOre(OrePrefixes.itemCasing, Materials.StainlessSteel, GT_ModHandler.getModItem("dreamcraft","item.StainlessSteelItemCasing", 1L, 0)); - GT_OreDictUnificator.registerOre(OrePrefixes.itemCasing, Materials.Tungsten, GT_ModHandler.getModItem("dreamcraft","item.TungstenItemCasing", 1L, 0)); - GT_OreDictUnificator.registerOre(OrePrefixes.itemCasing, Materials.Neutronium, GT_ModHandler.getModItem("dreamcraft","item.NeutroniumItemCasing", 1L, 0)); - GT_OreDictUnificator.registerOre(OrePrefixes.itemCasing, Materials.TungstenSteel, GT_ModHandler.getModItem("dreamcraft","item.TungstenSteelItemCasing", 1L, 0)); - GT_OreDictUnificator.registerOre(OrePrefixes.itemCasing, Materials.Iridium, GT_ModHandler.getModItem("dreamcraft","item.IridiumItemCasing", 1L, 0)); - GT_OreDictUnificator.registerOre(OrePrefixes.itemCasing, Materials.Titanium, GT_ModHandler.getModItem("dreamcraft","item.TitaniumItemCasing", 1L, 0)); - GT_OreDictUnificator.registerOre(OrePrefixes.itemCasing, Materials.Chrome, GT_ModHandler.getModItem("dreamcraft","item.ChromeItemCasing", 1L, 0)); + GT_OreDictUnificator.registerOre(OrePrefixes.itemCasing, Materials.Osmium, GT_ModHandler.getModItem(MOD_ID_DC,"item.OsmiumItemCasing", 1L, 0)); + GT_OreDictUnificator.registerOre(OrePrefixes.itemCasing, Materials.Aluminium, GT_ModHandler.getModItem(MOD_ID_DC,"item.AluminiumItemCasing", 1L, 0)); + GT_OreDictUnificator.registerOre(OrePrefixes.itemCasing, Materials.StainlessSteel, GT_ModHandler.getModItem(MOD_ID_DC,"item.StainlessSteelItemCasing", 1L, 0)); + GT_OreDictUnificator.registerOre(OrePrefixes.itemCasing, Materials.Tungsten, GT_ModHandler.getModItem(MOD_ID_DC,"item.TungstenItemCasing", 1L, 0)); + GT_OreDictUnificator.registerOre(OrePrefixes.itemCasing, Materials.Neutronium, GT_ModHandler.getModItem(MOD_ID_DC,"item.NeutroniumItemCasing", 1L, 0)); + GT_OreDictUnificator.registerOre(OrePrefixes.itemCasing, Materials.TungstenSteel, GT_ModHandler.getModItem(MOD_ID_DC,"item.TungstenSteelItemCasing", 1L, 0)); + GT_OreDictUnificator.registerOre(OrePrefixes.itemCasing, Materials.Iridium, GT_ModHandler.getModItem(MOD_ID_DC,"item.IridiumItemCasing", 1L, 0)); + GT_OreDictUnificator.registerOre(OrePrefixes.itemCasing, Materials.Titanium, GT_ModHandler.getModItem(MOD_ID_DC,"item.TitaniumItemCasing", 1L, 0)); + GT_OreDictUnificator.registerOre(OrePrefixes.itemCasing, Materials.Chrome, GT_ModHandler.getModItem(MOD_ID_DC,"item.ChromeItemCasing", 1L, 0)); } } -- cgit From 2e4c8d3f1c0b20217cba07d9fa17da2f59ffd0f3 Mon Sep 17 00:00:00 2001 From: Jason Mitchell Date: Sun, 5 Sep 2021 13:45:13 -0700 Subject: Fix potential crash --- .../long_distance/GT_MetaTileEntity_LongDistancePipelineBase.java | 1 + 1 file changed, 1 insertion(+) (limited to 'src/main/java/gregtech/common/tileentities') diff --git a/src/main/java/gregtech/common/tileentities/machines/long_distance/GT_MetaTileEntity_LongDistancePipelineBase.java b/src/main/java/gregtech/common/tileentities/machines/long_distance/GT_MetaTileEntity_LongDistancePipelineBase.java index 2fa860bb20..64651a3fc4 100644 --- a/src/main/java/gregtech/common/tileentities/machines/long_distance/GT_MetaTileEntity_LongDistancePipelineBase.java +++ b/src/main/java/gregtech/common/tileentities/machines/long_distance/GT_MetaTileEntity_LongDistancePipelineBase.java @@ -105,6 +105,7 @@ public abstract class GT_MetaTileEntity_LongDistancePipelineBase extends GT_Meta final IGregTechTileEntity gt_tile = getBaseMetaTileEntity(); if (gt_tile == null || !gt_tile.isAllowedToWork() || gt_tile.isClientSide()) return false; World world = gt_tile.getWorld(); + if (world == null) return false; if (mTargetPos == null) { // We don't have a target position, scan the pipes -- cgit From 9829fdf6ef13c2784897d836d41751908fb2e62f Mon Sep 17 00:00:00 2001 From: repo_alt Date: Wed, 8 Sep 2021 19:20:23 +0300 Subject: Allow configurable non-GT blocks in cleanroom structure --- src/main/java/gregtech/GT_Mod.java | 3 + .../multi/GT_MetaTileEntity_Cleanroom.java | 109 +++++++++++++++------ 2 files changed, 81 insertions(+), 31 deletions(-) (limited to 'src/main/java/gregtech/common/tileentities') diff --git a/src/main/java/gregtech/GT_Mod.java b/src/main/java/gregtech/GT_Mod.java index f42e9a5ced..5266eb246c 100644 --- a/src/main/java/gregtech/GT_Mod.java +++ b/src/main/java/gregtech/GT_Mod.java @@ -28,6 +28,7 @@ import gregtech.common.items.GT_MetaGenerated_Tool_01; import gregtech.common.items.behaviors.Behaviour_DataOrb; import gregtech.common.misc.GT_Command; import gregtech.common.tileentities.machines.basic.GT_MetaTileEntity_Massfabricator; +import gregtech.common.tileentities.machines.multi.GT_MetaTileEntity_Cleanroom; import gregtech.common.tileentities.storage.GT_MetaTileEntity_DigitalChestBase; import gregtech.loaders.ExtraIcons; import gregtech.loaders.load.GT_CoverBehaviorLoader; @@ -379,6 +380,8 @@ public class GT_Mod implements IGT_Mod { gregtechproxy.mExplosionItemDrop = tMainConfig.get("general", "ExplosionItemDrops", false).getBoolean(false); gregtechproxy.mUndergroundOil.getConfig(tMainConfig, "undergroundfluid"); gregtechproxy.mEnableCleanroom = tMainConfig.get("general", "EnableCleanroom", true).getBoolean(true); + if (gregtechproxy.mEnableCleanroom) + GT_MetaTileEntity_Cleanroom.loadConfig(tMainConfig); gregtechproxy.mLowGravProcessing = Loader.isModLoaded(GT_Values.MOD_ID_GC_CORE) && tMainConfig.get("general", "LowGravProcessing", true).getBoolean(true); gregtechproxy.mUseGreatlyShrukenReplacementList = tMainConfig.get("general", "GTNH Optimised Material Loading", true).getBoolean(true); Calendar now = Calendar.getInstance(); diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Cleanroom.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Cleanroom.java index e486596fe6..203fe4a08d 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Cleanroom.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Cleanroom.java @@ -1,5 +1,8 @@ package gregtech.common.tileentities.machines.multi; +import java.util.HashMap; +import java.util.Map; + import gregtech.api.GregTech_API; import gregtech.api.enums.GT_Values; import gregtech.api.gui.GT_GUIContainer_MultiMachine; @@ -17,6 +20,8 @@ import net.minecraft.block.Block; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; +import net.minecraftforge.common.config.ConfigCategory; +import net.minecraftforge.common.config.Configuration; import net.minecraftforge.common.util.ForgeDirection; import org.lwjgl.input.Keyboard; @@ -91,7 +96,7 @@ public class GT_MetaTileEntity_Cleanroom extends GT_MetaTileEntity_MultiBlockBas int mDoorCount = 0; int mHullCount = 0; int mPlascreteCount = 0; - int mGlassCount = 0; + HashMap otherBlocks = new HashMap<>(); boolean doorState = false; this.mUpdate = 100; @@ -186,8 +191,6 @@ public class GT_MetaTileEntity_Cleanroom extends GT_MetaTileEntity_MultiBlockBas } } else if (tBlock == GregTech_API.sBlockReinforced && tMeta == 2) { mPlascreteCount++; - } else if (tBlock != null && tBlock.getUnlocalizedName().equals("blockAlloyGlass")) { - ++mGlassCount; } else { IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(dX, dY, dZ); if ((!this.addMaintenanceToMachineList(tTileEntity, 210)) && (!this.addEnergyInputToMachineList(tTileEntity, 210))) { @@ -202,32 +205,35 @@ public class GT_MetaTileEntity_Cleanroom extends GT_MetaTileEntity_MultiBlockBas } mDoorCount++; } else { - if (tTileEntity == null) { - if (debugCleanroom) { - GT_Log.out.println( - "Cleanroom: Missing block? Not a tTileEntity" - ); - } - return false; - } - IMetaTileEntity aMetaTileEntity = tTileEntity.getMetaTileEntity(); - if (aMetaTileEntity == null) { - if (debugCleanroom) { - GT_Log.out.println( + if (tTileEntity != null) { + IMetaTileEntity aMetaTileEntity = tTileEntity.getMetaTileEntity(); + if (aMetaTileEntity == null) { + if (debugCleanroom) { + GT_Log.out.println( "Cleanroom: Missing block? Not a aMetaTileEntity" - ); + ); + } + return false; + } + if (aMetaTileEntity instanceof GT_MetaTileEntity_BasicHull) { + mHullCount++; + } + else { + if (debugCleanroom) { + GT_Log.out.println( + "Cleanroom: Incorrect GT block? " + tBlock.getUnlocalizedName() + ); + } + return false; } - return false; - } - if (aMetaTileEntity instanceof GT_MetaTileEntity_BasicHull) { - mHullCount++; } else { - if (debugCleanroom) { - GT_Log.out.println( - "Cleanroom: Incorrect block?" - ); + if (config.containsKey(tBlock.getUnlocalizedName())) + otherBlocks.compute(tBlock.getUnlocalizedName(), (k,v) -> v == null ? 1 : v + 1 ); + else { + if (debugCleanroom) + GT_Log.out.println("Cleanroom: not allowed block " + tBlock.getUnlocalizedName()); + return false; } - return false; } } } @@ -236,9 +242,20 @@ public class GT_MetaTileEntity_Cleanroom extends GT_MetaTileEntity_MultiBlockBas } } } - if (this.mMaintenanceHatches.size() != 1 || this.mEnergyHatches.size() != 1 || mDoorCount != 2 || mHullCount > 10) { + if (this.mMaintenanceHatches.size() != 1 || this.mEnergyHatches.size() != 1 || mDoorCount > 2 || mHullCount > 10) { return false; } + if (mPlascreteCount < 20) + return false; + float ratio = (((float) mPlascreteCount) / 100f); + for (Map.Entry e : otherBlocks.entrySet()) { + ConfigEntry ce = config.get(e.getKey()); + if (ce.allowedCount > 0) { // count has priority + if (e.getValue() > ce.allowedCount) + return false; + } else if (e.getValue() > ratio * ce.percentage) + return false; + } setCallbacks(x, y, z, aBaseMetaTileEntity); @@ -249,12 +266,8 @@ public class GT_MetaTileEntity_Cleanroom extends GT_MetaTileEntity_MultiBlockBas byte t = (byte) Math.max(1, (byte) (15 / (10000f / this.mEfficiency))); aBaseMetaTileEntity.setInternalOutputRedstoneSignal(i, t); } - - float ratio = (((float) mPlascreteCount) / 100f) * GT_Values.cleanroomGlass; - this.mHeight = -y; - - return mPlascreteCount >= 20 && mGlassCount < (int) Math.floor(ratio); + return true; } private void setCallbacks(int x, int y, int z, IGregTechTileEntity aBaseMetaTileEntity) { @@ -344,4 +357,38 @@ public class GT_MetaTileEntity_Cleanroom extends GT_MetaTileEntity_MultiBlockBas public boolean explodesOnComponentBreak(ItemStack aStack) { return false; } + + private static class ConfigEntry { + int percentage; + int allowedCount; + ConfigEntry(int percentage, int count) { + this.percentage = percentage; + this.allowedCount = count; + } + } + private final static HashMap config = new HashMap<>(); + + private static final String category = "cleanroom_allowed_blocks"; + + private static void setDefaultConfigValues(Configuration cfg) { + cfg.get("cleanroom_allowed_blocks.reinforced_glass", "Name","blockAlloyGlass"); + cfg.get("cleanroom_allowed_blocks.reinforced_glass", "Percentage",5); + cfg.get("cleanroom_allowed_blocks.bw_reinforced_glass", "Name","BW_GlasBlocks"); + cfg.get("cleanroom_allowed_blocks.bw_reinforced_glass", "Percentage",100); + cfg.get("cleanroom_allowed_blocks.elevator", "Name","tile.openblocks.elevator"); + cfg.get("cleanroom_allowed_blocks.elevator", "Count",1); + cfg.get("cleanroom_allowed_blocks.travel_anchor", "Name","tile.blockTravelAnchor"); + cfg.get("cleanroom_allowed_blocks.travel_anchor", "Count",1); + } + public static void loadConfig(Configuration cfg) { + if (!cfg.hasCategory(category)) + setDefaultConfigValues(cfg); + for (ConfigCategory cc : cfg.getCategory(category).getChildren()) { + String name = cc.get("Name").getString(); + if (cc.containsKey("Count")) + config.put(name, new ConfigEntry(0, cc.get("Count").getInt())); + else if (cc.containsKey("Percentage")) + config.put(name, new ConfigEntry(cc.get("Percentage").getInt(), 0)); + } + } } -- cgit From 8c64f13922200ef1c5c8a5196752bc6797b2cc71 Mon Sep 17 00:00:00 2001 From: repo_alt Date: Thu, 9 Sep 2021 14:07:28 +0300 Subject: allow differentiating cleanroom additional blocks by meta --- .../multi/GT_MetaTileEntity_Cleanroom.java | 48 +++++++++++++++++----- 1 file changed, 37 insertions(+), 11 deletions(-) (limited to 'src/main/java/gregtech/common/tileentities') diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Cleanroom.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Cleanroom.java index 203fe4a08d..fb8ab838f3 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Cleanroom.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Cleanroom.java @@ -226,13 +226,22 @@ public class GT_MetaTileEntity_Cleanroom extends GT_MetaTileEntity_MultiBlockBas } return false; } - } else { - if (config.containsKey(tBlock.getUnlocalizedName())) - otherBlocks.compute(tBlock.getUnlocalizedName(), (k,v) -> v == null ? 1 : v + 1 ); + } + else { + String key = tBlock.getUnlocalizedName() + ":"+ tMeta; + if (config.containsKey(key)) { // check with meta first + otherBlocks.compute(key, (k, v) -> v == null ? 1 : v + 1); + } else { - if (debugCleanroom) - GT_Log.out.println("Cleanroom: not allowed block " + tBlock.getUnlocalizedName()); - return false; + key = tBlock.getUnlocalizedName(); + if (config.containsKey(key)) { + otherBlocks.compute(key, (k, v) -> v == null ? 1 : v + 1); + } + else { + if (debugCleanroom) + GT_Log.out.println("Cleanroom: not allowed block " + tBlock.getUnlocalizedName()); + return false; + } } } } @@ -361,34 +370,51 @@ public class GT_MetaTileEntity_Cleanroom extends GT_MetaTileEntity_MultiBlockBas private static class ConfigEntry { int percentage; int allowedCount; - ConfigEntry(int percentage, int count) { + int meta; + ConfigEntry(int percentage, int count, int meta) { this.percentage = percentage; this.allowedCount = count; + this.meta = meta; } } private final static HashMap config = new HashMap<>(); private static final String category = "cleanroom_allowed_blocks"; + private static final int wildcard_meta = Short.MAX_VALUE; private static void setDefaultConfigValues(Configuration cfg) { cfg.get("cleanroom_allowed_blocks.reinforced_glass", "Name","blockAlloyGlass"); cfg.get("cleanroom_allowed_blocks.reinforced_glass", "Percentage",5); + cfg.get("cleanroom_allowed_blocks.bw_reinforced_glass_0", "Name","BW_GlasBlocks"); + cfg.get("cleanroom_allowed_blocks.bw_reinforced_glass_0", "Percentage",50); + cfg.get("cleanroom_allowed_blocks.bw_reinforced_glass_0", "Meta",0); cfg.get("cleanroom_allowed_blocks.bw_reinforced_glass", "Name","BW_GlasBlocks"); cfg.get("cleanroom_allowed_blocks.bw_reinforced_glass", "Percentage",100); cfg.get("cleanroom_allowed_blocks.elevator", "Name","tile.openblocks.elevator"); cfg.get("cleanroom_allowed_blocks.elevator", "Count",1); cfg.get("cleanroom_allowed_blocks.travel_anchor", "Name","tile.blockTravelAnchor"); cfg.get("cleanroom_allowed_blocks.travel_anchor", "Count",1); + cfg.get("cleanroom_allowed_blocks.warded_glass", "Name","tile.blockCosmeticOpaque"); + cfg.get("cleanroom_allowed_blocks.warded_glass", "Meta",2); + cfg.get("cleanroom_allowed_blocks.warded_glass", "Percentage",50); } public static void loadConfig(Configuration cfg) { if (!cfg.hasCategory(category)) setDefaultConfigValues(cfg); for (ConfigCategory cc : cfg.getCategory(category).getChildren()) { String name = cc.get("Name").getString(); - if (cc.containsKey("Count")) - config.put(name, new ConfigEntry(0, cc.get("Count").getInt())); - else if (cc.containsKey("Percentage")) - config.put(name, new ConfigEntry(cc.get("Percentage").getInt(), 0)); + if (cc.containsKey("Count")) { + if (cc.containsKey("Meta")) + config.put(name+":"+cc.get("Meta").getInt(), new ConfigEntry(0, cc.get("Count").getInt(), cc.get("Meta").getInt())); + else + config.put(name, new ConfigEntry(0, cc.get("Count").getInt(), wildcard_meta)); + } + else if (cc.containsKey("Percentage")) { + if (cc.containsKey("Meta")) + config.put(name+":"+cc.get("Meta").getInt(), new ConfigEntry(cc.get("Percentage").getInt(), 0, cc.get("Meta").getInt())); + else + config.put(name, new ConfigEntry(cc.get("Percentage").getInt(), 0, wildcard_meta)); + } } } } -- cgit From 4f22ec32fd325a5f0593dcbe7d8cf2fb21d98cd4 Mon Sep 17 00:00:00 2001 From: TimeConqueror Date: Fri, 10 Sep 2021 00:04:08 +0300 Subject: Made cleanroom tooltip more readable on low res --- .../machines/multi/GT_MetaTileEntity_Cleanroom.java | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'src/main/java/gregtech/common/tileentities') diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Cleanroom.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Cleanroom.java index e486596fe6..80bfb20009 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Cleanroom.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Cleanroom.java @@ -21,11 +21,7 @@ import net.minecraftforge.common.util.ForgeDirection; import org.lwjgl.input.Keyboard; import static gregtech.api.enums.GT_Values.debugCleanroom; -import static gregtech.api.enums.Textures.BlockIcons.BLOCK_PLASCRETE; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_CLEANROOM; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_CLEANROOM_ACTIVE; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_CLEANROOM_ACTIVE_GLOW; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_CLEANROOM_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.*; public class GT_MetaTileEntity_Cleanroom extends GT_MetaTileEntity_MultiBlockBase { private int mHeight = -1; @@ -48,10 +44,12 @@ public class GT_MetaTileEntity_Cleanroom extends GT_MetaTileEntity_MultiBlockBas final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); tt.addMachineType("Cleanroom") .addInfo("Controller block for the Cleanroom") - .addInfo("Consumes 40 EU/t when first turned on and 4 EU/t once at 100% efficiency when not overclocked")//? + .addInfo("Consumes 40 EU/t when first turned on") + .addInfo("and 4 EU/t once at 100% efficiency when not overclocked")//? .addInfo("An energy hatch accepts up to 2A, so you can use 2A LV or 1A MV") .addInfo("2 LV batteries + 1 LV generator or 1 MV generator")//? - .addInfo("Time required to reach full efficiency is propotional to the height of empty space within") + .addInfo("Time required to reach full efficiency is proportional to") + .addInfo("the height of empty space within") .addInfo("Make sure your Energy Hatch matches! ?") .addSeparator() .beginVariableStructureBlock(3, 15, 4, 15, 3, 15, true) -- cgit