Skip to content

Commit

Permalink
Remove unnecessary section data removal list
Browse files Browse the repository at this point in the history
Signed-off-by: HellFirePvP <[email protected]>
  • Loading branch information
HellFirePvP committed Dec 26, 2024
1 parent a8f4c2c commit ed25151
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ public abstract class SectionWorldData<T extends SectionWorldData<T, S>, S exten
private final int precision;

private final AlternatingSet<SectionKey> dirtySections = new AlternatingSet<>();
private final Set<SectionKey> removedSections = new HashSet<>();

protected SectionWorldData(WorldCacheDomain.SaveKey<T> key, Codec<S> sectionCodec, int sectionPrecision) {
super(key);
Expand Down Expand Up @@ -108,12 +107,12 @@ private S getSection(SectionKey key) {

public boolean removeSection(S section) {
SectionKey key = SectionKey.from(section);
return this.sections.remove(key) == section && this.removedSections.add(key);
return this.sections.remove(key) != null;
}

public boolean removeSection(Vec3i absolute) {
SectionKey key = SectionKey.resolve(absolute, this.precision);
return this.sections.remove(key) != null && this.removedSections.add(key);
return this.sections.remove(key) != null;
}

@Nonnull
Expand Down

0 comments on commit ed25151

Please sign in to comment.