mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-20 12:19:46 +00:00
Added Comparator support to Mana Pools.
This commit is contained in:
1 parent
092fc19ed5
commit
fdf806a809
3 files changed
+17
-1
No files matched your search
@@ -76,6 +76,21 @@ public class BlockPool extends BlockModContainer implements IWandHUD, IWandable,
|
||||
public int getRenderType() {
|
||||
return LibRenderIDs.idPool;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasComparatorInputOverride() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getComparatorInputOverride(World par1World, int par2, int par3, int par4, int par5) {
|
||||
TilePool pool = (TilePool) par1World.getBlockTileEntity(par2, par3, par4);
|
||||
int val = (int) ((double) pool.getCurrentMana() / (double) TilePool.MAX_MANA * 15.0);
|
||||
if(pool.getCurrentMana() > 0)
|
||||
val = Math.max(val, 1);
|
||||
|
||||
return val;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderHUD(Minecraft mc, ScaledResolution res, World world, int x, int y, int z) {
|
||||
|
||||
@@ -49,6 +49,7 @@ public class TilePool extends TileMod implements IManaPool {
|
||||
@Override
|
||||
public void recieveMana(int mana) {
|
||||
this.mana = Math.min(this.mana + mana, MAX_MANA);
|
||||
worldObj.func_96440_m(xCoord, yCoord, zCoord, worldObj.getBlockId(xCoord, yCoord, zCoord));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -290,7 +290,7 @@ botania.page.spreader9=&1Rainbow Lens&0 all the way
|
||||
botania.entry.pool=Mana Pool
|
||||
botania.page.pool0=The &1Mana Pool&0 is, simply put, a storage of &4Mana&0.<br>Mana can be inserted into it by usage of a &1Mana Spreader&0, and any adjacent &1Mana Spreaders&0 will pull mana from it to increase their internal buffer automatically.<br>Any &4Functional Flowers&0 require a nearby &1Mana Pool&0 to draw power from.
|
||||
botania.page.pool1=Making the &1Mana Pool&0.
|
||||
botania.page.pool2=Tossing in some resources into the Mana Pool will cause them to get infused with &4Mana&0, turning them into more powerful forms.<br>A few examples are &1Iron Ingots, Ender Pearls, Diamonds and Mystical Petals&0.<br>&4Mana&0 reading for this block functions like the &1Mana Spreader&0.
|
||||
botania.page.pool2=Tossing in some resources into the Mana Pool will cause them to get infused with &4Mana&0, turning them into more powerful forms.<br>A few examples are &1Iron Ingots or Mystical Petals&0.<br>&4Mana&0 reading for this block functions like the &1Mana Spreader&0. A &1Redstone Comparator&0 can also output a signal based on the contents.
|
||||
botania.page.pool3=Infusing &1Manasteel&0
|
||||
botania.page.pool4=Infusing &1Mana Pearls&0
|
||||
botania.page.pool5=Infusing &1Mana Diamonds&0
|
||||
|
||||
Reference in new issue
Block a user