mirror of
https://github.com/refactorinqq/SLC-1.8.9.git
synced 2024-11-10 07:01:32 +01:00
Inventory Blur
This commit is contained in:
parent
afc69f88b0
commit
a1a2cf60c9
@ -0,0 +1,30 @@
|
||||
package net.silentclient.client.mixin.mixins;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.silentclient.client.Client;
|
||||
import net.silentclient.client.cosmetics.StaticResourceLocation;
|
||||
import net.silentclient.client.mixin.ducks.EntityRendererExt;
|
||||
import net.silentclient.client.mods.render.InventoryBlurMod;
|
||||
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;
|
||||
|
||||
@Mixin(GuiContainer.class)
|
||||
public class GuiContainerMixin {
|
||||
@Inject(method = "initGui", at = @At("HEAD"))
|
||||
public void onOpenBlur(CallbackInfo ci) {
|
||||
if(Client.getInstance().getModInstances().getModByClass(InventoryBlurMod.class).isEnabled()) {
|
||||
((EntityRendererExt) Minecraft.getMinecraft().entityRenderer).silent$loadShader(new StaticResourceLocation("shaders/post/menu_blur.json"));
|
||||
}
|
||||
}
|
||||
|
||||
@Inject(method = "onGuiClosed", at = @At("HEAD"))
|
||||
public void onCloseBlur(CallbackInfo ci) {
|
||||
if(Client.getInstance().getModInstances().getModByClass(InventoryBlurMod.class).isEnabled()) {
|
||||
Minecraft.getMinecraft().entityRenderer.loadEntityShader(null);
|
||||
}
|
||||
}
|
||||
}
|
@ -39,6 +39,7 @@
|
||||
"accessors.MinecraftAccessor",
|
||||
"accessors.ItemFoodAccessor",
|
||||
"mixins.BlockGlassMixin",
|
||||
"mixins.ShaderGroupMixin"
|
||||
"mixins.ShaderGroupMixin",
|
||||
"mixins.GuiContainerMixin"
|
||||
]
|
||||
}
|
Loading…
Reference in New Issue
Block a user