Moved particles to a single method
This commit is contained in:
parent
3e58ec3e21
commit
be17f95ed6
5 changed files with 19 additions and 37 deletions
|
@ -29,31 +29,21 @@ public class ClientProxy extends CommonProxy {
|
|||
RenderingRegistry.registerBlockHandler(new FoliageRenderer());
|
||||
RenderingRegistry.registerBlockHandler(new PlantsRenderer());
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void spawnMud(World world, double x, double y, double z, double xVel, double yVel, double zVel)
|
||||
public void spawnParticle(String string, double x, double y, double z)
|
||||
{
|
||||
EntityFX entityfx = null;
|
||||
|
||||
entityfx = new EntityBreakingFX(mc.theWorld, x, y, z, Items.mudball.get(), mc.renderEngine);
|
||||
mc.effectRenderer.addEffect(entityfx);
|
||||
if (string == "mud")
|
||||
entityfx = new EntityBreakingFX(mc.theWorld, x, y, z, Items.mudball.get(), mc.renderEngine);
|
||||
else if (string == "dart")
|
||||
entityfx = new EntityBreakingFX(mc.theWorld, x, y, z, Items.dart.get(), mc.renderEngine);
|
||||
else if (string == "dandelion")
|
||||
entityfx = new EntityDandelionFX(mc.theWorld, x, y, z, 1.0F);
|
||||
|
||||
mc.effectRenderer.addEffect(entityfx);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void spawnDart(World world, double x, double y, double z, double xVel, double yVel, double zVel)
|
||||
{
|
||||
EntityFX entityfx = null;
|
||||
|
||||
entityfx = new EntityBreakingFX(mc.theWorld, x, y, z, Items.dart.get(), mc.renderEngine);
|
||||
mc.effectRenderer.addEffect(entityfx);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void spawnDandelion(World world, double x, double y, double z, double xVel, double yVel, double zVel)
|
||||
{
|
||||
EntityDandelionFX entityfx = new EntityDandelionFX(mc.theWorld, x, y, z, 1.0F);
|
||||
mc.effectRenderer.addEffect(entityfx);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int addArmor(String armor)
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
package biomesoplenty;
|
||||
|
||||
import biomesoplenty.api.Items;
|
||||
import net.minecraft.client.particle.EntityBreakingFX;
|
||||
import net.minecraft.client.particle.EntityFX;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class CommonProxy {
|
||||
|
@ -17,19 +20,8 @@ public class CommonProxy {
|
|||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
public void spawnMud(World world, double x, double y, double z, double xVel, double yVel, double zVel)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void spawnDart(World world, double x, double y, double z, double xVel, double yVel, double zVel)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void spawnDandelion(World world, double x, double y, double z, double xVel, double yVel, double zVel)
|
||||
{
|
||||
|
||||
}
|
||||
public void spawnParticle(String string, double x, double y, double z)
|
||||
{
|
||||
}
|
||||
}
|
|
@ -231,7 +231,7 @@ public class EntityDart extends EntityArrow
|
|||
|
||||
for (int p = 0; i < 16; ++i)
|
||||
{
|
||||
BiomesOPlenty.proxy.spawnDandelion(this.worldObj, this.posX, this.posY, this.posZ, 0.0D, 0.0D, 0.0D);
|
||||
BiomesOPlenty.proxy.spawnParticle("dandelion", this.posX, this.posY, this.posZ);
|
||||
}
|
||||
|
||||
this.playSound("random.bowhit", 1.0F, 1.2F / (this.rand.nextFloat() * 0.2F + 0.9F));
|
||||
|
|
|
@ -43,7 +43,7 @@ public class EntityMudball extends EntityThrowable
|
|||
|
||||
for (int i = 0; i < 16; ++i)
|
||||
{
|
||||
BiomesOPlenty.proxy.spawnMud(this.worldObj, this.posX, this.posY, this.posZ, 0.0D, 0.0D, 0.0D);
|
||||
BiomesOPlenty.proxy.spawnParticle("mud", this.posX, this.posY, this.posZ);
|
||||
}
|
||||
|
||||
if (!this.worldObj.isRemote)
|
||||
|
|
|
@ -232,7 +232,7 @@ public class EntityPoisonDart extends EntityArrow
|
|||
|
||||
for (int p = 0; i < 16; ++i)
|
||||
{
|
||||
BiomesOPlenty.proxy.spawnDart(this.worldObj, this.posX, this.posY, this.posZ, 0.0D, 0.0D, 0.0D);
|
||||
BiomesOPlenty.proxy.spawnParticle("dart", this.posX, this.posY, this.posZ);
|
||||
}
|
||||
|
||||
this.playSound("random.bowhit", 1.0F, 1.2F / (this.rand.nextFloat() * 0.2F + 0.9F));
|
||||
|
|
Loading…
Reference in a new issue