mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-22 15:18:34 +01:00
Phantom Placer now have particles
This commit is contained in:
parent
4e83aff1b1
commit
31bffd7076
1 changed files with 23 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue