[ci skip] spotlessApply with the new settings

This commit is contained in:
Jason Mitchell committed 2023-01-28 17:55:51 -08:00
1 parent f1dea5460a
commit f106b5e766
172 files changed
+2552 -2088

No files matched your search

@@ -1,7 +1,9 @@
package codechicken.nei.util;
import java.util.Set;
import javax.annotation.Nullable;
import net.minecraft.nbt.NBTBase;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
@@ -9,8 +11,8 @@ import net.minecraft.nbt.NBTTagList;
public class NBTHelper {
/*
* Taken from Botania r1.11-379 by Vazkii under the Botania License
* You can obtain one at https://botaniamod.net/license.php
* Taken from Botania r1.11-379 by Vazkii under the Botania License You can obtain one at
* https://botaniamod.net/license.php
*/
/**
@@ -32,7 +34,7 @@ public class NBTHelper {
private static boolean matchTagCompound(NBTTagCompound template, NBTTagCompound target) {
if (template.tagMap.size() > target.tagMap.size()) return false;
//noinspection unchecked
// noinspection unchecked
for (String key : (Set<String>) template.func_150296_c()) {
if (!matchTag(template.getTag(key), target.getTag(key))) return false;
}
@@ -1,14 +1,11 @@
package codechicken.nei.util;
import com.google.gson.JsonArray;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.JsonPrimitive;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import net.minecraft.nbt.NBTBase;
import net.minecraft.nbt.NBTTagByte;
import net.minecraft.nbt.NBTTagByteArray;
@@ -22,7 +19,13 @@ import net.minecraft.nbt.NBTTagLong;
import net.minecraft.nbt.NBTTagShort;
import net.minecraft.nbt.NBTTagString;
import com.google.gson.JsonArray;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.JsonPrimitive;
public class NBTJson {
private static final Pattern numberPattern = Pattern.compile("^([-+]?\\d+\\.?\\d*E*\\d*)([bBsSlLfFdD]?)$");
public static String toJson(NBTTagCompound tag) {
@@ -166,9 +169,7 @@ public class NBTJson {
}
if (nbtList.stream().allMatch(n -> n instanceof NBTTagInt)) {
return new NBTTagIntArray(nbtList.stream()
.mapToInt(i -> ((NBTTagInt) i).func_150287_d())
.toArray());
return new NBTTagIntArray(nbtList.stream().mapToInt(i -> ((NBTTagInt) i).func_150287_d()).toArray());
} else if (nbtList.stream().allMatch(n -> n instanceof NBTTagByte)) {
final byte[] abyte = new byte[nbtList.size()];
@@ -216,8 +217,7 @@ public class NBTJson {
try {
final String className = obj.get("__custom_type").getAsString();
return (NBTBase) Class.forName(className).newInstance();
} catch (ClassNotFoundException | InstantiationException | IllegalAccessException th) {
}
} catch (ClassNotFoundException | InstantiationException | IllegalAccessException th) {}
}
return null;
@@ -6,14 +6,14 @@ import java.text.DecimalFormatSymbols;
import java.text.Format;
/**
* copy from ae2
* Converter class to convert a large number into a SI system.
* copy from ae2 Converter class to convert a large number into a SI system.
*
* @author thatsIch
* @version rv2
* @since rv2
*/
public enum ReadableNumberConverter {
INSTANCE;
/**
@@ -8,6 +8,7 @@ import java.util.Optional;
* Backported from JustEnoughItems/Core/src/main/java/mezz/jei/core/util/TextHistory.java
*/
public class TextHistory {
private static final int MAX_HISTORY = 100;
public enum Direction {