From 651eb8834b4d4f6f313c1b0ba17e755bb665ef73 Mon Sep 17 00:00:00 2001 From: Electroblob77 <35599699+Electroblob77@users.noreply.github.com> Date: Mon, 6 Jul 2020 22:53:10 +0100 Subject: [PATCH] Make sure ParticleBuilder warnings only trigger when appropriate, plus misc cleanup --- .../wizardry/client/model/BakedModelBookshelf.java | 4 ++-- .../wizardry/client/particle/ParticleWizardry.java | 2 +- .../java/electroblob/wizardry/util/ParticleBuilder.java | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/main/java/electroblob/wizardry/client/model/BakedModelBookshelf.java b/src/main/java/electroblob/wizardry/client/model/BakedModelBookshelf.java index af18c319..ca8d2476 100644 --- a/src/main/java/electroblob/wizardry/client/model/BakedModelBookshelf.java +++ b/src/main/java/electroblob/wizardry/client/model/BakedModelBookshelf.java @@ -63,12 +63,12 @@ public class BakedModelBookshelf implements IBakedModel { @Override public TextureAtlasSprite getParticleTexture(){ - return bookshelf.getParticleTexture(); // TESTME: May need to do this manually + return bookshelf.getParticleTexture(); } @Override public ItemOverrideList getOverrides(){ - return bookshelf.getOverrides(); // TESTME: Same here + return bookshelf.getOverrides(); } } diff --git a/src/main/java/electroblob/wizardry/client/particle/ParticleWizardry.java b/src/main/java/electroblob/wizardry/client/particle/ParticleWizardry.java index d957163a..b2946e3e 100644 --- a/src/main/java/electroblob/wizardry/client/particle/ParticleWizardry.java +++ b/src/main/java/electroblob/wizardry/client/particle/ParticleWizardry.java @@ -27,7 +27,7 @@ import java.util.stream.Collectors; /** * Abstract superclass for all of wizardry's particles. This replaces {@code ParticleCustomTexture} (the functionality of * which is no longer necessary since wizardry now uses {@code TextureAtlasSprite}s to do the rendering), and fits into - * {@code ParticleBuilder} by exposing all the necessary variables through getters, allowing them to be set on the fly + * {@code ParticleBuilder} by exposing all the necessary variables through setters, allowing them to be set on the fly * rather than needing to be passed into the constructor. *
* The new system is as follows: diff --git a/src/main/java/electroblob/wizardry/util/ParticleBuilder.java b/src/main/java/electroblob/wizardry/util/ParticleBuilder.java index 0b019303..be238a8f 100644 --- a/src/main/java/electroblob/wizardry/util/ParticleBuilder.java +++ b/src/main/java/electroblob/wizardry/util/ParticleBuilder.java @@ -229,7 +229,7 @@ public final class ParticleBuilder { * Sets the velocity of the particle being built. This is a vector-based alternative to {@link ParticleBuilder#vel( * double, double, double)}, allowing for even more concise code when a vector is available. * - * Affects: All particle types except + * Affects: All particle types * @param vel A vector representing the velocity of the particle to be built. * @return The particle builder instance, allowing other methods to be chained onto this one * @throws IllegalStateException if the particle builder is not yet building. @@ -605,9 +605,9 @@ public final class ParticleBuilder { public void spawn(World world){ if(!building) throw new IllegalStateException("Not building yet!"); - - if(y < 0 && entity == null) Wizardry.logger.warn("Spawning particle below y = 0 - are you sure the position/entity " - + "has been set correctly?"); + + if(x == 0 && y == 0 && z == 0 && entity == null) Wizardry.logger.warn("Spawning particle at (0, 0, 0) - are you" + + " sure the position/entity has been set correctly?"); if(!world.isRemote){ Wizardry.logger.warn("ParticleBuilder.spawn(...) called on the server side! ParticleBuilder has prevented a "