Make sure ParticleBuilder warnings only trigger when appropriate, plus misc cleanup
This commit is contained in:
@@ -63,12 +63,12 @@ public class BakedModelBookshelf implements IBakedModel {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TextureAtlasSprite getParticleTexture(){
|
public TextureAtlasSprite getParticleTexture(){
|
||||||
return bookshelf.getParticleTexture(); // TESTME: May need to do this manually
|
return bookshelf.getParticleTexture();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ItemOverrideList getOverrides(){
|
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
|
* 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
|
* 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.
|
* rather than needing to be passed into the constructor.
|
||||||
* <p></p>
|
* <p></p>
|
||||||
* The new system is as follows:
|
* 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(
|
* 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.
|
* double, double, double)}, allowing for even more concise code when a vector is available.
|
||||||
* <p></p>
|
* <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.
|
* @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
|
* @return The particle builder instance, allowing other methods to be chained onto this one
|
||||||
* @throws IllegalStateException if the particle builder is not yet building.
|
* @throws IllegalStateException if the particle builder is not yet building.
|
||||||
@@ -605,9 +605,9 @@ public final class ParticleBuilder {
|
|||||||
public void spawn(World world){
|
public void spawn(World world){
|
||||||
|
|
||||||
if(!building) throw new IllegalStateException("Not building yet!");
|
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 "
|
if(x == 0 && y == 0 && z == 0 && entity == null) Wizardry.logger.warn("Spawning particle at (0, 0, 0) - are you"
|
||||||
+ "has been set correctly?");
|
+ " sure the position/entity has been set correctly?");
|
||||||
|
|
||||||
if(!world.isRemote){
|
if(!world.isRemote){
|
||||||
Wizardry.logger.warn("ParticleBuilder.spawn(...) called on the server side! ParticleBuilder has prevented a "
|
Wizardry.logger.warn("ParticleBuilder.spawn(...) called on the server side! ParticleBuilder has prevented a "
|
||||||
|
|||||||
Reference in New Issue
Block a user