Class SyncHandler
java.lang.Object
tech.anonymoushacker1279.immersiveweapons.event.SyncHandler
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voiddebugDataHandler(float lastDamageDealt, float lastDamageTaken, int ticksSinceRest, UUID playerUUID) Sync values for debug tracing data from server to client.static voidsyncPersistentData(net.minecraft.nbt.CompoundTag tag, UUID playerUUID) Sync persistent data from server to client.
-
Constructor Details
-
SyncHandler
public SyncHandler()
-
-
Method Details
-
syncPersistentData
Sync persistent data from server to client. This is in a separate class to avoid loading client classes on the dedicated server.- Parameters:
tag- theCompoundTagto sync, should be fromEntity.getPersistentData()playerUUID- theUUIDof the player to sync to
-
debugDataHandler
public static void debugDataHandler(float lastDamageDealt, float lastDamageTaken, int ticksSinceRest, UUID playerUUID) Sync values for debug tracing data from server to client. This is in a separate class to avoid loading client classes on the dedicated server. All parameters which are not being updated should be passed as -1.- Parameters:
lastDamageDealt- the damage dealtlastDamageTaken- the damage takenticksSinceRest- the number of ticks since the player last sleptplayerUUID- theUUIDof the player to sync to
-