The Mana Pool now has a small cooldown between crafting items, it also plays a less obnoxious sound.

This commit is contained in:
Vasco Lavos committed 2014-05-02 16:28:34 +01:00
1 parent c2be7c1b9e
commit a6a3a67de6
1 file changed
+10 -2
@@ -49,6 +49,7 @@ public class TilePool extends TileMod implements IManaPool {
int mana;
int knownMana = -1;
int craftCooldown = 20;
boolean added = false;
@Override
@@ -79,6 +80,9 @@ public class TilePool extends TileMod implements IManaPool {
}
public boolean collideEntityItem(EntityItem item) {
if(craftCooldown > 0)
return false;
boolean didChange = false;
ItemStack stack = item.getEntityItem();
if(stack == null)
@@ -99,6 +103,8 @@ public class TilePool extends TileMod implements IManaPool {
EntityItem outputItem = new EntityItem(worldObj, xCoord + 0.5, yCoord + 1.5, zCoord + 0.5, output);
worldObj.spawnEntityInWorld(outputItem);
}
craftCooldown = 20;
craftingFanciness();
didChange = true;
}
@@ -111,7 +117,7 @@ public class TilePool extends TileMod implements IManaPool {
}
public void craftingFanciness() {
worldObj.playSoundEffect(xCoord, yCoord, zCoord, "random.levelup", 1F, 1F);
worldObj.playSoundEffect(xCoord, yCoord, zCoord, "random.levelup", 0.5F, 4F);
for(int i = 0; i < 25; i++) {
float red = (float) Math.random();
float green = (float) Math.random();
@@ -132,7 +138,9 @@ public class TilePool extends TileMod implements IManaPool {
if(Math.random() > particleChance)
Botania.proxy.wispFX(worldObj, xCoord + 0.3 + Math.random() * 0.5, yCoord + 0.6 + Math.random() * 0.25, zCoord + Math.random(), color.getRed() / 255F, color.getGreen() / 255F, color.getBlue() / 255F, (float) Math.random() / 3F, (float) -Math.random() / 25F);
}
if(craftCooldown > 0)
craftCooldown--;
List<EntityItem> items = worldObj.getEntitiesWithinAABB(EntityItem.class, AxisAlignedBB.getBoundingBox(xCoord, yCoord, zCoord, xCoord + 1, yCoord + 1, zCoord + 1));
for(EntityItem item : items) {
ItemStack stack = item.getEntityItem();