Almost ready for final 1.2.0 push
This commit is contained in:
parent
4a1f13d988
commit
3d6d7bcdd6
12 changed files with 136 additions and 46 deletions
|
@ -23,6 +23,7 @@ import WayofTime.alchemicalWizardry.common.PacketHandler;
|
|||
import WayofTime.alchemicalWizardry.common.items.EnergyBattery;
|
||||
import WayofTime.alchemicalWizardry.common.items.sigil.SigilOfHolding;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEBellJar;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
|
@ -78,6 +79,34 @@ public class BlockAltar extends BlockContainer
|
|||
return sideIcon2;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasComparatorInputOverride()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getComparatorInputOverride(World world, int x, int y, int z, int meta)
|
||||
{
|
||||
TileEntity tile = world.getTileEntity(x, y, z);
|
||||
|
||||
if (tile instanceof TEAltar)
|
||||
{
|
||||
ItemStack stack = ((TEAltar) tile).getStackInSlot(0);
|
||||
|
||||
if (stack != null && stack.getItem() instanceof EnergyBattery)
|
||||
{
|
||||
EnergyBattery bloodOrb = (EnergyBattery) stack.getItem();
|
||||
int maxEssence = bloodOrb.getMaxEssence();
|
||||
int currentEssence = bloodOrb.getCurrentEssence(stack);
|
||||
int level = currentEssence * 15 / maxEssence;
|
||||
return ((int) (Math.min(15, level))) % 16;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int idk, float what, float these, float are)
|
||||
|
@ -271,11 +300,11 @@ public class BlockAltar extends BlockContainer
|
|||
// return 1;
|
||||
// }
|
||||
|
||||
@Override
|
||||
public boolean canProvidePower()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
// @Override
|
||||
// public boolean canProvidePower()
|
||||
// {
|
||||
// return true;
|
||||
// }
|
||||
|
||||
@Override
|
||||
public int isProvidingWeakPower(IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5)
|
||||
|
|
|
@ -111,13 +111,13 @@ public class BlockBelljar extends BlockContainer
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean canProvidePower()
|
||||
public boolean hasComparatorInputOverride()
|
||||
{
|
||||
return true;
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int isProvidingWeakPower(IBlockAccess world, int x, int y, int z, int meta)
|
||||
public int getComparatorInputOverride(World world, int x, int y, int z, int meta)
|
||||
{
|
||||
TileEntity tile = world.getTileEntity(x, y, z);
|
||||
if(tile instanceof TEBellJar)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue