diff --git a/cardinal-components-scoreboard/src/main/java/dev/onyxstudios/cca/mixin/scoreboard/MixinScoreboardState.java b/cardinal-components-scoreboard/src/main/java/dev/onyxstudios/cca/mixin/scoreboard/MixinScoreboardState.java index ed782998..815bb567 100644 --- a/cardinal-components-scoreboard/src/main/java/dev/onyxstudios/cca/mixin/scoreboard/MixinScoreboardState.java +++ b/cardinal-components-scoreboard/src/main/java/dev/onyxstudios/cca/mixin/scoreboard/MixinScoreboardState.java @@ -44,35 +44,33 @@ public abstract class MixinScoreboardState { @Final @Shadow - private Scoreboard field_27936; + private Scoreboard scoreboard; @Inject(method = "toTag", at = @At("RETURN")) private void saveComponents(CompoundTag tag, CallbackInfoReturnable cir) { - ((ComponentProvider) this.field_27936).getComponentContainer().toTag(tag); + ((ComponentProvider) this.scoreboard).getComponentContainer().toTag(tag); } - @Inject(method = "method_32481", at = @At("RETURN")) + @Inject(method = "fromTag", at = @At("RETURN")) private void loadComponents(CompoundTag tag, CallbackInfoReturnable ci) { - if (this.field_27936 != null) { // weird deferred loading thing - ((ComponentProvider) this.field_27936).getComponentContainer().fromTag(tag); - } + ((ComponentProvider) this.scoreboard).getComponentContainer().fromTag(tag); } @Inject( - method = "deserializeTeams", + method = "teamsFromTag", at = @At( value = "INVOKE", - target = "Lnet/minecraft/scoreboard/ScoreboardState;deserializeTeamPlayers(Lnet/minecraft/scoreboard/Team;Lnet/minecraft/nbt/ListTag;)V", + target = "Lnet/minecraft/scoreboard/ScoreboardState;teamPlayersFromTag(Lnet/minecraft/scoreboard/Team;Lnet/minecraft/nbt/ListTag;)V", shift = At.Shift.AFTER ), locals = LocalCapture.CAPTURE_FAILEXCEPTION ) - private void loadTeamComponents(ListTag listTag, CallbackInfo ci, int i, CompoundTag teamData, String name, Team team) { + private void loadTeamComponents(ListTag teamsData, CallbackInfo ci, int i, CompoundTag teamData, String name, Team team) { ((ComponentProvider) team).getComponentContainer().fromTag(teamData); } @Inject( - method = "serializeTeams", + method = "teamsToTag", at = @At( value = "INVOKE", target = "Lnet/minecraft/scoreboard/Team;getPlayerList()Ljava/util/Collection;" @@ -81,7 +79,7 @@ private void loadTeamComponents(ListTag listTag, CallbackInfo ci, int i, Compoun ) private void saveTeamComponents( CallbackInfoReturnable cir, - ListTag listTag, + ListTag teamsData, Collection teams, Iterator it, Team team, diff --git a/changelog.md b/changelog.md index 55a152c9..5d646524 100644 --- a/changelog.md +++ b/changelog.md @@ -3,7 +3,7 @@ Version 3.0.0 ------------------------------------------------------ **The breaking changes are here !** -- Updated to 20w45a +- Updated to 20w48a Additions - Ticking components now work on any `BlockEntity`, not just those that already tick in vanilla diff --git a/gradle.properties b/gradle.properties index 61bc8d5b..0bd035d1 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,17 +2,17 @@ org.gradle.jvmargs = -Xmx3G #see https://modmuss50.me/fabric.html -minecraft_version=20w46a -yarn_mappings=11 -loader_version=0.10.6+build.214 +minecraft_version=20w48a +yarn_mappings=1 +loader_version=0.10.8 #Fabric api -fabric_api_version=0.25.7+1.17 +fabric_api_version=0.26.4+1.17 #Publishing -mod_version = 3.0.0-nightly.20w46a +mod_version = 3.0.0-nightly.20w48a curseforge_id = 318449 -curseforge_versions = 1.16-Snapshot +curseforge_versions = 1.17 changelog_url = https://github.com/OnyxStudios/Cardinal-Components-API/blob/master/changelog.md release_type = alpha #api_package = nerdhub.cardinal.components.api