diff --git a/src/main/java/noppes/npcs/scripted/ScriptParticle.java b/src/main/java/noppes/npcs/scripted/ScriptParticle.java index 9053206e7..a98c0c2da 100644 --- a/src/main/java/noppes/npcs/scripted/ScriptParticle.java +++ b/src/main/java/noppes/npcs/scripted/ScriptParticle.java @@ -3,6 +3,7 @@ package noppes.npcs.scripted; import net.minecraft.nbt.*; import noppes.npcs.NoppesUtilServer; import noppes.npcs.scripted.interfaces.IParticle; +import noppes.npcs.scripted.interfaces.IWorld; import noppes.npcs.scripted.interfaces.entity.IEntity; import java.lang.reflect.Field; @@ -128,7 +129,7 @@ public class ScriptParticle implements IParticle { return particle; } - public void spawnOnEntity(IEntity entity){ + public void spawn(IEntity entity){ int entityID = entity.getMCEntity().getEntityId(); NBTTagCompound compound = this.writeToNBT(); @@ -137,16 +138,28 @@ public class ScriptParticle implements IParticle { NoppesUtilServer.spawnScriptedParticle(compound, entity.getWorld().getDimensionID()); } - public void spawnInWorld(ScriptWorld world){ + public void spawn(IWorld world){ NBTTagCompound compound = this.writeToNBT(); NoppesUtilServer.spawnScriptedParticle(compound, world.getDimensionID()); } - public void spawnInWorld(ScriptWorld world, double x, double y, double z){ + public void spawn(IWorld world, double x, double y, double z){ NBTTagCompound compound = this.writeToNBT(); NoppesUtilServer.spawnScriptedParticle(compound, world.getDimensionID()); } + public void spawnOnEntity(IEntity entity) { + spawn(entity); + } + + public void spawnInWorld(IWorld world) { + spawn(world); + } + + public void spawnInWorld(IWorld world, double x, double y, double z){ + spawn(world, x, y, z); + } + public void setGlows(boolean glows) { this.glows = glows; } public boolean getGlows() { return this.glows; } diff --git a/src/main/java/noppes/npcs/scripted/entity/ScriptEntity.java b/src/main/java/noppes/npcs/scripted/entity/ScriptEntity.java index 7164998eb..fc10f7447 100644 --- a/src/main/java/noppes/npcs/scripted/entity/ScriptEntity.java +++ b/src/main/java/noppes/npcs/scripted/entity/ScriptEntity.java @@ -248,7 +248,7 @@ public class ScriptEntity implements IEntity { NoppesUtilServer.spawnScriptedParticle(compound, this.getWorld().getDimensionID()); } - public void spawnParticle(IParticle entityParticle) { entityParticle.spawnOnEntity(this); } + public void spawnParticle(IParticle entityParticle) { entityParticle.spawn(this); } public int getEntityId(){ return entity.getEntityId(); diff --git a/src/main/java/noppes/npcs/scripted/interfaces/IParticle.java b/src/main/java/noppes/npcs/scripted/interfaces/IParticle.java index a231d4a98..3c97f32f8 100644 --- a/src/main/java/noppes/npcs/scripted/interfaces/IParticle.java +++ b/src/main/java/noppes/npcs/scripted/interfaces/IParticle.java @@ -1,6 +1,5 @@ package noppes.npcs.scripted.interfaces; -import noppes.npcs.scripted.ScriptWorld; import noppes.npcs.scripted.interfaces.entity.IEntity; /** @@ -24,13 +23,13 @@ public interface IParticle { * * @param entity Spawns this particle object on the given entity. When spawned this way, the particle will always have its origin at the entity. */ - void spawnOnEntity(IEntity entity); + void spawn(IEntity entity); /** * * @param world Spawns the particle in the given world, at a position corresponding to this particle's position variables. */ - void spawnInWorld(ScriptWorld world); + void spawn(IWorld world); /** * @@ -39,7 +38,16 @@ public interface IParticle { * @param y The Y position the particle will spawn in the world. * @param z The Z position the particle will spawn in the world. */ - void spawnInWorld(ScriptWorld world, double x, double y, double z); + void spawn(IWorld world, double x, double y, double z); + + @Deprecated + void spawnOnEntity(IEntity entity); + + @Deprecated + void spawnInWorld(IWorld world); + + @Deprecated + void spawnInWorld(IWorld world, double x, double y, double z); /** *