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