@Override public int getAge() { return a.getAge(); }
protected void tick(Block b) throws Exception { for (Entity n: me.mrCookieSlime.Slimefun.holograms.AnimalGrowthAccelerator.getArmorStand(b).getNearbyEntities(3D, 3D, 3D)) { if (n instanceof Ageable && !((Ageable) n).isAdult()) { for (int slot: getInputSlots()) { if (SlimefunManager.isItemSimiliar(BlockStorage.getInventory(b).getItemInSlot(slot), SlimefunItems.ORGANIC_FOOD, false)) { if (ChargableBlock.getCharge(b) < getEnergyConsumption()) return; ChargableBlock.addCharge(b, -getEnergyConsumption()); BlockStorage.getInventory(b).replaceExistingItem(slot, InvUtils.decreaseItem(BlockStorage.getInventory(b).getItemInSlot(slot), 1)); ((Ageable) n).setAge(((Ageable) n).getAge() + 2000); if (((Ageable) n).getAge() > 0) ((Ageable) n).setAge(0); n.getWorld().spawnParticle(Particle.VILLAGER_HAPPY,((LivingEntity) n).getEyeLocation(), 8, 0.2F, 0.2F, 0.2F); return; } } } } }