Make sure ParticleBuilder warnings only trigger when appropriate, plus misc cleanup

This commit is contained in:
Electroblob77
2020-07-06 22:53:10 +01:00
parent 48221582c3
commit 651eb8834b
3 changed files with 7 additions and 7 deletions
@@ -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();
}
}
@@ -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.
* <p></p>
* The new system is as follows:
@@ -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.
* <p></p>
* <b>Affects:</b> All particle types except
* <b>Affects:</b> 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 "