diff options
author | Alkalus <draknyte1@hotmail.com> | 2017-11-24 17:20:03 +1000 |
---|---|---|
committer | Alkalus <draknyte1@hotmail.com> | 2017-11-24 17:20:03 +1000 |
commit | b5fd7c514de976e5f0b550e751ae3a73001ac67e (patch) | |
tree | 3cf44e52935588e228cfa89af9c70d4b81648b97 /src/Java/gtPlusPlus/core/tileentities/general | |
parent | 27a3675ced121616092334e68b8ae2719a86abaf (diff) | |
download | GT5-Unofficial-b5fd7c514de976e5f0b550e751ae3a73001ac67e.tar.gz GT5-Unofficial-b5fd7c514de976e5f0b550e751ae3a73001ac67e.tar.bz2 GT5-Unofficial-b5fd7c514de976e5f0b550e751ae3a73001ac67e.zip |
$ Fixed issue where all my blocks allowed mobs to spawn.
% More Work on the Xp Converter.
% Formatting.
Diffstat (limited to 'src/Java/gtPlusPlus/core/tileentities/general')
-rw-r--r-- | src/Java/gtPlusPlus/core/tileentities/general/TileEntityXpConverter.java | 31 |
1 files changed, 24 insertions, 7 deletions
diff --git a/src/Java/gtPlusPlus/core/tileentities/general/TileEntityXpConverter.java b/src/Java/gtPlusPlus/core/tileentities/general/TileEntityXpConverter.java index ca190802dc..09fea921a5 100644 --- a/src/Java/gtPlusPlus/core/tileentities/general/TileEntityXpConverter.java +++ b/src/Java/gtPlusPlus/core/tileentities/general/TileEntityXpConverter.java @@ -1,6 +1,8 @@ package gtPlusPlus.core.tileentities.general; import gtPlusPlus.core.util.enchanting.EnchantingUtils; +import gtPlusPlus.core.util.player.PlayerUtils; +import net.minecraft.entity.player.EntityPlayer; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.network.NetworkManager; import net.minecraft.network.Packet; @@ -91,6 +93,14 @@ public class TileEntityXpConverter extends TileEntity implements IFluidHandler { this.yCoord, this.zCoord, tank, 0)); } } + + if ((from == ForgeDirection.UP) || (from == ForgeDirection.DOWN)){ + this.tankEssence = tank; + } + else { + this.tankLiquidXp = tank; + } + return stack; } @@ -125,7 +135,7 @@ public class TileEntityXpConverter extends TileEntity implements IFluidHandler { @Override public void updateEntity() { - if (this.tankEssence.getFluid() != null){ + /*if (this.tankEssence.getFluid() != null){ final FluidStack bigStorage = this.tankEssence.getFluid(); bigStorage.amount = this.tankEssence.getCapacity(); this.tankEssence.setFluid(bigStorage); @@ -135,20 +145,19 @@ public class TileEntityXpConverter extends TileEntity implements IFluidHandler { final FluidStack bigStorage = this.tankLiquidXp.getFluid(); bigStorage.amount = this.tankLiquidXp.getCapacity(); this.tankLiquidXp.setFluid(bigStorage); - } + }*/ if (this.needsUpdate) { - if (this.tankEssence.getFluid() != null){ + /*if (this.tankEssence.getFluid() != null){ final FluidStack bigStorage = this.tankEssence.getFluid(); bigStorage.amount = this.tankEssence.getCapacity(); this.tankEssence.setFluid(bigStorage); - } + }*/ if (this.tankLiquidXp.getFluid() != null){ - final FluidStack bigStorage = this.tankLiquidXp.getFluid(); - bigStorage.amount = this.tankLiquidXp.getCapacity(); - this.tankLiquidXp.setFluid(bigStorage); + final FluidStack bigStorage = EnchantingUtils.getEssenceFromLiquidXp(this.tankLiquidXp.getFluidAmount()); + this.tankEssence.setFluid(bigStorage); } if (this.updateTimer == 0) { @@ -190,4 +199,12 @@ public class TileEntityXpConverter extends TileEntity implements IFluidHandler { this.readFromNBT(tag); } + public void onScrewdriverRightClick(final byte aSide, final EntityPlayer aPlayer, final float aX, final float aY, final float aZ) { + PlayerUtils.messagePlayer(aPlayer, "Screwdriver Rightclick."); + } + + public void onRightClick(final byte aSide, final EntityPlayer aPlayer, final int aX, final int aY, final int aZ) { + PlayerUtils.messagePlayer(aPlayer, "Rightclick."); + } + } |