aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/xmod
diff options
context:
space:
mode:
Diffstat (limited to 'src/Java/gtPlusPlus/xmod')
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/IGregtech_RecipeAdder.java19
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_SuperBus_Input.java33
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java41
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GT4Entity_AutoCrafter.java17
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_IndustrialFishingPond.java12
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java20
6 files changed, 107 insertions, 35 deletions
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/IGregtech_RecipeAdder.java b/src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/IGregtech_RecipeAdder.java
index ac2320afdb..621918b370 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/IGregtech_RecipeAdder.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/IGregtech_RecipeAdder.java
@@ -111,13 +111,30 @@ public interface IGregtech_RecipeAdder {
* @param aInput = ItemStack[] (not null, and respects StackSize)
* @param aFluidInput = Input of a fluid (can be null, and respects StackSize)
* @param aFluidOutput = Output of the Molten Metal (not null, and respects StackSize)
+ * @param aOutputStack = Item Output (Can be null)
* @param aChances = Output Chance (can be == 0)
* @param aDuration = Duration (must be >= 0)
* @param aEUt = EU per tick needed for heating up (must be >= 0)
- * @param aSpecialValue = Stores the Required Temp for the Recipe
* @return true if the Recipe got added, otherwise false.
*/
+ public boolean addBlastSmelterRecipe(ItemStack[] aInput, FluidStack aInputFluid, FluidStack aOutput, ItemStack[] aOutputStack, int aChance, int aDuration, int aEUt);
+
public boolean addBlastSmelterRecipe(ItemStack[] aInput, FluidStack aInputFluid, FluidStack aOutput, int aChance, int aDuration, int aEUt, int aSpecialValue);
+
+ /**
+ * Adds a Recipe for the Alloy Blast Smelter. (up to 9 Inputs)
+ *
+ * @param aInput = ItemStack[] (not null, and respects StackSize)
+ * @param aFluidInput = Input of a fluid (can be null, and respects StackSize)
+ * @param aFluidOutput = Output of the Molten Metal (not null, and respects StackSize)
+ * @param aOutputStack = Item Output (Can be null)
+ * @param aChances = Output Chance (can be == 0)
+ * @param aDuration = Duration (must be >= 0)
+ * @param aEUt = EU per tick needed for heating up (must be >= 0)
+ * @param aSpecialValue = Stores the Required Temp for the Recipe
+ * @return true if the Recipe got added, otherwise false.
+ */
+ public boolean addBlastSmelterRecipe(ItemStack[] aInput, FluidStack aInputFluid, FluidStack aOutput, ItemStack[] aOutputStack, int aChance, int aDuration, int aEUt, int aSpecialValue);
public boolean addLFTRRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, int aDuration, int aEUt);
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_SuperBus_Input.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_SuperBus_Input.java
index 833c1bfcc0..96df4dbfd0 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_SuperBus_Input.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_SuperBus_Input.java
@@ -168,14 +168,31 @@ public class GT_MetaTileEntity_SuperBus_Input extends GT_MetaTileEntity_Hatch_In
return;
}
- PlayerUtils.messagePlayer(aPlayer, "This Super Bus (I) contains:");
- for (String s : aNames) {
- if (s.startsWith(" ")) {
- s = s.substring(1);
- }
- //Logger.INFO("Trying to display Super Input Bus contents. "+s);
- PlayerUtils.messagePlayer(aPlayer, s);
- }
+ PlayerUtils.messagePlayer(aPlayer, "This Super Bus (I) contains: ["+getRealInventory().length+"]");
+
+ if (aNames.length <= 12) {
+ for (String s : aNames) {
+ if (s.startsWith(" ")) {
+ s = s.substring(1);
+ }
+ //Logger.INFO("Trying to display Super Input Bus contents. "+s);
+ PlayerUtils.messagePlayer(aPlayer, s);
+ }
+ }
+ else {
+
+ String superString = "";
+
+ for (String s : aNames) {
+ if (s.startsWith(" ")) {
+ s = s.substring(1);
+ }
+ superString += (s+"\r\n");
+ }
+ PlayerUtils.messagePlayer(aPlayer, superString);
+ }
+
+
}
@Override
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java
index 39666a2d3b..892f8f332a 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java
@@ -912,7 +912,10 @@ GT_MetaTileEntity_MultiBlockBase {
return 0;
}
- public GT_MetaTileEntity_Hatch_ControlCore getControlCoreBus() {
+ public GT_MetaTileEntity_Hatch_ControlCore getControlCoreBus() {
+ if (this.mControlCoreBus == null || this.mControlCoreBus.isEmpty()) {
+ return null;
+ }
GT_MetaTileEntity_Hatch_ControlCore x = this.mControlCoreBus.get(0);
if (x != null) {
log("getControlCore(ok)");
@@ -1506,11 +1509,8 @@ GT_MetaTileEntity_MultiBlockBase {
public final boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) {
- boolean aStructureCheck = checkMultiblock(aBaseMetaTileEntity, aStack);
-
- boolean aCoresConfig = gtPlusPlus.core.lib.CORE.ConfigSwitches.requireControlCores;
-
- boolean aHasCore = (aCoresConfig ? (this.getControlCoreBus() != null) : true);
+ boolean aStructureCheck = checkMultiblock(aBaseMetaTileEntity, aStack);
+ boolean aHasCore = (requireControlCores ? (this.getControlCoreBus() != null) : true);
return aStructureCheck && aHasCore;
}
@@ -1526,10 +1526,34 @@ GT_MetaTileEntity_MultiBlockBase {
return true;
}
else {
+ int aMetaTileID = aBaseMetaTileEntity.getMetaTileID();
//Found a controller
- if (aFoundMeta > 0 && aFoundMeta < 1000 && aFoundBlock == GregTech_API.sBlockMachines) {
+ if (aMetaTileID >= 750 && aMetaTileID < 1000 && aFoundBlock == GregTech_API.sBlockMachines) {
+ return true;
+ }
+ //Vanilla Hatches/Busses
+ else if (aMetaTileID >= 10 && aMetaTileID <= 99 && aFoundBlock == GregTech_API.sBlockMachines) {
+ return true;
+ }
+ //Adv Mufflers
+ else if (aMetaTileID >= 30001 && aMetaTileID <= 30009 && aFoundBlock == GregTech_API.sBlockMachines) {
return true;
}
+ //Control Core, Super IO
+ else if (aMetaTileID >= 30020 && aMetaTileID <= 30040 && aFoundBlock == GregTech_API.sBlockMachines) {
+ return true;
+ }
+ //Auto maint
+ else if (aMetaTileID == 111 && aFoundBlock == GregTech_API.sBlockMachines) {
+ return true;
+ }
+ //Data Ports
+ else if ((aMetaTileID == 131 || aMetaTileID == 132) && aFoundBlock == GregTech_API.sBlockMachines) {
+ return true;
+ }
+ else {
+ Logger.INFO("Found meta Tile: "+aMetaTileID);
+ }
}
}
if (!isHatch) {
@@ -1537,7 +1561,8 @@ GT_MetaTileEntity_MultiBlockBase {
return true;
}
else if (aFoundBlock != aExpectedBlock) {
- Logger.INFO("A1 - Found: "+aFoundBlock.getLocalizedName()+", Expected: "+aExpectedBlock.getLocalizedName());
+ Logger.INFO("A1 - Found: "+aFoundBlock.getLocalizedName()+":"+aFoundMeta+", Expected: "+aExpectedBlock.getLocalizedName()+":"+aExpectedMeta);
+ Logger.INFO("Loc: "+(new BlockPos(aBaseMetaTileEntity).getLocationString()));
return false;
}
else if (aFoundMeta != aExpectedMeta) {
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GT4Entity_AutoCrafter.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GT4Entity_AutoCrafter.java
index a39bc5d31b..759378013c 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GT4Entity_AutoCrafter.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GT4Entity_AutoCrafter.java
@@ -8,7 +8,7 @@ import net.minecraft.block.Block;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
-
+import net.minecraft.util.EnumChatFormatting;
import gregtech.api.enums.TAE;
import gregtech.api.enums.Textures;
import gregtech.api.interfaces.ITexture;
@@ -131,7 +131,6 @@ public class GT4Entity_AutoCrafter extends GregtechMeta_MultiBlockBase {
return new String[] {
"Highly Advanced Autocrafter",
"Right Click with a Screwdriver to change mode",
- "This Machine Can Autocraft, Assemble, Disassemble or Circuit Assemble",
"200% faster than using single block machines of the same voltage",
"Processes two items per voltage tier",
"--------------------------------------",
@@ -239,13 +238,13 @@ public class GT4Entity_AutoCrafter extends GregtechMeta_MultiBlockBase {
if (isModernGT && !CORE.GTNH) {
mMachineMode = mMachineMode.nextMode();
if (mMachineMode == MODE.CRAFTING) {
- PlayerUtils.messagePlayer(aPlayer, "Running the Auto-Crafter in mode: �dAutoCrafting");
+ PlayerUtils.messagePlayer(aPlayer, "Running the Auto-Crafter in mode: "+EnumChatFormatting.AQUA+"AutoCrafting");
} else if (mMachineMode == MODE.ASSEMBLY) {
- PlayerUtils.messagePlayer(aPlayer, "Running the Auto-Crafter in mode: �aAssembly");
+ PlayerUtils.messagePlayer(aPlayer, "Running the Auto-Crafter in mode: "+EnumChatFormatting.GREEN+"Assembly");
} else if (mMachineMode == MODE.DISASSEMBLY) {
- PlayerUtils.messagePlayer(aPlayer, "Running the Auto-Crafter in mode: �cDisassembly");
+ PlayerUtils.messagePlayer(aPlayer, "Running the Auto-Crafter in mode: "+EnumChatFormatting.RED+"Disassembly");
} else {
- PlayerUtils.messagePlayer(aPlayer, "Running the Auto-Crafter in mode: �eCircuit Assembly");
+ PlayerUtils.messagePlayer(aPlayer, "Running the Auto-Crafter in mode: "+EnumChatFormatting.YELLOW+"Circuit Assembly");
}
}
//5.08 support
@@ -258,11 +257,11 @@ public class GT4Entity_AutoCrafter extends GregtechMeta_MultiBlockBase {
}
if (mMachineMode == MODE.CRAFTING) {
- PlayerUtils.messagePlayer(aPlayer, "You are now running the Auto-Crafter in mode: �dAutoCrafting");
+ PlayerUtils.messagePlayer(aPlayer, "You are now running the Auto-Crafter in mode: "+EnumChatFormatting.AQUA+"AutoCrafting");
} else if (mMachineMode == MODE.ASSEMBLY) {
- PlayerUtils.messagePlayer(aPlayer, "You are now running the Auto-Crafter in mode: �aAssembly");
+ PlayerUtils.messagePlayer(aPlayer, "You are now running the Auto-Crafter in mode: "+EnumChatFormatting.GREEN+"Assembly");
} else {
- PlayerUtils.messagePlayer(aPlayer, "You are now running the Auto-Crafter in mode: �cDisassembly");
+ PlayerUtils.messagePlayer(aPlayer, "You are now running the Auto-Crafter in mode: "+EnumChatFormatting.RED+"Disassembly");
}
}
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_IndustrialFishingPond.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_IndustrialFishingPond.java
index f88065d9a9..b1e433e276 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_IndustrialFishingPond.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_IndustrialFishingPond.java
@@ -70,6 +70,7 @@ public class GregtechMetaTileEntity_IndustrialFishingPond extends GregtechMeta_M
"X X",
"X X",
"XXXXXXXXX",
+ "Can process (Tier + 1) * 2 recipes",
"Put a numbered circuit into the input bus.",
"Circuit 14 for Fish",
"Circuit 15 for Junk",
@@ -147,14 +148,14 @@ public class GregtechMetaTileEntity_IndustrialFishingPond extends GregtechMeta_M
return false;
}
- return checkRecipeGeneric(tItemInputs, tFluidInputs, 1, 100, 80, 100);
+ return checkRecipeGeneric(tItemInputs, tFluidInputs, getMaxParallelRecipes(), 100, 80, 100);
}
return true;
}
@Override
public int getMaxParallelRecipes() {
- return 1;
+ return (2 * (GT_Utility.getTier(this.getMaxInputVoltage())+1));
}
@Override
@@ -415,7 +416,7 @@ public class GregtechMetaTileEntity_IndustrialFishingPond extends GregtechMeta_M
if (j.getItem() == CI.getNumberedCircuit(0).getItem()) {
// Fish
if (j.getItemDamage() == 14) {
- mMax = 8;
+ mMax = 8 + (this.getMaxParallelRecipes() - 2);
this.mMode = 14;
break;
}
@@ -469,7 +470,7 @@ public class GregtechMetaTileEntity_IndustrialFishingPond extends GregtechMeta_M
for (int k = 0; k < this.mMax; k++) {
if (mFishOutput[k] == null)
for (WeightedRandomFishable g : categoryFish.values()) {
- if (MathUtils.randInt(0, 75) <= 2) {
+ if (MathUtils.randInt(0, (65 - getMaxParallelRecipes())) <= 2) {
ItemStack t = reflectiveFish(g);
if (t != null) {
mFishOutput[k] = ItemUtils.getSimpleStack(t, 1);
@@ -528,6 +529,7 @@ public class GregtechMetaTileEntity_IndustrialFishingPond extends GregtechMeta_M
this.mMaxProgresstime = 0;
this.mOutputItems = new ItemStack[]{};
this.mOutputFluids = new FluidStack[]{};
+
long tVoltage = getMaxInputVoltage();
byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage));
@@ -549,7 +551,7 @@ public class GregtechMetaTileEntity_IndustrialFishingPond extends GregtechMeta_M
ItemStack[] mFishOutput = generateLoot(this.mMode);
mFishOutput = removeNulls(mFishOutput);
- GT_Recipe g = new Recipe_GT(true, new ItemStack[] {}, mFishOutput, null, new int[] {}, aFluidInputs, mOutputFluids, 100, 16, 0);
+ GT_Recipe g = new Recipe_GT(true, new ItemStack[] {}, mFishOutput, null, new int[] {}, aFluidInputs, mOutputFluids, 200, 16, 0);
if (!this.canBufferOutputs(g, aMaxParallelRecipes)) {
log("No Space");
return false;
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java b/src/Java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java
index 50e9f8c3d6..94486d472b 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java
@@ -351,18 +351,30 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder {
@Override
public boolean addBlastSmelterRecipe(final ItemStack[] aInput, FluidStack aOutput, final int aChance, int aDuration,
final int aEUt) {
- return addBlastSmelterRecipe(aInput, null, aOutput, aChance, aDuration, aEUt, 3700);
+ return addBlastSmelterRecipe(aInput, null, aOutput, new ItemStack[] {}, aChance, aDuration, aEUt, 3700);
}
@Override
public boolean addBlastSmelterRecipe(final ItemStack[] aInput, FluidStack aInputFluid, FluidStack aOutput,
final int aChance, int aDuration, final int aEUt) {
- return addBlastSmelterRecipe(aInput, aInputFluid, aOutput, aChance, aDuration, aEUt, 3700);
+ return addBlastSmelterRecipe(aInput, aInputFluid, aOutput, new ItemStack[] {}, aChance, aDuration, aEUt, 3700);
+ }
+
+ @Override
+ public boolean addBlastSmelterRecipe(final ItemStack[] aInput, FluidStack aInputFluid, FluidStack aOutput, ItemStack[] aOutputStack,
+ final int aChance, int aDuration, final int aEUt) {
+ return addBlastSmelterRecipe(aInput, aInputFluid, aOutput, aOutputStack, aChance, aDuration, aEUt, 3700);
}
@Override
public boolean addBlastSmelterRecipe(ItemStack[] aInput, FluidStack aInputFluid, FluidStack aOutput, int aChance,
int aDuration, int aEUt, int aSpecialValue) {
+ return addBlastSmelterRecipe(aInput, aInputFluid, aOutput, new ItemStack[] {}, aChance, aDuration, aEUt, aSpecialValue);
+ }
+
+ @Override
+ public boolean addBlastSmelterRecipe(ItemStack[] aInput, FluidStack aInputFluid, FluidStack aOutput, ItemStack[] aOutputStack, int aChance,
+ int aDuration, int aEUt, int aSpecialValue) {
if ((aInput == null) || (aOutput == null)) {
Logger.WARNING("Fail - Input or Output was null.");
return false;
@@ -391,8 +403,8 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder {
return false;
}
- Recipe_GT.Gregtech_Recipe_Map.sAlloyBlastSmelterRecipes.addRecipe(true, aInput, new ItemStack[] { null }, null,
- new int[] { aChance*10 }, new FluidStack[] { aInputFluid }, new FluidStack[] { aOutput }, aDuration, aEUt,
+ Recipe_GT.Gregtech_Recipe_Map.sAlloyBlastSmelterRecipes.addRecipe(true, aInput, aOutputStack, null,
+ new int[] {}, new FluidStack[] { aInputFluid }, new FluidStack[] { aOutput }, aDuration, aEUt,
aSpecialValue);
return true;
}