mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-13 00:47:50 +00:00
juhhh in case
This commit is contained in:
1 parent
facee7c388
commit
332f1bfd57
2 files changed
+15
No files matched your search
@@ -272,6 +272,7 @@ public class SyncController {
|
||||
SyncHandler handler = SyncRegistry.getHandler(syncType);
|
||||
if (handler == null) return;
|
||||
try {
|
||||
handler.clientHandleUpdate(compound);
|
||||
handler.clientHandleUpdate(compound, id);
|
||||
handler.clientHandleUpdate(compound, key);
|
||||
} catch (Exception e) {
|
||||
|
||||
@@ -56,6 +56,20 @@ public interface SyncHandler {
|
||||
// No-op: type does not support individual updates
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle an UPDATE action on the client.
|
||||
* Deserialize a single object and insert/replace it in the client-side data.
|
||||
*
|
||||
* <p>Default: no-op. Types that don't support individual updates
|
||||
* use {@code syncAll()} for full reload instead.</p>
|
||||
*
|
||||
* @param compound the serialized single object
|
||||
*/
|
||||
@SideOnly(Side.CLIENT)
|
||||
default void clientHandleUpdate(NBTTagCompound compound) {
|
||||
// No-op: type does not support individual updates
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle an UPDATE action on the client.
|
||||
* Deserialize a single object and insert/replace it in the client-side data.
|
||||
|
||||
Reference in new issue
Block a user