mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-26 16:58:34 +01:00
~
This commit is contained in:
parent
41e2c7ce6a
commit
c300b080f4
1 changed files with 3 additions and 1 deletions
|
@ -41,13 +41,15 @@ public class TileEntityLaserRelay extends TileEntityBase implements IEnergyRecei
|
||||||
LaserRelayConnectionHandler.getInstance().removeRelayFromNetwork(new WorldPos(this.worldObj, this.xCoord, this.yCoord, this.zCoord));
|
LaserRelayConnectionHandler.getInstance().removeRelayFromNetwork(new WorldPos(this.worldObj, this.xCoord, this.yCoord, this.zCoord));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("ForLoopReplaceableByForEach")
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void renderParticles(){
|
public void renderParticles(){
|
||||||
if(this.worldObj.rand.nextInt(2) == 0){
|
if(this.worldObj.rand.nextInt(2) == 0){
|
||||||
WorldPos thisPos = new WorldPos(this.getWorldObj(), this.xCoord, this.yCoord, this.zCoord);
|
WorldPos thisPos = new WorldPos(this.getWorldObj(), this.xCoord, this.yCoord, this.zCoord);
|
||||||
ArrayList<LaserRelayConnectionHandler.ConnectionPair> network = LaserRelayConnectionHandler.getInstance().getNetworkFor(thisPos);
|
ArrayList<LaserRelayConnectionHandler.ConnectionPair> network = LaserRelayConnectionHandler.getInstance().getNetworkFor(thisPos);
|
||||||
if(network != null){
|
if(network != null){
|
||||||
for(LaserRelayConnectionHandler.ConnectionPair aPair : network){
|
for(int i1 = 0; i1 < network.size(); i1++){
|
||||||
|
LaserRelayConnectionHandler.ConnectionPair aPair = network.get(i1);
|
||||||
if(aPair.contains(thisPos) && thisPos.isEqual(aPair.firstRelay)){
|
if(aPair.contains(thisPos) && thisPos.isEqual(aPair.firstRelay)){
|
||||||
if(Minecraft.getMinecraft().thePlayer.getDistance(aPair.firstRelay.getX(), aPair.firstRelay.getY(), aPair.firstRelay.getZ()) <= 64){
|
if(Minecraft.getMinecraft().thePlayer.getDistance(aPair.firstRelay.getX(), aPair.firstRelay.getY(), aPair.firstRelay.getZ()) <= 64){
|
||||||
int difX = aPair.firstRelay.getX()-aPair.secondRelay.getX();
|
int difX = aPair.firstRelay.getX()-aPair.secondRelay.getX();
|
||||||
|
|
Loading…
Reference in a new issue