Class EntityDataDictionary

java.lang.Object
com.stereowalker.unionlib.network.syncher.EntityDataDictionary

public class EntityDataDictionary extends Object
  • Field Details

  • Constructor Details

    • EntityDataDictionary

      public EntityDataDictionary()
  • Method Details

    • registerLocal

      public static int registerLocal(net.minecraft.resources.Identifier key)
      Called during static initialization of your entity classes
    • getLocalCount

      public static int getLocalCount()
    • getSyncMap

      public static Map<net.minecraft.resources.Identifier, Integer> getSyncMap()
      Used by the server to build the login dictionary packet
    • buildTranslationMap

      public static void buildTranslationMap(Map<net.minecraft.resources.Identifier, Integer> serverMap)
      Called by the client when it receives the dictionary packet
    • toNetworkId

      public static int toNetworkId(int localId)
      Translates local -> server (for sending packets)
    • toLocalId

      public static int toLocalId(int networkId)
      Translates server -> local (for reading packets)