mirror of
https://github.com/Motschen/Blur.git
synced 2025-12-16 19:55:10 +01:00
Fix formatting that was changed
This commit is contained in:
@@ -46,7 +46,7 @@ public class Blur implements ClientModInitializer {
|
|||||||
public static final String VERSION = "@VERSION@";
|
public static final String VERSION = "@VERSION@";
|
||||||
|
|
||||||
static class ConfigJson {
|
static class ConfigJson {
|
||||||
String[] blurExclusions = new String[]{ChatScreen.class.getName()};
|
String[] blurExclusions = new String[]{ ChatScreen.class.getName() };
|
||||||
int fadeTimeMillis = 200;
|
int fadeTimeMillis = 200;
|
||||||
int radius = 8;
|
int radius = 8;
|
||||||
String gradientStartColor = "75000000";
|
String gradientStartColor = "75000000";
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ package com.tterrag.blur.mixin;
|
|||||||
import org.objectweb.asm.Opcodes;
|
import org.objectweb.asm.Opcodes;
|
||||||
import org.spongepowered.asm.mixin.Mixin;
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
import org.spongepowered.asm.mixin.injection.At;
|
import org.spongepowered.asm.mixin.injection.At;
|
||||||
import org.spongepowered.asm.mixin.injection.At.Shift;
|
|
||||||
import org.spongepowered.asm.mixin.injection.Inject;
|
import org.spongepowered.asm.mixin.injection.Inject;
|
||||||
|
import org.spongepowered.asm.mixin.injection.At.Shift;
|
||||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||||
|
|
||||||
import com.tterrag.blur.Blur;
|
import com.tterrag.blur.Blur;
|
||||||
@@ -18,15 +18,15 @@ public class MixinMinecraftClient {
|
|||||||
|
|
||||||
@Inject(method = "openScreen",
|
@Inject(method = "openScreen",
|
||||||
at = @At(value = "FIELD",
|
at = @At(value = "FIELD",
|
||||||
target = "Lnet/minecraft/client/MinecraftClient;currentScreen:Lnet/minecraft/client/gui/screen/Screen;",
|
target = "Lnet/minecraft/client/MinecraftClient;currentScreen:Lnet/minecraft/client/gui/screen/Screen;",
|
||||||
opcode = Opcodes.PUTFIELD))
|
opcode = Opcodes.PUTFIELD))
|
||||||
public void onScreenOpen(Screen newScreen, CallbackInfo info) {
|
public void onScreenOpen(Screen newScreen, CallbackInfo info) {
|
||||||
Blur.instance.onScreenChange(newScreen);
|
Blur.instance.onScreenChange(newScreen);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Inject(method = "render",
|
@Inject(method = "render",
|
||||||
at = @At(value = "INVOKE",
|
at = @At(value = "INVOKE",
|
||||||
target = "net/minecraft/client/toast/ToastManager.draw()V"),
|
target = "net/minecraft/client/toast/ToastManager.draw()V"),
|
||||||
require = 1)
|
require = 1)
|
||||||
public void onPostRenderTick(CallbackInfo info) {
|
public void onPostRenderTick(CallbackInfo info) {
|
||||||
Blur.instance.onPostRenderTick();
|
Blur.instance.onPostRenderTick();
|
||||||
@@ -34,9 +34,9 @@ public class MixinMinecraftClient {
|
|||||||
|
|
||||||
@Inject(method = "init()V",
|
@Inject(method = "init()V",
|
||||||
at = @At(value = "FIELD",
|
at = @At(value = "FIELD",
|
||||||
target = "Lnet/minecraft/client/MinecraftClient;resourceManager:Lnet/minecraft/resource/ReloadableResourceManager;",
|
target = "Lnet/minecraft/client/MinecraftClient;resourceManager:Lnet/minecraft/resource/ReloadableResourceManager;",
|
||||||
opcode = Opcodes.PUTFIELD,
|
opcode = Opcodes.PUTFIELD,
|
||||||
shift = Shift.AFTER))
|
shift = Shift.AFTER))
|
||||||
public void onResourceManagerAssign(CallbackInfo info) {
|
public void onResourceManagerAssign(CallbackInfo info) {
|
||||||
Blur.instance.registerReloadListeners((ReloadableResourceManager) MinecraftClient.getInstance().getResourceManager());
|
Blur.instance.registerReloadListeners((ReloadableResourceManager) MinecraftClient.getInstance().getResourceManager());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import java.util.Arrays;
|
|||||||
public class ReflectionHelper {
|
public class ReflectionHelper {
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
public static <T> T getValue(Class<?> cls, Object instance, String... names) {
|
public static <T> T getValue(Class<?> cls, Object instance, String...names) {
|
||||||
try {
|
try {
|
||||||
return (T) getField(cls, names).get(instance);
|
return (T) getField(cls, names).get(instance);
|
||||||
} catch (IllegalAccessException e) {
|
} catch (IllegalAccessException e) {
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ public class ShaderResourcePack implements ResourcePack, ResourceReloadListener
|
|||||||
return ImmutableSet.of("minecraft");
|
return ImmutableSet.of("minecraft");
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings({"unchecked", "null"})
|
@SuppressWarnings({ "unchecked", "null" })
|
||||||
@Override
|
@Override
|
||||||
public <T> T parseMetadata(ResourceMetadataReader<T> var1) throws IOException {
|
public <T> T parseMetadata(ResourceMetadataReader<T> var1) throws IOException {
|
||||||
if ("pack".equals(var1.getKey())) {
|
if ("pack".equals(var1.getKey())) {
|
||||||
@@ -88,8 +88,7 @@ public class ShaderResourcePack implements ResourcePack, ResourceReloadListener
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void close() {
|
public void close() throws IOException {}
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public InputStream openRoot(String var1) throws IOException {
|
public InputStream openRoot(String var1) throws IOException {
|
||||||
|
|||||||
Reference in New Issue
Block a user