Skip to content

Commit

Permalink
fix: visited enclosures
Browse files Browse the repository at this point in the history
  • Loading branch information
zly2006 committed Jun 22, 2024
1 parent a29b9f0 commit 1bb175c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
org.gradle.jvmargs=-Xmx5G
org.gradle.parallel=true
# Mod Properties
mod_version=0.4
archices_preview_version=
mod_version=0.4.1
archices_preview_version=alpha

maven_group=com.github.zly2006
archives_base_name=enclosure-fabric
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,14 @@ private void writeCustomDataToNbt(NbtCompound nbt, CallbackInfo ci) {
nbt.put("visited_enclosures", list);
}

@Inject(
method = "copyFrom",
at = @At("HEAD")
)
private void copyFrom(ServerPlayerEntity oldPlayer, boolean alive, CallbackInfo ci) {
visitedEnclosures = Sets.newHashSet(((PlayerAccess) oldPlayer).enclosure$getVisitedEnclosures());
}

public Set<UUID> enclosure$getVisitedEnclosures() {
return visitedEnclosures;
}
Expand Down

0 comments on commit 1bb175c

Please sign in to comment.