aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/custom
diff options
context:
space:
mode:
authorAlkalus <3060479+draknyte1@users.noreply.github.com>2019-04-18 01:49:55 +1000
committerAlkalus <3060479+draknyte1@users.noreply.github.com>2019-04-18 01:49:55 +1000
commitbd586aea681d1ecf7842c00f44cf03c7ef33b9d9 (patch)
tree346a36da03bbb608430bc3f1b857462032ae646f /src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/custom
parentb9d166c56f38dee13b5a03cab93f504b46fed7d2 (diff)
downloadGT5-Unofficial-bd586aea681d1ecf7842c00f44cf03c7ef33b9d9.tar.gz
GT5-Unofficial-bd586aea681d1ecf7842c00f44cf03c7ef33b9d9.tar.bz2
GT5-Unofficial-bd586aea681d1ecf7842c00f44cf03c7ef33b9d9.zip
$ Fixed Semifluid Generators. Closes #450
$ Adjusted Simple Washer IDs.
Diffstat (limited to 'src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/custom')
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/custom/power/GTPP_MTE_BasicLosslessGenerator.java16
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/custom/power/GTPP_MTE_BasicTank.java6
2 files changed, 19 insertions, 3 deletions
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/custom/power/GTPP_MTE_BasicLosslessGenerator.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/custom/power/GTPP_MTE_BasicLosslessGenerator.java
index 8e6f36c4af..1ce7fc49d3 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/custom/power/GTPP_MTE_BasicLosslessGenerator.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/custom/power/GTPP_MTE_BasicLosslessGenerator.java
@@ -6,6 +6,7 @@ import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Utility;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.util.minecraft.gregtech.PollutionUtils;
import gregtech.api.util.GT_Recipe.GT_Recipe_Map;
import java.util.Collection;
@@ -70,6 +71,7 @@ public abstract class GTPP_MTE_BasicLosslessGenerator extends GTPP_MTE_BasicTank
}
public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) {
+ Logger.WARNING("Right Clicked");
if (aBaseMetaTileEntity.isClientSide()) {
return true;
} else {
@@ -175,7 +177,9 @@ public abstract class GTPP_MTE_BasicLosslessGenerator extends GTPP_MTE_BasicTank
}
public boolean isFluidInputAllowed(FluidStack aFluid) {
- return this.getFuelValue(aFluid) > 0;
+ int aVal = this.getFuelValue(aFluid);
+ Logger.WARNING("Fuel Value: "+aVal);
+ return aVal > 0;
}
public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
@@ -223,6 +227,7 @@ public abstract class GTPP_MTE_BasicLosslessGenerator extends GTPP_MTE_BasicTank
}
if (aBaseMetaTileEntity.isServerSide()) {
+ Logger.WARNING("Ticking Servside");
aBaseMetaTileEntity.setActive(aBaseMetaTileEntity.isAllowedToWork() && aBaseMetaTileEntity
.getUniversalEnergyStored() >= this.maxEUOutput() + this.getMinimumStoredEU());
}
@@ -242,6 +247,7 @@ public abstract class GTPP_MTE_BasicLosslessGenerator extends GTPP_MTE_BasicTank
public int getFuelValue(FluidStack aLiquid) {
if (aLiquid != null && this.getRecipes() != null) {
Collection<GT_Recipe> tRecipeList = this.getRecipes().mRecipeList;
+ Logger.WARNING("Fuels: "+tRecipeList.size());
if (tRecipeList != null) {
Iterator var4 = tRecipeList.iterator();
@@ -250,6 +256,13 @@ public abstract class GTPP_MTE_BasicLosslessGenerator extends GTPP_MTE_BasicTank
FluidStack tLiquid;
if ((tLiquid = GT_Utility.getFluidForFilledItem(tFuel.getRepresentativeInput(0), true)) != null
&& aLiquid.isFluidEqual(tLiquid)) {
+ Logger.WARNING("Fuel Ok");
+ return (int) ((long) tFuel.mSpecialValue * (long) this.getEfficiency()
+ * (long) this.consumedFluidPerOperation(tLiquid) / 100L);
+ }
+ if ((tLiquid = tFuel.getRepresentativeFluidInput(0)) != null
+ && aLiquid.isFluidEqual(tLiquid)) {
+ Logger.WARNING("Fuel Ok");
return (int) ((long) tFuel.mSpecialValue * (long) this.getEfficiency()
* (long) this.consumedFluidPerOperation(tLiquid) / 100L);
}
@@ -264,6 +277,7 @@ public abstract class GTPP_MTE_BasicLosslessGenerator extends GTPP_MTE_BasicTank
public int getFuelValue(ItemStack aStack) {
if (!GT_Utility.isStackInvalid(aStack) && this.getRecipes() != null) {
+ Logger.WARNING("Fuel Item OK");
GT_Recipe tFuel = this.getRecipes().findRecipe(this.getBaseMetaTileEntity(), false, Long.MAX_VALUE,
(FluidStack[]) null, new ItemStack[]{aStack});
return tFuel != null ? (int) ((long) tFuel.mSpecialValue * 1000L * (long) this.getEfficiency() / 100L) : 0;
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/custom/power/GTPP_MTE_BasicTank.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/custom/power/GTPP_MTE_BasicTank.java
index 03c8fadad4..9c6840e33c 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/custom/power/GTPP_MTE_BasicTank.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/custom/power/GTPP_MTE_BasicTank.java
@@ -6,6 +6,8 @@ import gregtech.api.gui.GT_GUIContainer_BasicTank;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.util.GT_Utility;
+import gtPlusPlus.xmod.gregtech.api.gui.power.CONTAINER_BasicTank;
+import gtPlusPlus.xmod.gregtech.api.gui.power.GUI_BasicTank;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
@@ -115,12 +117,12 @@ public abstract class GTPP_MTE_BasicTank extends GTPP_MTE_TieredMachineBlock {
@Override
public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- return new GT_Container_BasicTank(aPlayerInventory, aBaseMetaTileEntity);
+ return new CONTAINER_BasicTank(aPlayerInventory, aBaseMetaTileEntity);
}
@Override
public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- return new GT_GUIContainer_BasicTank(aPlayerInventory, aBaseMetaTileEntity, getLocalName());
+ return new GUI_BasicTank(aPlayerInventory, aBaseMetaTileEntity, getLocalName());
}
@Override