Class EntityDataDictionary
java.lang.Object
com.stereowalker.unionlib.network.syncher.EntityDataDictionary
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidbuildTranslationMap(Map<net.minecraft.resources.Identifier, Integer> serverMap) Called by the client when it receives the dictionary packetstatic intUsed by the server to build the login dictionary packetstatic intregisterLocal(net.minecraft.resources.Identifier key) Called during static initialization of your entity classesstatic inttoLocalId(int networkId) Translates server -> local (for reading packets)static inttoNetworkId(int localId) Translates local -> server (for sending packets)
-
Field Details
-
STARTING_ID
public static final int STARTING_ID- See Also:
-
-
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
-
buildTranslationMap
-
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)
-