Recipes commit

Fix
This commit is contained in:
Arcaratus 2015-12-30 17:24:40 -05:00
parent e48eedb874
commit 07097c00a9
16 changed files with 213 additions and 112 deletions

View file

@ -36,7 +36,7 @@ public class ItemSigilAir extends ItemSigilBase
player.fallDistance = 0;
if (!player.capabilities.isCreativeMode)
this.setUnusable(stack, !syphonBatteries(stack, player, getLPUsed()));
this.setUnusable(stack, !syphonNetwork(stack, player, getLPUsed()));
}
return super.onItemRightClick(stack, world, player);

View file

@ -21,7 +21,7 @@ public class ItemSigilBloodLight extends ItemSigilBase
@Override
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player)
{
if (BindableHelper.checkAndSetItemOwner(stack, player) && ItemBindable.syphonBatteries(stack, player, getLPUsed() * 5) && !world.isRemote)
if (BindableHelper.checkAndSetItemOwner(stack, player) && ItemBindable.syphonNetwork(stack, player, getLPUsed() * 5) && !world.isRemote)
world.spawnEntityInWorld(new EntityBloodLight(world, player));
return stack;
@ -30,10 +30,9 @@ public class ItemSigilBloodLight extends ItemSigilBase
@Override
public boolean onItemUseFirst(ItemStack stack, EntityPlayer player, World world, BlockPos blockPos, EnumFacing side, float hitX, float hitY, float hitZ)
{
if (world.isRemote)
return false;
if (world.isRemote) return false;
if (BindableHelper.checkAndSetItemOwner(stack, player) && ItemBindable.syphonBatteries(stack, player, getLPUsed()))
if (BindableHelper.checkAndSetItemOwner(stack, player) && ItemBindable.syphonNetwork(stack, player, getLPUsed()))
{
BlockPos newPos = blockPos.offset(side);

View file

@ -32,8 +32,7 @@ public class ItemSigilLava extends ItemSigilBase
if (movingobjectposition != null)
{
ItemStack ret = net.minecraftforge.event.ForgeEventFactory.onBucketUse(player, world, stack, movingobjectposition);
if (ret != null)
return ret;
if (ret != null) return ret;
if (movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK)
{
@ -56,7 +55,7 @@ public class ItemSigilLava extends ItemSigilBase
return stack;
}
if (this.canPlaceLava(world, blockpos1) && syphonBatteries(stack, player, getLPUsed()) && this.tryPlaceLava(world, blockpos1))
if (this.canPlaceLava(world, blockpos1) && syphonNetwork(stack, player, getLPUsed()) && this.tryPlaceLava(world, blockpos1))
{
return stack;
}
@ -64,7 +63,7 @@ public class ItemSigilLava extends ItemSigilBase
}
if (!player.capabilities.isCreativeMode)
this.setUnusable(stack, !syphonBatteries(stack, player, getLPUsed()));
this.setUnusable(stack, !syphonNetwork(stack, player, getLPUsed()));
}
return stack;
@ -88,7 +87,7 @@ public class ItemSigilLava extends ItemSigilBase
FluidStack fluid = new FluidStack(FluidRegistry.LAVA, 1000);
int amount = ((IFluidHandler) tile).fill(side, fluid, false);
if (amount > 0 && syphonBatteries(stack, player, getLPUsed()))
if (amount > 0 && syphonNetwork(stack, player, getLPUsed()))
{
((IFluidHandler) tile).fill(side, fluid, true);
}
@ -106,7 +105,7 @@ public class ItemSigilLava extends ItemSigilBase
return false;
}
if (this.canPlaceLava(world, newPos) && syphonBatteries(stack, player, getLPUsed()))
if (this.canPlaceLava(world, newPos) && syphonNetwork(stack, player, getLPUsed()))
{
return this.tryPlaceLava(world, newPos);
}
@ -119,10 +118,12 @@ public class ItemSigilLava extends ItemSigilBase
if (!world.isAirBlock(blockPos) && world.getBlockState(blockPos).getBlock().getMaterial().isSolid())
{
return false;
} else if ((world.getBlockState(blockPos).getBlock() == Blocks.lava || world.getBlockState(blockPos).getBlock() == Blocks.flowing_lava) && world.getBlockState(blockPos).getBlock().getMetaFromState(world.getBlockState(blockPos)) == 0)
}
else if ((world.getBlockState(blockPos).getBlock() == Blocks.lava || world.getBlockState(blockPos).getBlock() == Blocks.flowing_lava) && world.getBlockState(blockPos).getBlock().getMetaFromState(world.getBlockState(blockPos)) == 0)
{
return false;
} else
}
else
{
world.setBlockState(blockPos, Blocks.lava.getBlockState().getBaseState(), 3);
return true;

View file

@ -29,10 +29,8 @@ public class ItemSigilToggleable extends ItemSigilBase
public void addInformation(ItemStack stack, EntityPlayer player, List<String> tooltip, boolean advanced)
{
super.addInformation(stack, player, tooltip, advanced);
if (getActivated(stack))
tooltip.add(TextHelper.localize("tooltip.BloodMagic.activated"));
else
tooltip.add(TextHelper.localize("tooltip.BloodMagic.deactivated"));
if (getActivated(stack)) tooltip.add(TextHelper.localize("tooltip.BloodMagic.activated"));
else tooltip.add(TextHelper.localize("tooltip.BloodMagic.deactivated"));
}
@Override
@ -40,10 +38,8 @@ public class ItemSigilToggleable extends ItemSigilBase
{
if (!world.isRemote && !isUnusable(stack))
{
if (player.isSneaking())
setActivated(stack, !getActivated(stack));
if (getActivated(stack) && ItemBindable.syphonBatteries(stack, player, getLPUsed()))
return stack;
if (player.isSneaking()) setActivated(stack, !getActivated(stack));
if (getActivated(stack) && ItemBindable.syphonNetwork(stack, player, getLPUsed())) return stack;
}
return stack;
@ -52,7 +48,7 @@ public class ItemSigilToggleable extends ItemSigilBase
@Override
public boolean onItemUseFirst(ItemStack stack, EntityPlayer player, World world, BlockPos blockPos, EnumFacing side, float hitX, float hitY, float hitZ)
{
if (BindableHelper.checkAndSetItemOwner(stack, player) && ItemBindable.syphonBatteries(stack, player, getLPUsed()))
if (BindableHelper.checkAndSetItemOwner(stack, player) && ItemBindable.syphonNetwork(stack, player, getLPUsed()))
return onSigilUseFirst(stack, player, world, blockPos, side, hitX, hitY, hitZ);
return false;
@ -70,7 +66,7 @@ public class ItemSigilToggleable extends ItemSigilBase
{
if (worldIn.getWorldTime() % 100 == 0)
{
if (!ItemBindable.syphonBatteries(stack, (EntityPlayer) entityIn, getLPUsed()))
if (!ItemBindable.syphonNetwork(stack, (EntityPlayer) entityIn, getLPUsed()))
{
setActivated(stack, false);
}

View file

@ -14,7 +14,6 @@ import net.minecraftforge.fluids.IFluidHandler;
public class ItemSigilVoid extends ItemSigilBase
{
public ItemSigilVoid()
{
super("void", 50);
@ -30,8 +29,7 @@ public class ItemSigilVoid extends ItemSigilBase
if (movingobjectposition != null)
{
ItemStack ret = net.minecraftforge.event.ForgeEventFactory.onBucketUse(player, world, stack, movingobjectposition);
if (ret != null)
return ret;
if (ret != null) return ret;
if (movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK)
{
@ -52,19 +50,20 @@ public class ItemSigilVoid extends ItemSigilBase
return stack;
}
if (world.getBlockState(blockpos).getBlock().getMaterial().isLiquid() && syphonBatteries(stack, player, getLPUsed()))
if (world.getBlockState(blockpos).getBlock().getMaterial().isLiquid() && syphonNetwork(stack, player, getLPUsed()))
{
world.setBlockToAir(blockpos);
return stack;
}
}
} else
}
else
{
return stack;
}
if (!player.capabilities.isCreativeMode)
this.setUnusable(stack, !syphonBatteries(stack, player, getLPUsed()));
this.setUnusable(stack, !syphonNetwork(stack, player, getLPUsed()));
}
return stack;
@ -88,7 +87,7 @@ public class ItemSigilVoid extends ItemSigilBase
{
FluidStack amount = ((IFluidHandler) tile).drain(side, 1000, false);
if (amount != null && amount.amount > 0 && syphonBatteries(stack, player, getLPUsed()))
if (amount != null && amount.amount > 0 && syphonNetwork(stack, player, getLPUsed()))
{
((IFluidHandler) tile).drain(side, 1000, true);
return true;
@ -104,7 +103,7 @@ public class ItemSigilVoid extends ItemSigilBase
return false;
}
if (world.getBlockState(newPos).getBlock() instanceof IFluidBlock && syphonBatteries(stack, player, getLPUsed()))
if (world.getBlockState(newPos).getBlock() instanceof IFluidBlock && syphonNetwork(stack, player, getLPUsed()))
{
world.setBlockToAir(newPos);
return true;

View file

@ -17,7 +17,6 @@ import net.minecraftforge.fluids.IFluidHandler;
public class ItemSigilWater extends ItemSigilBase
{
public ItemSigilWater()
{
super("water", 100);
@ -33,8 +32,7 @@ public class ItemSigilWater extends ItemSigilBase
if (movingobjectposition != null)
{
ItemStack ret = net.minecraftforge.event.ForgeEventFactory.onBucketUse(player, world, stack, movingobjectposition);
if (ret != null)
return ret;
if (ret != null) return ret;
if (movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK)
{
@ -57,7 +55,7 @@ public class ItemSigilWater extends ItemSigilBase
return stack;
}
if (this.canPlaceWater(world, blockpos1) && syphonBatteries(stack, player, getLPUsed()) && this.tryPlaceWater(world, blockpos1))
if (this.canPlaceWater(world, blockpos1) && syphonNetwork(stack, player, getLPUsed()) && this.tryPlaceWater(world, blockpos1))
{
return stack;
}
@ -65,7 +63,7 @@ public class ItemSigilWater extends ItemSigilBase
}
if (!player.capabilities.isCreativeMode)
this.setUnusable(stack, !syphonBatteries(stack, player, getLPUsed()));
this.setUnusable(stack, !syphonNetwork(stack, player, getLPUsed()));
}
return stack;
@ -90,7 +88,7 @@ public class ItemSigilWater extends ItemSigilBase
FluidStack fluid = new FluidStack(FluidRegistry.WATER, 1000);
int amount = ((IFluidHandler) tile).fill(side, fluid, false);
if (amount > 0 && syphonBatteries(stack, player, getLPUsed()))
if (amount > 0 && syphonNetwork(stack, player, getLPUsed()))
{
((IFluidHandler) tile).fill(side, fluid, true);
}
@ -108,7 +106,7 @@ public class ItemSigilWater extends ItemSigilBase
return false;
}
if (this.canPlaceWater(world, newPos) && syphonBatteries(stack, player, getLPUsed()))
if (this.canPlaceWater(world, newPos) && syphonNetwork(stack, player, getLPUsed()))
{
return this.tryPlaceWater(world, newPos);
}
@ -121,10 +119,12 @@ public class ItemSigilWater extends ItemSigilBase
if (!world.isAirBlock(blockPos) && world.getBlockState(blockPos).getBlock().getMaterial().isSolid())
{
return false;
} else if ((world.getBlockState(blockPos).getBlock() == Blocks.water || world.getBlockState(blockPos).getBlock() == Blocks.flowing_water) && world.getBlockState(blockPos).getBlock().getMetaFromState(world.getBlockState(blockPos)) == 0)
}
else if ((world.getBlockState(blockPos).getBlock() == Blocks.water || world.getBlockState(blockPos).getBlock() == Blocks.flowing_water) && world.getBlockState(blockPos).getBlock().getMetaFromState(world.getBlockState(blockPos)) == 0)
{
return false;
} else
}
else
{
return true;
}
@ -139,7 +139,8 @@ public class ItemSigilWater extends ItemSigilBase
if (!worldIn.isAirBlock(pos) && !flag)
{
return false;
} else
}
else
{
if (worldIn.provider.doesWaterVaporize())
{
@ -152,7 +153,8 @@ public class ItemSigilWater extends ItemSigilBase
{
worldIn.spawnParticle(EnumParticleTypes.SMOKE_LARGE, (double) i + Math.random(), (double) j + Math.random(), (double) k + Math.random(), 0.0D, 0.0D, 0.0D, 0);
}
} else
}
else
{
if (!worldIn.isRemote && flag && !material.isLiquid())
{