Skip to content

Commit

Permalink
revet the level change
Browse files Browse the repository at this point in the history
  • Loading branch information
Taiyou06 committed Mar 31, 2024
1 parent d53f39d commit 906a584
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/main/java/net/gensokyoreimagined/nitori/core/MixinLevel.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,21 +30,20 @@

@Mixin(Level.class)
public class MixinLevel {

// Use HashedReferenceList instead of ArrayList for better performance
// Implementation of 0006-lithium-HashedReferenceList.patch
@Mutable
@Final @Shadow
private List<TickingBlockEntity> blockEntityTickers;
public List<TickingBlockEntity> blockEntityTickers;

// Use HashedReferenceList instead of ArrayList for better performance
// Implementation of 0006-lithium-HashedReferenceList.patch
@Mutable
@Final @Shadow
private List<TickingBlockEntity> pendingBlockEntityTickers;

// Implementation of 0006-lithium-HashedReferenceList.patch
@Inject(method = "<init>", at = @At("RETURN"))
private void onInit(CallbackInfo ci) {
// Initialize blockEntityTickers and pendingBlockEntityTickers with an empty list
this.blockEntityTickers = new HashedReferenceList<>();
this.pendingBlockEntityTickers = new HashedReferenceList<>();
this.blockEntityTickers = new HashedReferenceList<>(Lists.newArrayList());
this.pendingBlockEntityTickers = new HashedReferenceList<>(Lists.newArrayList());
}
}

0 comments on commit 906a584

Please sign in to comment.