diff --git a/src/main/java/de/ellpeck/naturesaura/ModConfig.java b/src/main/java/de/ellpeck/naturesaura/ModConfig.java index f0443d10..91545cd7 100644 --- a/src/main/java/de/ellpeck/naturesaura/ModConfig.java +++ b/src/main/java/de/ellpeck/naturesaura/ModConfig.java @@ -31,7 +31,7 @@ public final class ModConfig { public int fieldCreatorRange = 10; @Comment("The Aura to RF ratio used by the RF converter, read as aura*ratio = rf") - public float auraToRFRatio = 5; + public float auraToRFRatio = 0.05F; } public static class Features { diff --git a/src/main/java/de/ellpeck/naturesaura/api/aura/chunk/IAuraChunk.java b/src/main/java/de/ellpeck/naturesaura/api/aura/chunk/IAuraChunk.java index 7c1d9785..ce28066e 100644 --- a/src/main/java/de/ellpeck/naturesaura/api/aura/chunk/IAuraChunk.java +++ b/src/main/java/de/ellpeck/naturesaura/api/aura/chunk/IAuraChunk.java @@ -23,7 +23,7 @@ public interface IAuraChunk extends ICapabilityProvider, INBTSerializable 0) { diff --git a/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityFieldCreator.java b/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityFieldCreator.java index 4b22038f..53b056c9 100644 --- a/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityFieldCreator.java +++ b/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityFieldCreator.java @@ -81,11 +81,11 @@ public class TileEntityFieldCreator extends TileEntityImpl implements ITickable creator.sendToClients(); } - chunk.drainAura(spot, 3); + chunk.drainAura(spot, 300); this.sendParticles(); } else { if (this.world.getTotalWorldTime() % 40 == 0) - chunk.drainAura(spot, 1); + chunk.drainAura(spot, 100); Vec3d dist = new Vec3d( this.pos.getX() - connectedPos.getX(), @@ -120,7 +120,7 @@ public class TileEntityFieldCreator extends TileEntityImpl implements ITickable for (ItemStack stack : drops) Block.spawnAsEntity(this.world, pos, stack); - chunk.drainAura(spot, 3); + chunk.drainAura(spot, 300); this.sendParticles(); } } diff --git a/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityFlowerGenerator.java b/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityFlowerGenerator.java index 39396ece..14b8a695 100644 --- a/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityFlowerGenerator.java +++ b/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityFlowerGenerator.java @@ -50,8 +50,8 @@ public class TileEntityFlowerGenerator extends TileEntityImpl implements ITickab IBlockState state = this.world.getBlockState(pos); MutableInt curr = this.consumedRecently.computeIfAbsent(state, s -> new MutableInt()); - int addAmount = 250; - int toAdd = Math.max(0, addAmount - curr.getValue()); + int addAmount = 25000; + int toAdd = Math.max(0, addAmount - curr.getValue() * 100); if (toAdd > 0) { if (NaturesAuraAPI.TYPE_OVERWORLD.isPresentInWorld(this.world)) { int remain = toAdd; diff --git a/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityFurnaceHeater.java b/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityFurnaceHeater.java index 6af5fbec..e00ff89a 100644 --- a/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityFurnaceHeater.java +++ b/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityFurnaceHeater.java @@ -41,7 +41,7 @@ public class TileEntityFurnaceHeater extends TileEntityImpl implements ITickable BlockPos spot = IAuraChunk.getHighestSpot(this.world, this.pos, 20, this.pos); IAuraChunk chunk = IAuraChunk.getAuraChunk(this.world, spot); - chunk.drainAura(spot, MathHelper.ceil((200 - time) / 6F)); + chunk.drainAura(spot, MathHelper.ceil((200 - time) * 16.6F)); did = true; if (this.world.getTotalWorldTime() % 15 == 0) { diff --git a/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityHopperUpgrade.java b/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityHopperUpgrade.java index 6264586f..706fa335 100644 --- a/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityHopperUpgrade.java +++ b/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityHopperUpgrade.java @@ -58,7 +58,7 @@ public class TileEntityHopperUpgrade extends TileEntityImpl implements ITickable item.setDead(); BlockPos spot = IAuraChunk.getHighestSpot(this.world, this.pos, 25, this.pos); - IAuraChunk.getAuraChunk(this.world, spot).drainAura(spot, 5); + IAuraChunk.getAuraChunk(this.world, spot).drainAura(spot, 500); PacketHandler.sendToAllAround(this.world, this.pos, 32, new PacketParticles((float) item.posX, (float) item.posY, (float) item.posZ, 10)); diff --git a/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityNatureAltar.java b/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityNatureAltar.java index 5f6f1708..24488197 100644 --- a/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityNatureAltar.java +++ b/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityNatureAltar.java @@ -53,7 +53,7 @@ public class TileEntityNatureAltar extends TileEntityImpl implements ITickable { @SideOnly(Side.CLIENT) public int bobTimer; - private final BasicAuraContainer container = new BasicAuraContainer(NaturesAuraAPI.TYPE_OVERWORLD, 5000); + private final BasicAuraContainer container = new BasicAuraContainer(NaturesAuraAPI.TYPE_OVERWORLD, 500000); public boolean structureFine; private AltarRecipe currentRecipe; @@ -75,7 +75,7 @@ public class TileEntityNatureAltar extends TileEntityImpl implements ITickable { } if (this.structureFine) { - int space = this.container.storeAura(3, true); + int space = this.container.storeAura(300, true); if (space > 0 && this.container.isAcceptableType(IAuraType.forWorld(this.world))) { int toStore = Math.min(IAuraChunk.getAuraInArea(this.world, this.pos, 20), space); if (toStore > 0) { diff --git a/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityOakGenerator.java b/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityOakGenerator.java index 341fb1f4..065e3559 100644 --- a/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityOakGenerator.java +++ b/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityOakGenerator.java @@ -20,7 +20,7 @@ public class TileEntityOakGenerator extends TileEntityImpl implements ITickable while (!this.scheduledBigTrees.isEmpty()) { BlockPos pos = this.scheduledBigTrees.remove(); if (this.world.getBlockState(pos).getBlock() instanceof BlockLog) { - int toAdd = 1000; + int toAdd = 100000; while (toAdd > 0) { BlockPos spot = IAuraChunk.getLowestSpot(this.world, this.pos, 25, this.pos); toAdd -= IAuraChunk.getAuraChunk(this.world, spot).storeAura(spot, toAdd); diff --git a/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityPlacer.java b/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityPlacer.java index 8d64e265..7de7438e 100644 --- a/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityPlacer.java +++ b/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityPlacer.java @@ -73,7 +73,7 @@ public class TileEntityPlacer extends TileEntityImpl implements ITickable { handler.extractItem(i, 1, false); BlockPos spot = IAuraChunk.getHighestSpot(this.world, this.pos, 10, this.pos); - IAuraChunk.getAuraChunk(this.world, spot).drainAura(spot, 10); + IAuraChunk.getAuraChunk(this.world, spot).drainAura(spot, 1000); PacketHandler.sendToAllAround(this.world, this.pos, 32, new PacketParticles(pos.getX(), pos.getY(), pos.getZ(), 9)); diff --git a/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityPotionGenerator.java b/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityPotionGenerator.java index 69cd7ef7..c2053408 100644 --- a/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityPotionGenerator.java +++ b/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityPotionGenerator.java @@ -40,7 +40,7 @@ public class TileEntityPotionGenerator extends TileEntityImpl implements ITickab continue; } - int toAdd = ((effect.getAmplifier() * 7 + 1) * (effect.getDuration() / 25)); + int toAdd = ((effect.getAmplifier() * 7 + 1) * (effect.getDuration() / 25)) * 100; while (toAdd > 0) { BlockPos spot = IAuraChunk.getLowestSpot(this.world, this.pos, 30, this.pos); toAdd -= IAuraChunk.getAuraChunk(this.world, spot).storeAura(spot, toAdd); diff --git a/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityRFConverter.java b/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityRFConverter.java index f28fa2d8..8f791d35 100644 --- a/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityRFConverter.java +++ b/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityRFConverter.java @@ -71,7 +71,7 @@ public class TileEntityRFConverter extends TileEntityImpl implements ITickable { int aura = IAuraChunk.getAuraInArea(this.world, this.pos, 45); if (aura <= IAuraChunk.DEFAULT_AURA) return; - int amountToGen = Math.min(Math.min(10000, aura / 10), emptyPart); + int amountToGen = Math.min(Math.min(1000, aura / 1000), emptyPart); int amountToUse = MathHelper.ceil(amountToGen / ModConfig.general.auraToRFRatio); this.storage.setEnergy(this.storage.getEnergyStored() + amountToGen); diff --git a/src/main/java/de/ellpeck/naturesaura/chunk/effect/AnimalEffect.java b/src/main/java/de/ellpeck/naturesaura/chunk/effect/AnimalEffect.java index 9ad640a8..5bdce071 100644 --- a/src/main/java/de/ellpeck/naturesaura/chunk/effect/AnimalEffect.java +++ b/src/main/java/de/ellpeck/naturesaura/chunk/effect/AnimalEffect.java @@ -33,12 +33,12 @@ public class AnimalEffect implements IDrainSpotEffect { if (spot <= 0) return; int aura = IAuraChunk.getAuraInArea(world, pos, 30); - if (aura < 15000) + if (aura < 1500000) return; - int chance = Math.min(50, Math.abs(aura) / 5000); + int chance = Math.min(50, Math.abs(aura) / 500000); if (chance <= 0) return; - int dist = MathHelper.clamp(Math.abs(aura) / 1500, 5, 35); + int dist = MathHelper.clamp(Math.abs(aura) / 150000, 5, 35); AxisAlignedBB bb = new AxisAlignedBB(pos).grow(dist); List animals = world.getEntitiesWithinAABB(EntityAnimal.class, bb); @@ -74,7 +74,7 @@ public class AnimalEffect implements IDrainSpotEffect { world.spawnEntity(chicken); BlockPos closestSpot = IAuraChunk.getHighestSpot(world, item.getPosition(), 35, pos); - IAuraChunk.getAuraChunk(world, closestSpot).drainAura(closestSpot, 20); + IAuraChunk.getAuraChunk(world, closestSpot).drainAura(closestSpot, 2000); } } @@ -100,7 +100,7 @@ public class AnimalEffect implements IDrainSpotEffect { this.setInLove(second); BlockPos closestSpot = IAuraChunk.getHighestSpot(world, first.getPosition(), 35, pos); - IAuraChunk.getAuraChunk(world, closestSpot).drainAura(closestSpot, 35); + IAuraChunk.getAuraChunk(world, closestSpot).drainAura(closestSpot, 3500); } } diff --git a/src/main/java/de/ellpeck/naturesaura/chunk/effect/BalanceEffect.java b/src/main/java/de/ellpeck/naturesaura/chunk/effect/BalanceEffect.java index ef0724f9..70eddb61 100644 --- a/src/main/java/de/ellpeck/naturesaura/chunk/effect/BalanceEffect.java +++ b/src/main/java/de/ellpeck/naturesaura/chunk/effect/BalanceEffect.java @@ -16,19 +16,19 @@ public class BalanceEffect implements IDrainSpotEffect { @Override public void update(World world, Chunk chunk, IAuraChunk auraChunk, BlockPos pos, Integer spot) { - if (spot < 1000) + if (spot < 100000) return; - int searchRadius = Math.min(45, spot / 100); + int searchRadius = Math.min(45, spot / 10000); MutableInt positiveAura = new MutableInt(); IAuraChunk.getSpotsInArea(world, pos, searchRadius, (otherPos, otherSpot) -> { if (otherSpot > 0) positiveAura.add(otherSpot); }); - int radius = Math.min(80, positiveAura.intValue() / 50); + int radius = Math.min(80, positiveAura.intValue() / 5000); BlockPos lowestPos = IAuraChunk.getLowestSpot(world, pos, radius, null); if (lowestPos == null) return; - int stored = IAuraChunk.getAuraChunk(world, lowestPos).storeAura(lowestPos, spot / 10); + int stored = IAuraChunk.getAuraChunk(world, lowestPos).storeAura(lowestPos, spot / 500); auraChunk.drainAura(pos, stored); } diff --git a/src/main/java/de/ellpeck/naturesaura/chunk/effect/BreathlessEffect.java b/src/main/java/de/ellpeck/naturesaura/chunk/effect/BreathlessEffect.java index df44f62e..8a0badeb 100644 --- a/src/main/java/de/ellpeck/naturesaura/chunk/effect/BreathlessEffect.java +++ b/src/main/java/de/ellpeck/naturesaura/chunk/effect/BreathlessEffect.java @@ -28,10 +28,10 @@ public class BreathlessEffect implements IDrainSpotEffect { int aura = IAuraChunk.getAuraInArea(world, pos, 50); if (aura > 0) return; - int dist = Math.min(Math.abs(aura) / 500, 75); + int dist = Math.min(Math.abs(aura) / 50000, 75); if (dist < 10) return; - int amp = Math.min(MathHelper.floor(Math.abs(aura) / 25000F), 3); + int amp = Math.min(MathHelper.floor(Math.abs(aura) / 2500000F), 3); List entities = world.getEntitiesWithinAABB(EntityLivingBase.class, new AxisAlignedBB(pos).grow(dist)); diff --git a/src/main/java/de/ellpeck/naturesaura/chunk/effect/CacheRechargeEffect.java b/src/main/java/de/ellpeck/naturesaura/chunk/effect/CacheRechargeEffect.java index 20b982e1..11035321 100644 --- a/src/main/java/de/ellpeck/naturesaura/chunk/effect/CacheRechargeEffect.java +++ b/src/main/java/de/ellpeck/naturesaura/chunk/effect/CacheRechargeEffect.java @@ -22,15 +22,15 @@ public class CacheRechargeEffect implements IDrainSpotEffect { @Override public void update(World world, Chunk chunk, IAuraChunk auraChunk, BlockPos pos, Integer spot) { - if (spot < 1000) + if (spot < 100000) return; int aura = IAuraChunk.getAuraInArea(world, pos, 20); - if (aura < 15000) + if (aura < 1500000) return; if (NaturesAuraAPI.instance().isEffectPowderActive(world, pos, NAME)) return; int dist = MathHelper.clamp(aura / 3500, 3, 15); - int amount = aura / 2500 - 2; + int amount = aura / 250000 - 2; List players = world.getEntitiesWithinAABB(EntityPlayer.class, new AxisAlignedBB(pos).grow(dist)); for (EntityPlayer player : players) { diff --git a/src/main/java/de/ellpeck/naturesaura/chunk/effect/ExplosionEffect.java b/src/main/java/de/ellpeck/naturesaura/chunk/effect/ExplosionEffect.java index 13660c14..9be3c096 100644 --- a/src/main/java/de/ellpeck/naturesaura/chunk/effect/ExplosionEffect.java +++ b/src/main/java/de/ellpeck/naturesaura/chunk/effect/ExplosionEffect.java @@ -20,15 +20,15 @@ public class ExplosionEffect implements IDrainSpotEffect { if (spot >= 0 || world.getTotalWorldTime() % 40 != 0) return; int aura = IAuraChunk.getAuraInArea(world, pos, 85); - if (aura > -50000) + if (aura > -5000000) return; - int chance = 140 - Math.abs(aura) / 2000; + int chance = 140 - Math.abs(aura) / 200000; if (chance > 1 && world.rand.nextInt(chance) != 0) return; - float strength = Math.min(Math.abs(aura) / 50000F, 5F); + float strength = Math.min(Math.abs(aura) / 5000000F, 5F); if (strength <= 0) return; - int dist = MathHelper.clamp(Math.abs(aura) / 2000, 25, 100); + int dist = MathHelper.clamp(Math.abs(aura) / 200000, 25, 100); int x = MathHelper.floor(pos.getX() + world.rand.nextGaussian() * dist); int z = MathHelper.floor(pos.getZ() + world.rand.nextGaussian() * dist); diff --git a/src/main/java/de/ellpeck/naturesaura/chunk/effect/GrassDieEffect.java b/src/main/java/de/ellpeck/naturesaura/chunk/effect/GrassDieEffect.java index 3c43fca5..bfef5b5b 100644 --- a/src/main/java/de/ellpeck/naturesaura/chunk/effect/GrassDieEffect.java +++ b/src/main/java/de/ellpeck/naturesaura/chunk/effect/GrassDieEffect.java @@ -25,9 +25,9 @@ public class GrassDieEffect implements IDrainSpotEffect { if (spot < 0) { int aura = IAuraChunk.getAuraInArea(world, pos, 50); if (aura < 0) { - int amount = Math.min(300, Math.abs(aura) / 1000); + int amount = Math.min(300, Math.abs(aura) / 100000); if (amount > 1) { - int dist = MathHelper.clamp(Math.abs(aura) / 750, 5, 75); + int dist = MathHelper.clamp(Math.abs(aura) / 75000, 5, 75); for (int i = amount / 2 + world.rand.nextInt(amount / 2); i >= 0; i--) { BlockPos grassPos = new BlockPos( pos.getX() + world.rand.nextGaussian() * dist, diff --git a/src/main/java/de/ellpeck/naturesaura/chunk/effect/PlantBoostEffect.java b/src/main/java/de/ellpeck/naturesaura/chunk/effect/PlantBoostEffect.java index 5d6cc273..3900d6c0 100644 --- a/src/main/java/de/ellpeck/naturesaura/chunk/effect/PlantBoostEffect.java +++ b/src/main/java/de/ellpeck/naturesaura/chunk/effect/PlantBoostEffect.java @@ -27,12 +27,12 @@ public class PlantBoostEffect implements IDrainSpotEffect { if (spot <= 0) return; int aura = IAuraChunk.getAuraInArea(world, pos, 30); - if (aura < 15000) + if (aura < 1500000) return; - int amount = Math.min(45, Math.abs(aura) / 1000); + int amount = Math.min(45, Math.abs(aura) / 100000); if (amount <= 1) return; - int dist = MathHelper.clamp(Math.abs(aura) / 1500, 5, 35); + int dist = MathHelper.clamp(Math.abs(aura) / 150000, 5, 35); for (int i = amount / 2 + world.rand.nextInt(amount / 2); i >= 0; i--) { int x = MathHelper.floor(pos.getX() + world.rand.nextGaussian() * dist); @@ -51,7 +51,7 @@ public class PlantBoostEffect implements IDrainSpotEffect { growable.grow(world, world.rand, plantPos, state); BlockPos closestSpot = IAuraChunk.getHighestSpot(world, plantPos, 25, pos); - IAuraChunk.getAuraChunk(world, closestSpot).drainAura(closestSpot, 35); + IAuraChunk.getAuraChunk(world, closestSpot).drainAura(closestSpot, 3500); PacketHandler.sendToAllAround(world, plantPos, 32, new PacketParticles(plantPos.getX(), plantPos.getY(), plantPos.getZ(), 6)); diff --git a/src/main/java/de/ellpeck/naturesaura/chunk/effect/SpreadEffect.java b/src/main/java/de/ellpeck/naturesaura/chunk/effect/SpreadEffect.java index fafe2c72..28cce373 100644 --- a/src/main/java/de/ellpeck/naturesaura/chunk/effect/SpreadEffect.java +++ b/src/main/java/de/ellpeck/naturesaura/chunk/effect/SpreadEffect.java @@ -16,10 +16,10 @@ public class SpreadEffect implements IDrainSpotEffect { @Override public void update(World world, Chunk chunk, IAuraChunk auraChunk, BlockPos pos, Integer spot) { - if (Math.abs(spot) < 10000) + if (Math.abs(spot) < 1000000) return; boolean drain = spot > 0; - int toMove = 7200; + int toMove = 720000; while (toMove > 0) { BlockPos bestOffset = null; int bestAmount = drain ? Integer.MAX_VALUE : Integer.MIN_VALUE; @@ -42,10 +42,10 @@ public class SpreadEffect implements IDrainSpotEffect { int moved; if (drain) { - moved = bestChunk.storeAura(bestPos, 1200); + moved = bestChunk.storeAura(bestPos, 120000); auraChunk.drainAura(pos, moved); } else { - moved = bestChunk.drainAura(bestPos, 1200); + moved = bestChunk.drainAura(bestPos, 120000); auraChunk.storeAura(pos, moved); } toMove -= moved; diff --git a/src/main/java/de/ellpeck/naturesaura/entities/EntityMoverMinecart.java b/src/main/java/de/ellpeck/naturesaura/entities/EntityMoverMinecart.java index 45a529ee..d7967311 100644 --- a/src/main/java/de/ellpeck/naturesaura/entities/EntityMoverMinecart.java +++ b/src/main/java/de/ellpeck/naturesaura/entities/EntityMoverMinecart.java @@ -49,7 +49,7 @@ public class EntityMoverMinecart extends EntityMinecart { int amount = chunk.getDrainSpot(spot); if (amount <= 0) continue; - int toMove = Math.min(amount, 3000); + int toMove = Math.min(amount, 300000); int drained = chunk.drainAura(spot, toMove, false, false); if (drained <= 0) continue; diff --git a/src/main/java/de/ellpeck/naturesaura/events/ClientEvents.java b/src/main/java/de/ellpeck/naturesaura/events/ClientEvents.java index 303324f1..b61722d8 100644 --- a/src/main/java/de/ellpeck/naturesaura/events/ClientEvents.java +++ b/src/main/java/de/ellpeck/naturesaura/events/ClientEvents.java @@ -121,7 +121,7 @@ public class ClientEvents { if (block instanceof IGrowable || block instanceof IPlantable || block.isLeaves(state, mc.world, pos)) { int excess = IAuraChunk.triangulateAuraInArea(mc.world, pos, 45) - IAuraChunk.DEFAULT_AURA; if (excess > 0) { - int chance = Math.max(10, 50 - excess / 250); + int chance = Math.max(10, 50 - excess / 25000); if (mc.world.rand.nextInt(chance) <= 0) NaturesAuraAPI.instance().spawnMagicParticle( pos.getX() + mc.world.rand.nextFloat(), @@ -131,8 +131,8 @@ public class ClientEvents { mc.world.rand.nextFloat() * 0.025F, mc.world.rand.nextGaussian() * 0.01F, BiomeColorHelper.getFoliageColorAtPos(mc.world, pos), - Math.min(2F, 1F + mc.world.rand.nextFloat() * (excess / 300F)), - Math.min(300, 100 + mc.world.rand.nextInt(excess / 30 + 1)), + Math.min(2F, 1F + mc.world.rand.nextFloat() * (excess / 30000F)), + Math.min(300, 100 + mc.world.rand.nextInt(excess / 3000 + 1)), 0F, false, true); } } @@ -183,6 +183,7 @@ public class ClientEvents { GlStateManager.pushMatrix(); GlStateManager.translate((pos.getX() + 0.1) / scale, (pos.getY() + 1) / scale, (pos.getZ() + 0.1) / scale); GlStateManager.rotate(90F, 1F, 0F, 0F); + GlStateManager.scale(0.75F, 0.75F, 0.75F); mc.fontRenderer.drawString(spot.getValue().toString(), 0, 0, 0); GlStateManager.popMatrix(); } diff --git a/src/main/java/de/ellpeck/naturesaura/items/ItemAuraBottle.java b/src/main/java/de/ellpeck/naturesaura/items/ItemAuraBottle.java index eee31732..68a47bbd 100644 --- a/src/main/java/de/ellpeck/naturesaura/items/ItemAuraBottle.java +++ b/src/main/java/de/ellpeck/naturesaura/items/ItemAuraBottle.java @@ -49,7 +49,7 @@ public class ItemAuraBottle extends ItemImpl implements IColorProvidingItem { dispense = setType(new ItemStack(ItemAuraBottle.this), IAuraType.forWorld(world)); BlockPos spot = IAuraChunk.getHighestSpot(world, offset, 30, offset); - IAuraChunk.getAuraChunk(world, spot).drainAura(spot, 200); + IAuraChunk.getAuraChunk(world, spot).drainAura(spot, 20000); } } @@ -79,7 +79,7 @@ public class ItemAuraBottle extends ItemImpl implements IColorProvidingItem { setType(new ItemStack(this), IAuraType.forWorld(player.world))); BlockPos spot = IAuraChunk.getHighestSpot(player.world, pos, 30, pos); - IAuraChunk.getAuraChunk(player.world, spot).drainAura(spot, 200); + IAuraChunk.getAuraChunk(player.world, spot).drainAura(spot, 20000); player.world.playSound(null, player.posX, player.posY, player.posZ, SoundEvents.ITEM_BOTTLE_FILL_DRAGONBREATH, SoundCategory.PLAYERS, 1F, 1F); diff --git a/src/main/java/de/ellpeck/naturesaura/items/ItemAuraCache.java b/src/main/java/de/ellpeck/naturesaura/items/ItemAuraCache.java index 6f04ec1d..58587163 100644 --- a/src/main/java/de/ellpeck/naturesaura/items/ItemAuraCache.java +++ b/src/main/java/de/ellpeck/naturesaura/items/ItemAuraCache.java @@ -82,7 +82,7 @@ public class ItemAuraCache extends ItemImpl implements ITrinketItem { @Override public ICapabilityProvider initCapabilities(ItemStack stack, @Nullable NBTTagCompound nbt) { return new ICapabilityProvider() { - private final ItemAuraContainer container = new ItemAuraContainer(stack, null, 4000); + private final ItemAuraContainer container = new ItemAuraContainer(stack, null, 400000); @Override public boolean hasCapability(@Nonnull Capability capability, @Nullable EnumFacing facing) { diff --git a/src/main/java/de/ellpeck/naturesaura/items/ItemBirthSpirit.java b/src/main/java/de/ellpeck/naturesaura/items/ItemBirthSpirit.java index a09e3f7e..78eaaf29 100644 --- a/src/main/java/de/ellpeck/naturesaura/items/ItemBirthSpirit.java +++ b/src/main/java/de/ellpeck/naturesaura/items/ItemBirthSpirit.java @@ -30,7 +30,7 @@ public class ItemBirthSpirit extends ItemGlowing { parent.world.spawnEntity(item); BlockPos spot = IAuraChunk.getHighestSpot(parent.world, pos, 30, pos); - IAuraChunk.getAuraChunk(parent.world, spot).drainAura(spot, 50 * amount); + IAuraChunk.getAuraChunk(parent.world, spot).drainAura(spot, 800 * amount); } } } diff --git a/src/main/java/de/ellpeck/naturesaura/items/ItemColorChanger.java b/src/main/java/de/ellpeck/naturesaura/items/ItemColorChanger.java index b970d468..84f3d60d 100644 --- a/src/main/java/de/ellpeck/naturesaura/items/ItemColorChanger.java +++ b/src/main/java/de/ellpeck/naturesaura/items/ItemColorChanger.java @@ -57,7 +57,7 @@ public class ItemColorChanger extends ItemImpl implements IColorProvidingItem { } } else { if (stored != null && stored != color) { - if (NaturesAuraAPI.instance().extractAuraFromPlayer(player, 10, world.isRemote)) { + if (NaturesAuraAPI.instance().extractAuraFromPlayer(player, 1000, world.isRemote)) { if (firstColor == null) { world.playSound(player, pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, SoundEvents.ITEM_BUCKET_EMPTY, SoundCategory.PLAYERS, 0.65F, 1F); diff --git a/src/main/java/de/ellpeck/naturesaura/items/ItemShockwaveCreator.java b/src/main/java/de/ellpeck/naturesaura/items/ItemShockwaveCreator.java index f25b8861..59a90a1e 100644 --- a/src/main/java/de/ellpeck/naturesaura/items/ItemShockwaveCreator.java +++ b/src/main/java/de/ellpeck/naturesaura/items/ItemShockwaveCreator.java @@ -73,7 +73,7 @@ public class ItemShockwaveCreator extends ItemImpl implements ITrinketItem { return; if (living.getDistanceSq(compound.getDouble("x"), compound.getDouble("y"), compound.getDouble("z")) > 0.75F) return; - if (living instanceof EntityPlayer && !NaturesAuraAPI.instance().extractAuraFromPlayer((EntityPlayer) living, 10, false)) + if (living instanceof EntityPlayer && !NaturesAuraAPI.instance().extractAuraFromPlayer((EntityPlayer) living, 1000, false)) return; DamageSource source; @@ -92,7 +92,7 @@ public class ItemShockwaveCreator extends ItemImpl implements ITrinketItem { continue; if (living.getDistanceSq(mob) > range * range) continue; - if (living instanceof EntityPlayer && !NaturesAuraAPI.instance().extractAuraFromPlayer((EntityPlayer) living, 5, false)) + if (living instanceof EntityPlayer && !NaturesAuraAPI.instance().extractAuraFromPlayer((EntityPlayer) living, 500, false)) break; mob.attackEntityFrom(source, 4F); diff --git a/src/main/java/de/ellpeck/naturesaura/particles/ParticleMagic.java b/src/main/java/de/ellpeck/naturesaura/particles/ParticleMagic.java index 55e2b5f1..cd925247 100644 --- a/src/main/java/de/ellpeck/naturesaura/particles/ParticleMagic.java +++ b/src/main/java/de/ellpeck/naturesaura/particles/ParticleMagic.java @@ -54,14 +54,13 @@ public class ParticleMagic extends Particle { this.motionY -= 0.04D * (double) this.particleGravity; this.move(this.motionX, this.motionY, this.motionZ); - if (this.fade) { - float lifeRatio = (float) this.particleAge / (float) this.particleMaxAge; + float lifeRatio = (float) this.particleAge / (float) this.particleMaxAge; + if (this.fade) this.particleAlpha = 1F - lifeRatio * 0.75F; - if (lifeRatio <= 0.25F) - this.particleScale = this.desiredScale * (lifeRatio / 0.25F); - else - this.particleScale = this.desiredScale * (1F - (lifeRatio - 0.25F) / 0.75F); - } + if (lifeRatio <= 0.25F) + this.particleScale = this.desiredScale * (lifeRatio / 0.25F); + else if (this.fade) + this.particleScale = this.desiredScale * (1F - (lifeRatio - 0.25F) / 0.75F); } } diff --git a/src/main/java/de/ellpeck/naturesaura/recipes/ModRecipes.java b/src/main/java/de/ellpeck/naturesaura/recipes/ModRecipes.java index 0e814c74..ab03c1e9 100644 --- a/src/main/java/de/ellpeck/naturesaura/recipes/ModRecipes.java +++ b/src/main/java/de/ellpeck/naturesaura/recipes/ModRecipes.java @@ -112,48 +112,48 @@ public final class ModRecipes { new AltarRecipe(new ResourceLocation(NaturesAura.MOD_ID, "infused_iron"), Ingredient.fromItem(Items.IRON_INGOT), new ItemStack(ModItems.INFUSED_IRON), - Ingredient.EMPTY, 150, 80).register(); + Ingredient.EMPTY, 15000, 80).register(); new AltarRecipe(new ResourceLocation(NaturesAura.MOD_ID, "infused_iron_block"), Helper.blockIng(Blocks.IRON_BLOCK), new ItemStack(ModBlocks.INFUSED_IRON), - Ingredient.EMPTY, 1350, 700).register(); + Ingredient.EMPTY, 135000, 700).register(); new AltarRecipe(new ResourceLocation(NaturesAura.MOD_ID, "infused_stone"), Helper.blockIng(Blocks.STONE), new ItemStack(ModBlocks.INFUSED_STONE), - Ingredient.EMPTY, 75, 40).register(); + Ingredient.EMPTY, 7500, 40).register(); Ingredient conversion = Helper.blockIng(ModBlocks.CONVERSION_CATALYST); new AltarRecipe(new ResourceLocation(NaturesAura.MOD_ID, "breath"), new NBTIngredient(ItemAuraBottle.setType(new ItemStack(ModItems.AURA_BOTTLE), NaturesAuraAPI.TYPE_END)), new ItemStack(Items.DRAGON_BREATH), - conversion, 200, 80).register(); + conversion, 20000, 80).register(); new AltarRecipe(new ResourceLocation(NaturesAura.MOD_ID, "leather"), Ingredient.fromItem(Items.ROTTEN_FLESH), new ItemStack(Items.LEATHER), - conversion, 100, 50).register(); + conversion, 10000, 50).register(); new AltarRecipe(new ResourceLocation(NaturesAura.MOD_ID, "soul_sand"), Helper.blockIng(Blocks.SAND), new ItemStack(Blocks.SOUL_SAND), - conversion, 50, 100).register(); + conversion, 5000, 100).register(); new AltarRecipe(new ResourceLocation(NaturesAura.MOD_ID, "nether_wart"), Helper.blockIng(Blocks.RED_MUSHROOM), new ItemStack(Items.NETHER_WART), - conversion, 300, 250).register(); + conversion, 30000, 250).register(); new AltarRecipe(new ResourceLocation(NaturesAura.MOD_ID, "prismarine"), Ingredient.fromItem(Items.QUARTZ), new ItemStack(Items.PRISMARINE_SHARD), - conversion, 550, 200).register(); + conversion, 55000, 200).register(); Ingredient crushing = Helper.blockIng(ModBlocks.CRUSHING_CATALYST); new AltarRecipe(new ResourceLocation(NaturesAura.MOD_ID, "bone"), Ingredient.fromItem(Items.BONE), new ItemStack(Items.DYE, 6, 15), - crushing, 30, 40).register(); + crushing, 3000, 40).register(); new AltarRecipe(new ResourceLocation(NaturesAura.MOD_ID, "sugar"), Ingredient.fromItem(Items.REEDS), new ItemStack(Items.SUGAR, 3), - crushing, 30, 40).register(); + crushing, 3000, 40).register(); new AltarRecipe(new ResourceLocation(NaturesAura.MOD_ID, "blaze"), Ingredient.fromItem(Items.BLAZE_ROD), new ItemStack(Items.BLAZE_POWDER, 4), - crushing, 50, 60).register(); + crushing, 5000, 60).register(); new AltarRecipe(new ResourceLocation(NaturesAura.MOD_ID, "glowstone"), Helper.blockIng(Blocks.GLOWSTONE), new ItemStack(Items.GLOWSTONE_DUST, 4), - crushing, 30, 40).register(); + crushing, 3000, 40).register(); new AltarRecipe(new ResourceLocation(NaturesAura.MOD_ID, "sand"), Helper.blockIng(Blocks.COBBLESTONE), new ItemStack(Blocks.SAND), - crushing, 30, 40).register(); + crushing, 3000, 40).register(); new OfferingRecipe(new ResourceLocation(NaturesAura.MOD_ID, "sky_ingot"), new AmountIngredient(new ItemStack(ModItems.INFUSED_IRON, 3)), @@ -171,7 +171,7 @@ public final class ModRecipes { if (block instanceof BlockFlower) NaturesAuraAPI.FLOWERS.addAll(block.getBlockState().getValidStates()); - spawner("cow", "minecraft:cow", 500, 60, Ingredient.fromItem(Items.BEEF), Ingredient.fromItem(Items.LEATHER)); + spawner("cow", "minecraft:cow", 50000, 60, Ingredient.fromItem(Items.BEEF), Ingredient.fromItem(Items.LEATHER)); for (EnumDyeColor color : EnumDyeColor.values()) new AnimalSpawnerRecipe(new ResourceLocation(NaturesAura.MOD_ID, "sheep_" + color.getName()), new ResourceLocation("minecraft:sheep"), 500, 60, Ingredient.fromItem(ModItems.BIRTH_SPIRIT), Ingredient.fromItem(Items.MUTTON), @@ -183,39 +183,39 @@ public final class ModRecipes { return sheep; } }.register(); - spawner("chicken", "minecraft:chicken", 300, 40, Ingredient.fromItem(Items.FEATHER), Ingredient.fromItem(Items.EGG)); - spawner("pig", "minecraft:pig", 500, 60, Ingredient.fromItem(Items.PORKCHOP)); - spawner("blaze", "minecraft:blaze", 1500, 120, Ingredient.fromItem(Items.BLAZE_ROD), Ingredient.fromItem(Items.BLAZE_POWDER)); - spawner("ghast", "minecraft:ghast", 1200, 150, Ingredient.fromItem(Items.GUNPOWDER), Ingredient.fromItem(Items.GHAST_TEAR)); - spawner("ocelot", "minecraft:ocelot", 800, 60, Ingredient.fromItem(Items.FISH), Helper.blockIng(Blocks.WOOL)); - spawner("mule", "minecraft:mule", 1000, 100, Ingredient.fromItem(Items.LEATHER), Helper.blockIng(Blocks.CHEST), Ingredient.fromItem(Items.APPLE)); - spawner("bat", "minecraft:bat", 300, 40, Ingredient.fromItem(Items.FEATHER)); - spawner("endermite", "minecraft:endermite", 300, 40, Ingredient.fromItem(Items.ENDER_PEARL), Helper.blockIng(Blocks.STONE)); - spawner("parrot", "minecraft:parrot", 500, 60, Ingredient.fromItem(Items.FEATHER), Ingredient.fromItem(Items.COOKIE)); - spawner("slime", "minecraft:slime", 300, 40, Ingredient.fromItem(Items.SLIME_BALL)); - spawner("spider", "minecraft:spider", 1000, 120, Ingredient.fromItem(Items.STRING), Ingredient.fromItem(Items.SPIDER_EYE)); - spawner("skeleton", "minecraft:skeleton", 1000, 120, Ingredient.fromItem(Items.BONE), Ingredient.fromItem(Items.ARROW)); - spawner("enderman", "minecraft:enderman", 1200, 120, Ingredient.fromItem(Items.ENDER_PEARL)); - spawner("silverfish", "minecraft:silverfish", 300, 40, Helper.blockIng(Blocks.STONE)); - spawner("squid", "minecraft:squid", 500, 40, Ingredient.fromStacks(new ItemStack(Items.DYE, 1, EnumDyeColor.BLACK.getDyeDamage()))); - spawner("stray", "minecraft:stray", 1000, 120, Ingredient.fromItem(Items.BONE), Helper.blockIng(Blocks.ICE)); - spawner("shulker", "minecraft:shulker", 1500, 100, Ingredient.fromItem(Items.SHULKER_SHELL)); - spawner("husk", "minecraft:husk", 1000, 120, Ingredient.fromItem(Items.ROTTEN_FLESH), Helper.blockIng(Blocks.SAND)); - spawner("llama", "minecraft:llama", 600, 80, Ingredient.fromStacks(new ItemStack(Blocks.WOOL, 1, OreDictionary.WILDCARD_VALUE))); - spawner("rabbit", "minecraft:rabbit", 300, 40, Ingredient.fromItem(Items.RABBIT_HIDE)); - spawner("magma_cube", "minecraft:magma_cube", 1000, 100, Ingredient.fromItem(Items.MAGMA_CREAM)); - spawner("zombie_pigman", "minecraft:zombie_pigman", 1200, 150, Ingredient.fromItem(Items.ROTTEN_FLESH), Ingredient.fromItem(Items.GOLD_NUGGET)); - spawner("polar_bear", "minecraft:polar_bear", 500, 60, Ingredient.fromItem(Items.FISH), Helper.blockIng(Blocks.ICE)); - spawner("mooshroom", "minecraft:mooshroom", 400, 60, Ingredient.fromItem(Items.LEATHER), Helper.blockIng(Blocks.RED_MUSHROOM)); - spawner("guardian", "minecraft:guardian", 1500, 150, Ingredient.fromItem(Items.PRISMARINE_SHARD), Ingredient.fromItem(Items.PRISMARINE_CRYSTALS)); - spawner("horse", "minecraft:horse", 1000, 100, Ingredient.fromItem(Items.LEATHER)); - spawner("donkey", "minecraft:donkey", 1000, 100, Ingredient.fromItem(Items.LEATHER), Helper.blockIng(Blocks.CHEST)); - spawner("cave_spider", "minecraft:cave_spider", 1000, 120, Ingredient.fromItem(Items.STRING), Ingredient.fromItem(Items.FERMENTED_SPIDER_EYE)); - spawner("creeper", "minecraft:creeper", 1000, 120, Ingredient.fromItem(Items.GUNPOWDER)); - spawner("witch", "minecraft:witch", 1500, 150, Ingredient.fromItem(Items.GLASS_BOTTLE), Ingredient.fromItem(Items.GLOWSTONE_DUST)); - spawner("wither_skeleton", "minecraft:wither_skeleton", 1500, 150, Ingredient.fromItem(Items.BONE), Helper.blockIng(Blocks.OBSIDIAN)); - spawner("wolf", "minecraft:wolf", 500, 60, Ingredient.fromItem(Items.LEATHER), Ingredient.fromItem(Items.BONE)); - spawner("zombie", "minecraft:zombie", 1000, 100, Ingredient.fromItem(Items.ROTTEN_FLESH)); + spawner("chicken", "minecraft:chicken", 30000, 40, Ingredient.fromItem(Items.FEATHER), Ingredient.fromItem(Items.EGG)); + spawner("pig", "minecraft:pig", 50000, 60, Ingredient.fromItem(Items.PORKCHOP)); + spawner("blaze", "minecraft:blaze", 150000, 120, Ingredient.fromItem(Items.BLAZE_ROD), Ingredient.fromItem(Items.BLAZE_POWDER)); + spawner("ghast", "minecraft:ghast", 120000, 150, Ingredient.fromItem(Items.GUNPOWDER), Ingredient.fromItem(Items.GHAST_TEAR)); + spawner("ocelot", "minecraft:ocelot", 80000, 60, Ingredient.fromItem(Items.FISH), Helper.blockIng(Blocks.WOOL)); + spawner("mule", "minecraft:mule", 100000, 100, Ingredient.fromItem(Items.LEATHER), Helper.blockIng(Blocks.CHEST), Ingredient.fromItem(Items.APPLE)); + spawner("bat", "minecraft:bat", 30000, 40, Ingredient.fromItem(Items.FEATHER)); + spawner("endermite", "minecraft:endermite", 30000, 40, Ingredient.fromItem(Items.ENDER_PEARL), Helper.blockIng(Blocks.STONE)); + spawner("parrot", "minecraft:parrot", 50000, 60, Ingredient.fromItem(Items.FEATHER), Ingredient.fromItem(Items.COOKIE)); + spawner("slime", "minecraft:slime", 30000, 40, Ingredient.fromItem(Items.SLIME_BALL)); + spawner("spider", "minecraft:spider", 100000, 120, Ingredient.fromItem(Items.STRING), Ingredient.fromItem(Items.SPIDER_EYE)); + spawner("skeleton", "minecraft:skeleton", 100000, 120, Ingredient.fromItem(Items.BONE), Ingredient.fromItem(Items.ARROW)); + spawner("enderman", "minecraft:enderman", 120000, 120, Ingredient.fromItem(Items.ENDER_PEARL)); + spawner("silverfish", "minecraft:silverfish", 30000, 40, Helper.blockIng(Blocks.STONE)); + spawner("squid", "minecraft:squid", 50000, 40, Ingredient.fromStacks(new ItemStack(Items.DYE, 1, EnumDyeColor.BLACK.getDyeDamage()))); + spawner("stray", "minecraft:stray", 100000, 120, Ingredient.fromItem(Items.BONE), Helper.blockIng(Blocks.ICE)); + spawner("shulker", "minecraft:shulker", 150000, 100, Ingredient.fromItem(Items.SHULKER_SHELL)); + spawner("husk", "minecraft:husk", 100000, 120, Ingredient.fromItem(Items.ROTTEN_FLESH), Helper.blockIng(Blocks.SAND)); + spawner("llama", "minecraft:llama", 60000, 80, Ingredient.fromStacks(new ItemStack(Blocks.WOOL, 1, OreDictionary.WILDCARD_VALUE))); + spawner("rabbit", "minecraft:rabbit", 30000, 40, Ingredient.fromItem(Items.RABBIT_HIDE)); + spawner("magma_cube", "minecraft:magma_cube", 100000, 100, Ingredient.fromItem(Items.MAGMA_CREAM)); + spawner("zombie_pigman", "minecraft:zombie_pigman", 120000, 150, Ingredient.fromItem(Items.ROTTEN_FLESH), Ingredient.fromItem(Items.GOLD_NUGGET)); + spawner("polar_bear", "minecraft:polar_bear", 50000, 60, Ingredient.fromItem(Items.FISH), Helper.blockIng(Blocks.ICE)); + spawner("mooshroom", "minecraft:mooshroom", 40000, 60, Ingredient.fromItem(Items.LEATHER), Helper.blockIng(Blocks.RED_MUSHROOM)); + spawner("guardian", "minecraft:guardian", 150000, 150, Ingredient.fromItem(Items.PRISMARINE_SHARD), Ingredient.fromItem(Items.PRISMARINE_CRYSTALS)); + spawner("horse", "minecraft:horse", 100000, 100, Ingredient.fromItem(Items.LEATHER)); + spawner("donkey", "minecraft:donkey", 100000, 100, Ingredient.fromItem(Items.LEATHER), Helper.blockIng(Blocks.CHEST)); + spawner("cave_spider", "minecraft:cave_spider", 100000, 120, Ingredient.fromItem(Items.STRING), Ingredient.fromItem(Items.FERMENTED_SPIDER_EYE)); + spawner("creeper", "minecraft:creeper", 100000, 120, Ingredient.fromItem(Items.GUNPOWDER)); + spawner("witch", "minecraft:witch", 150000, 150, Ingredient.fromItem(Items.GLASS_BOTTLE), Ingredient.fromItem(Items.GLOWSTONE_DUST)); + spawner("wither_skeleton", "minecraft:wither_skeleton", 150000, 150, Ingredient.fromItem(Items.BONE), Helper.blockIng(Blocks.OBSIDIAN)); + spawner("wolf", "minecraft:wolf", 50000, 60, Ingredient.fromItem(Items.LEATHER), Ingredient.fromItem(Items.BONE)); + spawner("zombie", "minecraft:zombie", 100000, 100, Ingredient.fromItem(Items.ROTTEN_FLESH)); } private static void spawner(String name, String entity, int aura, int time, Ingredient... ings) {