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 net.minecraftforge.fml.common.network.NetworkRegistry.TargetPoint |
getTargetPoint(net.minecraft.tileentity.TileEntity tileEntity,
int range) |
static net.minecraftforge.fml.common.network.NetworkRegistry.TargetPoint |
getTargetPoint(net.minecraft.world.World world,
net.minecraft.util.BlockPos position,
int range) |
static net.minecraftforge.fml.common.network.NetworkRegistry.TargetPoint |
getTargetPoint(net.minecraft.world.World world,
double x,
double y,
double z,
int range) |
net.minecraftforge.fml.common.network.simpleimpl.SimpleNetworkWrapper |
getWrapper() |
void |
init() |
void |
onClientTick(net.minecraftforge.fml.common.gameevent.TickEvent.ClientTickEvent event) |
void |
onServerTick(net.minecraftforge.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 net.minecraftforge.fml.common.network.simpleimpl.SimpleNetworkWrapper getWrapper()
public static net.minecraftforge.fml.common.network.NetworkRegistry.TargetPoint getTargetPoint(net.minecraft.world.World world,
double x,
double y,
double z,
int range)
public static net.minecraftforge.fml.common.network.NetworkRegistry.TargetPoint getTargetPoint(net.minecraft.world.World world,
net.minecraft.util.BlockPos position,
int range)
public static net.minecraftforge.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(net.minecraftforge.fml.common.gameevent.TickEvent.ServerTickEvent event)
public void onClientTick(net.minecraftforge.fml.common.gameevent.TickEvent.ClientTickEvent event)