The great particle refactoring part 1: Introducing ParticleBuilder!

Adds ParticleBuilder to replace the particle spawning methods in the proxies, and changes all particle spawning to use the builder except for in the spell classes, which are to be reorganised first.
This commit is contained in:
Electroblob
2018-06-05 21:13:41 +01:00
parent 466b3bbc27
commit d91a3e056a
119 changed files with 722 additions and 972 deletions
@@ -11,7 +11,7 @@ import electroblob.wizardry.registry.WizardryItems;
import electroblob.wizardry.registry.WizardryPotions;
import electroblob.wizardry.registry.WizardrySounds;
import electroblob.wizardry.util.SpellModifiers;
import electroblob.wizardry.util.WizardryParticleType;
import electroblob.wizardry.util.ParticleBuilder.Type;
import electroblob.wizardry.util.WizardryUtilities;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLiving;
@@ -76,12 +76,12 @@ public class MindControl extends Spell {
}
}else{
for(int i = 0; i < 10; i++){
Wizardry.proxy.spawnParticle(WizardryParticleType.DARK_MAGIC, world,
Wizardry.proxy.spawnParticle(Type.DARK_MAGIC, world,
target.posX - 0.25 + world.rand.nextDouble() * 0.5,
target.getEntityBoundingBox().minY + target.getEyeHeight() - 0.25
+ world.rand.nextDouble() * 0.5,
target.posZ - 0.25 + world.rand.nextDouble() * 0.5, 0, 0, 0, 0, 0.8f, 0.2f, 1.0f);
Wizardry.proxy.spawnParticle(WizardryParticleType.DARK_MAGIC, world,
Wizardry.proxy.spawnParticle(Type.DARK_MAGIC, world,
target.posX - 0.25 + world.rand.nextDouble() * 0.5,
target.getEntityBoundingBox().minY + target.getEyeHeight() - 0.25
+ world.rand.nextDouble() * 0.5,
@@ -116,12 +116,12 @@ public class MindControl extends Spell {
}
}else{
for(int i = 0; i < 10; i++){
Wizardry.proxy.spawnParticle(WizardryParticleType.DARK_MAGIC, world,
Wizardry.proxy.spawnParticle(Type.DARK_MAGIC, world,
target.posX - 0.25 + world.rand.nextDouble() * 0.5,
target.getEntityBoundingBox().minY + target.getEyeHeight() - 0.25
+ world.rand.nextDouble() * 0.5,
target.posZ - 0.25 + world.rand.nextDouble() * 0.5, 0, 0, 0, 0, 0.8f, 0.2f, 1.0f);
Wizardry.proxy.spawnParticle(WizardryParticleType.DARK_MAGIC, world,
Wizardry.proxy.spawnParticle(Type.DARK_MAGIC, world,
target.posX - 0.25 + world.rand.nextDouble() * 0.5,
target.getEntityBoundingBox().minY + target.getEyeHeight() - 0.25
+ world.rand.nextDouble() * 0.5,