mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-19 19:59:36 +00:00
Added comparator override to the petal apothecary.
This commit is contained in:
1 parent
862e8a764b
commit
5014a7e404
2 files changed
+13
No files matched your search
@@ -68,6 +68,7 @@ public class BlockAltar extends BlockModContainer implements ILexiconable {
|
||||
if(!par5EntityPlayer.capabilities.isCreativeMode)
|
||||
par5EntityPlayer.inventory.setInventorySlotContents(par5EntityPlayer.inventory.currentItem, new ItemStack(Item.bucketEmpty));
|
||||
tile.hasWater = true;
|
||||
par1World.func_96440_m(par2, par3, par4, blockID);
|
||||
PacketDispatcher.sendPacketToAllInDimension(tile.getDescriptionPacket(), par1World.provider.dimensionId);
|
||||
}
|
||||
|
||||
@@ -139,6 +140,16 @@ public class BlockAltar extends BlockModContainer implements ILexiconable {
|
||||
super.breakBlock(par1World, par2, par3, par4, par5, par6);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasComparatorInputOverride() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public int getComparatorInputOverride(World par1World, int par2, int par3, int par4, int par5) {
|
||||
TileAltar altar = (TileAltar) par1World.getBlockTileEntity(par2, par3, par4);
|
||||
return altar.hasWater ? 15 : 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public LexiconEntry getEntry(World world, int x, int y, int z, EntityPlayer player, ItemStack lexicon) {
|
||||
return LexiconData.apothecary;
|
||||
|
||||
@@ -41,6 +41,7 @@ public class TileAltar extends TileSimpleInventory implements ISidedInventory {
|
||||
if(!hasWater) {
|
||||
if(stack.itemID == Item.bucketWater.itemID) {
|
||||
hasWater = true;
|
||||
worldObj.func_96440_m(xCoord, yCoord, zCoord, worldObj.getBlockId(xCoord, yCoord, zCoord));
|
||||
stack.itemID = Item.bucketEmpty.itemID;
|
||||
PacketDispatcher.sendPacketToAllInDimension(getDescriptionPacket(), worldObj.provider.dimensionId);
|
||||
} else return false;
|
||||
@@ -84,6 +85,7 @@ public class TileAltar extends TileSimpleInventory implements ISidedInventory {
|
||||
|
||||
craftingFanciness();
|
||||
hasWater = false;
|
||||
worldObj.func_96440_m(xCoord, yCoord, zCoord, worldObj.getBlockId(xCoord, yCoord, zCoord));
|
||||
didChange = true;
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user