Experimental annotation changes (#12028)

This commit is contained in:
Lulu13022002
2025-01-30 20:02:14 +01:00
committed by GitHub
parent 54b2e9d973
commit d4a957849c
25 changed files with 19 additions and 59 deletions

View File

@@ -1,11 +1,9 @@
package io.papermc.paper.registry.data;
import com.google.common.base.Preconditions;
import com.google.common.collect.Iterables;
import com.google.common.collect.Lists;
import io.papermc.paper.registry.PaperRegistryBuilder;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey;
import io.papermc.paper.registry.data.util.Checks;
import io.papermc.paper.registry.data.util.Conversions;
import io.papermc.paper.registry.set.PaperRegistrySets;
@@ -189,7 +187,6 @@ public class PaperEnchantmentRegistryEntry implements EnchantmentRegistryEntry {
@Override
public Builder anvilCost(final @Range(from = 0, to = Integer.MAX_VALUE) int anvilCost) {
Preconditions.checkArgument(anvilCost >= 0, "anvilCost must be non-negative");
this.anvilCost = OptionalInt.of(asArgumentMin(anvilCost, "anvilCost", 0));
return this;
}

View File

@@ -590,7 +590,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
e.getStringUUID()
);
} else {
// Ensure player flag is not needed
// Ensure misc flag is not needed
Preconditions.checkArgument(
nmsEntity.getType().canSerialize() || allowMiscSerialization,
"Cannot serialize misc non-saveable entity %s(%s) without the MISC flag",