Class FabricNetworking

java.lang.Object
com.wildfire.fabric.common.networking.FabricNetworking
All Implemented Interfaces:
WildfireNetworking

public class FabricNetworking extends Object implements WildfireNetworking
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final net.fabricmc.fabric.api.networking.v1.context.PacketContext.Key<Integer>
     

    Fields inherited from interface WildfireNetworking

    INSTANCE
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    canSendToPlayer(net.minecraft.server.level.ServerPlayer player, net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<?> type)
     
    boolean
    canSendToServer(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)
     
    void
    sendToClient(net.minecraft.server.level.ServerPlayer sendTo, net.minecraft.network.protocol.common.custom.CustomPacketPayload packet)
     
    void
    sendToServer(net.minecraft.network.protocol.common.custom.CustomPacketPayload packet)
     
    boolean
    versionMatches(net.minecraft.network.Connection connection)
     

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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:
      canSendToPlayer in interface WildfireNetworking
    • canSendToServer

      public boolean canSendToServer(net.minecraft.network.Connection connection, net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<?> type)
      Specified by:
      canSendToServer in interface WildfireNetworking
    • versionMatches

      public boolean versionMatches(net.minecraft.network.Connection connection)
      Specified by:
      versionMatches in interface WildfireNetworking
    • sendToClient

      public void sendToClient(net.minecraft.server.level.ServerPlayer sendTo, net.minecraft.network.protocol.common.custom.CustomPacketPayload packet)
      Specified by:
      sendToClient in interface WildfireNetworking
    • sendToServer

      public void sendToServer(net.minecraft.network.protocol.common.custom.CustomPacketPayload packet)
      Specified by:
      sendToServer in interface WildfireNetworking
    • playersTracking

      public Collection<net.minecraft.server.level.ServerPlayer> playersTracking(net.minecraft.world.entity.Entity toSync)
      Specified by:
      playersTracking in interface WildfireNetworking