mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-22 15:18:34 +01:00
Reverted Particle Range Change as it didn't work on servers and I can't really fix that right now
This commit is contained in:
parent
c901a1fe05
commit
9661f9e817
1 changed files with 6 additions and 10 deletions
|
@ -14,8 +14,6 @@ import cofh.api.energy.IEnergyReceiver;
|
||||||
import ellpeck.actuallyadditions.config.values.ConfigBoolValues;
|
import ellpeck.actuallyadditions.config.values.ConfigBoolValues;
|
||||||
import ellpeck.actuallyadditions.misc.LaserRelayConnectionHandler;
|
import ellpeck.actuallyadditions.misc.LaserRelayConnectionHandler;
|
||||||
import ellpeck.actuallyadditions.util.WorldPos;
|
import ellpeck.actuallyadditions.util.WorldPos;
|
||||||
import net.minecraft.client.Minecraft;
|
|
||||||
import net.minecraft.client.particle.EntityReddustFX;
|
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
import net.minecraft.network.NetworkManager;
|
import net.minecraft.network.NetworkManager;
|
||||||
import net.minecraft.network.Packet;
|
import net.minecraft.network.Packet;
|
||||||
|
@ -43,15 +41,13 @@ public class TileEntityLaserRelay extends TileEntityBase implements IEnergyRecei
|
||||||
if(network != null){
|
if(network != null){
|
||||||
for(LaserRelayConnectionHandler.ConnectionPair aPair : network){
|
for(LaserRelayConnectionHandler.ConnectionPair aPair : network){
|
||||||
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){
|
int difX = aPair.firstRelay.getX()-aPair.secondRelay.getX();
|
||||||
int difX = aPair.firstRelay.getX()-aPair.secondRelay.getX();
|
int difY = aPair.firstRelay.getY()-aPair.secondRelay.getY();
|
||||||
int difY = aPair.firstRelay.getY()-aPair.secondRelay.getY();
|
int difZ = aPair.firstRelay.getZ()-aPair.secondRelay.getZ();
|
||||||
int difZ = aPair.firstRelay.getZ()-aPair.secondRelay.getZ();
|
|
||||||
|
|
||||||
double distance = aPair.firstRelay.toVec().distanceTo(aPair.secondRelay.toVec());
|
double distance = aPair.firstRelay.toVec().distanceTo(aPair.secondRelay.toVec());
|
||||||
for(double i = 0; i <= 1; i += 1/(distance*(ConfigBoolValues.LESS_LASER_RELAY_PARTICLES.isEnabled() ? 1 : 4))){
|
for(double i = 0; i <= 1; i += 1/(distance*(ConfigBoolValues.LESS_LASER_RELAY_PARTICLES.isEnabled() ? 1 : 4))){
|
||||||
Minecraft.getMinecraft().effectRenderer.addEffect(new EntityReddustFX(this.worldObj, (difX*i)+aPair.secondRelay.getX()+0.5, (difY*i)+aPair.secondRelay.getY()+0.5, (difZ*i)+aPair.secondRelay.getZ()+0.5, 0, 0, 0));
|
this.worldObj.spawnParticle("reddust", (difX*i)+aPair.secondRelay.getX()+0.5, (difY*i)+aPair.secondRelay.getY()+0.5, (difZ*i)+aPair.secondRelay.getZ()+0.5, 0, 0, 0);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue