public final class Network
extends java.lang.Object
Aside from managing the mod's channel this also has facilities for throttling package throughput to avoid overloading the network when a large number of casings are active and nearby players. Throttling is applied to particle effect emission and module packets where possible.
| Modifier and Type | Field and Description |
|---|---|
static Network |
INSTANCE |
static int |
RANGE_HIGH |
static int |
RANGE_LOW |
static int |
RANGE_MEDIUM |
| Modifier and Type | Method and Description |
|---|---|
static cpw.mods.fml.common.network.NetworkRegistry.TargetPoint |
getTargetPoint(net.minecraft.tileentity.TileEntity tileEntity,
int range) |
static cpw.mods.fml.common.network.NetworkRegistry.TargetPoint |
getTargetPoint(net.minecraft.world.World world,
double x,
double y,
double z,
int range) |
cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper |
getWrapper() |
void |
init() |
void |
onClientTick(cpw.mods.fml.common.gameevent.TickEvent.ClientTickEvent event) |
void |
onServerTick(cpw.mods.fml.common.gameevent.TickEvent.ServerTickEvent event) |
static void |
sendModuleData(Casing casing,
Face face,
io.netty.buffer.ByteBuf data,
byte type) |
static void |
sendModuleData(Casing casing,
Face face,
net.minecraft.nbt.NBTTagCompound data,
byte type) |
static void |
sendPipeEffect(net.minecraft.world.World world,
double x,
double y,
double z) |
public static final Network INSTANCE
public static final int RANGE_HIGH
public static final int RANGE_MEDIUM
public static final int RANGE_LOW
public void init()
public cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper getWrapper()
public static cpw.mods.fml.common.network.NetworkRegistry.TargetPoint getTargetPoint(net.minecraft.world.World world,
double x,
double y,
double z,
int range)
public static cpw.mods.fml.common.network.NetworkRegistry.TargetPoint getTargetPoint(net.minecraft.tileentity.TileEntity tileEntity,
int range)
public static void sendModuleData(Casing casing, Face face, net.minecraft.nbt.NBTTagCompound data, byte type)
public static void sendModuleData(Casing casing, Face face, io.netty.buffer.ByteBuf data, byte type)
public static void sendPipeEffect(net.minecraft.world.World world,
double x,
double y,
double z)
public void onServerTick(cpw.mods.fml.common.gameevent.TickEvent.ServerTickEvent event)
public void onClientTick(cpw.mods.fml.common.gameevent.TickEvent.ClientTickEvent event)