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:
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user