mirror of
https://github.com/Jozufozu/Flywheel.git
synced 2025-01-10 22:36:06 +01:00
21 lines
926 B
Java
21 lines
926 B
Java
|
package com.jozufozu.flywheel.mixin;
|
||
|
|
||
|
import org.spongepowered.asm.mixin.Mixin;
|
||
|
import org.spongepowered.asm.mixin.injection.At;
|
||
|
import org.spongepowered.asm.mixin.injection.Inject;
|
||
|
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||
|
|
||
|
import com.jozufozu.flywheel.util.RenderTextures;
|
||
|
import com.mojang.blaze3d.systems.RenderSystem;
|
||
|
|
||
|
import net.minecraft.resources.ResourceLocation;
|
||
|
|
||
|
@Mixin(RenderSystem.class)
|
||
|
public class RenderTexturesMixin {
|
||
|
|
||
|
@Inject(method = "_setShaderTexture(ILnet/minecraft/resources/ResourceLocation;)V", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/renderer/texture/TextureManager;getTexture(Lnet/minecraft/resources/ResourceLocation;)Lnet/minecraft/client/renderer/texture/AbstractTexture;"))
|
||
|
private static void storeTextureLoc(int pShaderTexture, ResourceLocation pTextureId, CallbackInfo ci) {
|
||
|
RenderTextures._setShaderTexture(pShaderTexture, pTextureId);
|
||
|
}
|
||
|
}
|