Skip to content

Commit

Permalink
fix: mobcaps counting in border chunks
Browse files Browse the repository at this point in the history
  • Loading branch information
ishland committed Jan 1, 2025
1 parent 867397f commit 09194fe
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package com.ishland.c2me.notickvd.mixin;

import net.minecraft.world.SimulationDistanceLevelPropagator;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.Constant;
import org.spongepowered.asm.mixin.injection.ModifyConstant;

@Mixin(SimulationDistanceLevelPropagator.class)
public class MixinSimulationDistanceLevelPropagator {

@ModifyConstant(method = "<init>", constant = {@Constant(intValue = 34), @Constant(intValue = 33)}, require = 2)
private static int modifyMax(int constant) {
return constant + 1;
}

@ModifyConstant(method = "getLevel(Lnet/minecraft/util/collection/SortedArraySet;)I", constant = @Constant(intValue = 34))
private int modifyMax1(int constant) {
return constant + 1;
}

@ModifyConstant(method = "setLevel", constant = @Constant(intValue = 33))
private int modifyMax2(int constant) {
return constant + 1;
}

}
1 change: 1 addition & 0 deletions c2me-notickvd/src/main/resources/c2me-notickvd.mixins.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"MixinServerAccessibleChunkSending",
"MixinServerBlockTicking",
"MixinServerChunkManager",
"MixinSimulationDistanceLevelPropagator",
"MixinThreadedAnvilChunkStorage",
"MixinWorld",
"MixinWorldChunk",
Expand Down

0 comments on commit 09194fe

Please sign in to comment.