Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/1.20-recode' into 1.20-recode
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianMichael committed Jun 3, 2023
2 parents 4d82c14 + 9bddd04 commit 2501084
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
package de.florianmichael.viafabricplus.injection.mixin.fixes.sodium;

import de.florianmichael.viafabricplus.base.settings.groups.VisualSettings;
import it.unimi.dsi.fastutil.longs.Long2IntOpenHashMap;
import it.unimi.dsi.fastutil.longs.Long2BooleanOpenHashMap;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Pseudo;
import org.spongepowered.asm.mixin.injection.At;
Expand All @@ -28,10 +28,10 @@
@Mixin(targets = "me.jellysquid.mods.sodium.client.render.chunk.ChunkTracker", remap = false)
public abstract class MixinChunkTracker {

@Redirect(method = "recalculateChunks", at = @At(value = "INVOKE", target = "Lit/unimi/dsi/fastutil/longs/Long2IntOpenHashMap;get(J)I"))
private int modifyRenderCondition(Long2IntOpenHashMap instance, long k) {
@Redirect(method = "recalculateChunks", at = @At(value = "INVOKE", target = "Lit/unimi/dsi/fastutil/longs/Long2BooleanOpenHashMap;get(J)Z"))
private boolean modifyRenderCondition(Long2BooleanOpenHashMap instance, long k) {
if (VisualSettings.INSTANCE.fixSodiumChunkRendering.getValue()) {
return instance.getOrDefault(k, -1);
return instance.getOrDefault(k, false);
}

return instance.get(k);
Expand Down

0 comments on commit 2501084

Please sign in to comment.