diff --git a/LATEST_CHANGES.MD b/LATEST_CHANGES.MD index b8dcab228..a6a0af12f 100644 --- a/LATEST_CHANGES.MD +++ b/LATEST_CHANGES.MD @@ -20,6 +20,7 @@ - Teleport range now scales with a softcap - Aoe Fields now fit to the ground better - Overhauled Ancient Battlegrounds origin structure piece +- Separated Fire Particle from Fire Emitter Particle, and now use fire particle is various contexts ### Fixes - Fixed Priest's Villager Bible trade diff --git a/src/main/java/io/redspace/ironsspellbooks/entity/spells/fire_breath/FireBreathProjectile.java b/src/main/java/io/redspace/ironsspellbooks/entity/spells/fire_breath/FireBreathProjectile.java index 7fbe4b475..c6a03bd7a 100644 --- a/src/main/java/io/redspace/ironsspellbooks/entity/spells/fire_breath/FireBreathProjectile.java +++ b/src/main/java/io/redspace/ironsspellbooks/entity/spells/fire_breath/FireBreathProjectile.java @@ -79,7 +79,7 @@ public void spawnParticles() { double angularness = .5; Vec3 randomVec = new Vec3(Math.random() * 2 * angularness - angularness, Math.random() * 2 * angularness - angularness, Math.random() * 2 * angularness - angularness).normalize(); Vec3 result = (rotation.scale(3).add(randomVec)).normalize().scale(speed); - level.addParticle(ParticleHelper.FIRE, x + ox, y + oy, z + oz, result.x, result.y, result.z); + level.addParticle(ParticleHelper.FIRE_EMITTER, x + ox, y + oy, z + oz, result.x, result.y, result.z); } } diff --git a/src/main/java/io/redspace/ironsspellbooks/entity/spells/magma_ball/FireField.java b/src/main/java/io/redspace/ironsspellbooks/entity/spells/magma_ball/FireField.java index 81fe69d95..dca0d95a5 100644 --- a/src/main/java/io/redspace/ironsspellbooks/entity/spells/magma_ball/FireField.java +++ b/src/main/java/io/redspace/ironsspellbooks/entity/spells/magma_ball/FireField.java @@ -38,7 +38,7 @@ public void applyEffect(LivingEntity target) { @Override public float getParticleCount() { - return 0.7f * getRadius(); + return 0.9f * getRadius(); } @Override diff --git a/src/main/java/io/redspace/ironsspellbooks/entity/spells/wall_of_fire/WallOfFireEntity.java b/src/main/java/io/redspace/ironsspellbooks/entity/spells/wall_of_fire/WallOfFireEntity.java index 37dc8e2f3..fc9470632 100644 --- a/src/main/java/io/redspace/ironsspellbooks/entity/spells/wall_of_fire/WallOfFireEntity.java +++ b/src/main/java/io/redspace/ironsspellbooks/entity/spells/wall_of_fire/WallOfFireEntity.java @@ -77,9 +77,10 @@ public void tick() { subEntity.yOld = pos.y; subEntity.zOld = pos.z; if (level.isClientSide && i < subEntitiesLength - 1) { - for (int j = 0; j < 1; j++) { + int count = this.random.nextIntBetweenInclusive(1,2); + for (int j = 0; j < count; j++) { Vec3 offset = partPositions.get(i + 1).subtract(pos).scale(Utils.random.nextFloat()).add(Utils.getRandomVec3(.1)); - level.addParticle(ParticleHelper.FIRE, pos.x + offset.x, pos.y + Utils.random.nextFloat() * .25, pos.z + offset.z, 0, Math.random() * .3, 0); + level.addParticle(ParticleHelper.FIRE, pos.x + offset.x, pos.y + Utils.random.nextFloat() * .25 + .1, pos.z + offset.z, 0, Math.random() * .25 + 0.05, 0); } } else { for (LivingEntity livingentity : this.level.getEntitiesOfClass(LivingEntity.class, subEntity.getBoundingBox().inflate(0.2D, 0.0D, 0.2D))) { diff --git a/src/main/java/io/redspace/ironsspellbooks/particle/DragonFireParticle.java b/src/main/java/io/redspace/ironsspellbooks/particle/DragonFireParticle.java index 4a415f6b2..f0b899304 100644 --- a/src/main/java/io/redspace/ironsspellbooks/particle/DragonFireParticle.java +++ b/src/main/java/io/redspace/ironsspellbooks/particle/DragonFireParticle.java @@ -2,13 +2,13 @@ import net.minecraft.client.multiplayer.ClientLevel; import net.minecraft.client.particle.*; -import net.minecraft.core.particles.ParticleTypes; import net.minecraft.core.particles.SimpleParticleType; import net.neoforged.api.distmarker.Dist; import net.neoforged.api.distmarker.OnlyIn; public class DragonFireParticle extends TextureSheetParticle { private final SpriteSet sprites; + private final boolean mirrored; public DragonFireParticle(ClientLevel level, double xCoord, double yCoord, double zCoord, SpriteSet spriteSet, double xd, double yd, double zd) { @@ -19,12 +19,11 @@ public DragonFireParticle(ClientLevel level, double xCoord, double yCoord, doubl this.yd = yd; this.zd = zd; this.scale(this.random.nextFloat() * 1.75f + 1f); - this.lifetime = 5 + (int) (Math.random() * 20); + this.lifetime = 10 + (int) (Math.random() * 10); sprites = spriteSet; this.setSpriteFromAge(spriteSet); this.gravity = -0.015F; - - + this.mirrored = this.random.nextBoolean(); } @Override @@ -34,9 +33,19 @@ public void tick() { this.yd += this.random.nextFloat() / 100.0F; this.zd += this.random.nextFloat() / 500.0F * (float) (this.random.nextBoolean() ? 1 : -1); this.setSpriteFromAge(this.sprites); - if (age > lifetime * .5f && this.random.nextFloat() <= .35f) { - this.level.addParticle(ParticleTypes.SMOKE, this.x, this.y, this.z, this.xd, this.yd, this.zd); - } +// if (age > lifetime * .5f && this.random.nextFloat() <= .35f) { +// this.level.addParticle(ParticleTypes.SMOKE, this.x, this.y, this.z, this.xd, this.yd, this.zd); +// } + } + + @Override + protected float getU0() { + return mirrored ? super.getU1() : super.getU0(); + } + + @Override + protected float getU1() { + return mirrored ? super.getU0() : super.getU1(); } @Override diff --git a/src/main/java/io/redspace/ironsspellbooks/util/ParticleHelper.java b/src/main/java/io/redspace/ironsspellbooks/util/ParticleHelper.java index b38513571..b3f150834 100644 --- a/src/main/java/io/redspace/ironsspellbooks/util/ParticleHelper.java +++ b/src/main/java/io/redspace/ironsspellbooks/util/ParticleHelper.java @@ -8,7 +8,8 @@ public class ParticleHelper { //public static final ParticleOptions DRAGON_FIRE = ParticleRegistry.DRAGON_FIRE_PARTICLE.get(); - public static final ParticleOptions FIRE = ParticleRegistry.FIRE_PARTICLE.get(); + public static final ParticleOptions FIRE = ParticleRegistry.DRAGON_FIRE_PARTICLE.get(); + public static final ParticleOptions FIRE_EMITTER = ParticleRegistry.FIRE_PARTICLE.get(); public static final ParticleOptions BLOOD = ParticleRegistry.BLOOD_PARTICLE.get(); public static final ParticleOptions WISP = ParticleRegistry.WISP_PARTICLE.get(); public static final ParticleOptions BLOOD_GROUND = ParticleRegistry.BLOOD_GROUND_PARTICLE.get();