Class FabricNetworking
java.lang.Object
com.wildfire.fabric.common.networking.FabricNetworking
- All Implemented Interfaces:
WildfireNetworking
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final net.fabricmc.fabric.api.networking.v1.context.PacketContext.Key<Integer> Fields inherited from interface WildfireNetworking
INSTANCE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancanSendToPlayer(net.minecraft.server.level.ServerPlayer player, net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<?> type) booleancanSendToServer(net.minecraft.network.Connection connection, net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<?> type) Collection<net.minecraft.server.level.ServerPlayer> playersTracking(net.minecraft.world.entity.Entity toSync) voidsendToClient(net.minecraft.server.level.ServerPlayer sendTo, net.minecraft.network.protocol.common.custom.CustomPacketPayload packet) voidsendToServer(net.minecraft.network.protocol.common.custom.CustomPacketPayload packet) booleanversionMatches(net.minecraft.network.Connection connection)
-
Field Details
-
VERSION
public static final net.fabricmc.fabric.api.networking.v1.context.PacketContext.Key<Integer> VERSION
-
-
Constructor Details
-
FabricNetworking
public FabricNetworking()
-
-
Method Details
-
canSendToPlayer
public boolean canSendToPlayer(net.minecraft.server.level.ServerPlayer player, net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<?> type) - Specified by:
canSendToPlayerin interfaceWildfireNetworking
-
canSendToServer
public boolean canSendToServer(net.minecraft.network.Connection connection, net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<?> type) - Specified by:
canSendToServerin interfaceWildfireNetworking
-
versionMatches
public boolean versionMatches(net.minecraft.network.Connection connection) - Specified by:
versionMatchesin interfaceWildfireNetworking
-
sendToClient
public void sendToClient(net.minecraft.server.level.ServerPlayer sendTo, net.minecraft.network.protocol.common.custom.CustomPacketPayload packet) - Specified by:
sendToClientin interfaceWildfireNetworking
-
sendToServer
public void sendToServer(net.minecraft.network.protocol.common.custom.CustomPacketPayload packet) - Specified by:
sendToServerin interfaceWildfireNetworking
-
playersTracking
public Collection<net.minecraft.server.level.ServerPlayer> playersTracking(net.minecraft.world.entity.Entity toSync) - Specified by:
playersTrackingin interfaceWildfireNetworking
-