2021-12-06 10:47:52 +01:00
|
|
|
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;
|
|
|
|
|
2021-12-22 09:22:41 +01:00
|
|
|
import com.jozufozu.flywheel.util.Textures;
|
2021-12-06 10:47:52 +01:00
|
|
|
import com.mojang.blaze3d.systems.RenderSystem;
|
|
|
|
|
|
|
|
import net.minecraft.resources.ResourceLocation;
|
|
|
|
|
|
|
|
@Mixin(RenderSystem.class)
|
|
|
|
public class RenderTexturesMixin {
|
|
|
|
|
2021-12-08 08:53:13 +01:00
|
|
|
@Inject(method = "_setShaderTexture(ILnet/minecraft/resources/ResourceLocation;)V", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/renderer/texture/AbstractTexture;getId()I"))
|
2021-12-06 10:47:52 +01:00
|
|
|
private static void storeTextureLoc(int pShaderTexture, ResourceLocation pTextureId, CallbackInfo ci) {
|
2021-12-22 09:22:41 +01:00
|
|
|
Textures._setShaderTexture(pShaderTexture, pTextureId);
|
2021-12-06 10:47:52 +01:00
|
|
|
}
|
|
|
|
}
|