Class RaccoonNetworking
java.lang.Object
net.kamkeyke.raccooncore.networking.RaccoonNetworking
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraftforge.network.simple.SimpleChannelchannel()<MSG> voidregisterPacket(Class<MSG> packetClass, net.minecraft.network.FriendlyByteBuf.Reader<MSG> decoder, BiConsumer<MSG, net.minecraft.network.FriendlyByteBuf> encoder, BiConsumer<MSG, Supplier<net.minecraftforge.network.NetworkEvent.Context>> handler) <MSG> voidregisterPacket(Class<MSG> packetClass, net.minecraft.network.FriendlyByteBuf.Reader<MSG> decoder, BiConsumer<MSG, net.minecraft.network.FriendlyByteBuf> encoder, BiConsumer<MSG, Supplier<net.minecraftforge.network.NetworkEvent.Context>> handler, net.minecraftforge.network.NetworkDirection direction) <MSG> voidsendNearPlayer(MSG message, net.minecraft.server.level.ServerPlayer player, double radius) <MSG> voidsendToAllPlayers(MSG message) <MSG> voidsendToClient(MSG message, net.minecraft.server.level.ServerPlayer player) <MSG> voidsendToPlayers(MSG message, Iterable<? extends net.minecraft.server.level.ServerPlayer> players) <MSG> voidsendToServer(MSG message)
-
Constructor Details
-
RaccoonNetworking
-
-
Method Details
-
channel
public net.minecraftforge.network.simple.SimpleChannel channel() -
registerPacket
public <MSG> void registerPacket(Class<MSG> packetClass, net.minecraft.network.FriendlyByteBuf.Reader<MSG> decoder, BiConsumer<MSG, net.minecraft.network.FriendlyByteBuf> encoder, BiConsumer<MSG, Supplier<net.minecraftforge.network.NetworkEvent.Context>> handler) -
registerPacket
public <MSG> void registerPacket(Class<MSG> packetClass, net.minecraft.network.FriendlyByteBuf.Reader<MSG> decoder, BiConsumer<MSG, net.minecraft.network.FriendlyByteBuf> encoder, BiConsumer<MSG, Supplier<net.minecraftforge.network.NetworkEvent.Context>> handler, net.minecraftforge.network.NetworkDirection direction) -
sendToServer
public <MSG> void sendToServer(MSG message) -
sendToClient
public <MSG> void sendToClient(MSG message, net.minecraft.server.level.ServerPlayer player) -
sendToAllPlayers
public <MSG> void sendToAllPlayers(MSG message) -
sendNearPlayer
public <MSG> void sendNearPlayer(MSG message, net.minecraft.server.level.ServerPlayer player, double radius) -
sendToPlayers
public <MSG> void sendToPlayers(MSG message, Iterable<? extends net.minecraft.server.level.ServerPlayer> players)
-