Skip to content

Commit

Permalink
fix: Fixed the particles of Fire Golemancy
Browse files Browse the repository at this point in the history
  • Loading branch information
WinDanesz committed Jan 28, 2023
1 parent 94ef7db commit 63668d1
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 36 deletions.
31 changes: 13 additions & 18 deletions src/main/java/com/windanesz/wizardrygolems/spell/FireGolemancy.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import com.windanesz.wizardrygolems.entity.living.EntityMagmaGolemMinion;
import com.windanesz.wizardrygolems.entity.living.EntityNetherBrickGolemMinion;
import com.windanesz.wizardrygolems.registry.WizardryGolemsItems;
import electroblob.wizardry.client.DrawingUtils;
import electroblob.wizardry.constants.Element;
import electroblob.wizardry.constants.Tier;
import electroblob.wizardry.entity.living.ISummonedCreature;
Expand Down Expand Up @@ -118,27 +117,23 @@ protected boolean spawnGolems(World world, EnumHand hand, EntityLivingBase caste

public void spawnDefaultParticles(World world, EntityLivingBase caster) {
if (world.isRemote) {
for (int i = 0; i < 30; i++) {
for (int i = 0; i < 10; i++) {
float r = world.rand.nextFloat();
double speed = 0.02 / r * (1 + world.rand.nextDouble());//(world.rand.nextBoolean() ? 1 : -1) * (0.05 + 0.02 * world.rand.nextDouble());
ParticleBuilder.create(ParticleBuilder.Type.MAGIC_FIRE)
.entity(caster)
.pos(caster.posX, caster.posY + world.rand.nextDouble() * 2, caster.posY)
.vel(0, 0, 0)
.scale(2)
.time(40 + world.rand.nextInt(10))
.spin(world.rand.nextDouble() * 0.5, speed)
double speed = 0.02 / r * (1 + world.rand.nextDouble());
ParticleBuilder.create(ParticleBuilder.Type.CLOUD)
.pos(caster.posX, caster.posY + 1, caster.posZ)
.clr(235, 150, 52)
.spin(r * (5 - 1) + 0.5, speed)
.time(20)
.spawn(world);
}

for (int i = 0; i < 20; i++) {
for (int i = 0; i < 30; i++) {
float r = world.rand.nextFloat();
double speed = 0.02 / r * (1 + world.rand.nextDouble());//(world.rand.nextBoolean() ? 1 : -1) * (0.05 + 0.02 * world.rand.nextDouble());
ParticleBuilder.create(ParticleBuilder.Type.CLOUD)
.entity(caster)
.pos(caster.posX, caster.posY + world.rand.nextDouble() * 2.5, caster.posY)
.clr(DrawingUtils.mix(DrawingUtils.mix(0xffbe00, 0xff3600, r / 0.6f), 0x222222, (r - 0.6f) / 0.4f))
.spin(r * 0.5, speed)
double speed = 0.02 / r * (1 + world.rand.nextDouble());
ParticleBuilder.create(ParticleBuilder.Type.MAGIC_FIRE)
.pos(caster.posX, caster.posY + 1, caster.posZ)
.spin(r * (5 - 1) + 0.5, speed)
.time((int) (20 + 20 * world.rand.nextFloat()))
.spawn(world);
}
}
Expand Down
32 changes: 14 additions & 18 deletions src/main/java/com/windanesz/wizardrygolems/spell/IceGolemancy.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import com.windanesz.wizardrygolems.entity.living.EntityWinterGolemMinion;
import com.windanesz.wizardrygolems.registry.WizardryGolemsItems;
import com.windanesz.wizardryutils.item.ItemNewArtefact;
import electroblob.wizardry.client.DrawingUtils;
import electroblob.wizardry.constants.Element;
import electroblob.wizardry.constants.Tier;
import electroblob.wizardry.entity.living.ISummonedCreature;
Expand Down Expand Up @@ -115,27 +114,24 @@ protected boolean spawnGolems(World world, EnumHand hand, EntityLivingBase caste

public void spawnDefaultParticles(World world, EntityLivingBase caster) {
if (world.isRemote) {
for (int i = 0; i < 30; i++) {
for (int i = 0; i < 20; i++) {
float r = world.rand.nextFloat();
double speed = 0.02 / r * (1 + world.rand.nextDouble());//(world.rand.nextBoolean() ? 1 : -1) * (0.05 + 0.02 * world.rand.nextDouble());
ParticleBuilder.create(ParticleBuilder.Type.MAGIC_FIRE)
.entity(caster)
.pos(caster.posX, caster.posY + world.rand.nextDouble() * 2, caster.posY)
.vel(0, 0, 0)
.scale(2)
.time(40 + world.rand.nextInt(10))
.spin(world.rand.nextDouble() * 0.5, speed)
double speed = 0.02 / r * (1 + world.rand.nextDouble());
ParticleBuilder.create(ParticleBuilder.Type.CLOUD)
.pos(caster.posX, caster.posY + 1, caster.posZ)
.clr(250, 255, 255)
.spin(r * (5 - 1) + 0.5, speed)
.time(20)
.spawn(world);
}

for (int i = 0; i < 20; i++) {
for (int i = 0; i < 30; i++) {
float r = world.rand.nextFloat();
double speed = 0.02 / r * (1 + world.rand.nextDouble());//(world.rand.nextBoolean() ? 1 : -1) * (0.05 + 0.02 * world.rand.nextDouble());
ParticleBuilder.create(ParticleBuilder.Type.CLOUD)
.entity(caster)
.pos(caster.posX, caster.posY + world.rand.nextDouble() * 2.5, caster.posY)
.clr(DrawingUtils.mix(DrawingUtils.mix(0xffbe00, 0xff3600, r / 0.6f), 0x222222, (r - 0.6f) / 0.4f))
.spin(r * 0.5, speed)
double speed = 0.02 / r * (1 + world.rand.nextDouble());
ParticleBuilder.create(ParticleBuilder.Type.SNOW)
.pos(caster.posX, caster.posY + 1, caster.posZ)
.clr(250, 255, 255)
.spin(r * (5 - 1) + 0.5, speed)
.time((int) (20 + 20 * world.rand.nextFloat()))
.spawn(world);
}
}
Expand Down

0 comments on commit 63668d1

Please sign in to comment.