generator fix

This commit is contained in:
Jason Penilla 2024-04-25 19:09:21 -07:00
parent 88a3dac057
commit ce02863322
6 changed files with 11 additions and 11 deletions

View file

@ -250,7 +250,7 @@ public final class BiomeKeys {
* @apiNote This field is version-dependant and may be removed in future Minecraft versions * @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/ */
@ApiStatus.Experimental @ApiStatus.Experimental
@MinecraftExperimental("update 1.21") @MinecraftExperimental(MinecraftExperimental.Requires.UPDATE_1_21)
public static final TypedKey<Biome> MANGROVE_SWAMP = create(key("mangrove_swamp")); public static final TypedKey<Biome> MANGROVE_SWAMP = create(key("mangrove_swamp"));
/** /**
@ -406,7 +406,7 @@ public final class BiomeKeys {
* @apiNote This field is version-dependant and may be removed in future Minecraft versions * @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/ */
@ApiStatus.Experimental @ApiStatus.Experimental
@MinecraftExperimental("update 1.21") @MinecraftExperimental(MinecraftExperimental.Requires.UPDATE_1_21)
public static final TypedKey<Biome> SWAMP = create(key("swamp")); public static final TypedKey<Biome> SWAMP = create(key("swamp"));
/** /**

View file

@ -229,7 +229,7 @@ public final class StructureKeys {
* @apiNote This field is version-dependant and may be removed in future Minecraft versions * @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/ */
@ApiStatus.Experimental @ApiStatus.Experimental
@MinecraftExperimental("update 1.21") @MinecraftExperimental(MinecraftExperimental.Requires.UPDATE_1_21)
public static final TypedKey<Structure> TRIAL_CHAMBERS = create(key("trial_chambers")); public static final TypedKey<Structure> TRIAL_CHAMBERS = create(key("trial_chambers"));
/** /**

View file

@ -33,7 +33,7 @@ public final class TrimPatternKeys {
* @apiNote This field is version-dependant and may be removed in future Minecraft versions * @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/ */
@ApiStatus.Experimental @ApiStatus.Experimental
@MinecraftExperimental("update 1.21") @MinecraftExperimental(MinecraftExperimental.Requires.UPDATE_1_21)
public static final TypedKey<TrimPattern> BOLT = create(key("bolt")); public static final TypedKey<TrimPattern> BOLT = create(key("bolt"));
/** /**
@ -63,7 +63,7 @@ public final class TrimPatternKeys {
* @apiNote This field is version-dependant and may be removed in future Minecraft versions * @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/ */
@ApiStatus.Experimental @ApiStatus.Experimental
@MinecraftExperimental("update 1.21") @MinecraftExperimental(MinecraftExperimental.Requires.UPDATE_1_21)
public static final TypedKey<TrimPattern> FLOW = create(key("flow")); public static final TypedKey<TrimPattern> FLOW = create(key("flow"));
/** /**

View file

@ -130,15 +130,15 @@ public class GeneratedKeyType<T, A> extends SimpleGenerator {
.initializer("$N(key($S))", createMethod.build(), keyPath) .initializer("$N(key($S))", createMethod.build(), keyPath)
.addJavadoc(Javadocs.getVersionDependentField("{@code $L}"), key.location().toString()); .addJavadoc(Javadocs.getVersionDependentField("{@code $L}"), key.location().toString());
if (experimental.contains(key)) { if (experimental.contains(key)) {
fieldBuilder.addAnnotations(experimentalAnnotations("update 1.21")); fieldBuilder.addAnnotations(experimentalAnnotations("MinecraftExperimental.Requires.UPDATE_1_21"));
} else { } else {
allExperimental = false; allExperimental = false;
} }
typeBuilder.addField(fieldBuilder.build()); typeBuilder.addField(fieldBuilder.build());
} }
if (allExperimental) { if (allExperimental) {
typeBuilder.addAnnotations(experimentalAnnotations("update 1.21")); typeBuilder.addAnnotations(experimentalAnnotations("MinecraftExperimental.Requires.UPDATE_1_21"));
createMethod.addAnnotations(experimentalAnnotations("update 1.21")); createMethod.addAnnotations(experimentalAnnotations("MinecraftExperimental.Requires.UPDATE_1_21"));
} }
return typeBuilder.addMethod(createMethod.build()).build(); return typeBuilder.addMethod(createMethod.build()).build();
} }

View file

@ -16,7 +16,7 @@ public final class Annotations {
return List.of( return List.of(
AnnotationSpec.builder(ApiStatus.Experimental.class).build(), AnnotationSpec.builder(ApiStatus.Experimental.class).build(),
AnnotationSpec.builder(MinecraftExperimental.class) AnnotationSpec.builder(MinecraftExperimental.class)
.addMember("value", "$S", version) .addMember("value", "$L", version)
.build() .build()
); );
} }

View file

@ -839,7 +839,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
/** /**
* Vanilla tag representing entities which deflect projectiles. * Vanilla tag representing entities which deflect projectiles.
*/ */
+ @org.jetbrains.annotations.ApiStatus.Experimental @MinecraftExperimental // Paper - add missing annotation + @org.jetbrains.annotations.ApiStatus.Experimental @MinecraftExperimental(value = MinecraftExperimental.Requires.UPDATE_1_21) // Paper - add missing annotation
Tag<EntityType> ENTITY_TYPES_DEFLECTS_PROJECTILES = Bukkit.getTag(REGISTRY_ENTITY_TYPES, NamespacedKey.minecraft("deflects_projectiles"), EntityType.class); Tag<EntityType> ENTITY_TYPES_DEFLECTS_PROJECTILES = Bukkit.getTag(REGISTRY_ENTITY_TYPES, NamespacedKey.minecraft("deflects_projectiles"), EntityType.class);
/** /**
* Vanilla tag representing entities which deflect arrows. * Vanilla tag representing entities which deflect arrows.
@ -847,7 +847,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
/** /**
* Vanilla tag representing entities which can turn in boats. * Vanilla tag representing entities which can turn in boats.
*/ */
+ @org.jetbrains.annotations.ApiStatus.Experimental @MinecraftExperimental // Paper - add missing annotation + @org.jetbrains.annotations.ApiStatus.Experimental @MinecraftExperimental(value = MinecraftExperimental.Requires.UPDATE_1_21) // Paper - add missing annotation
Tag<EntityType> ENTITY_TYPES_CAN_TURN_IN_BOATS = Bukkit.getTag(REGISTRY_ENTITY_TYPES, NamespacedKey.minecraft("can_turn_in_boats"), EntityType.class); Tag<EntityType> ENTITY_TYPES_CAN_TURN_IN_BOATS = Bukkit.getTag(REGISTRY_ENTITY_TYPES, NamespacedKey.minecraft("can_turn_in_boats"), EntityType.class);
/** /**
* Vanilla tag representing all entities sensitive to illager enchantments. * Vanilla tag representing all entities sensitive to illager enchantments.