aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/xmod/gregtech/api
diff options
context:
space:
mode:
Diffstat (limited to 'src/Java/gtPlusPlus/xmod/gregtech/api')
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java16
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/IGregtech_RecipeAdder.java2
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/items/Gregtech_MetaItem_X32.java43
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java197
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/generators/GregtechRocketFuelGeneratorBase.java7
5 files changed, 185 insertions, 80 deletions
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java b/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java
index 28692e25cb..cd4b0947e4 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java
@@ -39,6 +39,13 @@ public enum GregtechItemList implements GregtechItemContainer {
Emitter_ULV,
Sensor_ULV,
+ // Mixed Components
+ TransmissionComponent_ULV, TransmissionComponent_LV,
+ TransmissionComponent_MV, TransmissionComponent_HV,
+ TransmissionComponent_EV, TransmissionComponent_IV,
+ TransmissionComponent_LuV, TransmissionComponent_ZPM,
+ TransmissionComponent_UV, TransmissionComponent_MAX,
+
//Recipe Circuit
Circuit_BioRecipeSelector,
@@ -148,6 +155,9 @@ public enum GregtechItemList implements GregtechItemContainer {
Industrial_Centrifuge,
Casing_Centrifuge1,
+ // Large Alloy Smelter
+ Industrial_AlloySmelter,
+
//Coke Oven
Industrial_CokeOven,
Casing_CokeOven,
@@ -517,6 +527,8 @@ public enum GregtechItemList implements GregtechItemContainer {
//512v Creative Buffer
Energy_Buffer_CREATIVE,
+ //Variable voltage RF convertor
+ Energy_Buffer_RF_Convertor,
//Energy Buffers
Energy_Buffer_1by1_ULV, Energy_Buffer_1by1_LV,
Energy_Buffer_1by1_MV, Energy_Buffer_1by1_HV,
@@ -625,7 +637,9 @@ public enum GregtechItemList implements GregtechItemContainer {
FakeMachineCasingPlate_MV, FakeMachineCasingPlate_HV,
FakeMachineCasingPlate_EV, FakeMachineCasingPlate_IV,
FakeMachineCasingPlate_LuV, FakeMachineCasingPlate_ZPM,
- FakeMachineCasingPlate_UV, FakeMachineCasingPlate_MAX,
+ FakeMachineCasingPlate_UV, FakeMachineCasingPlate_MAX,
+
+
//----------------------------------------------------------------------------
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 83f052a983..cb889e0233 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
@@ -271,7 +271,7 @@ public interface IGregtech_RecipeAdder {
public boolean addUvLaserRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput, int time, long eu);
public boolean addIrLaserRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput, int time, long eu);
- public boolean addFluidReactorRecipe(ItemStack[] aInputs, FluidStack[] aInputFluids, ItemStack[] aOutputs, FluidStack[] aFluidOutputs, int time, long eu, int aTier);
+ public boolean addChemicalPlantRecipe(ItemStack[] aInputs, FluidStack[] aInputFluids, ItemStack[] aOutputs, FluidStack[] aFluidOutputs, int time, long eu, int aTier);
public boolean addBlastRecipe(ItemStack[] aInputs, FluidStack[] aInputFluids, ItemStack[] aOutputs, FluidStack[] aFluidOutputs, int time, long eu, int aHeat);
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/items/Gregtech_MetaItem_X32.java b/src/Java/gtPlusPlus/xmod/gregtech/api/items/Gregtech_MetaItem_X32.java
index ef92f9919d..a5430846a9 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/items/Gregtech_MetaItem_X32.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/items/Gregtech_MetaItem_X32.java
@@ -192,22 +192,9 @@ public abstract class Gregtech_MetaItem_X32 extends Gregtech_MetaItem {
@Override
public int getColorFromItemStack(final ItemStack stack, int HEX_OxFFFFFF) {
- if (stack.getDisplayName().contains("ULV")){
- HEX_OxFFFFFF = Utils.rgbtoHexValue(200, 180, 180);
- }
- else if (stack.getDisplayName().contains("LuV")){
- HEX_OxFFFFFF = 0xffffcc;
- }
- else if (stack.getDisplayName().contains("ZPM")){
- HEX_OxFFFFFF = 0xffe600;
- }
- else if (stack.getDisplayName().contains("UV")){
- HEX_OxFFFFFF = 0xffb300;
- }
- else if (stack.getDisplayName().contains("MAX")){
- HEX_OxFFFFFF = Utils.rgbtoHexValue(MathUtils.randInt(220, 250), MathUtils.randInt(221, 251), MathUtils.randInt(220, 250));
- }
- else if (stack.getDisplayName().contains("Sodium")){
+
+ int aMeta = stack.getItemDamage();
+ if (stack.getDisplayName().contains("Sodium")){
HEX_OxFFFFFF = Utils.rgbtoHexValue(90, 90, 255);
}
else if (stack.getDisplayName().contains("Cadmium")){
@@ -228,8 +215,28 @@ public abstract class Gregtech_MetaItem_X32 extends Gregtech_MetaItem {
else if (stack.getDisplayName().contains("Invar")){
HEX_OxFFFFFF = Utils.rgbtoHexValue(180, 180, 120);
}
- else {
- HEX_OxFFFFFF = 0xffffff;
+ else {
+ if (aMeta > 50 && aMeta != 150) {
+ HEX_OxFFFFFF = 0xffffff;
+ }
+ else if (stack.getDisplayName().contains("ULV")){
+ HEX_OxFFFFFF = Utils.rgbtoHexValue(200, 180, 180);
+ }
+ else if (stack.getDisplayName().contains("LuV")){
+ HEX_OxFFFFFF = 0xffffcc;
+ }
+ else if (stack.getDisplayName().contains("ZPM")){
+ HEX_OxFFFFFF = 0xffe600;
+ }
+ else if (stack.getDisplayName().contains("UV")){
+ HEX_OxFFFFFF = 0xffb300;
+ }
+ else if (stack.getDisplayName().contains("MAX")){
+ HEX_OxFFFFFF = Utils.rgbtoHexValue(MathUtils.randInt(220, 250), MathUtils.randInt(221, 251), MathUtils.randInt(220, 250));
+ }
+ else {
+ HEX_OxFFFFFF = 0xffffff;
+ }
}
return HEX_OxFFFFFF;
}
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 f41efe602a..ef5429af62 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
@@ -99,9 +99,8 @@ public abstract class GregtechMeta_MultiBlockBase extends GT_MetaTileEntity_Mult
try {
calculatePollutionReduction = GT_MetaTileEntity_Hatch_Muffler.class.getDeclaredMethod("calculatePollutionReduction", int.class);
- } catch (NoSuchMethodException | SecurityException e) {}
-
- mCustomBehviours = new HashMap<String, SpecialMultiBehaviour>();
+ }
+ catch (NoSuchMethodException | SecurityException e) {}
}
@@ -121,7 +120,7 @@ public abstract class GregtechMeta_MultiBlockBase extends GT_MetaTileEntity_Mult
public ArrayList<GT_MetaTileEntity_Hatch_OutputBattery> mDischargeHatches = new ArrayList<GT_MetaTileEntity_Hatch_OutputBattery>();
// Custom Behaviour Map
- private static final HashMap<String, SpecialMultiBehaviour> mCustomBehviours;
+ private static final HashMap<String, SpecialMultiBehaviour> mCustomBehviours = new HashMap<String, SpecialMultiBehaviour>();;
public GregtechMeta_MultiBlockBase(final int aID, final String aName,
@@ -416,7 +415,8 @@ public abstract class GregtechMeta_MultiBlockBase extends GT_MetaTileEntity_Mult
aToolTip = ArrayUtils.addAll(aToolTip, x);
aToolTip = ArrayUtils.addAll(aToolTip, z);
- if (aCachedToolTip == null || aCachedToolTip.length <= 0) {
+ //Valid Cached Tooltip during Run-Time
+ if (aCachedToolTip == null || aCachedToolTip.length <= 0 || aCachedToolTip.length != aToolTip.length || this.mTotalRunTime % 100 == 0) {
aCachedToolTip = aToolTip;
}
return aCachedToolTip;
@@ -472,11 +472,11 @@ public abstract class GregtechMeta_MultiBlockBase extends GT_MetaTileEntity_Mult
public String getSound() { return ""; }
- public boolean canBufferOutputs(final GT_Recipe aRecipe, int aParallelRecipes) {
+ public int canBufferOutputs(final GT_Recipe aRecipe, int aParallelRecipes) {
return canBufferOutputs(aRecipe, aParallelRecipes, true);
}
- public boolean canBufferOutputs(final GT_Recipe aRecipe, int aParallelRecipes, boolean aAllow16SlotWithoutCheck) {
+ public int canBufferOutputs(final GT_Recipe aRecipe, int aParallelRecipes, boolean aAllow16SlotWithoutCheck) {
Logger.INFO("Determining if we have space to buffer outputs. Parallel: "+aParallelRecipes);
@@ -485,11 +485,11 @@ public abstract class GregtechMeta_MultiBlockBase extends GT_MetaTileEntity_Mult
// Do it anyway, provided the multi allows it. Default behaviour is aAllow16SlotWithoutCheck = true.
if (aRecipe == null || aRecipe.mOutputs.length > 16) {
if (aRecipe == null) {
- return false;
+ return 0;
}
else if (aRecipe.mOutputs.length > 16) {
if (aAllow16SlotWithoutCheck) {
- return true;
+ return aParallelRecipes;
}
else {
// Do nothing, we want to check this recipe properly.
@@ -626,9 +626,14 @@ public abstract class GregtechMeta_MultiBlockBase extends GT_MetaTileEntity_Mult
// We have stacks that did not merge, do we have space for them?
if (aInputMap.size() > 0) {
if (aInputMap.size() > aInputBusSlotsFree) {
+ aParallelRecipes = (int) Math.floor((double) aInputBusSlotsFree/aInputMap.size() * aParallelRecipes);
// We do not have enough free slots in total to accommodate the remaining managed stacks.
- Logger.INFO("Failed to find enough space for all item outputs. Free: "+aInputBusSlotsFree+", Required: "+aInputMap.size());
- return false;
+ Logger.INFO(" Free: "+aInputBusSlotsFree+", Required: "+aInputMap.size());
+ if(aParallelRecipes == 0) {
+ Logger.INFO("Failed to find enough space for all item outputs.");
+ return 0;
+ }
+
}
}
@@ -656,7 +661,7 @@ public abstract class GregtechMeta_MultiBlockBase extends GT_MetaTileEntity_Mult
int aEmptyFluidHatches = 0;
int aFullFluidHatches = 0;
// Create Map for Fluid Output
- ConcurrentHashSet<Triplet<GT_MetaTileEntity_Hatch_Output, FluidStack, Integer>> aOutputHatches = new ConcurrentHashSet<Triplet<GT_MetaTileEntity_Hatch_Output, FluidStack, Integer>>();
+ ArrayList<Triplet<GT_MetaTileEntity_Hatch_Output, FluidStack, Integer>> aOutputHatches = new ArrayList<Triplet<GT_MetaTileEntity_Hatch_Output, FluidStack, Integer>>();
for (final GT_MetaTileEntity_Hatch_Output tBus : this.mOutputHatches) {
if (!isValidMetaTileEntity(tBus)) {
continue;
@@ -672,32 +677,36 @@ public abstract class GregtechMeta_MultiBlockBase extends GT_MetaTileEntity_Mult
}
}
// Create a map of all the fluids we would like to output, we can iterate over this and see how many we can merge into existing hatch stacks.
- ConcurrentHashSet<FluidStack> aOutputFluids = new ConcurrentHashSet<FluidStack>();
+ ArrayList<FluidStack> aOutputFluids = new ArrayList<FluidStack>();
// Ugly ass boxing
aOutputFluids.addAll(new AutoMap<FluidStack>(aRecipe.mFluidOutputs));
// Iterate the Hatches, updating their 'stored' data.
- aHatchIterator: for (Triplet<GT_MetaTileEntity_Hatch_Output, FluidStack, Integer> aHatchData : aOutputHatches) {
+ //for (Triplet<GT_MetaTileEntity_Hatch_Output, FluidStack, Integer> aHatchData : aOutputHatches) {
+ for (int i = 0;i<aOutputHatches.size();i++) {
// The Hatch Itself
- GT_MetaTileEntity_Hatch_Output aHatch = aHatchData.getValue_1();
+ GT_MetaTileEntity_Hatch_Output aHatch = aOutputHatches.get(i).getValue_1();
// Fluid in the Hatch
- FluidStack aHatchStack = aHatchData.getValue_2();
+ FluidStack aHatchStack = aOutputHatches.get(i).getValue_2();
// Space left in Hatch
- int aSpaceLeftInHatch = aHatch.getCapacity() - aHatch.getFluidAmount();
+ int aSpaceLeftInHatch = aHatch.getCapacity() - aHatch.getFluidAmount();
// Hatch is full,
if (aSpaceLeftInHatch <= 0) {
aFullFluidHatches++;
- aOutputHatches.remove(aHatchData);
- continue aHatchIterator;
- }
+ aOutputHatches.remove(aOutputHatches.get(i));
+ i--;
+ continue;
+ }
// Hatch has space
- else {
+ else {
// Check if any fluids match
- aFluidMatch: for (FluidStack aOutputStack : aOutputFluids) {
- if (GT_Utility.areFluidsEqual(aHatchStack, aOutputStack)) {
- int aFluidToPutIntoHatch = aOutputStack.amount;
+ //aFluidMatch: for (FluidStack aOutputStack : aOutputFluids) {
+ for(int j = 0;j<aOutputFluids.size();j++) {
+ //log(" aHatchStack "+aHatchStack.getLocalizedName()+" aOutput stack "+aOutputStack.getLocalizedName());
+ if (GT_Utility.areFluidsEqual(aHatchStack, aOutputFluids.get(j))) {
+ int aFluidToPutIntoHatch = aOutputFluids.get(j).amount * aParallelRecipes;
// Not Enough space to insert all of the fluid.
// We fill this hatch and add a smaller Fluidstack back to the iterator.
- if (aSpaceLeftInHatch < aFluidToPutIntoHatch) {
+ if (aSpaceLeftInHatch < aFluidToPutIntoHatch) {
// Copy existing Hatch Stack
FluidStack aNewHatchStack = aHatchStack.copy();
aNewHatchStack.amount = 0;
@@ -710,51 +719,57 @@ public abstract class GregtechMeta_MultiBlockBase extends GT_MetaTileEntity_Mult
aNewHatchStack.amount = aHatch.getCapacity();
aNewOutputStack.amount = aFluidLeftAfterInsert;
// Remove fluid from output list, merge success
- aOutputFluids.remove(aOutputStack);
+ aOutputFluids.remove(aOutputFluids.get(j));
+ j--;
// Remove hatch from hatch list, data is now invalid.
- aOutputHatches.remove(aHatchData);
+ aOutputHatches.remove(aOutputHatches.get(i));
+ i--;
// Add remaining Fluid to Output list
aOutputFluids.add(aNewOutputStack);
// Re-add hatch to hatch list, with new data.
- Triplet<GT_MetaTileEntity_Hatch_Output, FluidStack, Integer> aNewHatchData = new Triplet<GT_MetaTileEntity_Hatch_Output, FluidStack, Integer>(aHatch, aNewHatchStack, aNewHatchStack.amount);
- aOutputHatches.add(aNewHatchData);
- continue aHatchIterator;
+ //Triplet<GT_MetaTileEntity_Hatch_Output, FluidStack, Integer> aNewHatchData = new Triplet<GT_MetaTileEntity_Hatch_Output, FluidStack, Integer>(aHatch, aNewHatchStack, aNewHatchStack.amount);
+ //aOutputHatches.add(aNewHatchData);
+ break;
}
// We can fill this hatch perfectly (rare case), may as well add it directly to the full list.
else if (aSpaceLeftInHatch == aFluidToPutIntoHatch) {
// Copy Old Stack
FluidStack aNewHatchStack = aHatchStack.copy();
// Add in amount from output stack
- aNewHatchStack.amount += aOutputStack.amount;
+ aNewHatchStack.amount += aFluidToPutIntoHatch;
// Remove fluid from output list, merge success
- aOutputFluids.remove(aOutputStack);
+ aOutputFluids.remove(aOutputFluids.get(j));
+ j--;
// Remove hatch from hatch list, data is now invalid.
- aOutputHatches.remove(aHatchData);
+ aOutputHatches.remove(aOutputHatches.get(i));
+ i--;
// Re-add hatch to hatch list, with new data.
Triplet<GT_MetaTileEntity_Hatch_Output, FluidStack, Integer> aNewHatchData = new Triplet<GT_MetaTileEntity_Hatch_Output, FluidStack, Integer>(aHatch, aNewHatchStack, aNewHatchStack.amount);
aOutputHatches.add(aNewHatchData);
- continue aHatchIterator;
+ break;
}
// We have more space than we need to merge, so we remove the stack from the output list and update the hatch list.
- else {
+ else {
// Copy Old Stack
FluidStack aNewHatchStack = aHatchStack.copy();
// Add in amount from output stack
- aNewHatchStack.amount += aOutputStack.amount;
+ aNewHatchStack.amount += aFluidToPutIntoHatch;
// Remove fluid from output list, merge success
- aOutputFluids.remove(aOutputStack);
+ aOutputFluids.remove(aOutputFluids.get(j));
+ j--;
// Remove hatch from hatch list, data is now invalid.
- aOutputHatches.remove(aHatchData);
+ aOutputHatches.remove(aOutputHatches.get(i));
+ i--;
// Re-add hatch to hatch list, with new data.
Triplet<GT_MetaTileEntity_Hatch_Output, FluidStack, Integer> aNewHatchData = new Triplet<GT_MetaTileEntity_Hatch_Output, FluidStack, Integer>(aHatch, aNewHatchStack, aNewHatchStack.amount);
aOutputHatches.add(aNewHatchData);
// Check next fluid
- continue aFluidMatch;
+ continue;
}
}
else {
- continue aFluidMatch;
+ continue;
}
}
}
@@ -768,11 +783,14 @@ public abstract class GregtechMeta_MultiBlockBase extends GT_MetaTileEntity_Mult
}
// We have Fluid Stacks we did not merge. Do we have space?
+ Logger.INFO("fluids to output "+aOutputFluids.size()+" empty hatches "+aEmptyFluidHatches);
if (aOutputFluids.size() > 0) {
// Not enough space to add fluids.
if (aOutputFluids.size() > aEmptyFluidHatches) {
- Logger.INFO("Failed to find enough space for all fluid outputs.");
- return false;
+ aParallelRecipes = (int) Math.floor((double) aEmptyFluidHatches/aOutputFluids.size() * aParallelRecipes);
+ Logger.INFO("Failed to find enough space for all fluid outputs. Free: "+aEmptyFluidHatches+", Required: "+aOutputFluids.size());
+ return 0;
+
}
}
@@ -781,7 +799,7 @@ public abstract class GregtechMeta_MultiBlockBase extends GT_MetaTileEntity_Mult
*/
}
- return true;
+ return aParallelRecipes;
}
/**
@@ -1034,7 +1052,7 @@ public abstract class GregtechMeta_MultiBlockBase extends GT_MetaTileEntity_Mult
*/
// First populate the map if we need to.
- if (mCustomBehviours == null || mCustomBehviours.isEmpty()) {
+ if (mCustomBehviours.isEmpty()) {
mCustomBehviours.putAll(Multiblock_API.getSpecialBehaviourItemMap());
}
@@ -1071,8 +1089,9 @@ public abstract class GregtechMeta_MultiBlockBase extends GT_MetaTileEntity_Mult
}
}
}
-
- if (!this.canBufferOutputs(tRecipe, aMaxParallelRecipes)) {
+
+ aMaxParallelRecipes = this.canBufferOutputs(tRecipe, aMaxParallelRecipes);
+ if (aMaxParallelRecipes == 0) {
log("BAD RETURN - 2");
return false;
}
@@ -1379,7 +1398,8 @@ public abstract class GregtechMeta_MultiBlockBase extends GT_MetaTileEntity_Mult
return false;
}
- if (!this.canBufferOutputs(tRecipe, aMaxParallelRecipes)) {
+ aMaxParallelRecipes = this.canBufferOutputs(tRecipe, aMaxParallelRecipes);
+ if (aMaxParallelRecipes == 0) {
log("BAD RETURN - 2");
return false;
}
@@ -1553,7 +1573,8 @@ public abstract class GregtechMeta_MultiBlockBase extends GT_MetaTileEntity_Mult
this.mDischargeHatches.clear();
this.mControlCoreBus.clear();
this.mAirIntakes.clear();
- this.mMultiDynamoHatches.clear();
+ this.mTecTechEnergyHatches.clear();
+ this.mTecTechDynamoHatches.clear();
}
}
@@ -1578,7 +1599,14 @@ public abstract class GregtechMeta_MultiBlockBase extends GT_MetaTileEntity_Mult
tTileEntity = localIterator.next();
}
tTileEntity = null;
- for (final Iterator<GT_MetaTileEntity_Hatch> localIterator = this.mMultiDynamoHatches
+ for (final Iterator<GT_MetaTileEntity_Hatch> localIterator = this.mTecTechDynamoHatches
+ .iterator(); localIterator.hasNext(); tTileEntity
+ .getBaseMetaTileEntity()
+ .doExplosion(gregtech.api.enums.GT_Values.V[8])) {
+ tTileEntity = localIterator.next();
+ }
+ tTileEntity = null;
+ for (final Iterator<GT_MetaTileEntity_Hatch> localIterator = this.mTecTechEnergyHatches
.iterator(); localIterator.hasNext(); tTileEntity
.getBaseMetaTileEntity()
.doExplosion(gregtech.api.enums.GT_Values.V[8])) {
@@ -1870,10 +1898,16 @@ public abstract class GregtechMeta_MultiBlockBase extends GT_MetaTileEntity_Mult
aDidAdd = addToMachineListInternal(mDischargeHatches, aMetaTileEntity, aBaseCasingIndex);
}
+ //Handle TT Multi-A Energy Hatches
+ else if (LoadedMods.TecTech && isThisHatchMultiEnergy(aMetaTileEntity)) {
+ log("Found isThisHatchMultiEnergy");
+ aDidAdd = addToMachineListInternal(mTecTechEnergyHatches, aMetaTileEntity, aBaseCasingIndex);
+ }
+
//Handle TT Multi-A Dynamos
else if (LoadedMods.TecTech && isThisHatchMultiDynamo(aMetaTileEntity)) {
log("Found isThisHatchMultiDynamo");
- aDidAdd = addToMachineListInternal(mMultiDynamoHatches, aMetaTileEntity, aBaseCasingIndex);
+ aDidAdd = addToMachineListInternal(mTecTechDynamoHatches, aMetaTileEntity, aBaseCasingIndex);
}
//Handle Fluid Hatches using seperate logic
@@ -2126,10 +2160,16 @@ public abstract class GregtechMeta_MultiBlockBase extends GT_MetaTileEntity_Mult
/**
- * This is the array Used to Store the Tectech Multi-Amp hatches.
+ * This is the array Used to Store the Tectech Multi-Amp Dynamo hatches.
+ */
+
+ public ArrayList<GT_MetaTileEntity_Hatch> mTecTechDynamoHatches = new ArrayList<GT_MetaTileEntity_Hatch>();
+
+ /**
+ * This is the array Used to Store the Tectech Multi-Amp Energy hatches.
*/
- public ArrayList<GT_MetaTileEntity_Hatch> mMultiDynamoHatches = new ArrayList<GT_MetaTileEntity_Hatch>();
+ public ArrayList<GT_MetaTileEntity_Hatch> mTecTechEnergyHatches = new ArrayList<GT_MetaTileEntity_Hatch>();
/**
* TecTech Multi-Amp Dynamo Support
@@ -2149,12 +2189,11 @@ public abstract class GregtechMeta_MultiBlockBase extends GT_MetaTileEntity_Mult
}
if (isThisHatchMultiDynamo(aTileEntity)) {
updateTexture(aTileEntity, aBaseCasingIndex);
- return this.mMultiDynamoHatches.add((GT_MetaTileEntity_Hatch) aMetaTileEntity);
+ return this.mTecTechDynamoHatches.add((GT_MetaTileEntity_Hatch) aMetaTileEntity);
}
return false;
}
- @SuppressWarnings("rawtypes")
public boolean isThisHatchMultiDynamo(Object aMetaTileEntity){
Class<?> mDynamoClass;
mDynamoClass = ReflectionUtils.getClass("com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_DynamoMulti");
@@ -2170,12 +2209,58 @@ public abstract class GregtechMeta_MultiBlockBase extends GT_MetaTileEntity_Mult
public boolean addDynamoToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) {
if (LoadedMods.TecTech){
if (isThisHatchMultiDynamo(aTileEntity)) {
- addMultiAmpDynamoToMachineList(aTileEntity, aBaseCasingIndex);
+ return addMultiAmpDynamoToMachineList(aTileEntity, aBaseCasingIndex);
}
}
return super.addDynamoToMachineList(aTileEntity, aBaseCasingIndex);
}
+
+
+ /**
+ * TecTech Multi-Amp Energy Hatch Support
+ * @param aTileEntity - The Energy Hatch
+ * @param aBaseCasingIndex - Casing Texture
+ * @return
+ */
+
+ public boolean addMultiAmpEnergyToMachineList(final IGregTechTileEntity aTileEntity, final int aBaseCasingIndex){
+ //GT_MetaTileEntity_Hatch_DynamoMulti
+ if (aTileEntity == null) {
+ return false;
+ }
+ final IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
+ if (aMetaTileEntity == null) {
+ return false;
+ }
+ if (isThisHatchMultiEnergy(aTileEntity)) {
+ updateTexture(aTileEntity, aBaseCasingIndex);
+ return this.mTecTechEnergyHatches.add((GT_MetaTileEntity_Hatch) aMetaTileEntity);
+ }
+ return false;
+ }
+
+ public boolean isThisHatchMultiEnergy(Object aMetaTileEntity){
+ Class<?> mDynamoClass;
+ mDynamoClass = ReflectionUtils.getClass("com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_EnergyMulti");
+ if (mDynamoClass != null){
+ if (mDynamoClass.isInstance(aMetaTileEntity)){
+ return true;
+ }
+ }
+ return false;
+ }
+
+ @Override
+ public boolean addEnergyInputToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) {
+ if (LoadedMods.TecTech){
+ if (isThisHatchMultiEnergy(aTileEntity)) {
+ return addMultiAmpEnergyToMachineList(aTileEntity, aBaseCasingIndex);
+ }
+
+ }
+ return super.addEnergyInputToMachineList(aTileEntity, aBaseCasingIndex);
+ }
/**
@@ -2497,7 +2582,7 @@ public abstract class GregtechMeta_MultiBlockBase extends GT_MetaTileEntity_Mult
else if (aFoundBlock != aExpectedBlock) {
if (GTplusplus.CURRENT_LOAD_PHASE == INIT_PHASE.STARTED) {
log("A1 - Found: "+aFoundBlock.getLocalizedName()+":"+aFoundMeta+", Expected: "+aExpectedBlock.getLocalizedName()+":"+aExpectedMeta);
- log("Loc: "+(new BlockPos(aBaseMetaTileEntity).getLocationString()));
+ //log("Loc: "+(new BlockPos(aBaseMetaTileEntity).getLocationString()));
}
return false;
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/generators/GregtechRocketFuelGeneratorBase.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/generators/GregtechRocketFuelGeneratorBase.java
index e72838fcad..6e33529b66 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/generators/GregtechRocketFuelGeneratorBase.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/generators/GregtechRocketFuelGeneratorBase.java
@@ -63,12 +63,12 @@ public abstract class GregtechRocketFuelGeneratorBase extends GT_MetaTileEntity_
String aPollution = "Causes between "+pollMin+" and "+pollMax+ " Pollution per second";
return new String[]{
this.mDescription,
- "Fuel Efficiency: " + this.getEfficiency()*2 + "%",
+ "Fuel Efficiency: " + this.getEfficiency() + "%",
aPollution};
}
return new String[]{
this.mDescription,
- "Fuel Efficiency: " + this.getEfficiency()*2 + "%"};
+ "Fuel Efficiency: " + this.getEfficiency() + "%"};
}
@@ -267,9 +267,8 @@ public abstract class GregtechRocketFuelGeneratorBase extends GT_MetaTileEntity_
final int tFuelValue = this.getFuelValue(this.mFluid), tConsumed = this.consumedFluidPerOperation(this.mFluid);
if ((tFuelValue > 0) && (tConsumed > 0) && (this.mFluid.amount >= tConsumed)) {
final long tFluidAmountToUse = Math.min(this.mFluid.amount / tConsumed, (((this.maxEUOutput() * 20) + this.getMinimumStoredEU()) - aBaseMetaTileEntity.getUniversalEnergyStored()) / tFuelValue);
- if ((tFluidAmountToUse > 0) && aBaseMetaTileEntity.increaseStoredEnergyUnits(tFluidAmountToUse * tFuelValue, true)){
+ if ((tFluidAmountToUse > 0) && aBaseMetaTileEntity.increaseStoredEnergyUnits(tFluidAmountToUse * tFuelValue, true)){
int aSafeFloor = (int) Math.max(((tFluidAmountToUse * tConsumed)/3), 1);
- //Logger.INFO("True consumption: "+toConsumeTrue+" | Consuming this tick? "+useFuel);
this.mFluid.amount -= (int) aSafeFloor;
PollutionUtils.addPollution(getBaseMetaTileEntity(), 10 * getPollution());
}