aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/core/tileentities/general
diff options
context:
space:
mode:
authorJordan Byrne <draknyte1@hotmail.com>2017-12-24 11:54:30 +1000
committerJordan Byrne <draknyte1@hotmail.com>2017-12-24 11:54:30 +1000
commitecf908e98ccee72a713091e8ab547e35a41d7436 (patch)
treef0dade1481aa02fd0ac4fcf8a672cc7a761a0547 /src/Java/gtPlusPlus/core/tileentities/general
parentb9fe3352840abe0846834cefd578895ec6f5e520 (diff)
parentfa5de3584ce7bc97ce6f32b31f6062b5b6e89e75 (diff)
downloadGT5-Unofficial-ecf908e98ccee72a713091e8ab547e35a41d7436.tar.gz
GT5-Unofficial-ecf908e98ccee72a713091e8ab547e35a41d7436.tar.bz2
GT5-Unofficial-ecf908e98ccee72a713091e8ab547e35a41d7436.zip
> Why does Git make me do these? arghhh...
Merge branch 'master' of https://github.com/draknyte1/GTplusplus # Conflicts: # src/Java/gtPlusPlus/core/material/ALLOY.java # src/Java/gtPlusPlus/core/material/ELEMENT.java # src/Java/gtPlusPlus/core/material/Material.java # src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Recycling.java
Diffstat (limited to 'src/Java/gtPlusPlus/core/tileentities/general')
-rw-r--r--src/Java/gtPlusPlus/core/tileentities/general/TileEntityFishTrap.java12
-rw-r--r--src/Java/gtPlusPlus/core/tileentities/general/TileEntityInfiniteFluid.java14
-rw-r--r--src/Java/gtPlusPlus/core/tileentities/general/TileEntityXpConverter.java38
3 files changed, 33 insertions, 31 deletions
diff --git a/src/Java/gtPlusPlus/core/tileentities/general/TileEntityFishTrap.java b/src/Java/gtPlusPlus/core/tileentities/general/TileEntityFishTrap.java
index d73de219e4..fea313917d 100644
--- a/src/Java/gtPlusPlus/core/tileentities/general/TileEntityFishTrap.java
+++ b/src/Java/gtPlusPlus/core/tileentities/general/TileEntityFishTrap.java
@@ -3,10 +3,10 @@ package gtPlusPlus.core.tileentities.general;
import java.util.Random;
import gregtech.api.util.GT_Utility;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.block.ModBlocks;
import gtPlusPlus.core.inventories.InventoryFishTrap;
import gtPlusPlus.core.lib.LoadedMods;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.item.ItemUtils;
import gtPlusPlus.core.util.math.MathUtils;
import net.minecraft.block.Block;
@@ -81,8 +81,8 @@ public class TileEntityFishTrap extends TileEntity implements ISidedInventory {
return true;
}
else if ((waterCount >= 2) && (trapCount > 4)) {
- Utils.LOG_WARNING("Too many fish traps surrounding this one.");
- Utils.LOG_WARNING("Not adding Loot to the fishtrap at x[" + this.locationX + "] y[" + this.locationY
+ Logger.WARNING("Too many fish traps surrounding this one.");
+ Logger.WARNING("Not adding Loot to the fishtrap at x[" + this.locationX + "] y[" + this.locationY
+ "] z[" + this.locationZ + "] (Ticking for loot every " + this.baseTickRate + " ticks)");
}
}
@@ -187,7 +187,7 @@ public class TileEntityFishTrap extends TileEntity implements ISidedInventory {
loot = ItemUtils.getSimpleStack(Blocks.diamond_ore);
}
loot.stackSize=1;
- Utils.LOG_WARNING("Adding x"+loot.stackSize+" "+loot.getDisplayName()+".");
+ Logger.WARNING("Adding x"+loot.stackSize+" "+loot.getDisplayName()+".");
return loot;
}
@@ -221,8 +221,8 @@ public class TileEntityFishTrap extends TileEntity implements ISidedInventory {
this.markDirty();
}
else {
- Utils.LOG_WARNING("This Trap does not have enough water around it.");
- Utils.LOG_WARNING("Not adding Loot to the fishtrap at x[" + this.locationX + "] y[" + this.locationY
+ Logger.WARNING("This Trap does not have enough water around it.");
+ Logger.WARNING("Not adding Loot to the fishtrap at x[" + this.locationX + "] y[" + this.locationY
+ "] z[" + this.locationZ + "] (Ticking for loot every " + this.baseTickRate + " ticks)");
this.markDirty();
}
diff --git a/src/Java/gtPlusPlus/core/tileentities/general/TileEntityInfiniteFluid.java b/src/Java/gtPlusPlus/core/tileentities/general/TileEntityInfiniteFluid.java
index 3b50fe4dea..329bbd73b8 100644
--- a/src/Java/gtPlusPlus/core/tileentities/general/TileEntityInfiniteFluid.java
+++ b/src/Java/gtPlusPlus/core/tileentities/general/TileEntityInfiniteFluid.java
@@ -6,12 +6,7 @@ import net.minecraft.network.Packet;
import net.minecraft.network.play.server.S35PacketUpdateTileEntity;
import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.common.util.ForgeDirection;
-import net.minecraftforge.fluids.Fluid;
-import net.minecraftforge.fluids.FluidEvent;
-import net.minecraftforge.fluids.FluidStack;
-import net.minecraftforge.fluids.FluidTank;
-import net.minecraftforge.fluids.FluidTankInfo;
-import net.minecraftforge.fluids.IFluidHandler;
+import net.minecraftforge.fluids.*;
public class TileEntityInfiniteFluid extends TileEntity implements IFluidHandler {
@@ -22,16 +17,19 @@ public class TileEntityInfiniteFluid extends TileEntity implements IFluidHandler
public TileEntityInfiniteFluid() {
}
+ @Override
public int fill(ForgeDirection from, FluidStack resource, boolean doFill) {
needsUpdate = true;
return this.tank.fill(resource, doFill);
}
+ @Override
public FluidStack drain(ForgeDirection from, FluidStack resource, boolean doDrain) {
needsUpdate = true;
return this.tank.drain(resource.amount, doDrain);
}
+ @Override
public FluidStack drain(ForgeDirection from, int maxDrain, boolean doDrain) {
needsUpdate = true;
FluidStack fluid = this.tank.getFluid();
@@ -60,14 +58,17 @@ public class TileEntityInfiniteFluid extends TileEntity implements IFluidHandler
return stack;
}
+ @Override
public boolean canFill(ForgeDirection from, Fluid fluid) {
return true;
}
+ @Override
public boolean canDrain(ForgeDirection from, Fluid fluid) {
return true;
}
+ @Override
public FluidTankInfo[] getTankInfo(ForgeDirection from) {
return new FluidTankInfo[] { this.tank.getInfo() };
}
@@ -80,6 +81,7 @@ public class TileEntityInfiniteFluid extends TileEntity implements IFluidHandler
return volume;
}
+ @Override
public void updateEntity() {
if (this.tank.getFluid() != null){
diff --git a/src/Java/gtPlusPlus/core/tileentities/general/TileEntityXpConverter.java b/src/Java/gtPlusPlus/core/tileentities/general/TileEntityXpConverter.java
index b886299afd..d94f4704d9 100644
--- a/src/Java/gtPlusPlus/core/tileentities/general/TileEntityXpConverter.java
+++ b/src/Java/gtPlusPlus/core/tileentities/general/TileEntityXpConverter.java
@@ -2,7 +2,7 @@ package gtPlusPlus.core.tileentities.general;
import org.lwjgl.input.Keyboard;
-import gtPlusPlus.core.util.Utils;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.util.enchanting.EnchantingUtils;
import gtPlusPlus.core.util.player.PlayerUtils;
import net.minecraft.entity.player.EntityPlayer;
@@ -54,26 +54,26 @@ public class TileEntityXpConverter extends TileEntity implements IFluidHandler {
@Override
public int fill(final ForgeDirection from, final FluidStack resource, final boolean doFill) {
this.needsUpdate = true;
- Utils.LOG_WARNING("Ticking. | mConvertToEssence: "+this.mConvertToEssence);
+ Logger.WARNING("Ticking. | mConvertToEssence: "+this.mConvertToEssence);
if (this.mConvertToEssence){
if (resource.isFluidEqual(EnchantingUtils.getLiquidXP(1))){
- Utils.LOG_WARNING("fill(tankLiquidXp)");
+ Logger.WARNING("fill(tankLiquidXp)");
return this.tankLiquidXp.fill(resource, doFill);
}
else {
- Utils.LOG_WARNING("Looking for Liquid Xp, Instead found "+resource.getLocalizedName()+".");
+ Logger.WARNING("Looking for Liquid Xp, Instead found "+resource.getLocalizedName()+".");
}
}
else {
if (resource.isFluidEqual(EnchantingUtils.getMobEssence(1))){
- Utils.LOG_WARNING("fill(tankEssence)");
+ Logger.WARNING("fill(tankEssence)");
return this.tankEssence.fill(resource, doFill);
}
else {
- Utils.LOG_WARNING("Looking for Essence, Instead found "+resource.getLocalizedName()+".");
+ Logger.WARNING("Looking for Essence, Instead found "+resource.getLocalizedName()+".");
}
}
- Utils.LOG_WARNING("fill(0)");
+ Logger.WARNING("fill(0)");
return 0;
}
@@ -82,24 +82,24 @@ public class TileEntityXpConverter extends TileEntity implements IFluidHandler {
this.needsUpdate = true;
if (this.mConvertToEssence){
if (resource.isFluidEqual(EnchantingUtils.getMobEssence(1))){
- Utils.LOG_WARNING("drain(mConvertToEssence)");
+ Logger.WARNING("drain(mConvertToEssence)");
return this.tankEssence.drain(resource.amount, doDrain);
}
}
else {
if (resource.isFluidEqual(EnchantingUtils.getLiquidXP(1))){
- Utils.LOG_WARNING("drain(tankLiquidXp)");
+ Logger.WARNING("drain(tankLiquidXp)");
return this.tankLiquidXp.drain(resource.amount, doDrain);
}
}
- Utils.LOG_WARNING("drain(null)");
+ Logger.WARNING("drain(null)");
return null;
}
@Override
public FluidStack drain(final ForgeDirection from, final int maxDrain, final boolean doDrain) {
this.needsUpdate = true;
- Utils.LOG_WARNING("drain(Ex)");
+ Logger.WARNING("drain(Ex)");
final FluidStack fluid_Essence = this.tankEssence.getFluid();
final FluidStack fluid_Xp = this.tankLiquidXp.getFluid();
if ((fluid_Essence == null) && (fluid_Xp == null)) {
@@ -144,7 +144,7 @@ public class TileEntityXpConverter extends TileEntity implements IFluidHandler {
this.tankLiquidXp = tank;
}
- Utils.LOG_WARNING("drain(Ex2)");
+ Logger.WARNING("drain(Ex2)");
return stack;
}
@@ -152,17 +152,17 @@ public class TileEntityXpConverter extends TileEntity implements IFluidHandler {
public boolean canFill(final ForgeDirection from, final Fluid fluid) {
if (this.mConvertToEssence){
if (this.tankEssence.getFluidAmount() < this.tankEssence.getCapacity()){
- Utils.LOG_WARNING("canFill(mConvertToEssence)");
+ Logger.WARNING("canFill(mConvertToEssence)");
return true;
}
}
else {
if (this.tankLiquidXp.getFluidAmount() < this.tankLiquidXp.getCapacity()){
- Utils.LOG_WARNING("canFill(tankLiquidXp)");
+ Logger.WARNING("canFill(tankLiquidXp)");
return true;
}
}
- Utils.LOG_WARNING("canFill(false)");
+ Logger.WARNING("canFill(false)");
return false;
}
@@ -178,7 +178,7 @@ public class TileEntityXpConverter extends TileEntity implements IFluidHandler {
return true;
}
}
- Utils.LOG_WARNING("canDrain(false)");
+ Logger.WARNING("canDrain(false)");
return false;
}
@@ -193,7 +193,7 @@ public class TileEntityXpConverter extends TileEntity implements IFluidHandler {
}
public float getAdjustedVolume() {
- Utils.LOG_WARNING("AdjustedVolume()");
+ Logger.WARNING("AdjustedVolume()");
this.needsUpdate = true;
final float amount = this.tankLiquidXp.getFluidAmount();
final float capacity = this.tankLiquidXp.getCapacity();
@@ -226,7 +226,7 @@ public class TileEntityXpConverter extends TileEntity implements IFluidHandler {
this.tankEssence.fill(bigStorage, true);
this.tankLiquidXp.drain(100, true);
this.needsUpdate = true;
- Utils.LOG_WARNING("B->A");
+ Logger.WARNING("B->A");
}
}
else {
@@ -236,7 +236,7 @@ public class TileEntityXpConverter extends TileEntity implements IFluidHandler {
this.tankLiquidXp.fill(bigStorage, true);
this.tankEssence.drain((int) rm, true);
this.needsUpdate = true;
- Utils.LOG_WARNING("A->B");
+ Logger.WARNING("A->B");
}
}
}