mirror of
https://github.com/Ellpeck/NaturesAura.git
synced 2024-11-22 19:58:34 +01:00
removed a lot of machine caps and fixed a graphical issue
This commit is contained in:
parent
cd5b98d68f
commit
6266d54aba
6 changed files with 21 additions and 30 deletions
|
@ -11,7 +11,7 @@ public class TileEntityAuraDetector extends TileEntityImpl implements ITickable
|
|||
|
||||
@Override
|
||||
public void update() {
|
||||
if (!this.world.isRemote && this.world.getTotalWorldTime() % 80 == 0) {
|
||||
if (!this.world.isRemote && this.world.getTotalWorldTime() % 20 == 0) {
|
||||
MutableFloat totalAmount = new MutableFloat(IAuraChunk.DEFAULT_AURA);
|
||||
IAuraChunk.getSpotsInArea(this.world, this.pos, 25, (pos, spot) -> {
|
||||
float percentage = 1F - (float) this.pos.getDistance(pos.getX(), pos.getY(), pos.getZ()) / 25F;
|
||||
|
|
|
@ -51,7 +51,7 @@ public class TileEntityFlowerGenerator extends TileEntityImpl implements ITickab
|
|||
int addAmount = 200;
|
||||
int toAdd = Math.max(0, addAmount - curr.getValue());
|
||||
if (toAdd > 0) {
|
||||
if (NaturesAuraAPI.TYPE_OVERWORLD.isPresentInWorld(this.world) && IAuraChunk.getAuraInArea(this.world, this.pos, 35) < 20000) {
|
||||
if (NaturesAuraAPI.TYPE_OVERWORLD.isPresentInWorld(this.world)) {
|
||||
int remain = toAdd;
|
||||
while (remain > 0) {
|
||||
BlockPos spot = IAuraChunk.getLowestSpot(this.world, this.pos, 30, this.pos);
|
||||
|
|
|
@ -40,20 +40,15 @@ public class TileEntityPotionGenerator extends TileEntityImpl implements ITickab
|
|||
continue;
|
||||
}
|
||||
|
||||
boolean disperseParticles;
|
||||
if (IAuraChunk.getAuraInArea(this.world, this.pos, 35) < 20000) {
|
||||
int toAdd = ((effect.getAmplifier() * 6 + 1) * (effect.getDuration() / 30));
|
||||
while (toAdd > 0) {
|
||||
BlockPos spot = IAuraChunk.getLowestSpot(this.world, this.pos, 30, this.pos);
|
||||
toAdd -= IAuraChunk.getAuraChunk(this.world, spot).storeAura(spot, toAdd);
|
||||
}
|
||||
disperseParticles = true;
|
||||
} else
|
||||
disperseParticles = false;
|
||||
int toAdd = ((effect.getAmplifier() * 6 + 1) * (effect.getDuration() / 30));
|
||||
while (toAdd > 0) {
|
||||
BlockPos spot = IAuraChunk.getLowestSpot(this.world, this.pos, 30, this.pos);
|
||||
toAdd -= IAuraChunk.getAuraChunk(this.world, spot).storeAura(spot, toAdd);
|
||||
}
|
||||
|
||||
PacketHandler.sendToAllAround(this.world, this.pos, 32, new PacketParticles(
|
||||
this.pos.getX(), this.pos.getY(), this.pos.getZ(), 5,
|
||||
PotionUtils.getPotionColor(type), disperseParticles ? 1 : 0));
|
||||
PotionUtils.getPotionColor(type)));
|
||||
|
||||
addedOne = true;
|
||||
break;
|
||||
|
|
|
@ -104,7 +104,6 @@ public class ClientEvents {
|
|||
if (mc.gameSettings.showDebugInfo && mc.player.capabilities.isCreativeMode && ModConfig.client.debugWorld) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glDisable(GL11.GL_DEPTH_TEST);
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
float partial = event.getPartialTicks();
|
||||
GL11.glTranslated(
|
||||
-mc.player.prevPosX - (mc.player.posX - mc.player.prevPosX) * partial,
|
||||
|
@ -121,7 +120,7 @@ public class ClientEvents {
|
|||
IAuraChunk.getSpotsInArea(mc.world, mc.player.getPosition(), 64, (pos, spot) -> {
|
||||
spots.put(pos, spot);
|
||||
|
||||
GlStateManager.color(spot > 0 ? 0F : 1F, spot > 0 ? 1F : 0F, 0F, 0.5F);
|
||||
GlStateManager.color(spot > 0 ? 0F : 1F, spot > 0 ? 1F : 0F, 0F, 0.35F);
|
||||
int x = pos.getX();
|
||||
int y = pos.getY();
|
||||
int z = pos.getZ();
|
||||
|
@ -169,7 +168,6 @@ public class ClientEvents {
|
|||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glEnable(GL11.GL_DEPTH_TEST);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
mc.profiler.endSection();
|
||||
|
|
|
@ -123,7 +123,6 @@ public class PacketParticles implements IMessage {
|
|||
break;
|
||||
case 5: // Potion generator
|
||||
int color = message.data[0];
|
||||
boolean disperse = message.data[1] > 0;
|
||||
for (int i = world.rand.nextInt(5) + 5; i >= 0; i--) {
|
||||
NaturesAuraAPI.instance().spawnMagicParticle(
|
||||
message.posX + world.rand.nextFloat(),
|
||||
|
@ -132,18 +131,17 @@ public class PacketParticles implements IMessage {
|
|||
world.rand.nextGaussian() * 0.01F, world.rand.nextFloat() * 0.1F, world.rand.nextGaussian() * 0.01F,
|
||||
color, 2F + world.rand.nextFloat(), 40, 0F, true, true);
|
||||
|
||||
if (disperse)
|
||||
for (int x = -1; x <= 1; x += 2)
|
||||
for (int z = -1; z <= 1; z += 2) {
|
||||
NaturesAuraAPI.instance().spawnMagicParticle(
|
||||
message.posX + x * 3 + 0.5F,
|
||||
message.posY + 2.5,
|
||||
message.posZ + z * 3 + 0.5F,
|
||||
world.rand.nextGaussian() * 0.02F,
|
||||
world.rand.nextFloat() * 0.04F,
|
||||
world.rand.nextGaussian() * 0.02F,
|
||||
0xd6340c, 1F + world.rand.nextFloat() * 2F, 75, 0F, true, true);
|
||||
}
|
||||
for (int x = -1; x <= 1; x += 2)
|
||||
for (int z = -1; z <= 1; z += 2) {
|
||||
NaturesAuraAPI.instance().spawnMagicParticle(
|
||||
message.posX + x * 3 + 0.5F,
|
||||
message.posY + 2.5,
|
||||
message.posZ + z * 3 + 0.5F,
|
||||
world.rand.nextGaussian() * 0.02F,
|
||||
world.rand.nextFloat() * 0.04F,
|
||||
world.rand.nextGaussian() * 0.02F,
|
||||
0xd6340c, 1F + world.rand.nextFloat() * 2F, 75, 0F, true, true);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 6: // Plant boost effect
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
},
|
||||
{
|
||||
"type": "text",
|
||||
"text": "Then, throwing any kind of positive, lasting $(item)Lingering Potion$() down in its vicinity will cause the effect to be consumed and turned into $(aura). Needless to say, the longer and higher the effect, the more $(aura) gets created.$(br)Notice that, however, only one effect can be converted at one time, and throwing multiple potions at the ritual will cause their powers to go to waste. Additionally, once there is enough $(aura) in the area, additional potion effects will similarly go to waste."
|
||||
"text": "Then, throwing any kind of positive, lasting $(item)Lingering Potion$() down in its vicinity will cause the effect to be consumed and turned into $(aura). Needless to say, the longer and higher the effect, the more $(aura) gets created.$(br)Notice that, however, only one effect can be converted at one time, and throwing multiple potions at the ritual will cause their powers to go to waste."
|
||||
},
|
||||
{
|
||||
"type": "multiblock",
|
||||
|
|
Loading…
Reference in a new issue