Fixed the Liquid Sigils so that they would work on tanks again.

This commit is contained in:
WayofTime 2015-04-24 07:41:08 -04:00
parent 110deaf0e6
commit 634bab7688
6 changed files with 244 additions and 256 deletions

View file

@ -69,6 +69,7 @@ import WayofTime.alchemicalWizardry.common.achievements.ModAchievements;
import WayofTime.alchemicalWizardry.common.alchemy.CombinedPotionRegistry; import WayofTime.alchemicalWizardry.common.alchemy.CombinedPotionRegistry;
import WayofTime.alchemicalWizardry.common.block.ArmourForge; import WayofTime.alchemicalWizardry.common.block.ArmourForge;
import WayofTime.alchemicalWizardry.common.bloodAltarUpgrade.UpgradedAltars; import WayofTime.alchemicalWizardry.common.bloodAltarUpgrade.UpgradedAltars;
import WayofTime.alchemicalWizardry.common.book.BloodMagicGuide;
import WayofTime.alchemicalWizardry.common.commands.CommandBind; import WayofTime.alchemicalWizardry.common.commands.CommandBind;
import WayofTime.alchemicalWizardry.common.commands.CommandSN; import WayofTime.alchemicalWizardry.common.commands.CommandSN;
import WayofTime.alchemicalWizardry.common.commands.CommandUnbind; import WayofTime.alchemicalWizardry.common.commands.CommandUnbind;
@ -274,6 +275,7 @@ import WayofTime.alchemicalWizardry.common.tweaker.MineTweakerIntegration;
import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.Loader; import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Optional;
import cpw.mods.fml.common.Mod.EventHandler; import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.Mod.Instance; import cpw.mods.fml.common.Mod.Instance;
import cpw.mods.fml.common.ModContainer; import cpw.mods.fml.common.ModContainer;
@ -1171,6 +1173,11 @@ public class AlchemicalWizardry
this.isThaumcraftLoaded = false; this.isThaumcraftLoaded = false;
} }
if(Loader.isModLoaded("guideapi"))
{
this.registerBMBook();
}
if (Loader.isModLoaded("Forestry")) if (Loader.isModLoaded("Forestry"))
{ {
this.isForestryLoaded = true; this.isForestryLoaded = true;
@ -1224,6 +1231,12 @@ public class AlchemicalWizardry
// this.createItemTextureFiles(); // this.createItemTextureFiles();
} }
@Optional.Method(modid = "guideapi")
public static void registerBMBook()
{
BloodMagicGuide.registerGuide();
}
public static void blacklistAccelerators() public static void blacklistAccelerators()
{ {
if (Loader.isModLoaded("Torcherino")) if (Loader.isModLoaded("Torcherino"))

View file

@ -0,0 +1,18 @@
package WayofTime.alchemicalWizardry.common.book;
import java.util.ArrayList;
import java.util.List;
import amerifrance.guideapi.api.abstraction.CategoryAbstract;
import amerifrance.guideapi.api.base.Book;
public class BloodMagicGuide
{
public static Book bloodMagicGuide;
public static List<CategoryAbstract> categories = new ArrayList<CategoryAbstract>();
public static void registerGuide()
{
}
}

View file

@ -1,11 +1,7 @@
package WayofTime.alchemicalWizardry.common.items.sigil; package WayofTime.alchemicalWizardry.common.items.sigil;
import WayofTime.alchemicalWizardry.AlchemicalWizardry; import java.util.List;
import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade;
import WayofTime.alchemicalWizardry.common.items.EnergyBattery;
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
@ -16,15 +12,18 @@ import net.minecraft.item.ItemStack;
import net.minecraft.potion.Potion; import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect; import net.minecraft.potion.PotionEffect;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.util.StatCollector; import net.minecraft.util.StatCollector;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidRegistry;
import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.IFluidHandler; import net.minecraftforge.fluids.IFluidHandler;
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
import java.util.List; import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade;
import WayofTime.alchemicalWizardry.common.items.EnergyBattery;
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class LavaSigil extends ItemBucket implements ArmourUpgrade public class LavaSigil extends ItemBucket implements ArmourUpgrade
{ {
@ -73,92 +72,83 @@ public class LavaSigil extends ItemBucket implements ArmourUpgrade
/** /**
* Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer * Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer
*/ */
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player)
{ {
if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) return stack;
{
return par1ItemStack;
} }
float f = 1.0F; @Override
double d0 = par3EntityPlayer.prevPosX + (par3EntityPlayer.posX - par3EntityPlayer.prevPosX) * (double) f; public boolean onItemUseFirst(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ)
double d1 = par3EntityPlayer.prevPosY + (par3EntityPlayer.posY - par3EntityPlayer.prevPosY) * (double) f + 1.62D - (double) par3EntityPlayer.yOffset;
double d2 = par3EntityPlayer.prevPosZ + (par3EntityPlayer.posZ - par3EntityPlayer.prevPosZ) * (double) f;
MovingObjectPosition movingobjectposition = this.getMovingObjectPositionFromPlayer(par2World, par3EntityPlayer, false);
if (movingobjectposition == null)
{ {
return par1ItemStack; if (world.isRemote || !EnergyItems.checkAndSetItemOwner(stack, player) || player.isSneaking())
} else
{ {
if (movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) return false;
{
int i = movingobjectposition.blockX;
int j = movingobjectposition.blockY;
int k = movingobjectposition.blockZ;
if (!par2World.canMineBlock(par3EntityPlayer, i, j, k))
{
return par1ItemStack;
} }
TileEntity tile = par2World.getTileEntity(i, j, k); if (!world.canMineBlock(player, x, y, z))
{
return false;
}
TileEntity tile = world.getTileEntity(x, y, z);
if (tile instanceof IFluidHandler) if (tile instanceof IFluidHandler)
{ {
FluidStack fluid = new FluidStack(FluidRegistry.LAVA, 1000); FluidStack fluid = new FluidStack(FluidRegistry.LAVA, 1000);
int amount = ((IFluidHandler) tile).fill(ForgeDirection.getOrientation(movingobjectposition.sideHit), fluid, false); int amount = ((IFluidHandler) tile).fill(ForgeDirection.getOrientation(side), fluid, false);
if (amount > 0 && EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) if (amount > 0 && EnergyItems.syphonBatteries(stack, player, getEnergyUsed()))
{ {
((IFluidHandler) tile).fill(ForgeDirection.getOrientation(movingobjectposition.sideHit), fluid, true); ((IFluidHandler) tile).fill(ForgeDirection.getOrientation(side), fluid, true);
} }
return par1ItemStack; return false;
} }
if (movingobjectposition.sideHit == 0)
{ {
--j; if (side == 0)
}
if (movingobjectposition.sideHit == 1)
{ {
++j; --y;
} }
if (movingobjectposition.sideHit == 2) if (side == 1)
{ {
--k; ++y;
} }
if (movingobjectposition.sideHit == 3) if (side == 2)
{ {
++k; --z;
} }
if (movingobjectposition.sideHit == 4) if (side == 3)
{ {
--i; ++z;
} }
if (movingobjectposition.sideHit == 5) if (side == 4)
{ {
++i; --x;
} }
if (!par3EntityPlayer.canPlayerEdit(i, j, k, movingobjectposition.sideHit, par1ItemStack)) if (side == 5)
{ {
return par1ItemStack; ++x;
} }
if(this.canPlaceContainedLiquid(par2World, d0, d1, d2, i, j, k) && EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) if (!player.canPlayerEdit(x, y, z, side, stack))
{ {
this.tryPlaceContainedLiquid(par2World, d0, d1, d2, i, j, k); return false;
}
if(this.canPlaceContainedLiquid(world, x, y, z, x, y, z) && EnergyItems.syphonBatteries(stack, player, getEnergyUsed()))
{
return this.tryPlaceContainedLiquid(world, x, y, z, x, y, z);
} }
} }
return par1ItemStack;
} return false;
} }
/** /**

View file

@ -1,26 +1,23 @@
package WayofTime.alchemicalWizardry.common.items.sigil; package WayofTime.alchemicalWizardry.common.items.sigil;
import WayofTime.alchemicalWizardry.AlchemicalWizardry; import java.util.List;
import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade;
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.material.MaterialLiquid; import net.minecraft.block.material.MaterialLiquid;
import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemBucket; import net.minecraft.item.ItemBucket;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.util.StatCollector; import net.minecraft.util.StatCollector;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.event.entity.player.FillBucketEvent;
import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.IFluidHandler; import net.minecraftforge.fluids.IFluidHandler;
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
import java.util.List; import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade;
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class VoidSigil extends ItemBucket implements ArmourUpgrade public class VoidSigil extends ItemBucket implements ArmourUpgrade
{ {
@ -44,13 +41,13 @@ public class VoidSigil extends ItemBucket implements ArmourUpgrade
} }
@Override @Override
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) public void addInformation(ItemStack stack, EntityPlayer par2EntityPlayer, List par3List, boolean par4)
{ {
par3List.add(StatCollector.translateToLocal("tooltip.voidsigil.desc")); par3List.add(StatCollector.translateToLocal("tooltip.voidsigil.desc"));
if (!(par1ItemStack.getTagCompound() == null)) if (!(stack.getTagCompound() == null))
{ {
par3List.add(StatCollector.translateToLocal("tooltip.owner.currentowner") + " " + par1ItemStack.getTagCompound().getString("ownerName")); par3List.add(StatCollector.translateToLocal("tooltip.owner.currentowner") + " " + stack.getTagCompound().getString("ownerName"));
} }
} }
@ -73,73 +70,59 @@ public class VoidSigil extends ItemBucket implements ArmourUpgrade
return this.energyUsed; return this.energyUsed;
} }
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player)
{
return stack;
}
@Override @Override
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) public boolean onItemUseFirst(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ)
{ {
if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) if (!EnergyItems.checkAndSetItemOwner(stack, player) || player.isSneaking())
{ {
return par1ItemStack; return false;
} }
float f = 1.0F; float f = 1.0F;
double d0 = par3EntityPlayer.prevPosX + (par3EntityPlayer.posX - par3EntityPlayer.prevPosX) * (double) f; double d0 = player.prevPosX + (player.posX - player.prevPosX) * (double) f;
double d1 = par3EntityPlayer.prevPosY + (par3EntityPlayer.posY - par3EntityPlayer.prevPosY) * (double) f + 1.62D - (double) par3EntityPlayer.yOffset; double d1 = player.prevPosY + (player.posY - player.prevPosY) * (double) f + 1.62D - (double) player.yOffset;
double d2 = par3EntityPlayer.prevPosZ + (par3EntityPlayer.posZ - par3EntityPlayer.prevPosZ) * (double) f; double d2 = player.prevPosZ + (player.posZ - player.prevPosZ) * (double) f;
boolean flag = this.isFull == 0; boolean flag = this.isFull == 0;
MovingObjectPosition movingobjectposition = this.getMovingObjectPositionFromPlayer(par2World, par3EntityPlayer, flag);
if (movingobjectposition == null) if (!world.canMineBlock(player, x, y, z))
{ {
return par1ItemStack; return false;
} else
{
FillBucketEvent event = new FillBucketEvent(par3EntityPlayer, par1ItemStack, par2World, movingobjectposition);
if (MinecraftForge.EVENT_BUS.post(event))
{
return par1ItemStack;
} }
if (movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) TileEntity tile = world.getTileEntity(x, y, z);
{
int i = movingobjectposition.blockX;
int j = movingobjectposition.blockY;
int k = movingobjectposition.blockZ;
if (!par2World.canMineBlock(par3EntityPlayer, i, j, k))
{
return par1ItemStack;
}
TileEntity tile = par2World.getTileEntity(i, j, k);
if (tile instanceof IFluidHandler) if (tile instanceof IFluidHandler)
{ {
FluidStack amount = ((IFluidHandler) tile).drain(ForgeDirection.getOrientation(movingobjectposition.sideHit), 1000, false); FluidStack amount = ((IFluidHandler) tile).drain(ForgeDirection.getOrientation(side), 1000, false);
if (amount != null && amount.amount > 0 && EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) if (amount != null && amount.amount > 0 && EnergyItems.syphonBatteries(stack, player, getEnergyUsed()))
{ {
((IFluidHandler) tile).drain(ForgeDirection.getOrientation(movingobjectposition.sideHit), 1000, true); ((IFluidHandler) tile).drain(ForgeDirection.getOrientation(side), 1000, true);
return true;
} }
return par1ItemStack; return false;
} }
if (this.isFull == 0) if (this.isFull == 0)
{ {
if (!par3EntityPlayer.canPlayerEdit(i, j, k, movingobjectposition.sideHit, par1ItemStack)) if (!player.canPlayerEdit(x, y, z, side, stack))
{ {
return par1ItemStack; return false;
} }
if (par2World.getBlock(i, j, k).getMaterial() instanceof MaterialLiquid && EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) if (world.getBlock(x, y, z).getMaterial() instanceof MaterialLiquid && EnergyItems.syphonBatteries(stack, player, getEnergyUsed()))
{ {
par2World.setBlockToAir(i, j, k); world.setBlockToAir(x, y, z);
} return true;
} }
} }
return par1ItemStack; return false;
}
} }
/** /**

View file

@ -1,10 +1,7 @@
package WayofTime.alchemicalWizardry.common.items.sigil; package WayofTime.alchemicalWizardry.common.items.sigil;
import WayofTime.alchemicalWizardry.AlchemicalWizardry; import java.util.List;
import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade;
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
@ -15,15 +12,17 @@ import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.potion.Potion; import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect; import net.minecraft.potion.PotionEffect;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.util.StatCollector; import net.minecraft.util.StatCollector;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidRegistry;
import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.IFluidHandler; import net.minecraftforge.fluids.IFluidHandler;
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
import java.util.List; import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade;
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class WaterSigil extends ItemBucket implements ArmourUpgrade public class WaterSigil extends ItemBucket implements ArmourUpgrade
{ {
@ -39,11 +38,11 @@ public class WaterSigil extends ItemBucket implements ArmourUpgrade
} }
@Override @Override
public void onCreated(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) public void onCreated(ItemStack stack, World world, EntityPlayer player)
{ {
if (par1ItemStack.getTagCompound() == null) if (stack.getTagCompound() == null)
{ {
par1ItemStack.setTagCompound(new NBTTagCompound()); stack.setTagCompound(new NBTTagCompound());
} }
} }
@ -57,116 +56,100 @@ public class WaterSigil extends ItemBucket implements ArmourUpgrade
@Override @Override
public ItemStack getContainerItem(ItemStack itemStack) public ItemStack getContainerItem(ItemStack itemStack)
{ {
ItemStack copiedStack = itemStack.copy(); return itemStack;
copiedStack.setItemDamage(copiedStack.getItemDamage() + 1);
copiedStack.stackSize = 1;
return copiedStack;
} }
@Override @Override
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) public void addInformation(ItemStack stack, EntityPlayer par2EntityPlayer, List par3List, boolean par4)
{ {
par3List.add(StatCollector.translateToLocal("tooltip.watersigil.desc")); par3List.add(StatCollector.translateToLocal("tooltip.watersigil.desc"));
if (!(par1ItemStack.getTagCompound() == null)) if (!(stack.getTagCompound() == null))
{ {
par3List.add(StatCollector.translateToLocal("tooltip.owner.currentowner") + " " + par1ItemStack.getTagCompound().getString("ownerName")); par3List.add(StatCollector.translateToLocal("tooltip.owner.currentowner") + " " + stack.getTagCompound().getString("ownerName"));
} }
} }
/** /**
* Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer * Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer
*/ */
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player)
{ {
if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) return stack;
{
return par1ItemStack;
} }
System.out.println("Being called"); @Override
public boolean onItemUseFirst(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ)
float f = 1.0F;
double d0 = par3EntityPlayer.prevPosX + (par3EntityPlayer.posX - par3EntityPlayer.prevPosX) * (double) f;
double d1 = par3EntityPlayer.prevPosY + (par3EntityPlayer.posY - par3EntityPlayer.prevPosY) * (double) f + 1.62D - (double) par3EntityPlayer.yOffset;
double d2 = par3EntityPlayer.prevPosZ + (par3EntityPlayer.posZ - par3EntityPlayer.prevPosZ) * (double) f;
MovingObjectPosition movingobjectposition = this.getMovingObjectPositionFromPlayer(par2World, par3EntityPlayer, false);
if (movingobjectposition == null)
{ {
return par1ItemStack; if (world.isRemote || !EnergyItems.checkAndSetItemOwner(stack, player) || player.isSneaking())
} else
{ {
if (movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) return false;
{
int i = movingobjectposition.blockX;
int j = movingobjectposition.blockY;
int k = movingobjectposition.blockZ;
if (!par2World.canMineBlock(par3EntityPlayer, i, j, k))
{
return par1ItemStack;
} }
TileEntity tile = par2World.getTileEntity(i, j, k); if (!world.canMineBlock(player, x, y, z))
{
return false;
}
TileEntity tile = world.getTileEntity(x, y, z);
if (tile instanceof IFluidHandler) if (tile instanceof IFluidHandler)
{ {
FluidStack fluid = new FluidStack(FluidRegistry.WATER, 1000); FluidStack fluid = new FluidStack(FluidRegistry.WATER, 1000);
int amount = ((IFluidHandler) tile).fill(ForgeDirection.getOrientation(movingobjectposition.sideHit), fluid, false); int amount = ((IFluidHandler) tile).fill(ForgeDirection.getOrientation(side), fluid, false);
if (amount > 0 && EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) if (amount > 0 && EnergyItems.syphonBatteries(stack, player, getEnergyUsed()))
{ {
((IFluidHandler) tile).fill(ForgeDirection.getOrientation(movingobjectposition.sideHit), fluid, true); ((IFluidHandler) tile).fill(ForgeDirection.getOrientation(side), fluid, true);
} }
return par1ItemStack; return false;
} }
{ {
if (movingobjectposition.sideHit == 0) if (side == 0)
{ {
--j; --y;
} }
if (movingobjectposition.sideHit == 1) if (side == 1)
{ {
++j; ++y;
} }
if (movingobjectposition.sideHit == 2) if (side == 2)
{ {
--k; --z;
} }
if (movingobjectposition.sideHit == 3) if (side == 3)
{ {
++k; ++z;
} }
if (movingobjectposition.sideHit == 4) if (side == 4)
{ {
--i; --x;
} }
if (movingobjectposition.sideHit == 5) if (side == 5)
{ {
++i; ++x;
} }
if (!par3EntityPlayer.canPlayerEdit(i, j, k, movingobjectposition.sideHit, par1ItemStack)) if (!player.canPlayerEdit(x, y, z, side, stack))
{ {
return par1ItemStack; return false;
} }
if(this.canPlaceContainedLiquid(par2World, d0, d1, d2, i, j, k) && EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) if(this.canPlaceContainedLiquid(world, x, y, z, x, y, z) && EnergyItems.syphonBatteries(stack, player, getEnergyUsed()))
{ {
this.tryPlaceContainedLiquid(par2World, d0, d1, d2, i, j, k); return this.tryPlaceContainedLiquid(world, x, y, z, x, y, z);
}
} }
} }
return par1ItemStack;
} return false;
} }
/** /**
@ -193,6 +176,7 @@ public class WaterSigil extends ItemBucket implements ArmourUpgrade
} else } else
{ {
par1World.setBlock(par8, par9, par10, this.isFull, 0, 3); par1World.setBlock(par8, par9, par10, this.isFull, 0, 3);
par1World.markBlockForUpdate(par8, par9, par10);
} }
return true; return true;

View file

@ -69,7 +69,7 @@ public class RitualEffectItemRouting extends RitualEffect
RoutingFocusParadigm parad = new RoutingFocusParadigm(); RoutingFocusParadigm parad = new RoutingFocusParadigm();
TileEntity outputChest = null; //Destination TileEntity outputChest = null; //Destination
ForgeDirection inputDirection;; ForgeDirection inputDirection;
{ {
IInventory outputChestInventory = null; IInventory outputChestInventory = null;