mirror of
https://github.com/FalsePattern/FalsePatternLib.git
synced 2026-11-16 17:44:51 +00:00
code cleanup
This commit is contained in:
76 files changed
+691
-622
No files matched your search
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
* Copyright (C) 2022 FalsePattern
|
||||
* All Rights Reserved
|
||||
*
|
||||
@@ -21,6 +21,7 @@
|
||||
package com.falsepattern.lib.util;
|
||||
|
||||
import com.falsepattern.lib.StableAPI;
|
||||
|
||||
import net.minecraft.launchwrapper.Launch;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
* Copyright (C) 2022 FalsePattern
|
||||
* All Rights Reserved
|
||||
*
|
||||
@@ -21,8 +21,11 @@
|
||||
package com.falsepattern.lib.util;
|
||||
|
||||
import com.falsepattern.lib.StableAPI;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.NonNull;
|
||||
import lombok.val;
|
||||
|
||||
import cpw.mods.fml.common.registry.LanguageRegistry;
|
||||
import lombok.*;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
@@ -40,8 +43,9 @@ public final class LangUtil {
|
||||
}
|
||||
|
||||
public static void defaultLocalization(@NonNull String key, @NonNull String value) {
|
||||
if (!LanguageRegistry.instance().getStringLocalization(key, DEFAULT_LOCALE).isEmpty())
|
||||
if (!LanguageRegistry.instance().getStringLocalization(key, DEFAULT_LOCALE).isEmpty()) {
|
||||
return;
|
||||
}
|
||||
val map = tempMap.get();
|
||||
map.put(key, value);
|
||||
LanguageRegistry.instance().injectLanguage(DEFAULT_LOCALE, map);
|
||||
|
||||
@@ -207,7 +207,7 @@ public class MathUtil {
|
||||
}
|
||||
|
||||
/**
|
||||
* Buckets an integer with specifed bucket sizes.
|
||||
* Buckets an integer with specified bucket sizes.
|
||||
*/
|
||||
@StableAPI(since = "0.10.0")
|
||||
public static int intFloorDiv(int number, int bucket) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
* Copyright (C) 2022 FalsePattern
|
||||
* All Rights Reserved
|
||||
*
|
||||
@@ -28,6 +28,7 @@ import java.lang.reflect.Modifier;
|
||||
|
||||
public class ReflectionUtil {
|
||||
private static final Field f_modifiers;
|
||||
|
||||
static {
|
||||
try {
|
||||
f_modifiers = Field.class.getDeclaredField("modifiers");
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
* Copyright (C) 2022 FalsePattern
|
||||
* All Rights Reserved
|
||||
*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
* Copyright (C) 2022 FalsePattern
|
||||
* All Rights Reserved
|
||||
*
|
||||
@@ -21,6 +21,8 @@
|
||||
package com.falsepattern.lib.util;
|
||||
|
||||
import com.falsepattern.lib.StableAPI;
|
||||
import lombok.val;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
@@ -28,7 +30,6 @@ import java.io.InputStream;
|
||||
import java.net.URL;
|
||||
import java.nio.charset.Charset;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import lombok.val;
|
||||
|
||||
/**
|
||||
* A utility class for reading resources in many ways.
|
||||
|
||||
Reference in new issue
Block a user