Class EntityDataDictionary

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

public class EntityDataDictionary extends Object
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    buildTranslationMap(Map<net.minecraft.resources.ResourceLocation,Integer> serverMap)
    Called by the client when it receives the dictionary packet
    static int
     
    static Map<net.minecraft.resources.ResourceLocation,Integer>
    Used by the server to build the login dictionary packet
    static int
    registerLocal(net.minecraft.resources.ResourceLocation key)
    Called during static initialization of your entity classes
    static int
    toLocalId(int networkId)
    Translates server -> local (for reading packets)
    static int
    toNetworkId(int localId)
    Translates local -> server (for sending packets)

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • EntityDataDictionary

      public EntityDataDictionary()
  • Method Details

    • registerLocal

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

      public static int getLocalCount()
    • getSyncMap

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

      public static void buildTranslationMap(Map<net.minecraft.resources.ResourceLocation,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)