switch to jetbrains nullable annotation

This commit is contained in:
rlnt 2024-08-26 19:57:00 +02:00
parent 82b50fdc89
commit 9a7a80f29d
No known key found for this signature in database
35 changed files with 34 additions and 39 deletions

View file

@ -14,8 +14,8 @@ import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.item.Item;
import net.minecraft.world.level.block.Block;
import org.apache.logging.log4j.Logger;
import org.jetbrains.annotations.Nullable;
import javax.annotation.Nullable;
import java.util.Map;
@SuppressWarnings({ "UtilityClassWithoutPrivateConstructor", "StaticVariableUsedBeforeInitialization" })

View file

@ -4,8 +4,8 @@ import com.almostreliable.unified.api.unification.Placeholders;
import net.minecraft.tags.TagKey;
import net.minecraft.world.item.Item;
import net.minecraft.world.level.ItemLike;
import org.jetbrains.annotations.Nullable;
import javax.annotation.Nullable;
import java.util.Collection;
import java.util.ServiceLoader;
import java.util.Set;

View file

@ -4,8 +4,8 @@ import com.almostreliable.unified.api.unification.Placeholders;
import com.almostreliable.unified.api.unification.TagSubstitutions;
import com.almostreliable.unified.api.unification.UnificationLookup;
import com.almostreliable.unified.api.unification.UnificationSettings;
import org.jetbrains.annotations.Nullable;
import javax.annotation.Nullable;
import java.util.Collection;
/**

View file

@ -2,8 +2,8 @@ package com.almostreliable.unified.api.unification;
import net.minecraft.tags.TagKey;
import net.minecraft.world.item.Item;
import org.jetbrains.annotations.Nullable;
import javax.annotation.Nullable;
import java.util.List;
import java.util.stream.Stream;
import java.util.stream.StreamSupport;

View file

@ -2,8 +2,8 @@ package com.almostreliable.unified.api.unification;
import net.minecraft.tags.TagKey;
import net.minecraft.world.item.Item;
import org.jetbrains.annotations.Nullable;
import javax.annotation.Nullable;
import java.util.Collection;
import java.util.Set;

View file

@ -7,8 +7,8 @@ import net.minecraft.tags.TagKey;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.crafting.Ingredient;
import org.jetbrains.annotations.Nullable;
import javax.annotation.Nullable;
import java.util.Collection;
import java.util.function.Predicate;

View file

@ -1,8 +1,7 @@
package com.almostreliable.unified.api.unification.recipe;
import com.google.gson.JsonElement;
import javax.annotation.Nullable;
import org.jetbrains.annotations.Nullable;
/**
* Abstraction of a recipe JSON to access and override properties.

View file

@ -8,8 +8,7 @@ import com.google.gson.JsonArray;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.JsonPrimitive;
import javax.annotation.Nullable;
import org.jetbrains.annotations.Nullable;
/**
* Helper interface to aid in the unification of recipes.

View file

@ -5,8 +5,8 @@ import com.almostreliable.unified.api.constant.ModConstants;
import com.almostreliable.unified.api.plugin.AlmostUnifiedPlugin;
import com.almostreliable.unified.api.unification.recipe.RecipeUnifierRegistry;
import net.minecraft.resources.ResourceLocation;
import org.jetbrains.annotations.Nullable;
import javax.annotation.Nullable;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;

View file

@ -8,8 +8,8 @@ import net.minecraft.resources.ResourceKey;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.tags.TagKey;
import net.minecraft.world.item.ItemStack;
import org.jetbrains.annotations.Nullable;
import javax.annotation.Nullable;
import java.util.Set;
import java.util.stream.Collectors;

View file

@ -18,8 +18,8 @@ import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.ItemStack;
import org.jetbrains.annotations.Nullable;
import javax.annotation.Nullable;
import java.util.ArrayList;
import java.util.Collection;

View file

@ -23,8 +23,8 @@ import net.minecraft.core.Holder;
import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.ItemStack;
import org.jetbrains.annotations.Nullable;
import javax.annotation.Nullable;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;

View file

@ -4,8 +4,7 @@ import com.almostreliable.unified.utils.Utils;
import net.minecraft.client.Minecraft;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.item.crafting.RecipeHolder;
import javax.annotation.Nullable;
import org.jetbrains.annotations.Nullable;
public final class CRTLookup {

View file

@ -18,8 +18,8 @@ import net.minecraft.world.item.crafting.RecipeInput;
import net.minecraft.world.item.crafting.RecipeSerializer;
import net.minecraft.world.item.crafting.RecipeType;
import net.minecraft.world.level.Level;
import org.jetbrains.annotations.Nullable;
import javax.annotation.Nullable;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

View file

@ -13,8 +13,8 @@ import net.minecraft.tags.TagKey;
import net.minecraft.world.item.Item;
import org.apache.commons.io.FileUtils;
import org.apache.commons.io.FilenameUtils;
import org.jetbrains.annotations.Nullable;
import javax.annotation.Nullable;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;

View file

@ -10,8 +10,8 @@ import net.minecraft.resources.ResourceLocation;
import net.minecraft.tags.TagKey;
import net.minecraft.world.item.Item;
import net.minecraft.world.level.ItemLike;
import org.jetbrains.annotations.Nullable;
import javax.annotation.Nullable;
import java.util.Collection;
import java.util.Set;
import java.util.stream.Collectors;

View file

@ -25,8 +25,8 @@ import net.minecraft.world.item.Item;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.crafting.Ingredient;
import net.minecraft.world.level.block.Block;
import org.jetbrains.annotations.Nullable;
import javax.annotation.Nullable;
import java.util.*;
import java.util.function.Predicate;
import java.util.stream.Collectors;

View file

@ -11,8 +11,8 @@ import net.minecraft.resources.ResourceKey;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.item.Item;
import net.minecraft.world.level.block.Block;
import org.jetbrains.annotations.Nullable;
import javax.annotation.Nullable;
import java.util.Collection;
import java.util.Map;
import java.util.Set;

View file

@ -5,8 +5,8 @@ import com.almostreliable.unified.api.unification.ModPriorities;
import com.almostreliable.unified.api.unification.UnificationEntry;
import net.minecraft.tags.TagKey;
import net.minecraft.world.item.Item;
import org.jetbrains.annotations.Nullable;
import javax.annotation.Nullable;
import java.util.Iterator;
import java.util.List;
import java.util.Map;

View file

@ -16,8 +16,8 @@ import net.minecraft.resources.ResourceLocation;
import net.minecraft.tags.TagKey;
import net.minecraft.world.item.Item;
import net.minecraft.world.level.block.Block;
import org.jetbrains.annotations.Nullable;
import javax.annotation.Nullable;
import java.util.*;
import java.util.regex.Pattern;

View file

@ -11,8 +11,8 @@ import net.minecraft.core.registries.Registries;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.tags.TagKey;
import net.minecraft.world.item.Item;
import org.jetbrains.annotations.Nullable;
import javax.annotation.Nullable;
import java.util.*;
import java.util.function.Predicate;
import java.util.stream.Collectors;

View file

@ -6,8 +6,8 @@ import net.minecraft.core.Registry;
import net.minecraft.resources.ResourceKey;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.tags.TagKey;
import org.jetbrains.annotations.Nullable;
import javax.annotation.Nullable;
import java.util.Objects;
public class UnificationEntryImpl<T> implements UnificationEntry<T> {

View file

@ -9,8 +9,8 @@ import net.minecraft.tags.TagKey;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.crafting.Ingredient;
import org.jetbrains.annotations.Nullable;
import javax.annotation.Nullable;
import java.util.*;
import java.util.function.Predicate;

View file

@ -9,8 +9,8 @@ import net.minecraft.world.item.Item;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.crafting.Ingredient;
import net.minecraft.world.level.block.Block;
import org.jetbrains.annotations.Nullable;
import javax.annotation.Nullable;
import java.util.Collection;
import java.util.List;
import java.util.function.Function;

View file

@ -5,8 +5,8 @@ import com.almostreliable.unified.utils.JsonCompare;
import com.google.common.base.Preconditions;
import com.google.gson.JsonObject;
import net.minecraft.resources.ResourceLocation;
import org.jetbrains.annotations.Nullable;
import javax.annotation.Nullable;
import java.util.Collections;
import java.util.HashSet;
import java.util.Set;

View file

@ -18,8 +18,8 @@ import com.google.common.collect.Multimap;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import net.minecraft.resources.ResourceLocation;
import org.jetbrains.annotations.Nullable;
import javax.annotation.Nullable;
import java.util.*;
import java.util.function.Consumer;
import java.util.stream.Collectors;

View file

@ -13,8 +13,7 @@ import com.google.gson.JsonPrimitive;
import net.minecraft.core.registries.Registries;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.tags.TagKey;
import javax.annotation.Nullable;
import org.jetbrains.annotations.Nullable;
public record UnificationHelperImpl(UnificationLookup getUnificationLookup) implements UnificationHelper {

View file

@ -4,8 +4,8 @@ import com.google.gson.JsonArray;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.JsonPrimitive;
import org.jetbrains.annotations.Nullable;
import javax.annotation.Nullable;
import java.util.*;
public final class JsonCompare {

View file

@ -5,8 +5,8 @@ import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.JsonPrimitive;
import org.apache.commons.lang3.StringUtils;
import org.jetbrains.annotations.Nullable;
import javax.annotation.Nullable;
import java.util.Optional;
public class JsonQuery {

View file

@ -1,8 +1,8 @@
package com.almostreliable.unified.utils;
import com.google.gson.*;
import org.jetbrains.annotations.Nullable;
import javax.annotation.Nullable;
import java.io.BufferedReader;
import java.io.IOException;
import java.nio.file.Files;

View file

@ -6,8 +6,8 @@ import net.minecraft.core.Registry;
import net.minecraft.resources.ResourceKey;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.tags.TagKey;
import org.jetbrains.annotations.Nullable;
import javax.annotation.Nullable;
import java.util.*;
/**

View file

@ -2,10 +2,10 @@ package testmod.gametest_core;
import net.minecraft.gametest.framework.*;
import net.minecraft.world.level.block.Rotation;
import org.jetbrains.annotations.Nullable;
import testmod.gametest_core.mixin.GameTestHelperAccessor;
import testmod.gametest_core.mixin.GameTestRegistryAccessor;
import javax.annotation.Nullable;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;

View file

@ -1,7 +1,6 @@
package testmod.old.utils;
// TODO I BROKE THEM! NEED TO FIX
public class ReplacementMapTests {

View file

@ -20,9 +20,9 @@ import net.neoforged.neoforge.common.NeoForge;
import net.neoforged.neoforge.event.RegisterCommandsEvent;
import net.neoforged.neoforge.registries.NeoForgeRegistries;
import net.neoforged.neoforge.registries.RegisterEvent;
import org.jetbrains.annotations.Nullable;
import org.objectweb.asm.Type;
import javax.annotation.Nullable;
import java.util.*;
@Mod(ModConstants.ALMOST_UNIFIED)

View file

@ -12,8 +12,8 @@ import net.minecraft.world.level.levelgen.GenerationStep;
import net.minecraft.world.level.levelgen.placement.PlacedFeature;
import net.neoforged.neoforge.common.world.BiomeModifier;
import net.neoforged.neoforge.common.world.ModifiableBiomeInfo;
import org.jetbrains.annotations.Nullable;
import javax.annotation.Nullable;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;