diff --git a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityPhantomPlacer.java b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityPhantomPlacer.java index 584c2a055..5615c3abe 100644 --- a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityPhantomPlacer.java +++ b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityPhantomPlacer.java @@ -10,7 +10,10 @@ package ellpeck.actuallyadditions.tile; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import ellpeck.actuallyadditions.inventory.GuiHandler; +import ellpeck.actuallyadditions.util.Util; import ellpeck.actuallyadditions.util.WorldPos; import ellpeck.actuallyadditions.util.WorldUtil; import net.minecraft.block.Block; @@ -87,6 +90,26 @@ public class TileEntityPhantomPlacer extends TileEntityInventoryBase implements } } } + else{ + if(this.boundPosition != null){ + this.renderParticles(); + } + } + } + + @SideOnly(Side.CLIENT) + public void renderParticles(){ + if(Util.RANDOM.nextInt(2) == 0){ + double d1 = (double)((float)this.boundPosition.getY()+Util.RANDOM.nextFloat()); + int i1 = Util.RANDOM.nextInt(2)*2-1; + int j1 = Util.RANDOM.nextInt(2)*2-1; + double d4 = ((double)Util.RANDOM.nextFloat()-0.5D)*0.125D; + double d2 = (double)this.boundPosition.getZ()+0.5D+0.25D*(double)j1; + double d5 = (double)(Util.RANDOM.nextFloat()*1.0F*(float)j1); + double d0 = (double)this.boundPosition.getX()+0.5D+0.25D*(double)i1; + double d3 = (double)(Util.RANDOM.nextFloat()*1.0F*(float)i1); + worldObj.spawnParticle("portal", d0, d1, d2, d3, d4, d5); + } } @Override