Created
November 21, 2020 20:53
-
-
Save Haven-King/8d4235ddf9efaf73a639a686f120f696 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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