diff options
Diffstat (limited to 'src/Java/gtPlusPlus/xmod/gregtech/api')
3 files changed, 76 insertions, 17 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) { |