Skip to content

Commit

Permalink
Fix AutoSyncedComponent for level components
Browse files Browse the repository at this point in the history
  • Loading branch information
Pyrofab committed Oct 19, 2020
1 parent db276fa commit 65a99db
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
*/
package dev.onyxstudios.cca.internal.level;

import dev.onyxstudios.cca.api.v3.component.AutoSyncedComponent;
import dev.onyxstudios.cca.api.v3.component.ComponentKey;
import dev.onyxstudios.cca.api.v3.component.ComponentProvider;
import dev.onyxstudios.cca.api.v3.component.sync.AutoSyncedComponent;
import dev.onyxstudios.cca.internal.base.ComponentsInternals;
import dev.onyxstudios.cca.internal.base.InternalComponentProvider;
import nerdhub.cardinal.components.api.ComponentRegistry;
Expand Down Expand Up @@ -71,7 +71,7 @@ public static void initClient() {
Component c = componentType.get(MinecraftClient.getInstance().world.getLevelProperties());

if (c instanceof AutoSyncedComponent) {
((AutoSyncedComponent) c).readFromPacket(copy);
((AutoSyncedComponent) c).applySyncPacket(copy);
} else if (c instanceof SyncedComponent) {
((SyncedComponent) c).processPacket(context, copy);
}
Expand Down
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Version 2.7.1
------------------------------------------------------
- Remove the `ScheduledForRemoval` annotation from the legacy `Component` interface
- Should fix unstable API warnings in IDEA
- Fixed the new `AutoSyncedComponent` interface for level components

------------------------------------------------------
Version 2.7.0
Expand Down

0 comments on commit 65a99db

Please sign in to comment.