Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix tag key generator output inconsistencies #11218

Merged
merged 2 commits into from
Aug 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
import org.bukkit.entity.Wither;
import org.bukkit.entity.Wolf;
import org.bukkit.entity.Zombie;
import org.jetbrains.annotations.NotNull;
import org.checkerframework.checker.nullness.qual.NonNull;

/**
* Vanilla keys for Mob Goals.
Expand Down Expand Up @@ -436,8 +436,8 @@ public interface VanillaGoal<T extends Mob> extends Goal<T> {

GoalKey<Zombie> ZOMBIE_ATTACK_TURTLE_EGG = create("zombie_attack_turtle_egg", Zombie.class);

private static <T extends Mob> @NotNull GoalKey<T> create(final @NotNull String key,
final @NotNull Class<T> type) {
private static <T extends Mob> @NonNull GoalKey<T> create(final @NonNull String key,
final @NonNull Class<T> type) {
return GoalKey.of(type, NamespacedKey.minecraft(key));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key;
import org.bukkit.block.Biome;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.NotNull;

/**
* Vanilla keys for {@link RegistryKey#BIOME}.
Expand Down Expand Up @@ -478,13 +478,13 @@ private BiomeKeys() {
}

/**
* Creates a key for {@link Biome} in a registry.
* Creates a key for {@link Biome} in the registry {@code minecraft:worldgen/biome}.
*
* @param key the value's key in the registry
* @return a new typed key
*/
@ApiStatus.Experimental
public static @NotNull TypedKey<Biome> create(final @NotNull Key key) {
public static @NonNull TypedKey<Biome> create(final @NonNull Key key) {
return TypedKey.create(RegistryKey.BIOME, key);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key;
import org.bukkit.damage.DamageType;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.NotNull;

/**
* Vanilla keys for {@link RegistryKey#DAMAGE_TYPE}.
Expand Down Expand Up @@ -359,13 +359,13 @@ private DamageTypeKeys() {
}

/**
* Creates a key for {@link DamageType} in a registry.
* Creates a key for {@link DamageType} in the registry {@code minecraft:damage_type}.
*
* @param key the value's key in the registry
* @return a new typed key
*/
@ApiStatus.Experimental
public static @NotNull TypedKey<DamageType> create(final @NotNull Key key) {
public static @NonNull TypedKey<DamageType> create(final @NonNull Key key) {
return TypedKey.create(RegistryKey.DAMAGE_TYPE, key);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key;
import org.bukkit.enchantments.Enchantment;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.NotNull;

/**
* Vanilla keys for {@link RegistryKey#ENCHANTMENT}.
Expand Down Expand Up @@ -323,7 +323,7 @@ public final class EnchantmentKeys {
private EnchantmentKeys() {
}

private static @NotNull TypedKey<Enchantment> create(final @NotNull Key key) {
private static @NonNull TypedKey<Enchantment> create(final @NonNull Key key) {
return TypedKey.create(RegistryKey.ENCHANTMENT, key);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key;
import org.bukkit.GameEvent;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.NotNull;

/**
* Vanilla keys for {@link RegistryKey#GAME_EVENT}.
Expand Down Expand Up @@ -449,7 +449,7 @@ public final class GameEventKeys {
private GameEventKeys() {
}

private static @NotNull TypedKey<GameEvent> create(final @NotNull Key key) {
private static @NonNull TypedKey<GameEvent> create(final @NonNull Key key) {
return TypedKey.create(RegistryKey.GAME_EVENT, key);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key;
import org.bukkit.MusicInstrument;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.NotNull;

/**
* Vanilla keys for {@link RegistryKey#INSTRUMENT}.
Expand Down Expand Up @@ -85,7 +85,7 @@ public final class InstrumentKeys {
private InstrumentKeys() {
}

private static @NotNull TypedKey<MusicInstrument> create(final @NotNull Key key) {
private static @NonNull TypedKey<MusicInstrument> create(final @NonNull Key key) {
return TypedKey.create(RegistryKey.INSTRUMENT, key);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key;
import org.bukkit.inventory.ItemType;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.NotNull;

/**
* Vanilla keys for {@link RegistryKey#ITEM}.
Expand Down Expand Up @@ -9360,7 +9360,7 @@ public final class ItemTypeKeys {
private ItemTypeKeys() {
}

private static @NotNull TypedKey<ItemType> create(final @NotNull Key key) {
private static @NonNull TypedKey<ItemType> create(final @NonNull Key key) {
return TypedKey.create(RegistryKey.ITEM, key);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key;
import org.bukkit.potion.PotionEffectType;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.NotNull;

/**
* Vanilla keys for {@link RegistryKey#MOB_EFFECT}.
Expand Down Expand Up @@ -302,7 +302,7 @@ public final class MobEffectKeys {
private MobEffectKeys() {
}

private static @NotNull TypedKey<PotionEffectType> create(final @NotNull Key key) {
private static @NonNull TypedKey<PotionEffectType> create(final @NonNull Key key) {
return TypedKey.create(RegistryKey.MOB_EFFECT, key);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key;
import org.bukkit.generator.structure.Structure;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.NotNull;

/**
* Vanilla keys for {@link RegistryKey#STRUCTURE}.
Expand Down Expand Up @@ -268,13 +268,13 @@ private StructureKeys() {
}

/**
* Creates a key for {@link Structure} in a registry.
* Creates a key for {@link Structure} in the registry {@code minecraft:worldgen/structure}.
*
* @param key the value's key in the registry
* @return a new typed key
*/
@ApiStatus.Experimental
public static @NotNull TypedKey<Structure> create(final @NotNull Key key) {
public static @NonNull TypedKey<Structure> create(final @NonNull Key key) {
return TypedKey.create(RegistryKey.STRUCTURE, key);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key;
import org.bukkit.generator.structure.StructureType;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.NotNull;

/**
* Vanilla keys for {@link RegistryKey#STRUCTURE_TYPE}.
Expand Down Expand Up @@ -141,7 +141,7 @@ public final class StructureTypeKeys {
private StructureTypeKeys() {
}

private static @NotNull TypedKey<StructureType> create(final @NotNull Key key) {
private static @NonNull TypedKey<StructureType> create(final @NonNull Key key) {
return TypedKey.create(RegistryKey.STRUCTURE_TYPE, key);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key;
import org.bukkit.inventory.meta.trim.TrimMaterial;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.NotNull;

/**
* Vanilla keys for {@link RegistryKey#TRIM_MATERIAL}.
Expand Down Expand Up @@ -100,13 +100,13 @@ private TrimMaterialKeys() {
}

/**
* Creates a key for {@link TrimMaterial} in a registry.
* Creates a key for {@link TrimMaterial} in the registry {@code minecraft:trim_material}.
*
* @param key the value's key in the registry
* @return a new typed key
*/
@ApiStatus.Experimental
public static @NotNull TypedKey<TrimMaterial> create(final @NotNull Key key) {
public static @NonNull TypedKey<TrimMaterial> create(final @NonNull Key key) {
return TypedKey.create(RegistryKey.TRIM_MATERIAL, key);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key;
import org.bukkit.inventory.meta.trim.TrimPattern;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.NotNull;

/**
* Vanilla keys for {@link RegistryKey#TRIM_PATTERN}.
Expand Down Expand Up @@ -156,13 +156,13 @@ private TrimPatternKeys() {
}

/**
* Creates a key for {@link TrimPattern} in a registry.
* Creates a key for {@link TrimPattern} in the registry {@code minecraft:trim_pattern}.
*
* @param key the value's key in the registry
* @return a new typed key
*/
@ApiStatus.Experimental
public static @NotNull TypedKey<TrimPattern> create(final @NotNull Key key) {
public static @NonNull TypedKey<TrimPattern> create(final @NonNull Key key) {
return TypedKey.create(RegistryKey.TRIM_PATTERN, key);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key;
import org.bukkit.entity.Wolf;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.NotNull;

/**
* Vanilla keys for {@link RegistryKey#WOLF_VARIANT}.
Expand Down Expand Up @@ -93,13 +93,13 @@ private WolfVariantKeys() {
}

/**
* Creates a key for {@link Wolf.Variant} in a registry.
* Creates a key for {@link Wolf.Variant} in the registry {@code minecraft:wolf_variant}.
*
* @param key the value's key in the registry
* @return a new typed key
*/
@ApiStatus.Experimental
public static @NotNull TypedKey<Wolf.Variant> create(final @NotNull Key key) {
public static @NonNull TypedKey<Wolf.Variant> create(final @NonNull Key key) {
return TypedKey.create(RegistryKey.WOLF_VARIANT, key);
}
}
Loading
Loading