1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-10-29 04:47:39 +00:00

Update to latest NullAway

This fixes several issues with @Nullable fields not being checked. This
is great in principle, but a little annoying in practice as MC's
@Nullable annotations are sometimes a little overly strict -- we now
need to wrap a couple of things in assertNonNull checks.
This commit is contained in:
Jonathan Coates
2024-04-06 08:38:44 +01:00
parent bce099ef32
commit 8b2516abb5
11 changed files with 41 additions and 23 deletions

View File

@@ -33,6 +33,7 @@ import java.io.Writer;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.HashSet;
import java.util.Objects;
import java.util.Set;
/**
@@ -79,7 +80,7 @@ public class Exporter {
}
// Now find all CC recipes.
var level = Minecraft.getInstance().level;
var level = Objects.requireNonNull(Minecraft.getInstance().level);
for (var recipe : level.getRecipeManager().getAllRecipesFor(RecipeType.CRAFTING)) {
var result = recipe.getResultItem(level.registryAccess());
if (!RegistryWrappers.ITEMS.getKey(result.getItem()).getNamespace().equals(ComputerCraftAPI.MOD_ID)) {