Merge branch 'development' into 1.8
Conflicts: src/main/java/mekanism/common/item/ItemBlockEnergyCube.java src/main/java/mekanism/common/multipart/PartTransmitter.java src/main/java/mekanism/common/tile/TileEntityBasicMachine.java src/main/java/mekanism/common/tile/TileEntityBin.java src/main/java/mekanism/common/tile/TileEntityChargepad.java src/main/java/mekanism/common/tile/TileEntityChemicalCrystallizer.java src/main/java/mekanism/common/tile/TileEntityChemicalDissolutionChamber.java src/main/java/mekanism/common/tile/TileEntityChemicalInfuser.java src/main/java/mekanism/common/tile/TileEntityChemicalOxidizer.java src/main/java/mekanism/common/tile/TileEntityChemicalWasher.java src/main/java/mekanism/common/tile/TileEntityDigitalMiner.java src/main/java/mekanism/common/tile/TileEntityFactory.java src/main/java/mekanism/common/tile/TileEntityMetallurgicInfuser.java src/main/java/mekanism/common/tile/TileEntityPortableTank.java src/main/java/mekanism/common/tile/TileEntityRotaryCondensentrator.java src/main/java/mekanism/common/tile/TileEntitySeismicVibrator.java src/main/java/mekanism/common/tile/TileEntityTeleporter.java src/main/java/mekanism/generators/common/tile/TileEntityGenerator.java
This commit is contained in:
commit
d5508667f3
35 changed files with 144 additions and 93 deletions
|
@ -1,6 +1,7 @@
|
|||
package mekanism.api;
|
||||
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
|
||||
public class Range4D
|
||||
{
|
||||
|
@ -31,15 +32,41 @@ public class Range4D
|
|||
yMin = 0;
|
||||
zMin = chunk.zCoord*16;
|
||||
xMax = xMin+16;
|
||||
yMax = 255;
|
||||
zMax = zMin+16;
|
||||
}
|
||||
|
||||
public static Range4D getLoadedChunks(MinecraftServer server)
|
||||
public Range4D(Coord4D coord)
|
||||
{
|
||||
int range = server.getConfigurationManager().getViewDistance();
|
||||
xMin = coord.xCoord;
|
||||
yMin = coord.yCoord;
|
||||
zMin = coord.zCoord;
|
||||
|
||||
xMax = coord.xCoord+1;
|
||||
yMax = coord.yCoord+1;
|
||||
zMax = coord.zCoord+1;
|
||||
}
|
||||
|
||||
public static Range4D getChunkRange(EntityPlayer player)
|
||||
{
|
||||
int radius = FMLCommonHandler.instance().getMinecraftServerInstance().getConfigurationManager().getViewDistance();
|
||||
|
||||
return null;
|
||||
return new Range4D(new Chunk3D(player)).expandChunks(radius);
|
||||
}
|
||||
|
||||
public Range4D expandChunks(int chunks)
|
||||
{
|
||||
xMin -= chunks*16;
|
||||
xMax += chunks*16;
|
||||
zMin -= chunks*16;
|
||||
zMax += chunks*16;
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean intersects(Range4D range)
|
||||
{
|
||||
return (xMax+1 - 1.E-05D > range.xMin) && (range.xMax+1 - 1.E-05D > xMin) && (yMax+1 - 1.E-05D > range.yMin) && (range.yMax+1 - 1.E-05D > yMin) && (zMax+1 - 1.E-05D > range.zMin) && (range.zMax+1 - 1.E-05D > zMin);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -12,10 +12,9 @@ import java.util.Set;
|
|||
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.api.IClientTicker;
|
||||
import mekanism.common.Mekanism;
|
||||
import mekanism.api.Range4D;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
@ -31,7 +30,7 @@ public abstract class DynamicNetwork<A, N extends DynamicNetwork<A, N>> implemen
|
|||
|
||||
private List<DelayQueue> updateQueue = new ArrayList<DelayQueue>();
|
||||
|
||||
protected AxisAlignedBB packetRange = null;
|
||||
protected Range4D packetRange = null;
|
||||
|
||||
protected int ticksSinceCreate = 0;
|
||||
|
||||
|
@ -95,7 +94,7 @@ public abstract class DynamicNetwork<A, N extends DynamicNetwork<A, N>> implemen
|
|||
refresh();
|
||||
}
|
||||
|
||||
public AxisAlignedBB getPacketRange()
|
||||
public Range4D getPacketRange()
|
||||
{
|
||||
if(packetRange == null)
|
||||
{
|
||||
|
@ -115,7 +114,7 @@ public abstract class DynamicNetwork<A, N extends DynamicNetwork<A, N>> implemen
|
|||
return transmitters.iterator().next().getTile().getWorldObj();
|
||||
}
|
||||
|
||||
protected AxisAlignedBB genPacketRange()
|
||||
protected Range4D genPacketRange()
|
||||
{
|
||||
if(getSize() == 0)
|
||||
{
|
||||
|
@ -144,14 +143,7 @@ public abstract class DynamicNetwork<A, N extends DynamicNetwork<A, N>> implemen
|
|||
if(coord.zCoord > maxZ) maxZ = coord.zCoord;
|
||||
}
|
||||
|
||||
minX -= 40;
|
||||
minY -= 40;
|
||||
minZ -= 40;
|
||||
maxX += 40;
|
||||
maxY += 40;
|
||||
maxZ += 40;
|
||||
|
||||
return AxisAlignedBB.getBoundingBox(minX, minY, minZ, maxX, maxY, maxZ);
|
||||
return new Range4D(minX, minY, minZ, maxX, maxY, maxZ, getWorld().provider.dimensionId);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1136,7 +1136,7 @@ public class Mekanism
|
|||
public void onEnergyTransferred(EnergyTransferEvent event)
|
||||
{
|
||||
try {
|
||||
packetHandler.sendToDimension(new TransmitterUpdateMessage(PacketType.ENERGY, Coord4D.get((TileEntity)event.energyNetwork.transmitters.iterator().next()), event.power), event.energyNetwork.getWorld().provider.dimensionId);
|
||||
packetHandler.sendToReceivers(new TransmitterUpdateMessage(PacketType.ENERGY, Coord4D.get((TileEntity)event.energyNetwork.transmitters.iterator().next()), event.power), event.energyNetwork.getPacketRange());
|
||||
} catch(Exception e) {}
|
||||
}
|
||||
|
||||
|
@ -1144,7 +1144,7 @@ public class Mekanism
|
|||
public void onGasTransferred(GasTransferEvent event)
|
||||
{
|
||||
try {
|
||||
packetHandler.sendToDimension(new TransmitterUpdateMessage(PacketType.GAS, Coord4D.get((TileEntity)event.gasNetwork.transmitters.iterator().next()), event.transferType, event.didTransfer), event.gasNetwork.getWorld().provider.dimensionId);
|
||||
packetHandler.sendToReceivers(new TransmitterUpdateMessage(PacketType.GAS, Coord4D.get((TileEntity)event.gasNetwork.transmitters.iterator().next()), event.transferType, event.didTransfer), event.gasNetwork.getPacketRange());
|
||||
} catch(Exception e) {}
|
||||
}
|
||||
|
||||
|
@ -1152,7 +1152,7 @@ public class Mekanism
|
|||
public void onLiquidTransferred(FluidTransferEvent event)
|
||||
{
|
||||
try {
|
||||
packetHandler.sendToDimension(new TransmitterUpdateMessage(PacketType.FLUID, Coord4D.get((TileEntity)event.fluidNetwork.transmitters.iterator().next()), event.fluidType, event.didTransfer), event.fluidNetwork.getWorld().provider.dimensionId);
|
||||
packetHandler.sendToReceivers(new TransmitterUpdateMessage(PacketType.FLUID, Coord4D.get((TileEntity)event.fluidNetwork.transmitters.iterator().next()), event.fluidType, event.didTransfer), event.fluidNetwork.getPacketRange());
|
||||
} catch(Exception e) {}
|
||||
}
|
||||
|
||||
|
|
|
@ -5,6 +5,8 @@ import io.netty.buffer.ByteBuf;
|
|||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.api.Range4D;
|
||||
import mekanism.common.network.PacketBoxBlacklist;
|
||||
import mekanism.common.network.PacketBoxBlacklist.BoxBlacklistMessage;
|
||||
import mekanism.common.network.PacketConfigSync;
|
||||
|
@ -269,14 +271,6 @@ public class PacketHandler
|
|||
return Mekanism.proxy.getPlayer(context);
|
||||
}
|
||||
|
||||
/**
|
||||
* Send this message to everyone.
|
||||
* @param message - the message to send
|
||||
*/
|
||||
public void sendToAll(IMessage message)
|
||||
{
|
||||
netHandler.sendToAll(message);
|
||||
}
|
||||
|
||||
/**
|
||||
* Send this message to the specified player.
|
||||
|
@ -339,4 +333,20 @@ public class PacketHandler
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void sendToReceivers(IMessage message, Range4D range)
|
||||
{
|
||||
MinecraftServer server = MinecraftServer.getServer();
|
||||
|
||||
if(server != null)
|
||||
{
|
||||
for(EntityPlayerMP player : (List<EntityPlayerMP>)server.getConfigurationManager().playerEntityList)
|
||||
{
|
||||
if(player.dimension == range.dimensionId && Range4D.getChunkRange(player).intersects(range))
|
||||
{
|
||||
sendTo(message, player);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,6 +6,7 @@ import java.util.List;
|
|||
import java.util.Random;
|
||||
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.api.Range4D;
|
||||
import mekanism.client.ClientProxy;
|
||||
import mekanism.common.ConnectedTextureRenderer;
|
||||
import mekanism.common.IActiveState;
|
||||
|
@ -423,7 +424,7 @@ public class BlockBasic extends Block
|
|||
|
||||
if(!manageInventory(entityplayer, tileEntity))
|
||||
{
|
||||
Mekanism.packetHandler.sendToAll(new TileEntityMessage(Coord4D.get(tileEntity), tileEntity.getNetworkedData(new ArrayList())));
|
||||
Mekanism.packetHandler.sendToReceivers(new TileEntityMessage(Coord4D.get(tileEntity), tileEntity.getNetworkedData(new ArrayList())), new Range4D(Coord4D.get(tileEntity)));
|
||||
entityplayer.openGui(Mekanism.instance, 18, world, x, y, z);
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -9,11 +9,11 @@ import java.util.List;
|
|||
import mekanism.api.Coord4D;
|
||||
import mekanism.api.EnumColor;
|
||||
import mekanism.api.MekanismConfig.general;
|
||||
import mekanism.api.Range4D;
|
||||
import mekanism.api.energy.IEnergizedItem;
|
||||
import mekanism.common.IEnergyCube;
|
||||
import mekanism.common.ISustainedInventory;
|
||||
import mekanism.common.Mekanism;
|
||||
import mekanism.common.Tier;
|
||||
import mekanism.common.Tier.EnergyCubeTier;
|
||||
import mekanism.common.integration.IC2ItemManager;
|
||||
import mekanism.common.network.PacketTileEntity.TileEntityMessage;
|
||||
|
@ -100,7 +100,7 @@ public class ItemBlockEnergyCube extends ItemBlock implements IEnergizedItem, IE
|
|||
|
||||
if(!world.isRemote)
|
||||
{
|
||||
Mekanism.packetHandler.sendToAll(new TileEntityMessage(Coord4D.get(tileEntity), tileEntity.getNetworkedData(new ArrayList())));
|
||||
Mekanism.packetHandler.sendToReceivers(new TileEntityMessage(Coord4D.get(tileEntity), tileEntity.getNetworkedData(new ArrayList())), new Range4D(Coord4D.get(tileEntity)));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -8,6 +8,7 @@ import java.util.Random;
|
|||
import mekanism.api.Coord4D;
|
||||
import mekanism.api.EnumColor;
|
||||
import mekanism.api.IConfigurable;
|
||||
import mekanism.api.Range4D;
|
||||
import mekanism.common.IInvConfiguration;
|
||||
import mekanism.common.Mekanism;
|
||||
import mekanism.common.network.PacketTileEntity.TileEntityMessage;
|
||||
|
@ -25,11 +26,10 @@ import net.minecraft.tileentity.TileEntity;
|
|||
import net.minecraft.util.ChatComponentText;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import buildcraft.api.tools.IToolWrench;
|
||||
import cpw.mods.fml.common.Optional.Interface;
|
||||
import cpw.mods.fml.common.Optional.Method;
|
||||
|
||||
import buildcraft.api.tools.IToolWrench;
|
||||
|
||||
@Interface(iface = "buildcraft.api.tools.IToolWrench", modid = "BuildCraftAPI|tools")
|
||||
public class ItemConfigurator extends ItemEnergized implements IToolWrench
|
||||
{
|
||||
|
@ -105,7 +105,7 @@ public class ItemConfigurator extends ItemEnergized implements IToolWrench
|
|||
if(config instanceof TileEntityBasicBlock)
|
||||
{
|
||||
TileEntityBasicBlock tileEntity = (TileEntityBasicBlock)config;
|
||||
Mekanism.packetHandler.sendToAllAround(new TileEntityMessage(Coord4D.get(tileEntity), tileEntity.getNetworkedData(new ArrayList())), Coord4D.get(tileEntity).getTargetPoint(50D));
|
||||
Mekanism.packetHandler.sendToReceivers(new TileEntityMessage(Coord4D.get(tileEntity), tileEntity.getNetworkedData(new ArrayList())), new Range4D(Coord4D.get(tileEntity)));
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
@ -6,6 +6,7 @@ import java.util.ArrayList;
|
|||
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.api.EnumColor;
|
||||
import mekanism.api.Range4D;
|
||||
import mekanism.common.Mekanism;
|
||||
import mekanism.common.network.PacketTileEntity.TileEntityMessage;
|
||||
import mekanism.common.transporter.TransporterStack;
|
||||
|
@ -121,7 +122,7 @@ public class PartDiversionTransporter extends PartLogisticalTransporter
|
|||
refreshConnections();
|
||||
tile().notifyPartChange(this);
|
||||
player.addChatMessage(new ChatComponentText(EnumColor.DARK_BLUE + "[Mekanism]" + EnumColor.GREY + " " + MekanismUtils.localize("tooltip.configurator.toggleDiverter") + ": " + EnumColor.RED + description));
|
||||
Mekanism.packetHandler.sendToAllAround(new TileEntityMessage(Coord4D.get(tile()), getNetworkedData(new ArrayList())), Coord4D.get(tile()).getTargetPoint(50D));
|
||||
Mekanism.packetHandler.sendToReceivers(new TileEntityMessage(Coord4D.get(tile()), getNetworkedData(new ArrayList())), new Range4D(Coord4D.get(tile())));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -8,6 +8,7 @@ import java.util.Set;
|
|||
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.api.EnumColor;
|
||||
import mekanism.api.Range4D;
|
||||
import mekanism.api.transmitters.TransmissionType;
|
||||
import mekanism.client.render.RenderPartTransmitter;
|
||||
import mekanism.common.HashList;
|
||||
|
@ -37,7 +38,6 @@ import net.minecraftforge.common.util.ForgeDirection;
|
|||
import buildcraft.api.transport.IPipeTile;
|
||||
import buildcraft.api.transport.PipeWire;
|
||||
import codechicken.lib.vec.Vector3;
|
||||
|
||||
import cpw.mods.fml.common.Optional.Interface;
|
||||
import cpw.mods.fml.common.Optional.Method;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
|
@ -328,7 +328,7 @@ public class PartLogisticalTransporter extends PartSidedPipe implements ILogisti
|
|||
|
||||
for(TransporterStack stack : remove)
|
||||
{
|
||||
Mekanism.packetHandler.sendToAllAround(new TileEntityMessage(Coord4D.get(tile()), getSyncPacket(stack, true)), Coord4D.get(tile()).getTargetPoint(50D));
|
||||
Mekanism.packetHandler.sendToReceivers(new TileEntityMessage(Coord4D.get(tile()), getSyncPacket(stack, true)), new Range4D(Coord4D.get(tile())));
|
||||
transit.remove(stack);
|
||||
MekanismUtils.saveChunk(tile());
|
||||
}
|
||||
|
@ -337,7 +337,7 @@ public class PartLogisticalTransporter extends PartSidedPipe implements ILogisti
|
|||
{
|
||||
if(transit.contains(stack))
|
||||
{
|
||||
Mekanism.packetHandler.sendToAllAround(new TileEntityMessage(Coord4D.get(tile()), getSyncPacket(stack, false)), Coord4D.get(tile()).getTargetPoint(50D));
|
||||
Mekanism.packetHandler.sendToReceivers(new TileEntityMessage(Coord4D.get(tile()), getSyncPacket(stack, false)), new Range4D(Coord4D.get(tile())));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -452,7 +452,7 @@ public class PartLogisticalTransporter extends PartSidedPipe implements ILogisti
|
|||
{
|
||||
transit.add(stack);
|
||||
TransporterManager.add(stack);
|
||||
Mekanism.packetHandler.sendToAllAround(new TileEntityMessage(Coord4D.get(tile()), getSyncPacket(stack, false)), Coord4D.get(tile()).getTargetPoint(50D));
|
||||
Mekanism.packetHandler.sendToReceivers(new TileEntityMessage(Coord4D.get(tile()), getSyncPacket(stack, false)), new Range4D(Coord4D.get(tile())));
|
||||
MekanismUtils.saveChunk(tile());
|
||||
}
|
||||
|
||||
|
@ -488,7 +488,7 @@ public class PartLogisticalTransporter extends PartSidedPipe implements ILogisti
|
|||
{
|
||||
transit.add(stack);
|
||||
TransporterManager.add(stack);
|
||||
Mekanism.packetHandler.sendToAllAround(new TileEntityMessage(Coord4D.get(tile()), getSyncPacket(stack, false)), Coord4D.get(tile()).getTargetPoint(50D));
|
||||
Mekanism.packetHandler.sendToReceivers(new TileEntityMessage(Coord4D.get(tile()), getSyncPacket(stack, false)), new Range4D(Coord4D.get(tile())));
|
||||
MekanismUtils.saveChunk(tile());
|
||||
}
|
||||
|
||||
|
@ -503,7 +503,7 @@ public class PartLogisticalTransporter extends PartSidedPipe implements ILogisti
|
|||
{
|
||||
stack.progress = 0;
|
||||
transit.add(stack);
|
||||
Mekanism.packetHandler.sendToAllAround(new TileEntityMessage(Coord4D.get(tile()), getSyncPacket(stack, false)), Coord4D.get(tile()).getTargetPoint(50D));
|
||||
Mekanism.packetHandler.sendToReceivers(new TileEntityMessage(Coord4D.get(tile()), getSyncPacket(stack, false)), new Range4D(Coord4D.get(tile())));
|
||||
MekanismUtils.saveChunk(tile());
|
||||
}
|
||||
|
||||
|
@ -693,7 +693,7 @@ public class PartLogisticalTransporter extends PartSidedPipe implements ILogisti
|
|||
TransporterUtils.incrementColor(this);
|
||||
refreshConnections();
|
||||
tile().notifyPartChange(this);
|
||||
Mekanism.packetHandler.sendToAllAround(new TileEntityMessage(Coord4D.get(tile()), getNetworkedData(new ArrayList())), Coord4D.get(tile()).getTargetPoint(50D));
|
||||
Mekanism.packetHandler.sendToReceivers(new TileEntityMessage(Coord4D.get(tile()), getNetworkedData(new ArrayList())), new Range4D(Coord4D.get(tile())));
|
||||
player.addChatMessage(new ChatComponentText(EnumColor.DARK_BLUE + "[Mekanism]" + EnumColor.GREY + " " + MekanismUtils.localize("tooltip.configurator.toggleColor") + ": " + (color != null ? color.getName() : EnumColor.BLACK + MekanismUtils.localize("gui.none"))));
|
||||
|
||||
return true;
|
||||
|
|
|
@ -5,6 +5,7 @@ import io.netty.buffer.ByteBuf;
|
|||
import java.util.ArrayList;
|
||||
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.api.Range4D;
|
||||
import mekanism.common.IInvConfiguration;
|
||||
import mekanism.common.ITileNetwork;
|
||||
import mekanism.common.Mekanism;
|
||||
|
@ -52,7 +53,7 @@ public class PacketConfigurationUpdate implements IMessageHandler<ConfigurationU
|
|||
((IInvConfiguration)tile).getConfiguration()[message.configIndex] = 0;
|
||||
}
|
||||
|
||||
Mekanism.packetHandler.sendToAllAround(new TileEntityMessage(message.coord4D, ((ITileNetwork)tile).getNetworkedData(new ArrayList())), message.coord4D.getTargetPoint(50D));
|
||||
Mekanism.packetHandler.sendToReceivers(new TileEntityMessage(message.coord4D, ((ITileNetwork)tile).getNetworkedData(new ArrayList())), new Range4D(message.coord4D));
|
||||
}
|
||||
else if(message.packetType == ConfigurationPacket.EJECT_COLOR)
|
||||
{
|
||||
|
|
|
@ -2,6 +2,7 @@ package mekanism.common.network;
|
|||
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.api.Range4D;
|
||||
import mekanism.common.Mekanism;
|
||||
import mekanism.common.ObfuscatedNames;
|
||||
import mekanism.common.PacketHandler;
|
||||
|
@ -62,7 +63,7 @@ public class PacketPortableTeleport implements IMessageHandler<PortableTeleportM
|
|||
((EntityPlayerMP)player).playerNetServerHandler.setPlayerLocation(coords.xCoord+0.5, coords.yCoord+1, coords.zCoord+0.5, player.rotationYaw, player.rotationPitch);
|
||||
|
||||
world.playSoundAtEntity(player, "mob.endermen.portal", 1.0F, 1.0F);
|
||||
Mekanism.packetHandler.sendToAllAround(new PortalFXMessage(coords), coords.getTargetPoint(40D));
|
||||
Mekanism.packetHandler.sendToReceivers(new PortalFXMessage(coords), new Range4D(coords));
|
||||
} catch(Exception e) {}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,6 +8,7 @@ import java.util.HashSet;
|
|||
import java.util.List;
|
||||
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.api.Range4D;
|
||||
import mekanism.common.ITileComponent;
|
||||
import mekanism.common.ITileNetwork;
|
||||
import mekanism.common.Mekanism;
|
||||
|
@ -182,7 +183,7 @@ public abstract class TileEntityBasicBlock extends TileEntity implements IWrench
|
|||
|
||||
if(!(facing == clientFacing || worldObj.isRemote))
|
||||
{
|
||||
Mekanism.packetHandler.sendToDimension(new TileEntityMessage(Coord4D.get(this), getNetworkedData(new ArrayList())), worldObj.provider.dimensionId);
|
||||
Mekanism.packetHandler.sendToReceivers(new TileEntityMessage(Coord4D.get(this), getNetworkedData(new ArrayList())), new Range4D(Coord4D.get(this)));
|
||||
worldObj.notifyBlocksOfNeighborChange(xCoord, yCoord, zCoord, worldObj.getBlock(xCoord, yCoord, zCoord));
|
||||
clientFacing = facing;
|
||||
}
|
||||
|
@ -233,7 +234,7 @@ public abstract class TileEntityBasicBlock extends TileEntity implements IWrench
|
|||
if(redstone != power)
|
||||
{
|
||||
redstone = power;
|
||||
Mekanism.packetHandler.sendToDimension(new TileEntityMessage(Coord4D.get(this), getNetworkedData(new ArrayList())), worldObj.provider.dimensionId);
|
||||
Mekanism.packetHandler.sendToReceivers(new TileEntityMessage(Coord4D.get(this), getNetworkedData(new ArrayList())), new Range4D(Coord4D.get(this)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,6 +5,7 @@ import io.netty.buffer.ByteBuf;
|
|||
import java.util.ArrayList;
|
||||
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.api.Range4D;
|
||||
import mekanism.api.MekanismConfig.general;
|
||||
import mekanism.client.sound.IHasSound;
|
||||
import mekanism.common.IActiveState;
|
||||
|
@ -116,7 +117,7 @@ public abstract class TileEntityBasicMachine extends TileEntityElectricBlock imp
|
|||
|
||||
if(updateDelay == 0 && clientActive != isActive)
|
||||
{
|
||||
Mekanism.packetHandler.sendToAll(new TileEntityMessage(Coord4D.get(this), getNetworkedData(new ArrayList())));
|
||||
Mekanism.packetHandler.sendToReceivers(new TileEntityMessage(Coord4D.get(this), getNetworkedData(new ArrayList())), new Range4D(Coord4D.get(this)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -231,7 +232,7 @@ public abstract class TileEntityBasicMachine extends TileEntityElectricBlock imp
|
|||
|
||||
if(clientActive != active && updateDelay == 0)
|
||||
{
|
||||
Mekanism.packetHandler.sendToAll(new TileEntityMessage(Coord4D.get(this), getNetworkedData(new ArrayList())));
|
||||
Mekanism.packetHandler.sendToReceivers(new TileEntityMessage(Coord4D.get(this), getNetworkedData(new ArrayList())), new Range4D(Coord4D.get(this)));
|
||||
|
||||
updateDelay = 10;
|
||||
clientActive = active;
|
||||
|
|
|
@ -6,6 +6,7 @@ import java.util.ArrayList;
|
|||
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.api.IConfigurable;
|
||||
import mekanism.api.Range4D;
|
||||
import mekanism.api.util.StackUtils;
|
||||
import mekanism.common.IActiveState;
|
||||
import mekanism.common.ILogisticalTransporter;
|
||||
|
@ -376,7 +377,7 @@ public class TileEntityBin extends TileEntityBasicBlock implements ISidedInvento
|
|||
if(!worldObj.isRemote)
|
||||
{
|
||||
MekanismUtils.saveChunk(this);
|
||||
Mekanism.packetHandler.sendToAll(new TileEntityMessage(Coord4D.get(this), getNetworkedData(new ArrayList())));
|
||||
Mekanism.packetHandler.sendToReceivers(new TileEntityMessage(Coord4D.get(this), getNetworkedData(new ArrayList())), new Range4D(Coord4D.get(this)));
|
||||
prevCount = getItemCount();
|
||||
sortStacks();
|
||||
}
|
||||
|
@ -488,7 +489,7 @@ public class TileEntityBin extends TileEntityBasicBlock implements ISidedInvento
|
|||
|
||||
if(clientActive != active)
|
||||
{
|
||||
Mekanism.packetHandler.sendToAll(new TileEntityMessage(Coord4D.get(this), getNetworkedData(new ArrayList())));
|
||||
Mekanism.packetHandler.sendToReceivers(new TileEntityMessage(Coord4D.get(this), getNetworkedData(new ArrayList())), new Range4D(Coord4D.get(this)));
|
||||
|
||||
clientActive = active;
|
||||
}
|
||||
|
|
|
@ -5,6 +5,7 @@ import io.netty.buffer.ByteBuf;
|
|||
import java.util.ArrayList;
|
||||
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.api.Range4D;
|
||||
import mekanism.common.ITileNetwork;
|
||||
import mekanism.common.Mekanism;
|
||||
import mekanism.common.network.PacketDataRequest.DataRequestMessage;
|
||||
|
@ -29,7 +30,7 @@ public class TileEntityBoundingBlock extends TileEntity implements ITileNetwork
|
|||
mainY = y;
|
||||
mainZ = z;
|
||||
|
||||
Mekanism.packetHandler.sendToAll(new TileEntityMessage(Coord4D.get(this), getNetworkedData(new ArrayList())));
|
||||
Mekanism.packetHandler.sendToReceivers(new TileEntityMessage(Coord4D.get(this), getNetworkedData(new ArrayList())), new Range4D(Coord4D.get(this)));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -71,7 +72,7 @@ public class TileEntityBoundingBlock extends TileEntity implements ITileNetwork
|
|||
}
|
||||
|
||||
prevPower = power;
|
||||
Mekanism.packetHandler.sendToDimension(new TileEntityMessage(Coord4D.get(tileEntity), tileEntity.getNetworkedData(new ArrayList())), tileEntity.getWorldObj().provider.dimensionId);
|
||||
Mekanism.packetHandler.sendToReceivers(new TileEntityMessage(Coord4D.get(tileEntity), tileEntity.getNetworkedData(new ArrayList())), new Range4D(Coord4D.get(this)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,6 +10,7 @@ import java.util.List;
|
|||
import java.util.Random;
|
||||
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.api.Range4D;
|
||||
import mekanism.api.MekanismConfig.general;
|
||||
import mekanism.api.energy.EnergizedItemManager;
|
||||
import mekanism.api.energy.IEnergizedItem;
|
||||
|
@ -171,7 +172,7 @@ public class TileEntityChargepad extends TileEntityElectricBlock implements IAct
|
|||
|
||||
if(prevActive != active)
|
||||
{
|
||||
Mekanism.packetHandler.sendToAll(new TileEntityMessage(Coord4D.get(this), getNetworkedData(new ArrayList())));
|
||||
Mekanism.packetHandler.sendToReceivers(new TileEntityMessage(Coord4D.get(this), getNetworkedData(new ArrayList())), new Range4D(Coord4D.get(this)));
|
||||
}
|
||||
|
||||
prevActive = active;
|
||||
|
|
|
@ -6,6 +6,7 @@ import java.util.ArrayList;
|
|||
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.api.EnumColor;
|
||||
import mekanism.api.Range4D;
|
||||
import mekanism.api.MekanismConfig.usage;
|
||||
import mekanism.api.gas.Gas;
|
||||
import mekanism.api.gas.GasRegistry;
|
||||
|
@ -119,7 +120,7 @@ public class TileEntityChemicalCrystallizer extends TileEntityElectricBlock impl
|
|||
|
||||
if(updateDelay == 0 && clientActive != isActive)
|
||||
{
|
||||
Mekanism.packetHandler.sendToAll(new TileEntityMessage(Coord4D.get(this), getNetworkedData(new ArrayList())));
|
||||
Mekanism.packetHandler.sendToReceivers(new TileEntityMessage(Coord4D.get(this), getNetworkedData(new ArrayList())), new Range4D(Coord4D.get(this)));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -342,7 +343,7 @@ public class TileEntityChemicalCrystallizer extends TileEntityElectricBlock impl
|
|||
|
||||
if(clientActive != active && updateDelay == 0)
|
||||
{
|
||||
Mekanism.packetHandler.sendToAll(new TileEntityMessage(Coord4D.get(this), getNetworkedData(new ArrayList())));
|
||||
Mekanism.packetHandler.sendToReceivers(new TileEntityMessage(Coord4D.get(this), getNetworkedData(new ArrayList())), new Range4D(Coord4D.get(this)));
|
||||
|
||||
updateDelay = 10;
|
||||
clientActive = active;
|
||||
|
|
|
@ -5,6 +5,7 @@ import io.netty.buffer.ByteBuf;
|
|||
import java.util.ArrayList;
|
||||
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.api.Range4D;
|
||||
import mekanism.api.MekanismConfig.usage;
|
||||
import mekanism.api.gas.Gas;
|
||||
import mekanism.api.gas.GasRegistry;
|
||||
|
@ -95,7 +96,7 @@ public class TileEntityChemicalDissolutionChamber extends TileEntityElectricBloc
|
|||
|
||||
if(updateDelay == 0 && clientActive != isActive)
|
||||
{
|
||||
Mekanism.packetHandler.sendToAll(new TileEntityMessage(Coord4D.get(this), getNetworkedData(new ArrayList())));
|
||||
Mekanism.packetHandler.sendToReceivers(new TileEntityMessage(Coord4D.get(this), getNetworkedData(new ArrayList())), new Range4D(Coord4D.get(this)));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -351,7 +352,7 @@ public class TileEntityChemicalDissolutionChamber extends TileEntityElectricBloc
|
|||
|
||||
if(clientActive != active && updateDelay == 0)
|
||||
{
|
||||
Mekanism.packetHandler.sendToAll(new TileEntityMessage(Coord4D.get(this), getNetworkedData(new ArrayList())));
|
||||
Mekanism.packetHandler.sendToReceivers(new TileEntityMessage(Coord4D.get(this), getNetworkedData(new ArrayList())), new Range4D(Coord4D.get(this)));
|
||||
|
||||
updateDelay = 10;
|
||||
clientActive = active;
|
||||
|
|
|
@ -5,6 +5,7 @@ import io.netty.buffer.ByteBuf;
|
|||
import java.util.ArrayList;
|
||||
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.api.Range4D;
|
||||
import mekanism.api.MekanismConfig.usage;
|
||||
import mekanism.api.gas.Gas;
|
||||
import mekanism.api.gas.GasRegistry;
|
||||
|
@ -88,7 +89,7 @@ public class TileEntityChemicalInfuser extends TileEntityElectricBlock implement
|
|||
|
||||
if(updateDelay == 0 && clientActive != isActive)
|
||||
{
|
||||
Mekanism.packetHandler.sendToAll(new TileEntityMessage(Coord4D.get(this), getNetworkedData(new ArrayList())));
|
||||
Mekanism.packetHandler.sendToReceivers(new TileEntityMessage(Coord4D.get(this), getNetworkedData(new ArrayList())), new Range4D(Coord4D.get(this)));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -336,7 +337,7 @@ public class TileEntityChemicalInfuser extends TileEntityElectricBlock implement
|
|||
|
||||
if(clientActive != active && updateDelay == 0)
|
||||
{
|
||||
Mekanism.packetHandler.sendToAll(new TileEntityMessage(Coord4D.get(this), getNetworkedData(new ArrayList())));
|
||||
Mekanism.packetHandler.sendToReceivers(new TileEntityMessage(Coord4D.get(this), getNetworkedData(new ArrayList())), new Range4D(Coord4D.get(this)));
|
||||
|
||||
updateDelay = 10;
|
||||
clientActive = active;
|
||||
|
|
|
@ -5,6 +5,7 @@ import io.netty.buffer.ByteBuf;
|
|||
import java.util.ArrayList;
|
||||
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.api.Range4D;
|
||||
import mekanism.api.MekanismConfig.usage;
|
||||
import mekanism.api.gas.GasRegistry;
|
||||
import mekanism.api.gas.GasStack;
|
||||
|
@ -91,7 +92,7 @@ public class TileEntityChemicalOxidizer extends TileEntityElectricBlock implemen
|
|||
|
||||
if(updateDelay == 0 && clientActive != isActive)
|
||||
{
|
||||
Mekanism.packetHandler.sendToAll(new TileEntityMessage(Coord4D.get(this), getNetworkedData(new ArrayList())));
|
||||
Mekanism.packetHandler.sendToReceivers(new TileEntityMessage(Coord4D.get(this), getNetworkedData(new ArrayList())), new Range4D(Coord4D.get(this)));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -306,7 +307,7 @@ public class TileEntityChemicalOxidizer extends TileEntityElectricBlock implemen
|
|||
|
||||
if(clientActive != active && updateDelay == 0)
|
||||
{
|
||||
Mekanism.packetHandler.sendToAll(new TileEntityMessage(Coord4D.get(this), getNetworkedData(new ArrayList())));
|
||||
Mekanism.packetHandler.sendToReceivers(new TileEntityMessage(Coord4D.get(this), getNetworkedData(new ArrayList())), new Range4D(Coord4D.get(this)));
|
||||
|
||||
updateDelay = 10;
|
||||
clientActive = active;
|
||||
|
|
|
@ -5,6 +5,7 @@ import io.netty.buffer.ByteBuf;
|
|||
import java.util.ArrayList;
|
||||
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.api.Range4D;
|
||||
import mekanism.api.MekanismConfig.usage;
|
||||
import mekanism.api.gas.Gas;
|
||||
import mekanism.api.gas.GasRegistry;
|
||||
|
@ -101,7 +102,7 @@ public class TileEntityChemicalWasher extends TileEntityElectricBlock implements
|
|||
|
||||
if(updateDelay == 0 && clientActive != isActive)
|
||||
{
|
||||
Mekanism.packetHandler.sendToAll(new TileEntityMessage(Coord4D.get(this), getNetworkedData(new ArrayList())));
|
||||
Mekanism.packetHandler.sendToReceivers(new TileEntityMessage(Coord4D.get(this), getNetworkedData(new ArrayList())), new Range4D(Coord4D.get(this)));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -405,7 +406,7 @@ public class TileEntityChemicalWasher extends TileEntityElectricBlock implements
|
|||
|
||||
if(clientActive != active && updateDelay == 0)
|
||||
{
|
||||
Mekanism.packetHandler.sendToAll(new TileEntityMessage(Coord4D.get(this), getNetworkedData(new ArrayList())));
|
||||
Mekanism.packetHandler.sendToReceivers(new TileEntityMessage(Coord4D.get(this), getNetworkedData(new ArrayList())), new Range4D(Coord4D.get(this)));
|
||||
|
||||
updateDelay = 10;
|
||||
clientActive = active;
|
||||
|
|
|
@ -12,6 +12,7 @@ import java.util.Map;
|
|||
import java.util.Set;
|
||||
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.api.Range4D;
|
||||
import mekanism.api.MekanismConfig.usage;
|
||||
import mekanism.common.HashList;
|
||||
import mekanism.common.IActiveState;
|
||||
|
@ -974,7 +975,7 @@ public class TileEntityDigitalMiner extends TileEntityElectricBlock implements I
|
|||
|
||||
if(clientActive != active)
|
||||
{
|
||||
Mekanism.packetHandler.sendToAll(new TileEntityMessage(Coord4D.get(this), getNetworkedData(new ArrayList())));
|
||||
Mekanism.packetHandler.sendToReceivers(new TileEntityMessage(Coord4D.get(this), getNetworkedData(new ArrayList())), new Range4D(Coord4D.get(this)));
|
||||
|
||||
clientActive = active;
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@ import java.util.HashMap;
|
|||
import java.util.Map;
|
||||
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.api.Range4D;
|
||||
import mekanism.common.IFluidContainerManager;
|
||||
import mekanism.common.Mekanism;
|
||||
import mekanism.common.multiblock.IMultiblock;
|
||||
|
@ -166,7 +167,7 @@ public class TileEntityDynamicTank extends TileEntityContainerBlock implements I
|
|||
}
|
||||
}
|
||||
|
||||
Mekanism.packetHandler.sendToAll(new TileEntityMessage(Coord4D.get(this), getNetworkedData(new ArrayList())));
|
||||
Mekanism.packetHandler.sendToReceivers(new TileEntityMessage(Coord4D.get(this), getNetworkedData(new ArrayList())), new Range4D(Coord4D.get(this)));
|
||||
}
|
||||
|
||||
prevStructure = structure != null;
|
||||
|
@ -278,7 +279,7 @@ public class TileEntityDynamicTank extends TileEntityContainerBlock implements I
|
|||
structure.fluidStored = null;
|
||||
}
|
||||
|
||||
Mekanism.packetHandler.sendToAll(new TileEntityMessage(Coord4D.get(this), getNetworkedData(new ArrayList())));
|
||||
Mekanism.packetHandler.sendToReceivers(new TileEntityMessage(Coord4D.get(this), getNetworkedData(new ArrayList())), new Range4D(Coord4D.get(this)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -339,7 +340,7 @@ public class TileEntityDynamicTank extends TileEntityContainerBlock implements I
|
|||
markDirty();
|
||||
}
|
||||
|
||||
Mekanism.packetHandler.sendToAll(new TileEntityMessage(Coord4D.get(this), getNetworkedData(new ArrayList())));
|
||||
Mekanism.packetHandler.sendToReceivers(new TileEntityMessage(Coord4D.get(this), getNetworkedData(new ArrayList())), new Range4D(Coord4D.get(this)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -483,7 +484,7 @@ public class TileEntityDynamicTank extends TileEntityContainerBlock implements I
|
|||
|
||||
if(tileEntity != null && tileEntity.isRendering)
|
||||
{
|
||||
Mekanism.packetHandler.sendToAll(new TileEntityMessage(Coord4D.get(tileEntity), tileEntity.getNetworkedData(new ArrayList())));
|
||||
Mekanism.packetHandler.sendToReceivers(new TileEntityMessage(Coord4D.get(this), getNetworkedData(new ArrayList())), new Range4D(Coord4D.get(this)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -123,10 +123,7 @@ public class TileEntityElectricPump extends TileEntityElectricBlock implements I
|
|||
{
|
||||
if(getEnergy() >= usage.electricPumpUsage && (fluidTank.getFluid() == null || fluidTank.getFluid().amount+FluidContainerRegistry.BUCKET_VOLUME <= fluidTank.getCapacity()))
|
||||
{
|
||||
if(suck(true))
|
||||
{
|
||||
Mekanism.packetHandler.sendToAllAround(new TileEntityMessage(Coord4D.get(this), getNetworkedData(new ArrayList())), Coord4D.get(this).getTargetPoint(50D));
|
||||
}
|
||||
suck(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@ import java.util.ArrayList;
|
|||
import mekanism.api.MekanismConfig.general;
|
||||
import mekanism.api.recipe.ChemicalPair;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.api.Range4D;
|
||||
import mekanism.api.gas.Gas;
|
||||
import mekanism.api.gas.GasRegistry;
|
||||
import mekanism.api.gas.GasStack;
|
||||
|
@ -162,7 +163,7 @@ public class TileEntityElectrolyticSeparator extends TileEntityElectricBlock imp
|
|||
|
||||
if(worldObj.rand.nextInt(3) == 2)
|
||||
{
|
||||
Mekanism.packetHandler.sendToAllAround(new TileEntityMessage(Coord4D.get(this), getParticlePacket(0, new ArrayList())), Coord4D.get(this).getTargetPoint(40D));
|
||||
Mekanism.packetHandler.sendToReceivers(new TileEntityMessage(Coord4D.get(this), getParticlePacket(0, new ArrayList())), new Range4D(Coord4D.get(this)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -188,7 +189,7 @@ public class TileEntityElectrolyticSeparator extends TileEntityElectricBlock imp
|
|||
|
||||
if(worldObj.rand.nextInt(3) == 2)
|
||||
{
|
||||
Mekanism.packetHandler.sendToAllAround(new TileEntityMessage(Coord4D.get(this), getParticlePacket(1, new ArrayList())), Coord4D.get(this).getTargetPoint(40D));
|
||||
Mekanism.packetHandler.sendToReceivers(new TileEntityMessage(Coord4D.get(this), getParticlePacket(1, new ArrayList())), new Range4D(Coord4D.get(this)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,6 +6,7 @@ import java.util.ArrayList;
|
|||
import java.util.EnumSet;
|
||||
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.api.Range4D;
|
||||
import mekanism.common.IRedstoneControl;
|
||||
import mekanism.common.Mekanism;
|
||||
import mekanism.common.PacketHandler;
|
||||
|
@ -68,7 +69,7 @@ public class TileEntityEnergyCube extends TileEntityElectricBlock implements IPe
|
|||
|
||||
if(newScale != prevScale)
|
||||
{
|
||||
Mekanism.packetHandler.sendToAllAround(new TileEntityMessage(Coord4D.get(this), getNetworkedData(new ArrayList())), Coord4D.get(this).getTargetPoint(50D));
|
||||
Mekanism.packetHandler.sendToReceivers(new TileEntityMessage(Coord4D.get(this), getNetworkedData(new ArrayList())), new Range4D(Coord4D.get(this)));
|
||||
}
|
||||
|
||||
prevScale = newScale;
|
||||
|
|
|
@ -7,6 +7,7 @@ import java.util.List;
|
|||
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.api.EnumColor;
|
||||
import mekanism.api.Range4D;
|
||||
import mekanism.api.MekanismConfig.general;
|
||||
import mekanism.api.MekanismConfig.usage;
|
||||
import mekanism.api.gas.Gas;
|
||||
|
@ -157,7 +158,7 @@ public class TileEntityFactory extends TileEntityElectricBlock implements IPerip
|
|||
|
||||
if(updateDelay == 0 && clientActive != isActive)
|
||||
{
|
||||
Mekanism.packetHandler.sendToAll(new TileEntityMessage(Coord4D.get(this), getNetworkedData(new ArrayList())));
|
||||
Mekanism.packetHandler.sendToReceivers(new TileEntityMessage(Coord4D.get(this), getNetworkedData(new ArrayList())), new Range4D(Coord4D.get(this)));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -784,7 +785,7 @@ public class TileEntityFactory extends TileEntityElectricBlock implements IPerip
|
|||
|
||||
if(clientActive != active && updateDelay == 0)
|
||||
{
|
||||
Mekanism.packetHandler.sendToAll(new TileEntityMessage(Coord4D.get(this), getNetworkedData(new ArrayList())));
|
||||
Mekanism.packetHandler.sendToReceivers(new TileEntityMessage(Coord4D.get(this), getNetworkedData(new ArrayList())), new Range4D(Coord4D.get(this)));
|
||||
|
||||
updateDelay = 10;
|
||||
clientActive = active;
|
||||
|
|
|
@ -8,6 +8,7 @@ import java.util.EnumSet;
|
|||
import mekanism.api.Coord4D;
|
||||
import mekanism.api.EnumColor;
|
||||
import mekanism.api.IFilterAccess;
|
||||
import mekanism.api.Range4D;
|
||||
import mekanism.common.HashList;
|
||||
import mekanism.common.IActiveState;
|
||||
import mekanism.common.ILogisticalTransporter;
|
||||
|
@ -494,7 +495,7 @@ public class TileEntityLogisticalSorter extends TileEntityElectricBlock implemen
|
|||
{
|
||||
if(!worldObj.isRemote)
|
||||
{
|
||||
Mekanism.packetHandler.sendToAllAround(new TileEntityMessage(Coord4D.get(this), getFilterPacket(new ArrayList())), Coord4D.get(this).getTargetPoint(50D));
|
||||
Mekanism.packetHandler.sendToReceivers(new TileEntityMessage(Coord4D.get(this), getFilterPacket(new ArrayList())), new Range4D(Coord4D.get(this)));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -517,7 +518,7 @@ public class TileEntityLogisticalSorter extends TileEntityElectricBlock implemen
|
|||
|
||||
if(clientActive != active)
|
||||
{
|
||||
Mekanism.packetHandler.sendToAll(new TileEntityMessage(Coord4D.get(this), getNetworkedData(new ArrayList())));
|
||||
Mekanism.packetHandler.sendToReceivers(new TileEntityMessage(Coord4D.get(this), getNetworkedData(new ArrayList())), new Range4D(Coord4D.get(this)));
|
||||
|
||||
if(active)
|
||||
{
|
||||
|
|
|
@ -6,6 +6,7 @@ import java.util.ArrayList;
|
|||
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.api.EnumColor;
|
||||
import mekanism.api.Range4D;
|
||||
import mekanism.api.MekanismConfig.general;
|
||||
import mekanism.api.MekanismConfig.usage;
|
||||
import mekanism.api.infuse.InfuseObject;
|
||||
|
@ -129,7 +130,7 @@ public class TileEntityMetallurgicInfuser extends TileEntityElectricBlock implem
|
|||
|
||||
if(updateDelay == 0 && clientActive != isActive)
|
||||
{
|
||||
Mekanism.packetHandler.sendToAll(new TileEntityMessage(Coord4D.get(this), getNetworkedData(new ArrayList())));
|
||||
Mekanism.packetHandler.sendToReceivers(new TileEntityMessage(Coord4D.get(this), getNetworkedData(new ArrayList())), new Range4D(Coord4D.get(this)));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -516,7 +517,7 @@ public class TileEntityMetallurgicInfuser extends TileEntityElectricBlock implem
|
|||
|
||||
if(clientActive != active && updateDelay == 0)
|
||||
{
|
||||
Mekanism.packetHandler.sendToAll(new TileEntityMessage(Coord4D.get(this), getNetworkedData(new ArrayList())));
|
||||
Mekanism.packetHandler.sendToReceivers(new TileEntityMessage(Coord4D.get(this), getNetworkedData(new ArrayList())), new Range4D(Coord4D.get(this)));
|
||||
|
||||
updateDelay = 10;
|
||||
clientActive = active;
|
||||
|
|
|
@ -6,6 +6,7 @@ import java.util.ArrayList;
|
|||
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.api.IConfigurable;
|
||||
import mekanism.api.Range4D;
|
||||
import mekanism.api.MekanismConfig.general;
|
||||
import mekanism.api.gas.IGasItem;
|
||||
import mekanism.common.IActiveState;
|
||||
|
@ -447,7 +448,7 @@ public class TileEntityPortableTank extends TileEntityContainerBlock implements
|
|||
|
||||
if(clientActive != active && updateDelay == 0)
|
||||
{
|
||||
Mekanism.packetHandler.sendToAll(new TileEntityMessage(Coord4D.get(this), getNetworkedData(new ArrayList())));
|
||||
Mekanism.packetHandler.sendToReceivers(new TileEntityMessage(Coord4D.get(this), getNetworkedData(new ArrayList())), new Range4D(Coord4D.get(this)));
|
||||
|
||||
updateDelay = 10;
|
||||
clientActive = active;
|
||||
|
|
|
@ -6,6 +6,7 @@ import java.util.ArrayList;
|
|||
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.api.MekanismConfig.usage;
|
||||
import mekanism.api.Range4D;
|
||||
import mekanism.api.gas.Gas;
|
||||
import mekanism.api.gas.GasRegistry;
|
||||
import mekanism.api.gas.GasStack;
|
||||
|
@ -94,7 +95,7 @@ public class TileEntityRotaryCondensentrator extends TileEntityElectricBlock imp
|
|||
|
||||
if(updateDelay == 0 && clientActive != isActive)
|
||||
{
|
||||
Mekanism.packetHandler.sendToAll(new TileEntityMessage(Coord4D.get(this), getNetworkedData(new ArrayList())));
|
||||
Mekanism.packetHandler.sendToReceivers(new TileEntityMessage(Coord4D.get(this), getNetworkedData(new ArrayList())), new Range4D(Coord4D.get(this)));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -448,7 +449,7 @@ public class TileEntityRotaryCondensentrator extends TileEntityElectricBlock imp
|
|||
|
||||
if(clientActive != active && updateDelay == 0)
|
||||
{
|
||||
Mekanism.packetHandler.sendToAll(new TileEntityMessage(Coord4D.get(this), getNetworkedData(new ArrayList())));
|
||||
Mekanism.packetHandler.sendToReceivers(new TileEntityMessage(Coord4D.get(this), getNetworkedData(new ArrayList())), new Range4D(Coord4D.get(this)));
|
||||
|
||||
updateDelay = 10;
|
||||
clientActive = active;
|
||||
|
|
|
@ -8,6 +8,7 @@ import java.util.Set;
|
|||
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.api.ISalinationSolar;
|
||||
import mekanism.api.Range4D;
|
||||
import mekanism.common.Mekanism;
|
||||
import mekanism.common.network.PacketTileEntity.TileEntityMessage;
|
||||
import mekanism.common.tank.TankUpdateProtocol;
|
||||
|
@ -111,7 +112,7 @@ public class TileEntitySalinationController extends TileEntitySalinationBlock
|
|||
{
|
||||
if(Math.abs((float)waterTank.getFluidAmount()/waterTank.getCapacity()-prevScale) > 0.01)
|
||||
{
|
||||
Mekanism.packetHandler.sendToAllAround(new TileEntityMessage(Coord4D.get(this), getNetworkedData(new ArrayList())), Coord4D.get(this).getTargetPoint(50D));
|
||||
Mekanism.packetHandler.sendToReceivers(new TileEntityMessage(Coord4D.get(this), getNetworkedData(new ArrayList())), new Range4D(Coord4D.get(this)));
|
||||
prevScale = (float)waterTank.getFluidAmount()/waterTank.getCapacity();
|
||||
}
|
||||
}
|
||||
|
@ -147,7 +148,7 @@ public class TileEntitySalinationController extends TileEntitySalinationBlock
|
|||
|
||||
if(structured != prev)
|
||||
{
|
||||
Mekanism.packetHandler.sendToAllAround(new TileEntityMessage(Coord4D.get(this), getNetworkedData(new ArrayList())), Coord4D.get(this).getTargetPoint(50D));
|
||||
Mekanism.packetHandler.sendToReceivers(new TileEntityMessage(Coord4D.get(this), getNetworkedData(new ArrayList())), new Range4D(Coord4D.get(this)));
|
||||
}
|
||||
|
||||
if(structured)
|
||||
|
|
|
@ -8,6 +8,7 @@ import java.util.EnumSet;
|
|||
import mekanism.api.Coord4D;
|
||||
import mekanism.api.MekanismConfig.general;
|
||||
import mekanism.api.MekanismConfig.usage;
|
||||
import mekanism.api.Range4D;
|
||||
import mekanism.common.IActiveState;
|
||||
import mekanism.common.IRedstoneControl;
|
||||
import mekanism.common.Mekanism;
|
||||
|
@ -63,7 +64,7 @@ public class TileEntitySeismicVibrator extends TileEntityElectricBlock implement
|
|||
|
||||
if(updateDelay == 0 && clientActive != isActive)
|
||||
{
|
||||
Mekanism.packetHandler.sendToAll(new TileEntityMessage(Coord4D.get(this), getNetworkedData(new ArrayList())));
|
||||
Mekanism.packetHandler.sendToReceivers(new TileEntityMessage(Coord4D.get(this), getNetworkedData(new ArrayList())), new Range4D(Coord4D.get(this)));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -148,7 +149,7 @@ public class TileEntitySeismicVibrator extends TileEntityElectricBlock implement
|
|||
|
||||
if(clientActive != active && updateDelay == 0)
|
||||
{
|
||||
Mekanism.packetHandler.sendToAll(new TileEntityMessage(Coord4D.get(this), getNetworkedData(new ArrayList())));
|
||||
Mekanism.packetHandler.sendToReceivers(new TileEntityMessage(Coord4D.get(this), getNetworkedData(new ArrayList())), new Range4D(Coord4D.get(this)));
|
||||
|
||||
updateDelay = 10;
|
||||
clientActive = active;
|
||||
|
|
|
@ -38,7 +38,7 @@ public class GuiSolarGenerator extends GuiMekanism
|
|||
public List<String> getInfo()
|
||||
{
|
||||
return ListUtils.asList(
|
||||
"Producing: " + MekanismUtils.getEnergyDisplay(tileEntity.isActive ? tileEntity.GENERATION_RATE : 0) + "/t",
|
||||
"Producing: " + MekanismUtils.getEnergyDisplay(tileEntity.isActive ? tileEntity.getProduction() : 0) + "/t",
|
||||
"Storing: " + MekanismUtils.getEnergyDisplay(tileEntity.getEnergy()),
|
||||
"Max Output: " + MekanismUtils.getEnergyDisplay(tileEntity.getMaxOutput()) + "/t");
|
||||
}
|
||||
|
|
|
@ -6,6 +6,7 @@ import java.util.ArrayList;
|
|||
import java.util.EnumSet;
|
||||
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.api.Range4D;
|
||||
import mekanism.api.MekanismConfig.general;
|
||||
import mekanism.client.sound.IHasSound;
|
||||
import mekanism.common.IActiveState;
|
||||
|
@ -18,7 +19,6 @@ import mekanism.common.util.MekanismUtils;
|
|||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import cpw.mods.fml.common.Optional.Interface;
|
||||
import cpw.mods.fml.common.Optional.Method;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
|
@ -93,7 +93,7 @@ public abstract class TileEntityGenerator extends TileEntityElectricBlock implem
|
|||
if(updateDelay == 0 && clientActive != isActive)
|
||||
{
|
||||
clientActive = isActive;
|
||||
Mekanism.packetHandler.sendToAll(new TileEntityMessage(Coord4D.get(this), getNetworkedData(new ArrayList())));
|
||||
Mekanism.packetHandler.sendToReceivers(new TileEntityMessage(Coord4D.get(this), getNetworkedData(new ArrayList())), new Range4D(Coord4D.get(this)));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -152,7 +152,7 @@ public abstract class TileEntityGenerator extends TileEntityElectricBlock implem
|
|||
|
||||
if(clientActive != active && updateDelay == 0)
|
||||
{
|
||||
Mekanism.packetHandler.sendToAll(new TileEntityMessage(Coord4D.get(this), getNetworkedData(new ArrayList())));
|
||||
Mekanism.packetHandler.sendToReceivers(new TileEntityMessage(Coord4D.get(this), getNetworkedData(new ArrayList())), new Range4D(Coord4D.get(this)));
|
||||
|
||||
updateDelay = general.UPDATE_DELAY;
|
||||
clientActive = active;
|
||||
|
|
Loading…
Reference in a new issue