Skip to content

Instantly share code, notes, and snippets.

@Haven-King
Created November 21, 2020 20:53
Show Gist options
  • Save Haven-King/8d4235ddf9efaf73a639a686f120f696 to your computer and use it in GitHub Desktop.
Save Haven-King/8d4235ddf9efaf73a639a686f120f696 to your computer and use it in GitHub Desktop.
package dev.hephaestus.sugarskulls.mixin.client;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.minecraft.client.render.BackgroundRenderer;
import net.minecraft.util.math.Vec3d;
import org.objectweb.asm.Opcodes;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Redirect;
@Environment(EnvType.CLIENT)
@Mixin(BackgroundRenderer.class)
public class ModifyBackgroundRenderer {
@Redirect(method = "render", at = @At(value = "FIELD", target = "Lnet/minecraft/util/math/Vec3d;y:D", opcode = Opcodes.GETFIELD, ordinal = 1))
private static double dontRenderVoid(Vec3d vec3d) {
return Double.MAX_VALUE;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment