mirror of
https://github.com/PaperMC/Paper.git
synced 2025-02-10 17:42:16 +01:00
Generators
This commit is contained in:
parent
fb5b173c6a
commit
fe84979a31
@ -1,3 +1,5 @@
|
|||||||
|
root = true
|
||||||
|
|
||||||
[*]
|
[*]
|
||||||
charset=utf-8
|
charset=utf-8
|
||||||
end_of_line=lf
|
end_of_line=lf
|
||||||
@ -34,11 +36,11 @@ ij_java_method_parameters_right_paren_on_new_line = true
|
|||||||
ij_java_use_fq_class_names = false
|
ij_java_use_fq_class_names = false
|
||||||
ij_java_class_names_in_javadoc = 1
|
ij_java_class_names_in_javadoc = 1
|
||||||
|
|
||||||
|
[paper-{server,api}/src/generated/java/**/*.java]
|
||||||
|
ij_java_imports_layout = $*, |, *
|
||||||
|
|
||||||
[paper-server/src/minecraft/java/**/*.java]
|
[paper-server/src/minecraft/java/**/*.java]
|
||||||
ij_java_use_fq_class_names = true
|
ij_java_use_fq_class_names = true
|
||||||
|
|
||||||
[paper-server/src/minecraft/resources/data/**/*.json]
|
[paper-server/src/minecraft/resources/data/**/*.json]
|
||||||
indent_size = 2
|
indent_size = 2
|
||||||
|
|
||||||
[paper-api-generator/generated/**/*.java]
|
|
||||||
ij_java_imports_layout = $*,|,*
|
|
||||||
|
2
.gitignore
vendored
2
.gitignore
vendored
@ -45,7 +45,7 @@ logs/
|
|||||||
!gradle/wrapper/gradle-wrapper.jar
|
!gradle/wrapper/gradle-wrapper.jar
|
||||||
|
|
||||||
test-plugin.settings.gradle.kts
|
test-plugin.settings.gradle.kts
|
||||||
paper-api-generator.settings.gradle.kts
|
paper-generator.settings.gradle.kts
|
||||||
|
|
||||||
# Don't track patched vanilla submodules
|
# Don't track patched vanilla submodules
|
||||||
paper-server/src/minecraft/
|
paper-server/src/minecraft/
|
||||||
|
@ -1,37 +0,0 @@
|
|||||||
import io.papermc.paperweight.util.defaultJavaLauncher
|
|
||||||
|
|
||||||
plugins {
|
|
||||||
java
|
|
||||||
id("io.papermc.paperweight.source-generator")
|
|
||||||
}
|
|
||||||
|
|
||||||
paperweight {
|
|
||||||
atFile.set(layout.projectDirectory.file("wideners.at"))
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
minecraftJar(project(":paper-server", "mappedJarOutgoing"))
|
|
||||||
implementation(project(":paper-server", "macheMinecraftLibraries"))
|
|
||||||
|
|
||||||
implementation("com.squareup:javapoet:1.13.0")
|
|
||||||
implementation(project(":paper-api"))
|
|
||||||
implementation("io.github.classgraph:classgraph:4.8.47")
|
|
||||||
implementation("org.jetbrains:annotations:26.0.1")
|
|
||||||
testImplementation("org.junit.jupiter:junit-jupiter:5.10.2")
|
|
||||||
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
|
|
||||||
}
|
|
||||||
|
|
||||||
tasks.register<JavaExec>("generate") {
|
|
||||||
dependsOn(tasks.check)
|
|
||||||
mainClass.set("io.papermc.generator.Main")
|
|
||||||
classpath(sourceSets.main.map { it.runtimeClasspath })
|
|
||||||
args(rootProject.layout.projectDirectory.dir("paper-api/src/generated/java").asFile.absolutePath)
|
|
||||||
javaLauncher = javaToolchains.defaultJavaLauncher(project)
|
|
||||||
}
|
|
||||||
|
|
||||||
tasks.test {
|
|
||||||
useJUnitPlatform()
|
|
||||||
}
|
|
||||||
|
|
||||||
group = "io.papermc.paper"
|
|
||||||
version = "1.0-SNAPSHOT"
|
|
@ -1,96 +0,0 @@
|
|||||||
package io.papermc.generator;
|
|
||||||
|
|
||||||
import io.papermc.generator.types.GeneratedKeyType;
|
|
||||||
import io.papermc.generator.types.GeneratedTagKeyType;
|
|
||||||
import io.papermc.generator.types.SourceGenerator;
|
|
||||||
import io.papermc.generator.types.goal.MobGoalGenerator;
|
|
||||||
import io.papermc.paper.registry.RegistryKey;
|
|
||||||
import net.minecraft.core.Registry;
|
|
||||||
import net.minecraft.core.registries.Registries;
|
|
||||||
import net.minecraft.resources.ResourceKey;
|
|
||||||
import org.bukkit.Art;
|
|
||||||
import org.bukkit.Fluid;
|
|
||||||
import org.bukkit.GameEvent;
|
|
||||||
import org.bukkit.JukeboxSong;
|
|
||||||
import org.bukkit.MusicInstrument;
|
|
||||||
import org.bukkit.Sound;
|
|
||||||
import org.bukkit.attribute.Attribute;
|
|
||||||
import org.bukkit.block.Biome;
|
|
||||||
import org.bukkit.block.BlockType;
|
|
||||||
import org.bukkit.block.banner.PatternType;
|
|
||||||
import org.bukkit.damage.DamageType;
|
|
||||||
import org.bukkit.enchantments.Enchantment;
|
|
||||||
import org.bukkit.entity.Cat;
|
|
||||||
import org.bukkit.entity.EntityType;
|
|
||||||
import org.bukkit.entity.Frog;
|
|
||||||
import org.bukkit.entity.Villager;
|
|
||||||
import org.bukkit.entity.Wolf;
|
|
||||||
import org.bukkit.generator.structure.Structure;
|
|
||||||
import org.bukkit.generator.structure.StructureType;
|
|
||||||
import org.bukkit.inventory.ItemType;
|
|
||||||
import org.bukkit.inventory.MenuType;
|
|
||||||
import org.bukkit.inventory.meta.trim.TrimMaterial;
|
|
||||||
import org.bukkit.inventory.meta.trim.TrimPattern;
|
|
||||||
import org.bukkit.map.MapCursor;
|
|
||||||
import org.bukkit.potion.PotionEffectType;
|
|
||||||
|
|
||||||
public interface Generators {
|
|
||||||
|
|
||||||
SourceGenerator[] API = {
|
|
||||||
// built-ins
|
|
||||||
simpleKey("GameEventKeys", GameEvent.class, Registries.GAME_EVENT, RegistryKey.GAME_EVENT, true),
|
|
||||||
simpleKey("StructureTypeKeys", StructureType.class, Registries.STRUCTURE_TYPE, RegistryKey.STRUCTURE_TYPE, false),
|
|
||||||
simpleKey("MobEffectKeys", PotionEffectType.class, Registries.MOB_EFFECT, RegistryKey.MOB_EFFECT, false),
|
|
||||||
simpleKey("BlockTypeKeys", BlockType.class, Registries.BLOCK, RegistryKey.BLOCK, false),
|
|
||||||
simpleKey("ItemTypeKeys", ItemType.class, Registries.ITEM, RegistryKey.ITEM, false),
|
|
||||||
simpleKey("CatVariantKeys", Cat.Type.class, Registries.CAT_VARIANT, RegistryKey.CAT_VARIANT, false),
|
|
||||||
simpleKey("FrogVariantKeys", Frog.Variant.class, Registries.FROG_VARIANT, RegistryKey.FROG_VARIANT, false),
|
|
||||||
simpleKey("VillagerProfessionKeys", Villager.Profession.class, Registries.VILLAGER_PROFESSION, RegistryKey.VILLAGER_PROFESSION, false),
|
|
||||||
simpleKey("VillagerTypeKeys", Villager.Type.class, Registries.VILLAGER_TYPE, RegistryKey.VILLAGER_TYPE, false),
|
|
||||||
simpleKey("MapDecorationTypeKeys", MapCursor.Type.class, Registries.MAP_DECORATION_TYPE, RegistryKey.MAP_DECORATION_TYPE, false),
|
|
||||||
simpleKey("MenuTypeKeys", MenuType.class, Registries.MENU, RegistryKey.MENU, false),
|
|
||||||
simpleKey("AttributeKeys", Attribute.class, Registries.ATTRIBUTE, RegistryKey.ATTRIBUTE, false),
|
|
||||||
simpleKey("FluidKeys", Fluid.class, Registries.FLUID, RegistryKey.FLUID, false),
|
|
||||||
simpleKey("SoundEventKeys", Sound.class, Registries.SOUND_EVENT, RegistryKey.SOUND_EVENT, false),
|
|
||||||
|
|
||||||
// data-driven
|
|
||||||
simpleKey("BiomeKeys", Biome.class, Registries.BIOME, RegistryKey.BIOME, true),
|
|
||||||
simpleKey("StructureKeys", Structure.class, Registries.STRUCTURE, RegistryKey.STRUCTURE, true),
|
|
||||||
simpleKey("TrimMaterialKeys", TrimMaterial.class, Registries.TRIM_MATERIAL, RegistryKey.TRIM_MATERIAL, true),
|
|
||||||
simpleKey("TrimPatternKeys", TrimPattern.class, Registries.TRIM_PATTERN, RegistryKey.TRIM_PATTERN, true),
|
|
||||||
simpleKey("DamageTypeKeys", DamageType.class, Registries.DAMAGE_TYPE, RegistryKey.DAMAGE_TYPE, true),
|
|
||||||
simpleKey("WolfVariantKeys", Wolf.Variant.class, Registries.WOLF_VARIANT, RegistryKey.WOLF_VARIANT, true),
|
|
||||||
simpleKey("EnchantmentKeys", Enchantment.class, Registries.ENCHANTMENT, RegistryKey.ENCHANTMENT, true),
|
|
||||||
simpleKey("JukeboxSongKeys", JukeboxSong.class, Registries.JUKEBOX_SONG, RegistryKey.JUKEBOX_SONG, true),
|
|
||||||
simpleKey("BannerPatternKeys", PatternType.class, Registries.BANNER_PATTERN, RegistryKey.BANNER_PATTERN, true),
|
|
||||||
simpleKey("PaintingVariantKeys", Art.class, Registries.PAINTING_VARIANT, RegistryKey.PAINTING_VARIANT, true),
|
|
||||||
simpleKey("InstrumentKeys", MusicInstrument.class, Registries.INSTRUMENT, RegistryKey.INSTRUMENT, true),
|
|
||||||
|
|
||||||
// tags
|
|
||||||
simpleTagKey("GameEventTagKeys", GameEvent.class, Registries.GAME_EVENT, RegistryKey.GAME_EVENT),
|
|
||||||
simpleTagKey("BlockTypeTagKeys", BlockType.class, Registries.BLOCK, RegistryKey.BLOCK),
|
|
||||||
simpleTagKey("ItemTypeTagKeys", ItemType.class, Registries.ITEM, RegistryKey.ITEM),
|
|
||||||
simpleTagKey("CatVariantTagKeys", Cat.Type.class, Registries.CAT_VARIANT, RegistryKey.CAT_VARIANT),
|
|
||||||
simpleTagKey("FluidTagKeys", Fluid.class, Registries.FLUID, RegistryKey.FLUID),
|
|
||||||
|
|
||||||
simpleTagKey("BiomeTagKeys", Biome.class, Registries.BIOME, RegistryKey.BIOME),
|
|
||||||
simpleTagKey("StructureTagKeys", Structure.class, Registries.STRUCTURE, RegistryKey.STRUCTURE),
|
|
||||||
simpleTagKey("DamageTypeTagKeys", DamageType.class, Registries.DAMAGE_TYPE, RegistryKey.DAMAGE_TYPE),
|
|
||||||
simpleTagKey("EnchantmentTagKeys", Enchantment.class, Registries.ENCHANTMENT, RegistryKey.ENCHANTMENT),
|
|
||||||
simpleTagKey("BannerPatternTagKeys", PatternType.class, Registries.BANNER_PATTERN, RegistryKey.BANNER_PATTERN),
|
|
||||||
simpleTagKey("PaintingVariantTagKeys", Art.class, Registries.PAINTING_VARIANT, RegistryKey.PAINTING_VARIANT),
|
|
||||||
simpleTagKey("InstrumentTagKeys", MusicInstrument.class, Registries.INSTRUMENT, RegistryKey.INSTRUMENT),
|
|
||||||
|
|
||||||
// api only
|
|
||||||
simpleTagKey("EntityTypeTagKeys", EntityType.class, Registries.ENTITY_TYPE, RegistryKey.ENTITY_TYPE),
|
|
||||||
new MobGoalGenerator("VanillaGoal", "com.destroystokyo.paper.entity.ai")
|
|
||||||
};
|
|
||||||
|
|
||||||
private static <T, A> SourceGenerator simpleKey(final String className, final Class<A> apiType, final ResourceKey<? extends Registry<T>> registryKey, final RegistryKey<A> apiRegistryKey, final boolean publicCreateKeyMethod) {
|
|
||||||
return new GeneratedKeyType<>(className, apiType, "io.papermc.paper.registry.keys", registryKey, apiRegistryKey, publicCreateKeyMethod);
|
|
||||||
}
|
|
||||||
|
|
||||||
private static <T, A> SourceGenerator simpleTagKey(final String className, final Class<A> apiType, final ResourceKey<? extends Registry<T>> registryKey, final RegistryKey<A> apiRegistryKey) {
|
|
||||||
return new GeneratedTagKeyType<>(className, apiType, "io.papermc.paper.registry.keys.tags", registryKey, apiRegistryKey, true);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,93 +0,0 @@
|
|||||||
package io.papermc.generator;
|
|
||||||
|
|
||||||
import com.google.common.util.concurrent.MoreExecutors;
|
|
||||||
import com.mojang.logging.LogUtils;
|
|
||||||
import io.papermc.generator.types.SourceGenerator;
|
|
||||||
import io.papermc.generator.utils.TagCollector;
|
|
||||||
import java.nio.file.Files;
|
|
||||||
import java.nio.file.Path;
|
|
||||||
import java.nio.file.Paths;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
import net.minecraft.SharedConstants;
|
|
||||||
import net.minecraft.commands.Commands;
|
|
||||||
import net.minecraft.core.HolderLookup;
|
|
||||||
import net.minecraft.core.LayeredRegistryAccess;
|
|
||||||
import net.minecraft.core.Registry;
|
|
||||||
import net.minecraft.core.RegistryAccess;
|
|
||||||
import net.minecraft.resources.RegistryDataLoader;
|
|
||||||
import net.minecraft.server.Bootstrap;
|
|
||||||
import net.minecraft.server.RegistryLayer;
|
|
||||||
import net.minecraft.server.ReloadableServerResources;
|
|
||||||
import net.minecraft.server.packs.PackType;
|
|
||||||
import net.minecraft.server.packs.repository.Pack;
|
|
||||||
import net.minecraft.server.packs.repository.PackRepository;
|
|
||||||
import net.minecraft.server.packs.repository.ServerPacksSource;
|
|
||||||
import net.minecraft.server.packs.resources.MultiPackResourceManager;
|
|
||||||
import net.minecraft.tags.TagKey;
|
|
||||||
import net.minecraft.tags.TagLoader;
|
|
||||||
import net.minecraft.world.flag.FeatureFlags;
|
|
||||||
import org.apache.commons.io.file.PathUtils;
|
|
||||||
import org.slf4j.Logger;
|
|
||||||
|
|
||||||
public final class Main {
|
|
||||||
|
|
||||||
private static final Logger LOGGER = LogUtils.getLogger();
|
|
||||||
public static final RegistryAccess.Frozen REGISTRY_ACCESS;
|
|
||||||
public static final Map<TagKey<?>, String> EXPERIMENTAL_TAGS;
|
|
||||||
|
|
||||||
static {
|
|
||||||
SharedConstants.tryDetectVersion();
|
|
||||||
Bootstrap.bootStrap();
|
|
||||||
Bootstrap.validate();
|
|
||||||
|
|
||||||
final PackRepository resourceRepository = ServerPacksSource.createVanillaTrustedRepository();
|
|
||||||
resourceRepository.reload();
|
|
||||||
final MultiPackResourceManager resourceManager = new MultiPackResourceManager(PackType.SERVER_DATA, resourceRepository.getAvailablePacks().stream().map(Pack::open).toList());
|
|
||||||
LayeredRegistryAccess<RegistryLayer> layers = RegistryLayer.createRegistryAccess();
|
|
||||||
final List<Registry.PendingTags<?>> pendingTags = TagLoader.loadTagsForExistingRegistries(resourceManager, layers.getLayer(RegistryLayer.STATIC));
|
|
||||||
final List<HolderLookup.RegistryLookup<?>> worldGenLayer = TagLoader.buildUpdatedLookups(layers.getAccessForLoading(RegistryLayer.WORLDGEN), pendingTags);
|
|
||||||
final RegistryAccess.Frozen frozenWorldgenRegistries = RegistryDataLoader.load(resourceManager, worldGenLayer, RegistryDataLoader.WORLDGEN_REGISTRIES);
|
|
||||||
layers = layers.replaceFrom(RegistryLayer.WORLDGEN, frozenWorldgenRegistries);
|
|
||||||
REGISTRY_ACCESS = layers.compositeAccess().freeze();
|
|
||||||
final ReloadableServerResources reloadableServerResources = ReloadableServerResources.loadResources(
|
|
||||||
resourceManager,
|
|
||||||
layers,
|
|
||||||
pendingTags,
|
|
||||||
FeatureFlags.VANILLA_SET,
|
|
||||||
Commands.CommandSelection.DEDICATED,
|
|
||||||
0,
|
|
||||||
MoreExecutors.directExecutor(),
|
|
||||||
MoreExecutors.directExecutor()
|
|
||||||
).join();
|
|
||||||
reloadableServerResources.updateStaticRegistryTags();
|
|
||||||
EXPERIMENTAL_TAGS = TagCollector.grabExperimental(resourceManager);
|
|
||||||
}
|
|
||||||
|
|
||||||
private Main() {
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void main(final String[] args) {
|
|
||||||
LOGGER.info("Running API generators...");
|
|
||||||
generate(Paths.get(args[0]), Generators.API);
|
|
||||||
// LOGGER.info("Running Server generators...");
|
|
||||||
// generate(Paths.get(args[1]), Generators.SERVER);
|
|
||||||
}
|
|
||||||
|
|
||||||
private static void generate(Path output, SourceGenerator[] generators) {
|
|
||||||
try {
|
|
||||||
if (Files.exists(output)) {
|
|
||||||
PathUtils.deleteDirectory(output);
|
|
||||||
}
|
|
||||||
Files.createDirectories(output);
|
|
||||||
|
|
||||||
for (final SourceGenerator generator : generators) {
|
|
||||||
generator.writeToFile(output);
|
|
||||||
}
|
|
||||||
|
|
||||||
LOGGER.info("Files written to {}", output.toAbsolutePath());
|
|
||||||
} catch (final Exception ex) {
|
|
||||||
throw new RuntimeException(ex);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,207 +0,0 @@
|
|||||||
package io.papermc.generator.types;
|
|
||||||
|
|
||||||
import com.google.common.collect.Sets;
|
|
||||||
import com.squareup.javapoet.FieldSpec;
|
|
||||||
import com.squareup.javapoet.JavaFile;
|
|
||||||
import com.squareup.javapoet.MethodSpec;
|
|
||||||
import com.squareup.javapoet.ParameterSpec;
|
|
||||||
import com.squareup.javapoet.ParameterizedTypeName;
|
|
||||||
import com.squareup.javapoet.TypeName;
|
|
||||||
import com.squareup.javapoet.TypeSpec;
|
|
||||||
import io.papermc.generator.Main;
|
|
||||||
import io.papermc.generator.utils.Annotations;
|
|
||||||
import io.papermc.generator.utils.CollectingContext;
|
|
||||||
import io.papermc.generator.utils.Formatting;
|
|
||||||
import io.papermc.generator.utils.Javadocs;
|
|
||||||
import io.papermc.paper.registry.RegistryKey;
|
|
||||||
import io.papermc.paper.registry.TypedKey;
|
|
||||||
import java.lang.reflect.Field;
|
|
||||||
import java.lang.reflect.Modifier;
|
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.IdentityHashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.Set;
|
|
||||||
import java.util.stream.Collectors;
|
|
||||||
import javax.lang.model.SourceVersion;
|
|
||||||
import net.kyori.adventure.key.Key;
|
|
||||||
import net.minecraft.core.Holder;
|
|
||||||
import net.minecraft.core.HolderLookup;
|
|
||||||
import net.minecraft.core.Registry;
|
|
||||||
import net.minecraft.core.RegistrySetBuilder;
|
|
||||||
import net.minecraft.core.registries.Registries;
|
|
||||||
import net.minecraft.data.registries.VanillaRegistries;
|
|
||||||
import net.minecraft.resources.ResourceKey;
|
|
||||||
import net.minecraft.world.flag.FeatureElement;
|
|
||||||
import net.minecraft.world.flag.FeatureFlags;
|
|
||||||
import org.bukkit.MinecraftExperimental;
|
|
||||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
|
||||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
|
||||||
import org.checkerframework.framework.qual.DefaultQualifier;
|
|
||||||
|
|
||||||
import static com.squareup.javapoet.TypeSpec.classBuilder;
|
|
||||||
import static io.papermc.generator.utils.Annotations.EXPERIMENTAL_API_ANNOTATION;
|
|
||||||
import static io.papermc.generator.utils.Annotations.experimentalAnnotations;
|
|
||||||
import static java.util.Objects.requireNonNull;
|
|
||||||
import static javax.lang.model.element.Modifier.FINAL;
|
|
||||||
import static javax.lang.model.element.Modifier.PRIVATE;
|
|
||||||
import static javax.lang.model.element.Modifier.PUBLIC;
|
|
||||||
import static javax.lang.model.element.Modifier.STATIC;
|
|
||||||
|
|
||||||
@DefaultQualifier(NonNull.class)
|
|
||||||
public class GeneratedKeyType<T, A> extends SimpleGenerator {
|
|
||||||
|
|
||||||
private static final Map<ResourceKey<? extends Registry<?>>, RegistrySetBuilder.RegistryBootstrap<?>> VANILLA_REGISTRY_ENTRIES = VanillaRegistries.BUILDER.entries.stream()
|
|
||||||
.collect(Collectors.toMap(RegistrySetBuilder.RegistryStub::key, RegistrySetBuilder.RegistryStub::bootstrap));
|
|
||||||
|
|
||||||
private static final Map<ResourceKey<? extends Registry<?>>, RegistrySetBuilder.RegistryBootstrap<?>> EXPERIMENTAL_REGISTRY_ENTRIES = Map.of(); // Update for Experimental API
|
|
||||||
private static final Map<RegistryKey<?>, String> REGISTRY_KEY_FIELD_NAMES;
|
|
||||||
static {
|
|
||||||
final Map<RegistryKey<?>, String> map = new HashMap<>();
|
|
||||||
try {
|
|
||||||
for (final Field field : RegistryKey.class.getFields()) {
|
|
||||||
if (!Modifier.isStatic(field.getModifiers()) || !Modifier.isFinal(field.getModifiers()) || field.getType() != RegistryKey.class) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
map.put((RegistryKey<?>) field.get(null), field.getName());
|
|
||||||
}
|
|
||||||
REGISTRY_KEY_FIELD_NAMES = Map.copyOf(map);
|
|
||||||
} catch (final ReflectiveOperationException ex) {
|
|
||||||
throw new RuntimeException(ex);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private static final String CREATE_JAVADOC = """
|
|
||||||
Creates a key for {@link $T} in the registry {@code $L}.
|
|
||||||
|
|
||||||
@param key the value's key in the registry
|
|
||||||
@return a new typed key
|
|
||||||
""";
|
|
||||||
|
|
||||||
private final Class<A> apiType;
|
|
||||||
private final ResourceKey<? extends Registry<T>> registryKey;
|
|
||||||
private final RegistryKey<A> apiRegistryKey;
|
|
||||||
private final boolean publicCreateKeyMethod;
|
|
||||||
|
|
||||||
public GeneratedKeyType(final String keysClassName, final Class<A> apiType, final String pkg, final ResourceKey<? extends Registry<T>> registryKey, final RegistryKey<A> apiRegistryKey, final boolean publicCreateKeyMethod) {
|
|
||||||
super(keysClassName, pkg);
|
|
||||||
this.apiType = apiType;
|
|
||||||
this.registryKey = registryKey;
|
|
||||||
this.apiRegistryKey = apiRegistryKey;
|
|
||||||
this.publicCreateKeyMethod = publicCreateKeyMethod;
|
|
||||||
}
|
|
||||||
|
|
||||||
private MethodSpec.Builder createMethod(final TypeName returnType) {
|
|
||||||
final TypeName keyType = TypeName.get(Key.class);
|
|
||||||
|
|
||||||
final ParameterSpec keyParam = ParameterSpec.builder(keyType, "key", FINAL).build();
|
|
||||||
final MethodSpec.Builder create = MethodSpec.methodBuilder("create")
|
|
||||||
.addModifiers(this.publicCreateKeyMethod ? PUBLIC : PRIVATE, STATIC)
|
|
||||||
.addParameter(keyParam)
|
|
||||||
.addCode("return $T.create($T.$L, $N);", TypedKey.class, RegistryKey.class, requireNonNull(REGISTRY_KEY_FIELD_NAMES.get(this.apiRegistryKey), "Missing field for " + this.apiRegistryKey), keyParam)
|
|
||||||
.returns(returnType);
|
|
||||||
if (this.publicCreateKeyMethod) {
|
|
||||||
create.addAnnotation(EXPERIMENTAL_API_ANNOTATION); // TODO remove once not experimental
|
|
||||||
create.addJavadoc(CREATE_JAVADOC, this.apiType, this.registryKey.location().toString());
|
|
||||||
}
|
|
||||||
return create;
|
|
||||||
}
|
|
||||||
|
|
||||||
private TypeSpec.Builder keyHolderType() {
|
|
||||||
return classBuilder(this.className)
|
|
||||||
.addModifiers(PUBLIC, FINAL)
|
|
||||||
.addJavadoc(Javadocs.getVersionDependentClassHeader("{@link $T#$L}"), RegistryKey.class, REGISTRY_KEY_FIELD_NAMES.get(this.apiRegistryKey))
|
|
||||||
.addAnnotations(Annotations.CLASS_HEADER)
|
|
||||||
.addMethod(MethodSpec.constructorBuilder()
|
|
||||||
.addModifiers(PRIVATE)
|
|
||||||
.build()
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Deprecated
|
|
||||||
private static final Map<String, String> JUKEBOX_SONG_NAMES = Map.of(
|
|
||||||
"5", "FIVE",
|
|
||||||
"11", "ELEVEN",
|
|
||||||
"13", "THIRTEEN"
|
|
||||||
);
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected TypeSpec getTypeSpec() {
|
|
||||||
final TypeName typedKey = ParameterizedTypeName.get(TypedKey.class, this.apiType);
|
|
||||||
|
|
||||||
final TypeSpec.Builder typeBuilder = this.keyHolderType();
|
|
||||||
final MethodSpec.Builder createMethod = this.createMethod(typedKey);
|
|
||||||
|
|
||||||
final Registry<T> registry = Main.REGISTRY_ACCESS.lookupOrThrow(this.registryKey);
|
|
||||||
final Set<ResourceKey<T>> experimental = this.collectExperimentalKeys(registry);
|
|
||||||
|
|
||||||
boolean allExperimental = true;
|
|
||||||
for (final Holder.Reference<T> reference : registry.listElements().sorted(Formatting.alphabeticKeyOrder(reference -> reference.key().location().getPath())).toList()) {
|
|
||||||
final ResourceKey<T> key = reference.key();
|
|
||||||
final String keyPath = key.location().getPath();
|
|
||||||
String fieldName = Formatting.formatKeyAsField(keyPath);
|
|
||||||
if (!SourceVersion.isIdentifier(fieldName) && this.registryKey.equals(Registries.JUKEBOX_SONG) && JUKEBOX_SONG_NAMES.containsKey(fieldName)) {
|
|
||||||
fieldName = JUKEBOX_SONG_NAMES.get(fieldName);
|
|
||||||
}
|
|
||||||
|
|
||||||
final FieldSpec.Builder fieldBuilder = FieldSpec.builder(typedKey, fieldName, PUBLIC, STATIC, FINAL)
|
|
||||||
.initializer("$N(key($S))", createMethod.build(), keyPath)
|
|
||||||
.addJavadoc(Javadocs.getVersionDependentField("{@code $L}"), key.location().toString());
|
|
||||||
if (experimental.contains(key)) {
|
|
||||||
fieldBuilder.addAnnotations(experimentalAnnotations(null)); // Update for Experimental API
|
|
||||||
} else {
|
|
||||||
allExperimental = false;
|
|
||||||
}
|
|
||||||
typeBuilder.addField(fieldBuilder.build());
|
|
||||||
}
|
|
||||||
if (allExperimental) {
|
|
||||||
typeBuilder.addAnnotations(experimentalAnnotations(null)); // Update for Experimental API
|
|
||||||
createMethod.addAnnotations(experimentalAnnotations(null)); // Update for Experimental API
|
|
||||||
} else {
|
|
||||||
typeBuilder.addAnnotation(EXPERIMENTAL_API_ANNOTATION); // TODO experimental API
|
|
||||||
}
|
|
||||||
return typeBuilder.addMethod(createMethod.build()).build();
|
|
||||||
}
|
|
||||||
|
|
||||||
// todo at some point this should be per feature data pack not all merged
|
|
||||||
private Set<ResourceKey<T>> collectExperimentalKeys(final Registry<T> registry) {
|
|
||||||
if (FeatureElement.FILTERED_REGISTRIES.contains(registry.key())) {
|
|
||||||
return this.collectExperimentalKeysBuiltIn(registry);
|
|
||||||
} else {
|
|
||||||
return this.collectExperimentalKeysDataDriven(registry);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private Set<ResourceKey<T>> collectExperimentalKeysBuiltIn(final Registry<T> registry) {
|
|
||||||
final HolderLookup.RegistryLookup<T> filteredLookup = registry.filterElements(v -> {
|
|
||||||
return v instanceof final FeatureElement featureElement && FeatureFlags.isExperimental(featureElement.requiredFeatures()); // Update for Experimental API
|
|
||||||
});
|
|
||||||
return filteredLookup.listElementIds().collect(Collectors.toUnmodifiableSet());
|
|
||||||
}
|
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
|
||||||
private Set<ResourceKey<T>> collectExperimentalKeysDataDriven(final Registry<T> registry) {
|
|
||||||
final RegistrySetBuilder.@Nullable RegistryBootstrap<T> experimentalBootstrap = (RegistrySetBuilder.RegistryBootstrap<T>) EXPERIMENTAL_REGISTRY_ENTRIES.get(this.registryKey);
|
|
||||||
if (experimentalBootstrap == null) {
|
|
||||||
return Collections.emptySet();
|
|
||||||
}
|
|
||||||
final Set<ResourceKey<T>> experimental = Collections.newSetFromMap(new IdentityHashMap<>());
|
|
||||||
final CollectingContext<T> experimentalCollector = new CollectingContext<>(experimental, registry);
|
|
||||||
experimentalBootstrap.run(experimentalCollector);
|
|
||||||
|
|
||||||
final RegistrySetBuilder.@Nullable RegistryBootstrap<T> vanillaBootstrap = (RegistrySetBuilder.RegistryBootstrap<T>) VANILLA_REGISTRY_ENTRIES.get(this.registryKey);
|
|
||||||
if (vanillaBootstrap != null) {
|
|
||||||
final Set<ResourceKey<T>> vanilla = Collections.newSetFromMap(new IdentityHashMap<>());
|
|
||||||
final CollectingContext<T> vanillaCollector = new CollectingContext<>(vanilla, registry);
|
|
||||||
vanillaBootstrap.run(vanillaCollector);
|
|
||||||
return Sets.difference(experimental, vanilla);
|
|
||||||
}
|
|
||||||
return experimental;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected JavaFile.Builder file(final JavaFile.Builder builder) {
|
|
||||||
return builder
|
|
||||||
.addStaticImport(Key.class, "key");
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,138 +0,0 @@
|
|||||||
package io.papermc.generator.types;
|
|
||||||
|
|
||||||
import com.squareup.javapoet.FieldSpec;
|
|
||||||
import com.squareup.javapoet.JavaFile;
|
|
||||||
import com.squareup.javapoet.MethodSpec;
|
|
||||||
import com.squareup.javapoet.ParameterSpec;
|
|
||||||
import com.squareup.javapoet.ParameterizedTypeName;
|
|
||||||
import com.squareup.javapoet.TypeName;
|
|
||||||
import com.squareup.javapoet.TypeSpec;
|
|
||||||
import io.papermc.generator.Main;
|
|
||||||
import io.papermc.generator.utils.Annotations;
|
|
||||||
import io.papermc.generator.utils.Formatting;
|
|
||||||
import io.papermc.generator.utils.Javadocs;
|
|
||||||
import io.papermc.paper.registry.RegistryKey;
|
|
||||||
import io.papermc.paper.registry.tag.TagKey;
|
|
||||||
import java.lang.reflect.Field;
|
|
||||||
import java.lang.reflect.Modifier;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Locale;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.concurrent.atomic.AtomicBoolean;
|
|
||||||
import net.kyori.adventure.key.Key;
|
|
||||||
import net.minecraft.core.Registry;
|
|
||||||
import net.minecraft.resources.ResourceKey;
|
|
||||||
import org.bukkit.MinecraftExperimental;
|
|
||||||
|
|
||||||
import static com.squareup.javapoet.TypeSpec.classBuilder;
|
|
||||||
import static io.papermc.generator.utils.Annotations.EXPERIMENTAL_API_ANNOTATION;
|
|
||||||
import static io.papermc.generator.utils.Annotations.experimentalAnnotations;
|
|
||||||
import static java.util.Objects.requireNonNull;
|
|
||||||
import static javax.lang.model.element.Modifier.FINAL;
|
|
||||||
import static javax.lang.model.element.Modifier.PRIVATE;
|
|
||||||
import static javax.lang.model.element.Modifier.PUBLIC;
|
|
||||||
import static javax.lang.model.element.Modifier.STATIC;
|
|
||||||
|
|
||||||
public class GeneratedTagKeyType<T, A> extends SimpleGenerator {
|
|
||||||
|
|
||||||
private static final Map<RegistryKey<?>, String> REGISTRY_KEY_FIELD_NAMES;
|
|
||||||
static {
|
|
||||||
final Map<RegistryKey<?>, String> map = new HashMap<>();
|
|
||||||
try {
|
|
||||||
for (final Field field : RegistryKey.class.getFields()) {
|
|
||||||
if (!Modifier.isStatic(field.getModifiers()) || !Modifier.isFinal(field.getModifiers()) || field.getType() != RegistryKey.class) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
map.put((RegistryKey<?>) field.get(null), field.getName());
|
|
||||||
}
|
|
||||||
REGISTRY_KEY_FIELD_NAMES = Map.copyOf(map);
|
|
||||||
} catch (final ReflectiveOperationException ex) {
|
|
||||||
throw new RuntimeException(ex);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private static final String CREATE_JAVADOC = """
|
|
||||||
Creates a tag key for {@link $T} in the registry {@code $L}.
|
|
||||||
|
|
||||||
@param key the tag key's key
|
|
||||||
@return a new tag key
|
|
||||||
""";
|
|
||||||
|
|
||||||
private final Class<A> apiType;
|
|
||||||
private final ResourceKey<? extends Registry<T>> registryKey;
|
|
||||||
private final RegistryKey<A> apiRegistryKey;
|
|
||||||
private final boolean publicCreateKeyMethod;
|
|
||||||
|
|
||||||
public GeneratedTagKeyType(final String keysClassName, final Class<A> apiType, final String pkg, final ResourceKey<? extends Registry<T>> registryKey, final RegistryKey<A> apiRegistryKey, final boolean publicCreateKeyMethod) {
|
|
||||||
super(keysClassName, pkg);
|
|
||||||
this.apiType = apiType;
|
|
||||||
this.registryKey = registryKey;
|
|
||||||
this.apiRegistryKey = apiRegistryKey;
|
|
||||||
this.publicCreateKeyMethod = publicCreateKeyMethod;
|
|
||||||
}
|
|
||||||
|
|
||||||
private MethodSpec.Builder createMethod(final TypeName returnType) {
|
|
||||||
final TypeName keyType = TypeName.get(Key.class);
|
|
||||||
|
|
||||||
final ParameterSpec keyParam = ParameterSpec.builder(keyType, "key", FINAL).build();
|
|
||||||
final MethodSpec.Builder create = MethodSpec.methodBuilder("create")
|
|
||||||
.addModifiers(this.publicCreateKeyMethod ? PUBLIC : PRIVATE, STATIC)
|
|
||||||
.addParameter(keyParam)
|
|
||||||
.addCode("return $T.create($T.$L, $N);", TagKey.class, RegistryKey.class, requireNonNull(REGISTRY_KEY_FIELD_NAMES.get(this.apiRegistryKey), "Missing field for " + this.apiRegistryKey), keyParam)
|
|
||||||
.returns(returnType);
|
|
||||||
if (this.publicCreateKeyMethod) {
|
|
||||||
create.addAnnotation(EXPERIMENTAL_API_ANNOTATION); // TODO remove once not experimental
|
|
||||||
create.addJavadoc(CREATE_JAVADOC, this.apiType, this.registryKey.location().toString());
|
|
||||||
}
|
|
||||||
return create;
|
|
||||||
}
|
|
||||||
|
|
||||||
private TypeSpec.Builder keyHolderType() {
|
|
||||||
return classBuilder(this.className)
|
|
||||||
.addModifiers(PUBLIC, FINAL)
|
|
||||||
.addJavadoc(Javadocs.getVersionDependentClassHeader("{@link $T#$L}"), RegistryKey.class, REGISTRY_KEY_FIELD_NAMES.get(this.apiRegistryKey))
|
|
||||||
.addAnnotations(Annotations.CLASS_HEADER)
|
|
||||||
.addMethod(MethodSpec.constructorBuilder()
|
|
||||||
.addModifiers(PRIVATE)
|
|
||||||
.build()
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected TypeSpec getTypeSpec() {
|
|
||||||
final TypeName tagKey = ParameterizedTypeName.get(TagKey.class, this.apiType);
|
|
||||||
|
|
||||||
final TypeSpec.Builder typeBuilder = this.keyHolderType();
|
|
||||||
final MethodSpec.Builder createMethod = this.createMethod(tagKey);
|
|
||||||
|
|
||||||
final Registry<T> registry = Main.REGISTRY_ACCESS.lookupOrThrow(this.registryKey);
|
|
||||||
|
|
||||||
final AtomicBoolean allExperimental = new AtomicBoolean(true);
|
|
||||||
registry.listTagIds().sorted(Formatting.alphabeticKeyOrder(nmsTagKey -> nmsTagKey.location().getPath())).forEach(nmsTagKey -> {
|
|
||||||
final String fieldName = Formatting.formatKeyAsField(nmsTagKey.location().getPath());
|
|
||||||
final FieldSpec.Builder fieldBuilder = FieldSpec.builder(tagKey, fieldName, PUBLIC, STATIC, FINAL)
|
|
||||||
.initializer("$N(key($S))", createMethod.build(), nmsTagKey.location().getPath())
|
|
||||||
.addJavadoc(Javadocs.getVersionDependentField("{@code $L}"), "#" + nmsTagKey.location());
|
|
||||||
final String featureFlagName = Main.EXPERIMENTAL_TAGS.get(nmsTagKey);
|
|
||||||
if (featureFlagName != null) {
|
|
||||||
fieldBuilder.addAnnotations(experimentalAnnotations(MinecraftExperimental.Requires.valueOf(featureFlagName.toUpperCase(Locale.ENGLISH)))); // Update for Experimental API
|
|
||||||
} else {
|
|
||||||
allExperimental.set(false);
|
|
||||||
}
|
|
||||||
typeBuilder.addField(fieldBuilder.build());
|
|
||||||
});
|
|
||||||
if (allExperimental.get()) {
|
|
||||||
typeBuilder.addAnnotations(experimentalAnnotations(null)); // Update for Experimental API
|
|
||||||
createMethod.addAnnotations(experimentalAnnotations(null)); // Update for Experimental API
|
|
||||||
} else {
|
|
||||||
typeBuilder.addAnnotation(EXPERIMENTAL_API_ANNOTATION); // TODO experimental API
|
|
||||||
}
|
|
||||||
return typeBuilder.addMethod(createMethod.build()).build();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected JavaFile.Builder file(final JavaFile.Builder builder) {
|
|
||||||
return builder
|
|
||||||
.addStaticImport(Key.class, "key");
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,65 +0,0 @@
|
|||||||
package io.papermc.generator.utils;
|
|
||||||
|
|
||||||
import com.squareup.javapoet.AnnotationSpec;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import io.papermc.paper.generated.GeneratedFrom;
|
|
||||||
import net.minecraft.SharedConstants;
|
|
||||||
import org.bukkit.MinecraftExperimental;
|
|
||||||
import org.jetbrains.annotations.ApiStatus;
|
|
||||||
import org.jetbrains.annotations.Nullable;
|
|
||||||
import org.jspecify.annotations.NullMarked;
|
|
||||||
|
|
||||||
public final class Annotations {
|
|
||||||
|
|
||||||
public static List<AnnotationSpec> experimentalAnnotations(final MinecraftExperimental.@Nullable Requires requiredFeatureFlag) {
|
|
||||||
final List<AnnotationSpec> annotationSpecs = new ArrayList<>();
|
|
||||||
annotationSpecs.add(AnnotationSpec.builder(ApiStatus.Experimental.class).build());
|
|
||||||
if (requiredFeatureFlag != null) {
|
|
||||||
annotationSpecs.add(AnnotationSpec.builder(MinecraftExperimental.class)
|
|
||||||
.addMember("value", "$T.$L", MinecraftExperimental.Requires.class, requiredFeatureFlag.name())
|
|
||||||
.build());
|
|
||||||
} else {
|
|
||||||
annotationSpecs.add(AnnotationSpec.builder(MinecraftExperimental.class).build());
|
|
||||||
}
|
|
||||||
return annotationSpecs;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static AnnotationSpec deprecatedVersioned(final @Nullable String version, final boolean forRemoval) {
|
|
||||||
final AnnotationSpec.Builder annotationSpec = AnnotationSpec.builder(Deprecated.class);
|
|
||||||
if (forRemoval) {
|
|
||||||
annotationSpec.addMember("forRemoval", "$L", true);
|
|
||||||
}
|
|
||||||
if (version != null) {
|
|
||||||
annotationSpec.addMember("since", "$S", version);
|
|
||||||
}
|
|
||||||
|
|
||||||
return annotationSpec.build();
|
|
||||||
}
|
|
||||||
|
|
||||||
public static AnnotationSpec scheduledRemoval(final @Nullable String version) {
|
|
||||||
return AnnotationSpec.builder(ApiStatus.ScheduledForRemoval.class)
|
|
||||||
.addMember("inVersion", "$S", version)
|
|
||||||
.build();
|
|
||||||
}
|
|
||||||
|
|
||||||
@ApiStatus.Experimental
|
|
||||||
public static final AnnotationSpec EXPERIMENTAL_API_ANNOTATION = AnnotationSpec.builder(ApiStatus.Experimental.class).build();
|
|
||||||
public static final AnnotationSpec NULL_MARKED = AnnotationSpec.builder(NullMarked.class).build();
|
|
||||||
private static final AnnotationSpec SUPPRESS_WARNINGS = AnnotationSpec.builder(SuppressWarnings.class)
|
|
||||||
.addMember("value", "$S", "unused")
|
|
||||||
.addMember("value", "$S", "SpellCheckingInspection")
|
|
||||||
.build();
|
|
||||||
private static final AnnotationSpec GENERATED_FROM = AnnotationSpec.builder(GeneratedFrom.class)
|
|
||||||
.addMember("value", "$S", SharedConstants.getCurrentVersion().getName())
|
|
||||||
.build();
|
|
||||||
public static final Iterable<AnnotationSpec> CLASS_HEADER = List.of(
|
|
||||||
SUPPRESS_WARNINGS,
|
|
||||||
GENERATED_FROM,
|
|
||||||
NULL_MARKED
|
|
||||||
);
|
|
||||||
|
|
||||||
private Annotations() {
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,59 +0,0 @@
|
|||||||
package io.papermc.generator.utils;
|
|
||||||
|
|
||||||
import java.util.Optional;
|
|
||||||
import org.apache.commons.lang3.math.NumberUtils;
|
|
||||||
import java.util.Comparator;
|
|
||||||
import java.util.Locale;
|
|
||||||
import java.util.OptionalInt;
|
|
||||||
import java.util.function.Function;
|
|
||||||
import java.util.regex.Pattern;
|
|
||||||
|
|
||||||
public final class Formatting {
|
|
||||||
|
|
||||||
private static final Pattern ILLEGAL_FIELD_CHARACTERS = Pattern.compile("[.-/]");
|
|
||||||
|
|
||||||
public static String formatKeyAsField(String path) {
|
|
||||||
return ILLEGAL_FIELD_CHARACTERS.matcher(path.toUpperCase(Locale.ROOT)).replaceAll("_");
|
|
||||||
}
|
|
||||||
|
|
||||||
public static Optional<String> formatTagKey(String tagDir, String resourcePath) {
|
|
||||||
int tagsIndex = resourcePath.indexOf(tagDir);
|
|
||||||
int dotIndex = resourcePath.lastIndexOf('.');
|
|
||||||
if (tagsIndex == -1 || dotIndex == -1) {
|
|
||||||
return Optional.empty();
|
|
||||||
}
|
|
||||||
return Optional.of(resourcePath.substring(tagsIndex + tagDir.length() + 1, dotIndex)); // namespace/tags/registry_key/[tag_key].json
|
|
||||||
}
|
|
||||||
|
|
||||||
public static Comparator<String> ALPHABETIC_KEY_ORDER = alphabeticKeyOrder(path -> path);
|
|
||||||
|
|
||||||
public static <T> Comparator<T> alphabeticKeyOrder(Function<T, String> mapper) {
|
|
||||||
return (o1, o2) -> {
|
|
||||||
String path1 = mapper.apply(o1);
|
|
||||||
String path2 = mapper.apply(o2);
|
|
||||||
|
|
||||||
OptionalInt trailingInt1 = tryParseTrailingInt(path1);
|
|
||||||
OptionalInt trailingInt2 = tryParseTrailingInt(path2);
|
|
||||||
|
|
||||||
if (trailingInt1.isPresent() && trailingInt2.isPresent()) {
|
|
||||||
return Integer.compare(trailingInt1.getAsInt(), trailingInt2.getAsInt());
|
|
||||||
}
|
|
||||||
|
|
||||||
return path1.compareTo(path2);
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
private static OptionalInt tryParseTrailingInt(String path) {
|
|
||||||
int delimiterIndex = path.lastIndexOf('_');
|
|
||||||
if (delimiterIndex != -1) {
|
|
||||||
String score = path.substring(delimiterIndex + 1);
|
|
||||||
if (NumberUtils.isDigits(score)) {
|
|
||||||
return OptionalInt.of(Integer.parseInt(score));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return OptionalInt.empty();
|
|
||||||
}
|
|
||||||
|
|
||||||
private Formatting() {
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,27 +0,0 @@
|
|||||||
package io.papermc.generator.utils;
|
|
||||||
|
|
||||||
public final class Javadocs {
|
|
||||||
|
|
||||||
public static String getVersionDependentClassHeader(String headerIdentifier) {
|
|
||||||
return """
|
|
||||||
Vanilla keys for %s.
|
|
||||||
|
|
||||||
@apiNote The fields provided here are a direct representation of
|
|
||||||
what is available from the vanilla game source. They may be
|
|
||||||
changed (including removals) on any Minecraft version
|
|
||||||
bump, so cross-version compatibility is not provided on the
|
|
||||||
same level as it is on most of the other API.
|
|
||||||
""".formatted(headerIdentifier);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String getVersionDependentField(String headerIdentifier) {
|
|
||||||
return """
|
|
||||||
%s
|
|
||||||
|
|
||||||
@apiNote This field is version-dependant and may be removed in future Minecraft versions
|
|
||||||
""".formatted(headerIdentifier);
|
|
||||||
}
|
|
||||||
|
|
||||||
private Javadocs() {
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,79 +0,0 @@
|
|||||||
package io.papermc.generator.utils;
|
|
||||||
|
|
||||||
import com.google.common.collect.HashMultimap;
|
|
||||||
import com.google.common.collect.Multimap;
|
|
||||||
import com.mojang.logging.LogUtils;
|
|
||||||
import io.papermc.generator.Main;
|
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.IdentityHashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.Set;
|
|
||||||
import java.util.function.BiConsumer;
|
|
||||||
import net.minecraft.core.Registry;
|
|
||||||
import net.minecraft.core.RegistryAccess;
|
|
||||||
import net.minecraft.core.registries.Registries;
|
|
||||||
import net.minecraft.resources.ResourceKey;
|
|
||||||
import net.minecraft.server.packs.PackResources;
|
|
||||||
import net.minecraft.server.packs.PackType;
|
|
||||||
import net.minecraft.server.packs.repository.BuiltInPackSource;
|
|
||||||
import net.minecraft.server.packs.resources.MultiPackResourceManager;
|
|
||||||
import net.minecraft.tags.TagKey;
|
|
||||||
import org.slf4j.Logger;
|
|
||||||
|
|
||||||
// collect all the tags by grabbing the json from the data-packs
|
|
||||||
// another (probably) way is to hook into the data generator like the typed keys generator
|
|
||||||
public final class TagCollector {
|
|
||||||
|
|
||||||
private static final Logger LOGGER = LogUtils.getLogger();
|
|
||||||
|
|
||||||
public static Map<TagKey<?>, String> grabExperimental(final MultiPackResourceManager resourceManager) {
|
|
||||||
Map<TagKey<?>, String> result = new IdentityHashMap<>();
|
|
||||||
|
|
||||||
// collect all vanilla tags
|
|
||||||
Multimap<ResourceKey<? extends Registry<?>>, String> vanillaTags = HashMultimap.create();
|
|
||||||
PackResources vanillaPack = resourceManager.listPacks()
|
|
||||||
.filter(packResources -> packResources.packId().equals(BuiltInPackSource.VANILLA_ID))
|
|
||||||
.findFirst()
|
|
||||||
.orElseThrow();
|
|
||||||
collectFromPack(vanillaPack, (entry, path) -> vanillaTags.put(entry.key(), path));
|
|
||||||
|
|
||||||
// then distinct with other data-pack tags to know for sure newly created tags and so experimental one
|
|
||||||
resourceManager.listPacks().forEach(pack -> {
|
|
||||||
String packId = pack.packId();
|
|
||||||
if (packId.equals(BuiltInPackSource.VANILLA_ID)) return;
|
|
||||||
|
|
||||||
collectFromPack(pack, (entry, path) -> {
|
|
||||||
if (vanillaTags.get(entry.key()).contains(path)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
result.put(entry.value().listTagIds()
|
|
||||||
.filter(tagKey -> tagKey.location().getPath().equals(path))
|
|
||||||
.findFirst()
|
|
||||||
.orElseThrow(), packId);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
return Collections.unmodifiableMap(result);
|
|
||||||
}
|
|
||||||
|
|
||||||
private static void collectFromPack(PackResources pack, BiConsumer<RegistryAccess.RegistryEntry<?>, String> output) {
|
|
||||||
Set<String> namespaces = pack.getNamespaces(PackType.SERVER_DATA);
|
|
||||||
|
|
||||||
for (String namespace : namespaces) {
|
|
||||||
Main.REGISTRY_ACCESS.registries().forEach(entry -> {
|
|
||||||
// this is probably expensive but can't find another way around and data-pack loader has similar logic
|
|
||||||
// the issue is that registry key can have parent/key (and custom folder too) but tag key can also have parent/key so parsing become a mess
|
|
||||||
// without having at least one of the two values
|
|
||||||
String tagDir = Registries.tagsDirPath(entry.key());
|
|
||||||
pack.listResources(PackType.SERVER_DATA, namespace, tagDir, (id, supplier) -> {
|
|
||||||
Formatting.formatTagKey(tagDir, id.getPath()).ifPresentOrElse(path -> output.accept(entry, path), () -> {
|
|
||||||
LOGGER.warn("Unable to parse the path: {}/{}/{}.json in the data-pack {} into a tag key", namespace, tagDir, id.getPath(), pack.packId());
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private TagCollector() {
|
|
||||||
}
|
|
||||||
}
|
|
@ -93,16 +93,16 @@ dependencies {
|
|||||||
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
|
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
|
||||||
}
|
}
|
||||||
|
|
||||||
val generatedApiPath: java.nio.file.Path = layout.projectDirectory.dir("src/generated/java").asFile.toPath()
|
val generatedDir: java.nio.file.Path = layout.projectDirectory.dir("src/generated/java").asFile.toPath()
|
||||||
idea {
|
idea {
|
||||||
module {
|
module {
|
||||||
generatedSourceDirs.add(generatedApiPath.toFile())
|
generatedSourceDirs.add(generatedDir.toFile())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
sourceSets {
|
sourceSets {
|
||||||
main {
|
main {
|
||||||
java {
|
java {
|
||||||
srcDir(generatedApiPath)
|
srcDir(generatedDir)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -228,16 +228,17 @@ tasks.compileTestJava {
|
|||||||
options.compilerArgs.add("-parameters")
|
options.compilerArgs.add("-parameters")
|
||||||
}
|
}
|
||||||
|
|
||||||
val scanJar = tasks.register("scanJarForBadCalls", io.papermc.paperweight.tasks.ScanJarForBadCalls::class) {
|
val scanJarForBadCalls by tasks.registering(io.papermc.paperweight.tasks.ScanJarForBadCalls::class) {
|
||||||
badAnnotations.add("Lio/papermc/paper/annotation/DoNotUse;")
|
badAnnotations.add("Lio/papermc/paper/annotation/DoNotUse;")
|
||||||
jarToScan.set(tasks.jar.flatMap { it.archiveFile })
|
jarToScan.set(tasks.jar.flatMap { it.archiveFile })
|
||||||
classpath.from(configurations.compileClasspath)
|
classpath.from(configurations.compileClasspath)
|
||||||
}
|
}
|
||||||
tasks.check {
|
tasks.check {
|
||||||
dependsOn(scanJar)
|
dependsOn(scanJarForBadCalls)
|
||||||
}
|
}
|
||||||
|
|
||||||
val scanJarForOldGeneratedCode = tasks.register("scanJarForOldGeneratedCode", io.papermc.paperweight.tasks.ScanJarForOldGeneratedCode::class) {
|
if (providers.gradleProperty("updatingMinecraft").getOrElse("false").toBoolean()) {
|
||||||
|
val scanJarForOldGeneratedCode by tasks.registering(io.papermc.paperweight.tasks.ScanJarForOldGeneratedCode::class) {
|
||||||
mcVersion.set(providers.gradleProperty("mcVersion"))
|
mcVersion.set(providers.gradleProperty("mcVersion"))
|
||||||
annotation.set("Lio/papermc/paper/generated/GeneratedFrom;")
|
annotation.set("Lio/papermc/paper/generated/GeneratedFrom;")
|
||||||
jarToScan.set(tasks.jar.flatMap { it.archiveFile })
|
jarToScan.set(tasks.jar.flatMap { it.archiveFile })
|
||||||
@ -246,3 +247,4 @@ val scanJarForOldGeneratedCode = tasks.register("scanJarForOldGeneratedCode", io
|
|||||||
tasks.check {
|
tasks.check {
|
||||||
dependsOn(scanJarForOldGeneratedCode)
|
dependsOn(scanJarForOldGeneratedCode)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
@ -66,8 +66,8 @@ import org.jspecify.annotations.NullMarked;
|
|||||||
"unused",
|
"unused",
|
||||||
"SpellCheckingInspection"
|
"SpellCheckingInspection"
|
||||||
})
|
})
|
||||||
@GeneratedFrom("1.21.4")
|
|
||||||
@NullMarked
|
@NullMarked
|
||||||
|
@GeneratedFrom("1.21.4")
|
||||||
public interface VanillaGoal<T extends Mob> extends Goal<T> {
|
public interface VanillaGoal<T extends Mob> extends Goal<T> {
|
||||||
GoalKey<AbstractHorse> RANDOM_STAND = create("random_stand", AbstractHorse.class);
|
GoalKey<AbstractHorse> RANDOM_STAND = create("random_stand", AbstractHorse.class);
|
||||||
|
|
||||||
|
@ -23,8 +23,8 @@ import org.jspecify.annotations.NullMarked;
|
|||||||
"unused",
|
"unused",
|
||||||
"SpellCheckingInspection"
|
"SpellCheckingInspection"
|
||||||
})
|
})
|
||||||
@GeneratedFrom("1.21.4")
|
|
||||||
@NullMarked
|
@NullMarked
|
||||||
|
@GeneratedFrom("1.21.4")
|
||||||
@ApiStatus.Experimental
|
@ApiStatus.Experimental
|
||||||
public final class AttributeKeys {
|
public final class AttributeKeys {
|
||||||
/**
|
/**
|
||||||
|
@ -23,8 +23,8 @@ import org.jspecify.annotations.NullMarked;
|
|||||||
"unused",
|
"unused",
|
||||||
"SpellCheckingInspection"
|
"SpellCheckingInspection"
|
||||||
})
|
})
|
||||||
@GeneratedFrom("1.21.4")
|
|
||||||
@NullMarked
|
@NullMarked
|
||||||
|
@GeneratedFrom("1.21.4")
|
||||||
@ApiStatus.Experimental
|
@ApiStatus.Experimental
|
||||||
public final class BannerPatternKeys {
|
public final class BannerPatternKeys {
|
||||||
/**
|
/**
|
||||||
@ -332,7 +332,7 @@ public final class BannerPatternKeys {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a key for {@link PatternType} in the registry {@code minecraft:banner_pattern}.
|
* Creates a typed key for {@link PatternType} in the registry {@code minecraft:banner_pattern}.
|
||||||
*
|
*
|
||||||
* @param key the value's key in the registry
|
* @param key the value's key in the registry
|
||||||
* @return a new typed key
|
* @return a new typed key
|
||||||
|
@ -23,8 +23,8 @@ import org.jspecify.annotations.NullMarked;
|
|||||||
"unused",
|
"unused",
|
||||||
"SpellCheckingInspection"
|
"SpellCheckingInspection"
|
||||||
})
|
})
|
||||||
@GeneratedFrom("1.21.4")
|
|
||||||
@NullMarked
|
@NullMarked
|
||||||
|
@GeneratedFrom("1.21.4")
|
||||||
@ApiStatus.Experimental
|
@ApiStatus.Experimental
|
||||||
public final class BiomeKeys {
|
public final class BiomeKeys {
|
||||||
/**
|
/**
|
||||||
@ -486,7 +486,7 @@ public final class BiomeKeys {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a key for {@link Biome} in the registry {@code minecraft:worldgen/biome}.
|
* Creates a typed key for {@link Biome} in the registry {@code minecraft:worldgen/biome}.
|
||||||
*
|
*
|
||||||
* @param key the value's key in the registry
|
* @param key the value's key in the registry
|
||||||
* @return a new typed key
|
* @return a new typed key
|
||||||
|
@ -23,8 +23,8 @@ import org.jspecify.annotations.NullMarked;
|
|||||||
"unused",
|
"unused",
|
||||||
"SpellCheckingInspection"
|
"SpellCheckingInspection"
|
||||||
})
|
})
|
||||||
@GeneratedFrom("1.21.4")
|
|
||||||
@NullMarked
|
@NullMarked
|
||||||
|
@GeneratedFrom("1.21.4")
|
||||||
@ApiStatus.Experimental
|
@ApiStatus.Experimental
|
||||||
public final class BlockTypeKeys {
|
public final class BlockTypeKeys {
|
||||||
/**
|
/**
|
||||||
|
@ -23,8 +23,8 @@ import org.jspecify.annotations.NullMarked;
|
|||||||
"unused",
|
"unused",
|
||||||
"SpellCheckingInspection"
|
"SpellCheckingInspection"
|
||||||
})
|
})
|
||||||
@GeneratedFrom("1.21.4")
|
|
||||||
@NullMarked
|
@NullMarked
|
||||||
|
@GeneratedFrom("1.21.4")
|
||||||
@ApiStatus.Experimental
|
@ApiStatus.Experimental
|
||||||
public final class CatVariantKeys {
|
public final class CatVariantKeys {
|
||||||
/**
|
/**
|
||||||
|
@ -23,8 +23,8 @@ import org.jspecify.annotations.NullMarked;
|
|||||||
"unused",
|
"unused",
|
||||||
"SpellCheckingInspection"
|
"SpellCheckingInspection"
|
||||||
})
|
})
|
||||||
@GeneratedFrom("1.21.4")
|
|
||||||
@NullMarked
|
@NullMarked
|
||||||
|
@GeneratedFrom("1.21.4")
|
||||||
@ApiStatus.Experimental
|
@ApiStatus.Experimental
|
||||||
public final class DamageTypeKeys {
|
public final class DamageTypeKeys {
|
||||||
/**
|
/**
|
||||||
@ -374,7 +374,7 @@ public final class DamageTypeKeys {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a key for {@link DamageType} in the registry {@code minecraft:damage_type}.
|
* Creates a typed key for {@link DamageType} in the registry {@code minecraft:damage_type}.
|
||||||
*
|
*
|
||||||
* @param key the value's key in the registry
|
* @param key the value's key in the registry
|
||||||
* @return a new typed key
|
* @return a new typed key
|
||||||
|
@ -0,0 +1,505 @@
|
|||||||
|
package io.papermc.paper.registry.keys;
|
||||||
|
|
||||||
|
import static net.kyori.adventure.key.Key.key;
|
||||||
|
|
||||||
|
import io.papermc.paper.datacomponent.DataComponentType;
|
||||||
|
import io.papermc.paper.generated.GeneratedFrom;
|
||||||
|
import io.papermc.paper.registry.RegistryKey;
|
||||||
|
import io.papermc.paper.registry.TypedKey;
|
||||||
|
import net.kyori.adventure.key.Key;
|
||||||
|
import org.jetbrains.annotations.ApiStatus;
|
||||||
|
import org.jspecify.annotations.NullMarked;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Vanilla keys for {@link RegistryKey#DATA_COMPONENT_TYPE}.
|
||||||
|
*
|
||||||
|
* @apiNote The fields provided here are a direct representation of
|
||||||
|
* what is available from the vanilla game source. They may be
|
||||||
|
* changed (including removals) on any Minecraft version
|
||||||
|
* bump, so cross-version compatibility is not provided on the
|
||||||
|
* same level as it is on most of the other API.
|
||||||
|
*/
|
||||||
|
@SuppressWarnings({
|
||||||
|
"unused",
|
||||||
|
"SpellCheckingInspection"
|
||||||
|
})
|
||||||
|
@NullMarked
|
||||||
|
@GeneratedFrom("1.21.4")
|
||||||
|
@ApiStatus.Experimental
|
||||||
|
public final class DataComponentTypeKeys {
|
||||||
|
/**
|
||||||
|
* {@code minecraft:attribute_modifiers}
|
||||||
|
*
|
||||||
|
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||||
|
*/
|
||||||
|
public static final TypedKey<DataComponentType> ATTRIBUTE_MODIFIERS = create(key("attribute_modifiers"));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@code minecraft:banner_patterns}
|
||||||
|
*
|
||||||
|
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||||
|
*/
|
||||||
|
public static final TypedKey<DataComponentType> BANNER_PATTERNS = create(key("banner_patterns"));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@code minecraft:base_color}
|
||||||
|
*
|
||||||
|
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||||
|
*/
|
||||||
|
public static final TypedKey<DataComponentType> BASE_COLOR = create(key("base_color"));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@code minecraft:bees}
|
||||||
|
*
|
||||||
|
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||||
|
*/
|
||||||
|
public static final TypedKey<DataComponentType> BEES = create(key("bees"));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@code minecraft:block_entity_data}
|
||||||
|
*
|
||||||
|
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||||
|
*/
|
||||||
|
public static final TypedKey<DataComponentType> BLOCK_ENTITY_DATA = create(key("block_entity_data"));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@code minecraft:block_state}
|
||||||
|
*
|
||||||
|
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||||
|
*/
|
||||||
|
public static final TypedKey<DataComponentType> BLOCK_STATE = create(key("block_state"));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@code minecraft:bucket_entity_data}
|
||||||
|
*
|
||||||
|
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||||
|
*/
|
||||||
|
public static final TypedKey<DataComponentType> BUCKET_ENTITY_DATA = create(key("bucket_entity_data"));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@code minecraft:bundle_contents}
|
||||||
|
*
|
||||||
|
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||||
|
*/
|
||||||
|
public static final TypedKey<DataComponentType> BUNDLE_CONTENTS = create(key("bundle_contents"));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@code minecraft:can_break}
|
||||||
|
*
|
||||||
|
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||||
|
*/
|
||||||
|
public static final TypedKey<DataComponentType> CAN_BREAK = create(key("can_break"));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@code minecraft:can_place_on}
|
||||||
|
*
|
||||||
|
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||||
|
*/
|
||||||
|
public static final TypedKey<DataComponentType> CAN_PLACE_ON = create(key("can_place_on"));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@code minecraft:charged_projectiles}
|
||||||
|
*
|
||||||
|
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||||
|
*/
|
||||||
|
public static final TypedKey<DataComponentType> CHARGED_PROJECTILES = create(key("charged_projectiles"));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@code minecraft:consumable}
|
||||||
|
*
|
||||||
|
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||||
|
*/
|
||||||
|
public static final TypedKey<DataComponentType> CONSUMABLE = create(key("consumable"));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@code minecraft:container}
|
||||||
|
*
|
||||||
|
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||||
|
*/
|
||||||
|
public static final TypedKey<DataComponentType> CONTAINER = create(key("container"));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@code minecraft:container_loot}
|
||||||
|
*
|
||||||
|
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||||
|
*/
|
||||||
|
public static final TypedKey<DataComponentType> CONTAINER_LOOT = create(key("container_loot"));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@code minecraft:creative_slot_lock}
|
||||||
|
*
|
||||||
|
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||||
|
*/
|
||||||
|
public static final TypedKey<DataComponentType> CREATIVE_SLOT_LOCK = create(key("creative_slot_lock"));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@code minecraft:custom_data}
|
||||||
|
*
|
||||||
|
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||||
|
*/
|
||||||
|
public static final TypedKey<DataComponentType> CUSTOM_DATA = create(key("custom_data"));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@code minecraft:custom_model_data}
|
||||||
|
*
|
||||||
|
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||||
|
*/
|
||||||
|
public static final TypedKey<DataComponentType> CUSTOM_MODEL_DATA = create(key("custom_model_data"));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@code minecraft:custom_name}
|
||||||
|
*
|
||||||
|
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||||
|
*/
|
||||||
|
public static final TypedKey<DataComponentType> CUSTOM_NAME = create(key("custom_name"));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@code minecraft:damage}
|
||||||
|
*
|
||||||
|
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||||
|
*/
|
||||||
|
public static final TypedKey<DataComponentType> DAMAGE = create(key("damage"));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@code minecraft:damage_resistant}
|
||||||
|
*
|
||||||
|
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||||
|
*/
|
||||||
|
public static final TypedKey<DataComponentType> DAMAGE_RESISTANT = create(key("damage_resistant"));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@code minecraft:death_protection}
|
||||||
|
*
|
||||||
|
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||||
|
*/
|
||||||
|
public static final TypedKey<DataComponentType> DEATH_PROTECTION = create(key("death_protection"));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@code minecraft:debug_stick_state}
|
||||||
|
*
|
||||||
|
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||||
|
*/
|
||||||
|
public static final TypedKey<DataComponentType> DEBUG_STICK_STATE = create(key("debug_stick_state"));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@code minecraft:dyed_color}
|
||||||
|
*
|
||||||
|
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||||
|
*/
|
||||||
|
public static final TypedKey<DataComponentType> DYED_COLOR = create(key("dyed_color"));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@code minecraft:enchantable}
|
||||||
|
*
|
||||||
|
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||||
|
*/
|
||||||
|
public static final TypedKey<DataComponentType> ENCHANTABLE = create(key("enchantable"));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@code minecraft:enchantment_glint_override}
|
||||||
|
*
|
||||||
|
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||||
|
*/
|
||||||
|
public static final TypedKey<DataComponentType> ENCHANTMENT_GLINT_OVERRIDE = create(key("enchantment_glint_override"));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@code minecraft:enchantments}
|
||||||
|
*
|
||||||
|
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||||
|
*/
|
||||||
|
public static final TypedKey<DataComponentType> ENCHANTMENTS = create(key("enchantments"));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@code minecraft:entity_data}
|
||||||
|
*
|
||||||
|
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||||
|
*/
|
||||||
|
public static final TypedKey<DataComponentType> ENTITY_DATA = create(key("entity_data"));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@code minecraft:equippable}
|
||||||
|
*
|
||||||
|
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||||
|
*/
|
||||||
|
public static final TypedKey<DataComponentType> EQUIPPABLE = create(key("equippable"));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@code minecraft:firework_explosion}
|
||||||
|
*
|
||||||
|
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||||
|
*/
|
||||||
|
public static final TypedKey<DataComponentType> FIREWORK_EXPLOSION = create(key("firework_explosion"));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@code minecraft:fireworks}
|
||||||
|
*
|
||||||
|
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||||
|
*/
|
||||||
|
public static final TypedKey<DataComponentType> FIREWORKS = create(key("fireworks"));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@code minecraft:food}
|
||||||
|
*
|
||||||
|
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||||
|
*/
|
||||||
|
public static final TypedKey<DataComponentType> FOOD = create(key("food"));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@code minecraft:glider}
|
||||||
|
*
|
||||||
|
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||||
|
*/
|
||||||
|
public static final TypedKey<DataComponentType> GLIDER = create(key("glider"));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@code minecraft:hide_additional_tooltip}
|
||||||
|
*
|
||||||
|
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||||
|
*/
|
||||||
|
public static final TypedKey<DataComponentType> HIDE_ADDITIONAL_TOOLTIP = create(key("hide_additional_tooltip"));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@code minecraft:hide_tooltip}
|
||||||
|
*
|
||||||
|
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||||
|
*/
|
||||||
|
public static final TypedKey<DataComponentType> HIDE_TOOLTIP = create(key("hide_tooltip"));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@code minecraft:instrument}
|
||||||
|
*
|
||||||
|
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||||
|
*/
|
||||||
|
public static final TypedKey<DataComponentType> INSTRUMENT = create(key("instrument"));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@code minecraft:intangible_projectile}
|
||||||
|
*
|
||||||
|
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||||
|
*/
|
||||||
|
public static final TypedKey<DataComponentType> INTANGIBLE_PROJECTILE = create(key("intangible_projectile"));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@code minecraft:item_model}
|
||||||
|
*
|
||||||
|
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||||
|
*/
|
||||||
|
public static final TypedKey<DataComponentType> ITEM_MODEL = create(key("item_model"));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@code minecraft:item_name}
|
||||||
|
*
|
||||||
|
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||||
|
*/
|
||||||
|
public static final TypedKey<DataComponentType> ITEM_NAME = create(key("item_name"));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@code minecraft:jukebox_playable}
|
||||||
|
*
|
||||||
|
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||||
|
*/
|
||||||
|
public static final TypedKey<DataComponentType> JUKEBOX_PLAYABLE = create(key("jukebox_playable"));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@code minecraft:lock}
|
||||||
|
*
|
||||||
|
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||||
|
*/
|
||||||
|
public static final TypedKey<DataComponentType> LOCK = create(key("lock"));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@code minecraft:lodestone_tracker}
|
||||||
|
*
|
||||||
|
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||||
|
*/
|
||||||
|
public static final TypedKey<DataComponentType> LODESTONE_TRACKER = create(key("lodestone_tracker"));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@code minecraft:lore}
|
||||||
|
*
|
||||||
|
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||||
|
*/
|
||||||
|
public static final TypedKey<DataComponentType> LORE = create(key("lore"));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@code minecraft:map_color}
|
||||||
|
*
|
||||||
|
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||||
|
*/
|
||||||
|
public static final TypedKey<DataComponentType> MAP_COLOR = create(key("map_color"));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@code minecraft:map_decorations}
|
||||||
|
*
|
||||||
|
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||||
|
*/
|
||||||
|
public static final TypedKey<DataComponentType> MAP_DECORATIONS = create(key("map_decorations"));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@code minecraft:map_id}
|
||||||
|
*
|
||||||
|
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||||
|
*/
|
||||||
|
public static final TypedKey<DataComponentType> MAP_ID = create(key("map_id"));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@code minecraft:map_post_processing}
|
||||||
|
*
|
||||||
|
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||||
|
*/
|
||||||
|
public static final TypedKey<DataComponentType> MAP_POST_PROCESSING = create(key("map_post_processing"));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@code minecraft:max_damage}
|
||||||
|
*
|
||||||
|
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||||
|
*/
|
||||||
|
public static final TypedKey<DataComponentType> MAX_DAMAGE = create(key("max_damage"));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@code minecraft:max_stack_size}
|
||||||
|
*
|
||||||
|
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||||
|
*/
|
||||||
|
public static final TypedKey<DataComponentType> MAX_STACK_SIZE = create(key("max_stack_size"));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@code minecraft:note_block_sound}
|
||||||
|
*
|
||||||
|
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||||
|
*/
|
||||||
|
public static final TypedKey<DataComponentType> NOTE_BLOCK_SOUND = create(key("note_block_sound"));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@code minecraft:ominous_bottle_amplifier}
|
||||||
|
*
|
||||||
|
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||||
|
*/
|
||||||
|
public static final TypedKey<DataComponentType> OMINOUS_BOTTLE_AMPLIFIER = create(key("ominous_bottle_amplifier"));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@code minecraft:pot_decorations}
|
||||||
|
*
|
||||||
|
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||||
|
*/
|
||||||
|
public static final TypedKey<DataComponentType> POT_DECORATIONS = create(key("pot_decorations"));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@code minecraft:potion_contents}
|
||||||
|
*
|
||||||
|
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||||
|
*/
|
||||||
|
public static final TypedKey<DataComponentType> POTION_CONTENTS = create(key("potion_contents"));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@code minecraft:profile}
|
||||||
|
*
|
||||||
|
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||||
|
*/
|
||||||
|
public static final TypedKey<DataComponentType> PROFILE = create(key("profile"));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@code minecraft:rarity}
|
||||||
|
*
|
||||||
|
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||||
|
*/
|
||||||
|
public static final TypedKey<DataComponentType> RARITY = create(key("rarity"));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@code minecraft:recipes}
|
||||||
|
*
|
||||||
|
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||||
|
*/
|
||||||
|
public static final TypedKey<DataComponentType> RECIPES = create(key("recipes"));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@code minecraft:repair_cost}
|
||||||
|
*
|
||||||
|
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||||
|
*/
|
||||||
|
public static final TypedKey<DataComponentType> REPAIR_COST = create(key("repair_cost"));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@code minecraft:repairable}
|
||||||
|
*
|
||||||
|
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||||
|
*/
|
||||||
|
public static final TypedKey<DataComponentType> REPAIRABLE = create(key("repairable"));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@code minecraft:stored_enchantments}
|
||||||
|
*
|
||||||
|
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||||
|
*/
|
||||||
|
public static final TypedKey<DataComponentType> STORED_ENCHANTMENTS = create(key("stored_enchantments"));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@code minecraft:suspicious_stew_effects}
|
||||||
|
*
|
||||||
|
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||||
|
*/
|
||||||
|
public static final TypedKey<DataComponentType> SUSPICIOUS_STEW_EFFECTS = create(key("suspicious_stew_effects"));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@code minecraft:tool}
|
||||||
|
*
|
||||||
|
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||||
|
*/
|
||||||
|
public static final TypedKey<DataComponentType> TOOL = create(key("tool"));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@code minecraft:tooltip_style}
|
||||||
|
*
|
||||||
|
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||||
|
*/
|
||||||
|
public static final TypedKey<DataComponentType> TOOLTIP_STYLE = create(key("tooltip_style"));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@code minecraft:trim}
|
||||||
|
*
|
||||||
|
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||||
|
*/
|
||||||
|
public static final TypedKey<DataComponentType> TRIM = create(key("trim"));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@code minecraft:unbreakable}
|
||||||
|
*
|
||||||
|
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||||
|
*/
|
||||||
|
public static final TypedKey<DataComponentType> UNBREAKABLE = create(key("unbreakable"));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@code minecraft:use_cooldown}
|
||||||
|
*
|
||||||
|
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||||
|
*/
|
||||||
|
public static final TypedKey<DataComponentType> USE_COOLDOWN = create(key("use_cooldown"));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@code minecraft:use_remainder}
|
||||||
|
*
|
||||||
|
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||||
|
*/
|
||||||
|
public static final TypedKey<DataComponentType> USE_REMAINDER = create(key("use_remainder"));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@code minecraft:writable_book_content}
|
||||||
|
*
|
||||||
|
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||||
|
*/
|
||||||
|
public static final TypedKey<DataComponentType> WRITABLE_BOOK_CONTENT = create(key("writable_book_content"));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@code minecraft:written_book_content}
|
||||||
|
*
|
||||||
|
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||||
|
*/
|
||||||
|
public static final TypedKey<DataComponentType> WRITTEN_BOOK_CONTENT = create(key("written_book_content"));
|
||||||
|
|
||||||
|
private DataComponentTypeKeys() {
|
||||||
|
}
|
||||||
|
|
||||||
|
private static TypedKey<DataComponentType> create(final Key key) {
|
||||||
|
return TypedKey.create(RegistryKey.DATA_COMPONENT_TYPE, key);
|
||||||
|
}
|
||||||
|
}
|
@ -23,8 +23,8 @@ import org.jspecify.annotations.NullMarked;
|
|||||||
"unused",
|
"unused",
|
||||||
"SpellCheckingInspection"
|
"SpellCheckingInspection"
|
||||||
})
|
})
|
||||||
@GeneratedFrom("1.21.4")
|
|
||||||
@NullMarked
|
@NullMarked
|
||||||
|
@GeneratedFrom("1.21.4")
|
||||||
@ApiStatus.Experimental
|
@ApiStatus.Experimental
|
||||||
public final class EnchantmentKeys {
|
public final class EnchantmentKeys {
|
||||||
/**
|
/**
|
||||||
@ -325,7 +325,7 @@ public final class EnchantmentKeys {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a key for {@link Enchantment} in the registry {@code minecraft:enchantment}.
|
* Creates a typed key for {@link Enchantment} in the registry {@code minecraft:enchantment}.
|
||||||
*
|
*
|
||||||
* @param key the value's key in the registry
|
* @param key the value's key in the registry
|
||||||
* @return a new typed key
|
* @return a new typed key
|
||||||
|
@ -23,8 +23,8 @@ import org.jspecify.annotations.NullMarked;
|
|||||||
"unused",
|
"unused",
|
||||||
"SpellCheckingInspection"
|
"SpellCheckingInspection"
|
||||||
})
|
})
|
||||||
@GeneratedFrom("1.21.4")
|
|
||||||
@NullMarked
|
@NullMarked
|
||||||
|
@GeneratedFrom("1.21.4")
|
||||||
@ApiStatus.Experimental
|
@ApiStatus.Experimental
|
||||||
public final class FluidKeys {
|
public final class FluidKeys {
|
||||||
/**
|
/**
|
||||||
|
@ -23,8 +23,8 @@ import org.jspecify.annotations.NullMarked;
|
|||||||
"unused",
|
"unused",
|
||||||
"SpellCheckingInspection"
|
"SpellCheckingInspection"
|
||||||
})
|
})
|
||||||
@GeneratedFrom("1.21.4")
|
|
||||||
@NullMarked
|
@NullMarked
|
||||||
|
@GeneratedFrom("1.21.4")
|
||||||
@ApiStatus.Experimental
|
@ApiStatus.Experimental
|
||||||
public final class FrogVariantKeys {
|
public final class FrogVariantKeys {
|
||||||
/**
|
/**
|
||||||
|
@ -23,8 +23,8 @@ import org.jspecify.annotations.NullMarked;
|
|||||||
"unused",
|
"unused",
|
||||||
"SpellCheckingInspection"
|
"SpellCheckingInspection"
|
||||||
})
|
})
|
||||||
@GeneratedFrom("1.21.4")
|
|
||||||
@NullMarked
|
@NullMarked
|
||||||
|
@GeneratedFrom("1.21.4")
|
||||||
@ApiStatus.Experimental
|
@ApiStatus.Experimental
|
||||||
public final class GameEventKeys {
|
public final class GameEventKeys {
|
||||||
/**
|
/**
|
||||||
@ -451,7 +451,7 @@ public final class GameEventKeys {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a key for {@link GameEvent} in the registry {@code minecraft:game_event}.
|
* Creates a typed key for {@link GameEvent} in the registry {@code minecraft:game_event}.
|
||||||
*
|
*
|
||||||
* @param key the value's key in the registry
|
* @param key the value's key in the registry
|
||||||
* @return a new typed key
|
* @return a new typed key
|
||||||
|
@ -23,8 +23,8 @@ import org.jspecify.annotations.NullMarked;
|
|||||||
"unused",
|
"unused",
|
||||||
"SpellCheckingInspection"
|
"SpellCheckingInspection"
|
||||||
})
|
})
|
||||||
@GeneratedFrom("1.21.4")
|
|
||||||
@NullMarked
|
@NullMarked
|
||||||
|
@GeneratedFrom("1.21.4")
|
||||||
@ApiStatus.Experimental
|
@ApiStatus.Experimental
|
||||||
public final class InstrumentKeys {
|
public final class InstrumentKeys {
|
||||||
/**
|
/**
|
||||||
@ -87,7 +87,7 @@ public final class InstrumentKeys {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a key for {@link MusicInstrument} in the registry {@code minecraft:instrument}.
|
* Creates a typed key for {@link MusicInstrument} in the registry {@code minecraft:instrument}.
|
||||||
*
|
*
|
||||||
* @param key the value's key in the registry
|
* @param key the value's key in the registry
|
||||||
* @return a new typed key
|
* @return a new typed key
|
||||||
|
@ -23,8 +23,8 @@ import org.jspecify.annotations.NullMarked;
|
|||||||
"unused",
|
"unused",
|
||||||
"SpellCheckingInspection"
|
"SpellCheckingInspection"
|
||||||
})
|
})
|
||||||
@GeneratedFrom("1.21.4")
|
|
||||||
@NullMarked
|
@NullMarked
|
||||||
|
@GeneratedFrom("1.21.4")
|
||||||
@ApiStatus.Experimental
|
@ApiStatus.Experimental
|
||||||
public final class ItemTypeKeys {
|
public final class ItemTypeKeys {
|
||||||
/**
|
/**
|
||||||
|
@ -23,8 +23,8 @@ import org.jspecify.annotations.NullMarked;
|
|||||||
"unused",
|
"unused",
|
||||||
"SpellCheckingInspection"
|
"SpellCheckingInspection"
|
||||||
})
|
})
|
||||||
@GeneratedFrom("1.21.4")
|
|
||||||
@NullMarked
|
@NullMarked
|
||||||
|
@GeneratedFrom("1.21.4")
|
||||||
@ApiStatus.Experimental
|
@ApiStatus.Experimental
|
||||||
public final class JukeboxSongKeys {
|
public final class JukeboxSongKeys {
|
||||||
/**
|
/**
|
||||||
@ -164,7 +164,7 @@ public final class JukeboxSongKeys {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a key for {@link JukeboxSong} in the registry {@code minecraft:jukebox_song}.
|
* Creates a typed key for {@link JukeboxSong} in the registry {@code minecraft:jukebox_song}.
|
||||||
*
|
*
|
||||||
* @param key the value's key in the registry
|
* @param key the value's key in the registry
|
||||||
* @return a new typed key
|
* @return a new typed key
|
||||||
|
@ -23,8 +23,8 @@ import org.jspecify.annotations.NullMarked;
|
|||||||
"unused",
|
"unused",
|
||||||
"SpellCheckingInspection"
|
"SpellCheckingInspection"
|
||||||
})
|
})
|
||||||
@GeneratedFrom("1.21.4")
|
|
||||||
@NullMarked
|
@NullMarked
|
||||||
|
@GeneratedFrom("1.21.4")
|
||||||
@ApiStatus.Experimental
|
@ApiStatus.Experimental
|
||||||
public final class MapDecorationTypeKeys {
|
public final class MapDecorationTypeKeys {
|
||||||
/**
|
/**
|
||||||
|
@ -23,8 +23,8 @@ import org.jspecify.annotations.NullMarked;
|
|||||||
"unused",
|
"unused",
|
||||||
"SpellCheckingInspection"
|
"SpellCheckingInspection"
|
||||||
})
|
})
|
||||||
@GeneratedFrom("1.21.4")
|
|
||||||
@NullMarked
|
@NullMarked
|
||||||
|
@GeneratedFrom("1.21.4")
|
||||||
@ApiStatus.Experimental
|
@ApiStatus.Experimental
|
||||||
public final class MenuTypeKeys {
|
public final class MenuTypeKeys {
|
||||||
/**
|
/**
|
||||||
|
@ -23,8 +23,8 @@ import org.jspecify.annotations.NullMarked;
|
|||||||
"unused",
|
"unused",
|
||||||
"SpellCheckingInspection"
|
"SpellCheckingInspection"
|
||||||
})
|
})
|
||||||
@GeneratedFrom("1.21.4")
|
|
||||||
@NullMarked
|
@NullMarked
|
||||||
|
@GeneratedFrom("1.21.4")
|
||||||
@ApiStatus.Experimental
|
@ApiStatus.Experimental
|
||||||
public final class MobEffectKeys {
|
public final class MobEffectKeys {
|
||||||
/**
|
/**
|
||||||
|
@ -23,8 +23,8 @@ import org.jspecify.annotations.NullMarked;
|
|||||||
"unused",
|
"unused",
|
||||||
"SpellCheckingInspection"
|
"SpellCheckingInspection"
|
||||||
})
|
})
|
||||||
@GeneratedFrom("1.21.4")
|
|
||||||
@NullMarked
|
@NullMarked
|
||||||
|
@GeneratedFrom("1.21.4")
|
||||||
@ApiStatus.Experimental
|
@ApiStatus.Experimental
|
||||||
public final class PaintingVariantKeys {
|
public final class PaintingVariantKeys {
|
||||||
/**
|
/**
|
||||||
@ -381,7 +381,7 @@ public final class PaintingVariantKeys {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a key for {@link Art} in the registry {@code minecraft:painting_variant}.
|
* Creates a typed key for {@link Art} in the registry {@code minecraft:painting_variant}.
|
||||||
*
|
*
|
||||||
* @param key the value's key in the registry
|
* @param key the value's key in the registry
|
||||||
* @return a new typed key
|
* @return a new typed key
|
||||||
|
@ -23,8 +23,8 @@ import org.jspecify.annotations.NullMarked;
|
|||||||
"unused",
|
"unused",
|
||||||
"SpellCheckingInspection"
|
"SpellCheckingInspection"
|
||||||
})
|
})
|
||||||
@GeneratedFrom("1.21.4")
|
|
||||||
@NullMarked
|
@NullMarked
|
||||||
|
@GeneratedFrom("1.21.4")
|
||||||
@ApiStatus.Experimental
|
@ApiStatus.Experimental
|
||||||
public final class SoundEventKeys {
|
public final class SoundEventKeys {
|
||||||
/**
|
/**
|
||||||
|
@ -23,8 +23,8 @@ import org.jspecify.annotations.NullMarked;
|
|||||||
"unused",
|
"unused",
|
||||||
"SpellCheckingInspection"
|
"SpellCheckingInspection"
|
||||||
})
|
})
|
||||||
@GeneratedFrom("1.21.4")
|
|
||||||
@NullMarked
|
@NullMarked
|
||||||
|
@GeneratedFrom("1.21.4")
|
||||||
@ApiStatus.Experimental
|
@ApiStatus.Experimental
|
||||||
public final class StructureKeys {
|
public final class StructureKeys {
|
||||||
/**
|
/**
|
||||||
@ -269,7 +269,7 @@ public final class StructureKeys {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a key for {@link Structure} in the registry {@code minecraft:worldgen/structure}.
|
* Creates a typed key for {@link Structure} in the registry {@code minecraft:worldgen/structure}.
|
||||||
*
|
*
|
||||||
* @param key the value's key in the registry
|
* @param key the value's key in the registry
|
||||||
* @return a new typed key
|
* @return a new typed key
|
||||||
|
@ -23,8 +23,8 @@ import org.jspecify.annotations.NullMarked;
|
|||||||
"unused",
|
"unused",
|
||||||
"SpellCheckingInspection"
|
"SpellCheckingInspection"
|
||||||
})
|
})
|
||||||
@GeneratedFrom("1.21.4")
|
|
||||||
@NullMarked
|
@NullMarked
|
||||||
|
@GeneratedFrom("1.21.4")
|
||||||
@ApiStatus.Experimental
|
@ApiStatus.Experimental
|
||||||
public final class StructureTypeKeys {
|
public final class StructureTypeKeys {
|
||||||
/**
|
/**
|
||||||
|
@ -23,8 +23,8 @@ import org.jspecify.annotations.NullMarked;
|
|||||||
"unused",
|
"unused",
|
||||||
"SpellCheckingInspection"
|
"SpellCheckingInspection"
|
||||||
})
|
})
|
||||||
@GeneratedFrom("1.21.4")
|
|
||||||
@NullMarked
|
@NullMarked
|
||||||
|
@GeneratedFrom("1.21.4")
|
||||||
@ApiStatus.Experimental
|
@ApiStatus.Experimental
|
||||||
public final class TrimMaterialKeys {
|
public final class TrimMaterialKeys {
|
||||||
/**
|
/**
|
||||||
@ -108,7 +108,7 @@ public final class TrimMaterialKeys {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a key for {@link TrimMaterial} in the registry {@code minecraft:trim_material}.
|
* Creates a typed key for {@link TrimMaterial} in the registry {@code minecraft:trim_material}.
|
||||||
*
|
*
|
||||||
* @param key the value's key in the registry
|
* @param key the value's key in the registry
|
||||||
* @return a new typed key
|
* @return a new typed key
|
||||||
|
@ -23,8 +23,8 @@ import org.jspecify.annotations.NullMarked;
|
|||||||
"unused",
|
"unused",
|
||||||
"SpellCheckingInspection"
|
"SpellCheckingInspection"
|
||||||
})
|
})
|
||||||
@GeneratedFrom("1.21.4")
|
|
||||||
@NullMarked
|
@NullMarked
|
||||||
|
@GeneratedFrom("1.21.4")
|
||||||
@ApiStatus.Experimental
|
@ApiStatus.Experimental
|
||||||
public final class TrimPatternKeys {
|
public final class TrimPatternKeys {
|
||||||
/**
|
/**
|
||||||
@ -157,7 +157,7 @@ public final class TrimPatternKeys {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a key for {@link TrimPattern} in the registry {@code minecraft:trim_pattern}.
|
* Creates a typed key for {@link TrimPattern} in the registry {@code minecraft:trim_pattern}.
|
||||||
*
|
*
|
||||||
* @param key the value's key in the registry
|
* @param key the value's key in the registry
|
||||||
* @return a new typed key
|
* @return a new typed key
|
||||||
|
@ -23,8 +23,8 @@ import org.jspecify.annotations.NullMarked;
|
|||||||
"unused",
|
"unused",
|
||||||
"SpellCheckingInspection"
|
"SpellCheckingInspection"
|
||||||
})
|
})
|
||||||
@GeneratedFrom("1.21.4")
|
|
||||||
@NullMarked
|
@NullMarked
|
||||||
|
@GeneratedFrom("1.21.4")
|
||||||
@ApiStatus.Experimental
|
@ApiStatus.Experimental
|
||||||
public final class VillagerProfessionKeys {
|
public final class VillagerProfessionKeys {
|
||||||
/**
|
/**
|
||||||
|
@ -23,8 +23,8 @@ import org.jspecify.annotations.NullMarked;
|
|||||||
"unused",
|
"unused",
|
||||||
"SpellCheckingInspection"
|
"SpellCheckingInspection"
|
||||||
})
|
})
|
||||||
@GeneratedFrom("1.21.4")
|
|
||||||
@NullMarked
|
@NullMarked
|
||||||
|
@GeneratedFrom("1.21.4")
|
||||||
@ApiStatus.Experimental
|
@ApiStatus.Experimental
|
||||||
public final class VillagerTypeKeys {
|
public final class VillagerTypeKeys {
|
||||||
/**
|
/**
|
||||||
|
@ -23,8 +23,8 @@ import org.jspecify.annotations.NullMarked;
|
|||||||
"unused",
|
"unused",
|
||||||
"SpellCheckingInspection"
|
"SpellCheckingInspection"
|
||||||
})
|
})
|
||||||
@GeneratedFrom("1.21.4")
|
|
||||||
@NullMarked
|
@NullMarked
|
||||||
|
@GeneratedFrom("1.21.4")
|
||||||
@ApiStatus.Experimental
|
@ApiStatus.Experimental
|
||||||
public final class WolfVariantKeys {
|
public final class WolfVariantKeys {
|
||||||
/**
|
/**
|
||||||
@ -94,7 +94,7 @@ public final class WolfVariantKeys {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a key for {@link Wolf.Variant} in the registry {@code minecraft:wolf_variant}.
|
* Creates a typed key for {@link Wolf.Variant} in the registry {@code minecraft:wolf_variant}.
|
||||||
*
|
*
|
||||||
* @param key the value's key in the registry
|
* @param key the value's key in the registry
|
||||||
* @return a new typed key
|
* @return a new typed key
|
||||||
|
@ -11,7 +11,7 @@ import org.jetbrains.annotations.ApiStatus;
|
|||||||
import org.jspecify.annotations.NullMarked;
|
import org.jspecify.annotations.NullMarked;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Vanilla keys for {@link RegistryKey#BANNER_PATTERN}.
|
* Vanilla tag keys for {@link RegistryKey#BANNER_PATTERN}.
|
||||||
*
|
*
|
||||||
* @apiNote The fields provided here are a direct representation of
|
* @apiNote The fields provided here are a direct representation of
|
||||||
* what is available from the vanilla game source. They may be
|
* what is available from the vanilla game source. They may be
|
||||||
@ -23,8 +23,8 @@ import org.jspecify.annotations.NullMarked;
|
|||||||
"unused",
|
"unused",
|
||||||
"SpellCheckingInspection"
|
"SpellCheckingInspection"
|
||||||
})
|
})
|
||||||
@GeneratedFrom("1.21.4")
|
|
||||||
@NullMarked
|
@NullMarked
|
||||||
|
@GeneratedFrom("1.21.4")
|
||||||
@ApiStatus.Experimental
|
@ApiStatus.Experimental
|
||||||
public final class BannerPatternTagKeys {
|
public final class BannerPatternTagKeys {
|
||||||
/**
|
/**
|
||||||
|
@ -11,7 +11,7 @@ import org.jetbrains.annotations.ApiStatus;
|
|||||||
import org.jspecify.annotations.NullMarked;
|
import org.jspecify.annotations.NullMarked;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Vanilla keys for {@link RegistryKey#BIOME}.
|
* Vanilla tag keys for {@link RegistryKey#BIOME}.
|
||||||
*
|
*
|
||||||
* @apiNote The fields provided here are a direct representation of
|
* @apiNote The fields provided here are a direct representation of
|
||||||
* what is available from the vanilla game source. They may be
|
* what is available from the vanilla game source. They may be
|
||||||
@ -23,8 +23,8 @@ import org.jspecify.annotations.NullMarked;
|
|||||||
"unused",
|
"unused",
|
||||||
"SpellCheckingInspection"
|
"SpellCheckingInspection"
|
||||||
})
|
})
|
||||||
@GeneratedFrom("1.21.4")
|
|
||||||
@NullMarked
|
@NullMarked
|
||||||
|
@GeneratedFrom("1.21.4")
|
||||||
@ApiStatus.Experimental
|
@ApiStatus.Experimental
|
||||||
public final class BiomeTagKeys {
|
public final class BiomeTagKeys {
|
||||||
/**
|
/**
|
||||||
|
@ -11,7 +11,7 @@ import org.jetbrains.annotations.ApiStatus;
|
|||||||
import org.jspecify.annotations.NullMarked;
|
import org.jspecify.annotations.NullMarked;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Vanilla keys for {@link RegistryKey#BLOCK}.
|
* Vanilla tag keys for {@link RegistryKey#BLOCK}.
|
||||||
*
|
*
|
||||||
* @apiNote The fields provided here are a direct representation of
|
* @apiNote The fields provided here are a direct representation of
|
||||||
* what is available from the vanilla game source. They may be
|
* what is available from the vanilla game source. They may be
|
||||||
@ -23,8 +23,8 @@ import org.jspecify.annotations.NullMarked;
|
|||||||
"unused",
|
"unused",
|
||||||
"SpellCheckingInspection"
|
"SpellCheckingInspection"
|
||||||
})
|
})
|
||||||
@GeneratedFrom("1.21.4")
|
|
||||||
@NullMarked
|
@NullMarked
|
||||||
|
@GeneratedFrom("1.21.4")
|
||||||
@ApiStatus.Experimental
|
@ApiStatus.Experimental
|
||||||
public final class BlockTypeTagKeys {
|
public final class BlockTypeTagKeys {
|
||||||
/**
|
/**
|
||||||
|
@ -11,7 +11,7 @@ import org.jetbrains.annotations.ApiStatus;
|
|||||||
import org.jspecify.annotations.NullMarked;
|
import org.jspecify.annotations.NullMarked;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Vanilla keys for {@link RegistryKey#CAT_VARIANT}.
|
* Vanilla tag keys for {@link RegistryKey#CAT_VARIANT}.
|
||||||
*
|
*
|
||||||
* @apiNote The fields provided here are a direct representation of
|
* @apiNote The fields provided here are a direct representation of
|
||||||
* what is available from the vanilla game source. They may be
|
* what is available from the vanilla game source. They may be
|
||||||
@ -23,8 +23,8 @@ import org.jspecify.annotations.NullMarked;
|
|||||||
"unused",
|
"unused",
|
||||||
"SpellCheckingInspection"
|
"SpellCheckingInspection"
|
||||||
})
|
})
|
||||||
@GeneratedFrom("1.21.4")
|
|
||||||
@NullMarked
|
@NullMarked
|
||||||
|
@GeneratedFrom("1.21.4")
|
||||||
@ApiStatus.Experimental
|
@ApiStatus.Experimental
|
||||||
public final class CatVariantTagKeys {
|
public final class CatVariantTagKeys {
|
||||||
/**
|
/**
|
||||||
|
@ -11,7 +11,7 @@ import org.jetbrains.annotations.ApiStatus;
|
|||||||
import org.jspecify.annotations.NullMarked;
|
import org.jspecify.annotations.NullMarked;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Vanilla keys for {@link RegistryKey#DAMAGE_TYPE}.
|
* Vanilla tag keys for {@link RegistryKey#DAMAGE_TYPE}.
|
||||||
*
|
*
|
||||||
* @apiNote The fields provided here are a direct representation of
|
* @apiNote The fields provided here are a direct representation of
|
||||||
* what is available from the vanilla game source. They may be
|
* what is available from the vanilla game source. They may be
|
||||||
@ -23,8 +23,8 @@ import org.jspecify.annotations.NullMarked;
|
|||||||
"unused",
|
"unused",
|
||||||
"SpellCheckingInspection"
|
"SpellCheckingInspection"
|
||||||
})
|
})
|
||||||
@GeneratedFrom("1.21.4")
|
|
||||||
@NullMarked
|
@NullMarked
|
||||||
|
@GeneratedFrom("1.21.4")
|
||||||
@ApiStatus.Experimental
|
@ApiStatus.Experimental
|
||||||
public final class DamageTypeTagKeys {
|
public final class DamageTypeTagKeys {
|
||||||
/**
|
/**
|
||||||
|
@ -12,7 +12,7 @@ import org.jetbrains.annotations.ApiStatus;
|
|||||||
import org.jspecify.annotations.NullMarked;
|
import org.jspecify.annotations.NullMarked;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Vanilla keys for {@link RegistryKey#ENCHANTMENT}.
|
* Vanilla tag keys for {@link RegistryKey#ENCHANTMENT}.
|
||||||
*
|
*
|
||||||
* @apiNote The fields provided here are a direct representation of
|
* @apiNote The fields provided here are a direct representation of
|
||||||
* what is available from the vanilla game source. They may be
|
* what is available from the vanilla game source. They may be
|
||||||
@ -24,8 +24,8 @@ import org.jspecify.annotations.NullMarked;
|
|||||||
"unused",
|
"unused",
|
||||||
"SpellCheckingInspection"
|
"SpellCheckingInspection"
|
||||||
})
|
})
|
||||||
@GeneratedFrom("1.21.4")
|
|
||||||
@NullMarked
|
@NullMarked
|
||||||
|
@GeneratedFrom("1.21.4")
|
||||||
@ApiStatus.Experimental
|
@ApiStatus.Experimental
|
||||||
public final class EnchantmentTagKeys {
|
public final class EnchantmentTagKeys {
|
||||||
/**
|
/**
|
||||||
|
@ -11,7 +11,7 @@ import org.jetbrains.annotations.ApiStatus;
|
|||||||
import org.jspecify.annotations.NullMarked;
|
import org.jspecify.annotations.NullMarked;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Vanilla keys for {@link RegistryKey#ENTITY_TYPE}.
|
* Vanilla tag keys for {@link RegistryKey#ENTITY_TYPE}.
|
||||||
*
|
*
|
||||||
* @apiNote The fields provided here are a direct representation of
|
* @apiNote The fields provided here are a direct representation of
|
||||||
* what is available from the vanilla game source. They may be
|
* what is available from the vanilla game source. They may be
|
||||||
@ -23,8 +23,8 @@ import org.jspecify.annotations.NullMarked;
|
|||||||
"unused",
|
"unused",
|
||||||
"SpellCheckingInspection"
|
"SpellCheckingInspection"
|
||||||
})
|
})
|
||||||
@GeneratedFrom("1.21.4")
|
|
||||||
@NullMarked
|
@NullMarked
|
||||||
|
@GeneratedFrom("1.21.4")
|
||||||
@ApiStatus.Experimental
|
@ApiStatus.Experimental
|
||||||
public final class EntityTypeTagKeys {
|
public final class EntityTypeTagKeys {
|
||||||
/**
|
/**
|
||||||
|
@ -11,7 +11,7 @@ import org.jetbrains.annotations.ApiStatus;
|
|||||||
import org.jspecify.annotations.NullMarked;
|
import org.jspecify.annotations.NullMarked;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Vanilla keys for {@link RegistryKey#FLUID}.
|
* Vanilla tag keys for {@link RegistryKey#FLUID}.
|
||||||
*
|
*
|
||||||
* @apiNote The fields provided here are a direct representation of
|
* @apiNote The fields provided here are a direct representation of
|
||||||
* what is available from the vanilla game source. They may be
|
* what is available from the vanilla game source. They may be
|
||||||
@ -23,8 +23,8 @@ import org.jspecify.annotations.NullMarked;
|
|||||||
"unused",
|
"unused",
|
||||||
"SpellCheckingInspection"
|
"SpellCheckingInspection"
|
||||||
})
|
})
|
||||||
@GeneratedFrom("1.21.4")
|
|
||||||
@NullMarked
|
@NullMarked
|
||||||
|
@GeneratedFrom("1.21.4")
|
||||||
@ApiStatus.Experimental
|
@ApiStatus.Experimental
|
||||||
public final class FluidTagKeys {
|
public final class FluidTagKeys {
|
||||||
/**
|
/**
|
||||||
|
@ -11,7 +11,7 @@ import org.jetbrains.annotations.ApiStatus;
|
|||||||
import org.jspecify.annotations.NullMarked;
|
import org.jspecify.annotations.NullMarked;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Vanilla keys for {@link RegistryKey#GAME_EVENT}.
|
* Vanilla tag keys for {@link RegistryKey#GAME_EVENT}.
|
||||||
*
|
*
|
||||||
* @apiNote The fields provided here are a direct representation of
|
* @apiNote The fields provided here are a direct representation of
|
||||||
* what is available from the vanilla game source. They may be
|
* what is available from the vanilla game source. They may be
|
||||||
@ -23,8 +23,8 @@ import org.jspecify.annotations.NullMarked;
|
|||||||
"unused",
|
"unused",
|
||||||
"SpellCheckingInspection"
|
"SpellCheckingInspection"
|
||||||
})
|
})
|
||||||
@GeneratedFrom("1.21.4")
|
|
||||||
@NullMarked
|
@NullMarked
|
||||||
|
@GeneratedFrom("1.21.4")
|
||||||
@ApiStatus.Experimental
|
@ApiStatus.Experimental
|
||||||
public final class GameEventTagKeys {
|
public final class GameEventTagKeys {
|
||||||
/**
|
/**
|
||||||
|
@ -11,7 +11,7 @@ import org.jetbrains.annotations.ApiStatus;
|
|||||||
import org.jspecify.annotations.NullMarked;
|
import org.jspecify.annotations.NullMarked;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Vanilla keys for {@link RegistryKey#INSTRUMENT}.
|
* Vanilla tag keys for {@link RegistryKey#INSTRUMENT}.
|
||||||
*
|
*
|
||||||
* @apiNote The fields provided here are a direct representation of
|
* @apiNote The fields provided here are a direct representation of
|
||||||
* what is available from the vanilla game source. They may be
|
* what is available from the vanilla game source. They may be
|
||||||
@ -23,8 +23,8 @@ import org.jspecify.annotations.NullMarked;
|
|||||||
"unused",
|
"unused",
|
||||||
"SpellCheckingInspection"
|
"SpellCheckingInspection"
|
||||||
})
|
})
|
||||||
@GeneratedFrom("1.21.4")
|
|
||||||
@NullMarked
|
@NullMarked
|
||||||
|
@GeneratedFrom("1.21.4")
|
||||||
@ApiStatus.Experimental
|
@ApiStatus.Experimental
|
||||||
public final class InstrumentTagKeys {
|
public final class InstrumentTagKeys {
|
||||||
/**
|
/**
|
||||||
|
@ -11,7 +11,7 @@ import org.jetbrains.annotations.ApiStatus;
|
|||||||
import org.jspecify.annotations.NullMarked;
|
import org.jspecify.annotations.NullMarked;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Vanilla keys for {@link RegistryKey#ITEM}.
|
* Vanilla tag keys for {@link RegistryKey#ITEM}.
|
||||||
*
|
*
|
||||||
* @apiNote The fields provided here are a direct representation of
|
* @apiNote The fields provided here are a direct representation of
|
||||||
* what is available from the vanilla game source. They may be
|
* what is available from the vanilla game source. They may be
|
||||||
@ -23,8 +23,8 @@ import org.jspecify.annotations.NullMarked;
|
|||||||
"unused",
|
"unused",
|
||||||
"SpellCheckingInspection"
|
"SpellCheckingInspection"
|
||||||
})
|
})
|
||||||
@GeneratedFrom("1.21.4")
|
|
||||||
@NullMarked
|
@NullMarked
|
||||||
|
@GeneratedFrom("1.21.4")
|
||||||
@ApiStatus.Experimental
|
@ApiStatus.Experimental
|
||||||
public final class ItemTypeTagKeys {
|
public final class ItemTypeTagKeys {
|
||||||
/**
|
/**
|
||||||
|
@ -11,7 +11,7 @@ import org.jetbrains.annotations.ApiStatus;
|
|||||||
import org.jspecify.annotations.NullMarked;
|
import org.jspecify.annotations.NullMarked;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Vanilla keys for {@link RegistryKey#PAINTING_VARIANT}.
|
* Vanilla tag keys for {@link RegistryKey#PAINTING_VARIANT}.
|
||||||
*
|
*
|
||||||
* @apiNote The fields provided here are a direct representation of
|
* @apiNote The fields provided here are a direct representation of
|
||||||
* what is available from the vanilla game source. They may be
|
* what is available from the vanilla game source. They may be
|
||||||
@ -23,8 +23,8 @@ import org.jspecify.annotations.NullMarked;
|
|||||||
"unused",
|
"unused",
|
||||||
"SpellCheckingInspection"
|
"SpellCheckingInspection"
|
||||||
})
|
})
|
||||||
@GeneratedFrom("1.21.4")
|
|
||||||
@NullMarked
|
@NullMarked
|
||||||
|
@GeneratedFrom("1.21.4")
|
||||||
@ApiStatus.Experimental
|
@ApiStatus.Experimental
|
||||||
public final class PaintingVariantTagKeys {
|
public final class PaintingVariantTagKeys {
|
||||||
/**
|
/**
|
||||||
|
@ -12,7 +12,7 @@ import org.jetbrains.annotations.ApiStatus;
|
|||||||
import org.jspecify.annotations.NullMarked;
|
import org.jspecify.annotations.NullMarked;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Vanilla keys for {@link RegistryKey#STRUCTURE}.
|
* Vanilla tag keys for {@link RegistryKey#STRUCTURE}.
|
||||||
*
|
*
|
||||||
* @apiNote The fields provided here are a direct representation of
|
* @apiNote The fields provided here are a direct representation of
|
||||||
* what is available from the vanilla game source. They may be
|
* what is available from the vanilla game source. They may be
|
||||||
@ -24,8 +24,8 @@ import org.jspecify.annotations.NullMarked;
|
|||||||
"unused",
|
"unused",
|
||||||
"SpellCheckingInspection"
|
"SpellCheckingInspection"
|
||||||
})
|
})
|
||||||
@GeneratedFrom("1.21.4")
|
|
||||||
@NullMarked
|
@NullMarked
|
||||||
|
@GeneratedFrom("1.21.4")
|
||||||
@ApiStatus.Experimental
|
@ApiStatus.Experimental
|
||||||
public final class StructureTagKeys {
|
public final class StructureTagKeys {
|
||||||
/**
|
/**
|
||||||
|
@ -63,21 +63,76 @@ import static java.util.Objects.requireNonNull;
|
|||||||
@ApiStatus.Experimental
|
@ApiStatus.Experimental
|
||||||
public final class DataComponentTypes {
|
public final class DataComponentTypes {
|
||||||
|
|
||||||
|
// Start generate - DataComponentTypes
|
||||||
|
// @GeneratedFrom 1.21.4
|
||||||
/**
|
/**
|
||||||
* Controls the maximum stacking size of this item.
|
* Holds attribute modifiers applied to any item,
|
||||||
* <br>
|
* if not set, has an implicit default value based on the item type's
|
||||||
* Values greater than 1 are mutually exclusive with the {@link #MAX_DAMAGE} component.
|
* default attributes (e.g. attack damage for weapons).
|
||||||
*/
|
*/
|
||||||
public static final DataComponentType.Valued<@IntRange(from = 1, to = 99) Integer> MAX_STACK_SIZE = valued("max_stack_size");
|
public static final DataComponentType.Valued<ItemAttributeModifiers> ATTRIBUTE_MODIFIERS = valued("attribute_modifiers");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Controls the maximum amount of damage than an item can take,
|
* Stores the additional patterns applied to a Banner or Shield.
|
||||||
* if not present, the item cannot be damaged.
|
*/
|
||||||
* <br>
|
public static final DataComponentType.Valued<BannerPatternLayers> BANNER_PATTERNS = valued("banner_patterns");
|
||||||
* Mutually exclusive with the {@link #MAX_STACK_SIZE} component greater than 1.
|
|
||||||
|
/**
|
||||||
|
* Stores the base color for a Shield.
|
||||||
|
*/
|
||||||
|
public static final DataComponentType.Valued<DyeColor> BASE_COLOR = valued("base_color");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Holds block state properties to apply when placing a block.
|
||||||
|
*/
|
||||||
|
public static final DataComponentType.Valued<BlockItemDataProperties> BLOCK_DATA = valued("block_state");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Holds all items stored inside a Bundle.
|
||||||
|
* If removed, items cannot be added to the Bundle.
|
||||||
|
*/
|
||||||
|
public static final DataComponentType.Valued<BundleContents> BUNDLE_CONTENTS = valued("bundle_contents");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Controls which blocks a player in Adventure mode can break with this item.
|
||||||
|
*/
|
||||||
|
public static final DataComponentType.Valued<ItemAdventurePredicate> CAN_BREAK = valued("can_break");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Controls which blocks a player in Adventure mode can place on with this item.
|
||||||
|
*/
|
||||||
|
public static final DataComponentType.Valued<ItemAdventurePredicate> CAN_PLACE_ON = valued("can_place_on");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Holds all projectiles that have been loaded into a Crossbow.
|
||||||
|
* If not present, the Crossbow is not charged.
|
||||||
|
*/
|
||||||
|
public static final DataComponentType.Valued<ChargedProjectiles> CHARGED_PROJECTILES = valued("charged_projectiles");
|
||||||
|
|
||||||
|
public static final DataComponentType.Valued<Consumable> CONSUMABLE = valued("consumable");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Holds the contents of container blocks (Chests, Shulker Boxes) in item form.
|
||||||
|
*/
|
||||||
|
public static final DataComponentType.Valued<ItemContainerContents> CONTAINER = valued("container");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Holds the unresolved loot table and seed of a container-like block.
|
||||||
|
*/
|
||||||
|
public static final DataComponentType.Valued<SeededContainerLoot> CONTAINER_LOOT = valued("container_loot");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Controls the minecraft:custom_model_data property in the item model.
|
||||||
|
*/
|
||||||
|
public static final DataComponentType.Valued<CustomModelData> CUSTOM_MODEL_DATA = valued("custom_model_data");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Custom name override for an item (as set by renaming with an Anvil).
|
||||||
*
|
*
|
||||||
* @see #DAMAGE
|
* @see #ITEM_NAME
|
||||||
*/
|
*/
|
||||||
public static final DataComponentType.Valued<@Positive Integer> MAX_DAMAGE = valued("max_damage");
|
public static final DataComponentType.Valued<Component> CUSTOM_NAME = valued("custom_name");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The amount of durability removed from an item,
|
* The amount of durability removed from an item,
|
||||||
* for damageable items (with the {@link #MAX_DAMAGE} component), has an implicit default value of: {@code 0}.
|
* for damageable items (with the {@link #MAX_DAMAGE} component), has an implicit default value of: {@code 0}.
|
||||||
@ -85,16 +140,80 @@ public final class DataComponentTypes {
|
|||||||
* @see #MAX_DAMAGE
|
* @see #MAX_DAMAGE
|
||||||
*/
|
*/
|
||||||
public static final DataComponentType.Valued<@NonNegative Integer> DAMAGE = valued("damage");
|
public static final DataComponentType.Valued<@NonNegative Integer> DAMAGE = valued("damage");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* If set, the item will not lose any durability when used.
|
* If present, this item will not take damage from the specified damage types.
|
||||||
*/
|
*/
|
||||||
public static final DataComponentType.Valued<Unbreakable> UNBREAKABLE = valued("unbreakable");
|
public static final DataComponentType.Valued<DamageResistant> DAMAGE_RESISTANT = valued("damage_resistant");
|
||||||
|
|
||||||
|
public static final DataComponentType.Valued<DeathProtection> DEATH_PROTECTION = valued("death_protection");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Custom name override for an item (as set by renaming with an Anvil).
|
* Represents a color applied to a dyeable item (in the {@link io.papermc.paper.registry.keys.tags.ItemTypeTagKeys#DYEABLE} item tag).
|
||||||
|
*/
|
||||||
|
public static final DataComponentType.Valued<DyedItemColor> DYED_COLOR = valued("dyed_color");
|
||||||
|
|
||||||
|
public static final DataComponentType.Valued<Enchantable> ENCHANTABLE = valued("enchantable");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Overrides the enchantment glint effect on an item.
|
||||||
|
* If not present, default behaviour is used.
|
||||||
|
*/
|
||||||
|
public static final DataComponentType.Valued<Boolean> ENCHANTMENT_GLINT_OVERRIDE = valued("enchantment_glint_override");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Controls the enchantments on an item.
|
||||||
|
* <br>
|
||||||
|
* If not present on a non-enchantment book, this item will not work in an anvil.
|
||||||
*
|
*
|
||||||
* @see #ITEM_NAME
|
* @see #STORED_ENCHANTMENTS
|
||||||
*/
|
*/
|
||||||
public static final DataComponentType.Valued<Component> CUSTOM_NAME = valued("custom_name");
|
public static final DataComponentType.Valued<ItemEnchantments> ENCHANTMENTS = valued("enchantments");
|
||||||
|
|
||||||
|
public static final DataComponentType.Valued<Equippable> EQUIPPABLE = valued("equippable");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Stores the explosion crafted in a Firework Star.
|
||||||
|
*/
|
||||||
|
public static final DataComponentType.Valued<FireworkEffect> FIREWORK_EXPLOSION = valued("firework_explosion");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Stores all explosions crafted into a Firework Rocket, as well as flight duration.
|
||||||
|
*/
|
||||||
|
public static final DataComponentType.Valued<Fireworks> FIREWORKS = valued("fireworks");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Controls potential food benefits gained when consuming the item the component is applied on.
|
||||||
|
* Requires the {@link #CONSUMABLE} component to allow consumption in the first place.
|
||||||
|
*/
|
||||||
|
public static final DataComponentType.Valued<FoodProperties> FOOD = valued("food");
|
||||||
|
|
||||||
|
public static final DataComponentType.NonValued GLIDER = unvalued("glider");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If set, disables 'additional' tooltip part which comes from the item type
|
||||||
|
* (e.g. content of a shulker).
|
||||||
|
*/
|
||||||
|
public static final DataComponentType.NonValued HIDE_ADDITIONAL_TOOLTIP = unvalued("hide_additional_tooltip");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If set, it will completely hide whole item tooltip (that includes item name).
|
||||||
|
*/
|
||||||
|
public static final DataComponentType.NonValued HIDE_TOOLTIP = unvalued("hide_tooltip");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Holds the instrument type used by a Goat Horn.
|
||||||
|
*/
|
||||||
|
public static final DataComponentType.Valued<MusicInstrument> INSTRUMENT = valued("instrument");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Marks that a projectile item would be intangible when fired
|
||||||
|
* (i.e. can only be picked up by a creative mode player).
|
||||||
|
*/
|
||||||
|
public static final DataComponentType.NonValued INTANGIBLE_PROJECTILE = unvalued("intangible_projectile");
|
||||||
|
|
||||||
|
public static final DataComponentType.Valued<Key> ITEM_MODEL = valued("item_model");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* When present, replaces default item name with contained chat component.
|
* When present, replaces default item name with contained chat component.
|
||||||
* <p>
|
* <p>
|
||||||
@ -109,91 +228,100 @@ public final class DataComponentTypes {
|
|||||||
* @see #CUSTOM_NAME
|
* @see #CUSTOM_NAME
|
||||||
*/
|
*/
|
||||||
public static final DataComponentType.Valued<Component> ITEM_NAME = valued("item_name");
|
public static final DataComponentType.Valued<Component> ITEM_NAME = valued("item_name");
|
||||||
public static final DataComponentType.Valued<Key> ITEM_MODEL = valued("item_model");
|
|
||||||
|
public static final DataComponentType.Valued<JukeboxPlayable> JUKEBOX_PLAYABLE = valued("jukebox_playable");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If present, specifies that the Compass is a Lodestone Compass.
|
||||||
|
*/
|
||||||
|
public static final DataComponentType.Valued<LodestoneTracker> LODESTONE_TRACKER = valued("lodestone_tracker");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Additional lines to include in an item's tooltip.
|
* Additional lines to include in an item's tooltip.
|
||||||
*/
|
*/
|
||||||
public static final DataComponentType.Valued<ItemLore> LORE = valued("lore");
|
public static final DataComponentType.Valued<ItemLore> LORE = valued("lore");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Represents the tint of the decorations on the {@link org.bukkit.inventory.ItemType#FILLED_MAP} item.
|
||||||
|
*/
|
||||||
|
public static final DataComponentType.Valued<MapItemColor> MAP_COLOR = valued("map_color");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Holds a list of markers to be placed on a {@link org.bukkit.inventory.ItemType#FILLED_MAP} (used for Explorer Maps).
|
||||||
|
*/
|
||||||
|
public static final DataComponentType.Valued<MapDecorations> MAP_DECORATIONS = valued("map_decorations");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* References the shared map state holding map contents and markers for a {@link org.bukkit.inventory.ItemType#FILLED_MAP}.
|
||||||
|
*/
|
||||||
|
public static final DataComponentType.Valued<MapId> MAP_ID = valued("map_id");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Internal map item state used in the map crafting recipe.
|
||||||
|
*/
|
||||||
|
public static final DataComponentType.Valued<MapPostProcessing> MAP_POST_PROCESSING = valued("map_post_processing");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Controls the maximum amount of damage than an item can take,
|
||||||
|
* if not present, the item cannot be damaged.
|
||||||
|
* <br>
|
||||||
|
* Mutually exclusive with the {@link #MAX_STACK_SIZE} component greater than 1.
|
||||||
|
*
|
||||||
|
* @see #DAMAGE
|
||||||
|
*/
|
||||||
|
public static final DataComponentType.Valued<@Positive Integer> MAX_DAMAGE = valued("max_damage");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Controls the maximum stacking size of this item.
|
||||||
|
* <br>
|
||||||
|
* Values greater than 1 are mutually exclusive with the {@link #MAX_DAMAGE} component.
|
||||||
|
*/
|
||||||
|
public static final DataComponentType.Valued<Integer> MAX_STACK_SIZE = valued("max_stack_size");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Controls the sound played by a Player Head when placed on a Note Block.
|
||||||
|
*/
|
||||||
|
public static final DataComponentType.Valued<Key> NOTE_BLOCK_SOUND = valued("note_block_sound");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Controls the amplifier amount for an Ominous Bottle's Bad Omen effect.
|
||||||
|
*/
|
||||||
|
public static final DataComponentType.Valued<OminousBottleAmplifier> OMINOUS_BOTTLE_AMPLIFIER = valued("ominous_bottle_amplifier");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Stores the Sherds applied to each side of a Decorated Pot.
|
||||||
|
*/
|
||||||
|
public static final DataComponentType.Valued<PotDecorations> POT_DECORATIONS = valued("pot_decorations");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Holds the contents of a potion (Potion, Splash Potion, Lingering Potion),
|
||||||
|
* or potion applied to a Tipped Arrow.
|
||||||
|
*/
|
||||||
|
public static final DataComponentType.Valued<PotionContents> POTION_CONTENTS = valued("potion_contents");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Controls the skin displayed on a Player Head.
|
||||||
|
*/
|
||||||
|
public static final DataComponentType.Valued<ResolvableProfile> PROFILE = valued("profile");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Controls the color of the item name.
|
* Controls the color of the item name.
|
||||||
*/
|
*/
|
||||||
public static final DataComponentType.Valued<ItemRarity> RARITY = valued("rarity");
|
public static final DataComponentType.Valued<ItemRarity> RARITY = valued("rarity");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Controls the enchantments on an item.
|
* List of recipes that should be unlocked when using the Knowledge Book item.
|
||||||
* <br>
|
|
||||||
* If not present on a non-enchantment book, this item will not work in an anvil.
|
|
||||||
*
|
|
||||||
* @see #STORED_ENCHANTMENTS
|
|
||||||
*/
|
*/
|
||||||
public static final DataComponentType.Valued<ItemEnchantments> ENCHANTMENTS = valued("enchantments");
|
public static final DataComponentType.Valued<List<Key>> RECIPES = valued("recipes");
|
||||||
/**
|
|
||||||
* Controls which blocks a player in Adventure mode can place on with this item.
|
|
||||||
*/
|
|
||||||
public static final DataComponentType.Valued<ItemAdventurePredicate> CAN_PLACE_ON = valued("can_place_on");
|
|
||||||
/**
|
|
||||||
* Controls which blocks a player in Adventure mode can break with this item.
|
|
||||||
*/
|
|
||||||
public static final DataComponentType.Valued<ItemAdventurePredicate> CAN_BREAK = valued("can_break");
|
|
||||||
/**
|
|
||||||
* Holds attribute modifiers applied to any item,
|
|
||||||
* if not set, has an implicit default value based on the item type's
|
|
||||||
* default attributes (e.g. attack damage for weapons).
|
|
||||||
*/
|
|
||||||
public static final DataComponentType.Valued<ItemAttributeModifiers> ATTRIBUTE_MODIFIERS = valued("attribute_modifiers");
|
|
||||||
/**
|
|
||||||
* Controls the minecraft:custom_model_data property in the item model.
|
|
||||||
*/
|
|
||||||
public static final DataComponentType.Valued<CustomModelData> CUSTOM_MODEL_DATA = valued("custom_model_data");
|
|
||||||
/**
|
|
||||||
* If set, disables 'additional' tooltip part which comes from the item type
|
|
||||||
* (e.g. content of a shulker).
|
|
||||||
*/
|
|
||||||
public static final DataComponentType.NonValued HIDE_ADDITIONAL_TOOLTIP = unvalued("hide_additional_tooltip");
|
|
||||||
/**
|
|
||||||
* If set, it will completely hide whole item tooltip (that includes item name).
|
|
||||||
*/
|
|
||||||
public static final DataComponentType.NonValued HIDE_TOOLTIP = unvalued("hide_tooltip");
|
|
||||||
/**
|
/**
|
||||||
* The additional experience cost required to modify an item in an Anvil.
|
* The additional experience cost required to modify an item in an Anvil.
|
||||||
* If not present, has an implicit default value of: {@code 0}.
|
* If not present, has an implicit default value of: {@code 0}.
|
||||||
*/
|
*/
|
||||||
public static final DataComponentType.Valued<@NonNegative Integer> REPAIR_COST = valued("repair_cost");
|
public static final DataComponentType.Valued<@NonNegative Integer> REPAIR_COST = valued("repair_cost");
|
||||||
// /**
|
|
||||||
// * Causes an item to not be pickable in the creative menu, currently not very useful.
|
|
||||||
// */
|
|
||||||
// public static final DataComponentType.NonValued CREATIVE_SLOT_LOCK = unvalued("creative_slot_lock");
|
|
||||||
/**
|
|
||||||
* Overrides the enchantment glint effect on an item.
|
|
||||||
* If not present, default behaviour is used.
|
|
||||||
*/
|
|
||||||
public static final DataComponentType.Valued<Boolean> ENCHANTMENT_GLINT_OVERRIDE = valued("enchantment_glint_override");
|
|
||||||
/**
|
|
||||||
* Marks that a projectile item would be intangible when fired
|
|
||||||
* (i.e. can only be picked up by a creative mode player).
|
|
||||||
*/
|
|
||||||
public static final DataComponentType.NonValued INTANGIBLE_PROJECTILE = unvalued("intangible_projectile");
|
|
||||||
/**
|
|
||||||
* Controls potential food benefits gained when consuming the item the component is applied on.
|
|
||||||
* Requires the {@link #CONSUMABLE} component to allow consumption in the first place.
|
|
||||||
*/
|
|
||||||
public static final DataComponentType.Valued<FoodProperties> FOOD = valued("food");
|
|
||||||
public static final DataComponentType.Valued<Consumable> CONSUMABLE = valued("consumable");
|
|
||||||
public static final DataComponentType.Valued<UseRemainder> USE_REMAINDER = valued("use_remainder");
|
|
||||||
public static final DataComponentType.Valued<UseCooldown> USE_COOLDOWN = valued("use_cooldown");
|
|
||||||
/**
|
|
||||||
* If present, this item will not take damage from the specified damage types.
|
|
||||||
*/
|
|
||||||
public static final DataComponentType.Valued<DamageResistant> DAMAGE_RESISTANT = valued("damage_resistant");
|
|
||||||
/**
|
|
||||||
* Controls the behavior of the item as a tool.
|
|
||||||
*/
|
|
||||||
public static final DataComponentType.Valued<Tool> TOOL = valued("tool");
|
|
||||||
public static final DataComponentType.Valued<Enchantable> ENCHANTABLE = valued("enchantable");
|
|
||||||
public static final DataComponentType.Valued<Equippable> EQUIPPABLE = valued("equippable");
|
|
||||||
public static final DataComponentType.Valued<Repairable> REPAIRABLE = valued("repairable");
|
public static final DataComponentType.Valued<Repairable> REPAIRABLE = valued("repairable");
|
||||||
public static final DataComponentType.NonValued GLIDER = unvalued("glider");
|
|
||||||
public static final DataComponentType.Valued<Key> TOOLTIP_STYLE = valued("tooltip_style");
|
|
||||||
public static final DataComponentType.Valued<DeathProtection> DEATH_PROTECTION = valued("death_protection");
|
|
||||||
/**
|
/**
|
||||||
* Stores list of enchantments and their levels for an Enchanted Book.
|
* Stores list of enchantments and their levels for an Enchanted Book.
|
||||||
* Unlike {@link #ENCHANTMENTS}, the effects provided by enchantments
|
* Unlike {@link #ENCHANTMENTS}, the effects provided by enchantments
|
||||||
@ -208,114 +336,51 @@ public final class DataComponentTypes {
|
|||||||
* @see #ENCHANTMENTS
|
* @see #ENCHANTMENTS
|
||||||
*/
|
*/
|
||||||
public static final DataComponentType.Valued<ItemEnchantments> STORED_ENCHANTMENTS = valued("stored_enchantments");
|
public static final DataComponentType.Valued<ItemEnchantments> STORED_ENCHANTMENTS = valued("stored_enchantments");
|
||||||
/**
|
|
||||||
* Represents a color applied to a dyeable item (in the {@link io.papermc.paper.registry.keys.tags.ItemTypeTagKeys#DYEABLE} item tag).
|
|
||||||
*/
|
|
||||||
public static final DataComponentType.Valued<DyedItemColor> DYED_COLOR = valued("dyed_color");
|
|
||||||
/**
|
|
||||||
* Represents the tint of the decorations on the {@link org.bukkit.inventory.ItemType#FILLED_MAP} item.
|
|
||||||
*/
|
|
||||||
public static final DataComponentType.Valued<MapItemColor> MAP_COLOR = valued("map_color");
|
|
||||||
/**
|
|
||||||
* References the shared map state holding map contents and markers for a {@link org.bukkit.inventory.ItemType#FILLED_MAP}.
|
|
||||||
*/
|
|
||||||
public static final DataComponentType.Valued<MapId> MAP_ID = valued("map_id");
|
|
||||||
/**
|
|
||||||
* Holds a list of markers to be placed on a {@link org.bukkit.inventory.ItemType#FILLED_MAP} (used for Explorer Maps).
|
|
||||||
*/
|
|
||||||
public static final DataComponentType.Valued<MapDecorations> MAP_DECORATIONS = valued("map_decorations");
|
|
||||||
/**
|
|
||||||
* Internal map item state used in the map crafting recipe.
|
|
||||||
*/
|
|
||||||
public static final DataComponentType.Valued<MapPostProcessing> MAP_POST_PROCESSING = valued("map_post_processing");
|
|
||||||
/**
|
|
||||||
* Holds all projectiles that have been loaded into a Crossbow.
|
|
||||||
* If not present, the Crossbow is not charged.
|
|
||||||
*/
|
|
||||||
public static final DataComponentType.Valued<ChargedProjectiles> CHARGED_PROJECTILES = valued("charged_projectiles");
|
|
||||||
/**
|
|
||||||
* Holds all items stored inside a Bundle.
|
|
||||||
* If removed, items cannot be added to the Bundle.
|
|
||||||
*/
|
|
||||||
public static final DataComponentType.Valued<BundleContents> BUNDLE_CONTENTS = valued("bundle_contents");
|
|
||||||
/**
|
|
||||||
* Holds the contents of a potion (Potion, Splash Potion, Lingering Potion),
|
|
||||||
* or potion applied to a Tipped Arrow.
|
|
||||||
*/
|
|
||||||
public static final DataComponentType.Valued<PotionContents> POTION_CONTENTS = valued("potion_contents");
|
|
||||||
/**
|
/**
|
||||||
* Holds the effects that will be applied when consuming Suspicious Stew.
|
* Holds the effects that will be applied when consuming Suspicious Stew.
|
||||||
*/
|
*/
|
||||||
public static final DataComponentType.Valued<SuspiciousStewEffects> SUSPICIOUS_STEW_EFFECTS = valued("suspicious_stew_effects");
|
public static final DataComponentType.Valued<SuspiciousStewEffects> SUSPICIOUS_STEW_EFFECTS = valued("suspicious_stew_effects");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the contents in a Book and Quill.
|
* Controls the behavior of the item as a tool.
|
||||||
*/
|
*/
|
||||||
public static final DataComponentType.Valued<WritableBookContent> WRITABLE_BOOK_CONTENT = valued("writable_book_content");
|
public static final DataComponentType.Valued<Tool> TOOL = valued("tool");
|
||||||
/**
|
|
||||||
* Holds the contents and metadata of a Written Book.
|
public static final DataComponentType.Valued<Key> TOOLTIP_STYLE = valued("tooltip_style");
|
||||||
*/
|
|
||||||
public static final DataComponentType.Valued<WrittenBookContent> WRITTEN_BOOK_CONTENT = valued("written_book_content");
|
|
||||||
/**
|
/**
|
||||||
* Holds the trims applied to an item in recipes
|
* Holds the trims applied to an item in recipes
|
||||||
*/
|
*/
|
||||||
public static final DataComponentType.Valued<ItemArmorTrim> TRIM = valued("trim");
|
public static final DataComponentType.Valued<ItemArmorTrim> TRIM = valued("trim");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If set, the item will not lose any durability when used.
|
||||||
|
*/
|
||||||
|
public static final DataComponentType.Valued<Unbreakable> UNBREAKABLE = valued("unbreakable");
|
||||||
|
|
||||||
|
public static final DataComponentType.Valued<UseCooldown> USE_COOLDOWN = valued("use_cooldown");
|
||||||
|
|
||||||
|
public static final DataComponentType.Valued<UseRemainder> USE_REMAINDER = valued("use_remainder");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Holds the contents in a Book and Quill.
|
||||||
|
*/
|
||||||
|
public static final DataComponentType.Valued<WritableBookContent> WRITABLE_BOOK_CONTENT = valued("writable_book_content");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Holds the contents and metadata of a Written Book.
|
||||||
|
*/
|
||||||
|
public static final DataComponentType.Valued<WrittenBookContent> WRITTEN_BOOK_CONTENT = valued("written_book_content");
|
||||||
|
// End generate - DataComponentTypes
|
||||||
|
// /**
|
||||||
|
// * Causes an item to not be pickable in the creative menu, currently not very useful.
|
||||||
|
// */
|
||||||
|
// public static final DataComponentType.NonValued CREATIVE_SLOT_LOCK = unvalued("creative_slot_lock");
|
||||||
// debug_stick_state - Block Property API
|
// debug_stick_state - Block Property API
|
||||||
// entity_data
|
// entity_data
|
||||||
// bucket_entity_data
|
// bucket_entity_data
|
||||||
// block_entity_data
|
// block_entity_data
|
||||||
/**
|
|
||||||
* Holds the instrument type used by a Goat Horn.
|
|
||||||
*/
|
|
||||||
public static final DataComponentType.Valued<MusicInstrument> INSTRUMENT = valued("instrument");
|
|
||||||
/**
|
|
||||||
* Controls the amplifier amount for an Ominous Bottle's Bad Omen effect.
|
|
||||||
*/
|
|
||||||
public static final DataComponentType.Valued<OminousBottleAmplifier> OMINOUS_BOTTLE_AMPLIFIER = valued("ominous_bottle_amplifier");
|
|
||||||
public static final DataComponentType.Valued<JukeboxPlayable> JUKEBOX_PLAYABLE = valued("jukebox_playable");
|
|
||||||
/**
|
|
||||||
* List of recipes that should be unlocked when using the Knowledge Book item.
|
|
||||||
*/
|
|
||||||
public static final DataComponentType.Valued<List<Key>> RECIPES = valued("recipes");
|
|
||||||
/**
|
|
||||||
* If present, specifies that the Compass is a Lodestone Compass.
|
|
||||||
*/
|
|
||||||
public static final DataComponentType.Valued<LodestoneTracker> LODESTONE_TRACKER = valued("lodestone_tracker");
|
|
||||||
/**
|
|
||||||
* Stores the explosion crafted in a Firework Star.
|
|
||||||
*/
|
|
||||||
public static final DataComponentType.Valued<FireworkEffect> FIREWORK_EXPLOSION = valued("firework_explosion");
|
|
||||||
/**
|
|
||||||
* Stores all explosions crafted into a Firework Rocket, as well as flight duration.
|
|
||||||
*/
|
|
||||||
public static final DataComponentType.Valued<Fireworks> FIREWORKS = valued("fireworks");
|
|
||||||
/**
|
|
||||||
* Controls the skin displayed on a Player Head.
|
|
||||||
*/
|
|
||||||
public static final DataComponentType.Valued<ResolvableProfile> PROFILE = valued("profile");
|
|
||||||
/**
|
|
||||||
* Controls the sound played by a Player Head when placed on a Note Block.
|
|
||||||
*/
|
|
||||||
public static final DataComponentType.Valued<Key> NOTE_BLOCK_SOUND = valued("note_block_sound");
|
|
||||||
/**
|
|
||||||
* Stores the additional patterns applied to a Banner or Shield.
|
|
||||||
*/
|
|
||||||
public static final DataComponentType.Valued<BannerPatternLayers> BANNER_PATTERNS = valued("banner_patterns");
|
|
||||||
/**
|
|
||||||
* Stores the base color for a Shield.
|
|
||||||
*/
|
|
||||||
public static final DataComponentType.Valued<DyeColor> BASE_COLOR = valued("base_color");
|
|
||||||
/**
|
|
||||||
* Stores the Sherds applied to each side of a Decorated Pot.
|
|
||||||
*/
|
|
||||||
public static final DataComponentType.Valued<PotDecorations> POT_DECORATIONS = valued("pot_decorations");
|
|
||||||
/**
|
|
||||||
* Holds the contents of container blocks (Chests, Shulker Boxes) in item form.
|
|
||||||
*/
|
|
||||||
public static final DataComponentType.Valued<ItemContainerContents> CONTAINER = valued("container");
|
|
||||||
/**
|
|
||||||
* Holds block state properties to apply when placing a block.
|
|
||||||
*/
|
|
||||||
public static final DataComponentType.Valued<BlockItemDataProperties> BLOCK_DATA = valued("block_state");
|
|
||||||
// bees
|
// bees
|
||||||
// /**
|
// /**
|
||||||
// * Holds the lock state of a container-like block,
|
// * Holds the lock state of a container-like block,
|
||||||
@ -325,10 +390,6 @@ public final class DataComponentTypes {
|
|||||||
// * to open this container.
|
// * to open this container.
|
||||||
// */
|
// */
|
||||||
// public static final DataComponentType.Valued<LockCode> LOCK = valued("lock");
|
// public static final DataComponentType.Valued<LockCode> LOCK = valued("lock");
|
||||||
/**
|
|
||||||
* Holds the unresolved loot table and seed of a container-like block.
|
|
||||||
*/
|
|
||||||
public static final DataComponentType.Valued<SeededContainerLoot> CONTAINER_LOOT = valued("container_loot");
|
|
||||||
|
|
||||||
private static DataComponentType.NonValued unvalued(final String name) {
|
private static DataComponentType.NonValued unvalued(final String name) {
|
||||||
return (DataComponentType.NonValued) requireNonNull(Registry.DATA_COMPONENT_TYPE.get(NamespacedKey.minecraft(name)), name + " unvalued data component type couldn't be found, this is a bug.");
|
return (DataComponentType.NonValued) requireNonNull(Registry.DATA_COMPONENT_TYPE.get(NamespacedKey.minecraft(name)), name + " unvalued data component type couldn't be found, this is a bug.");
|
||||||
|
@ -4,6 +4,8 @@ package io.papermc.paper.datacomponent.item.consumable;
|
|||||||
* Represents the hand animation that is used when a player is consuming this item.
|
* Represents the hand animation that is used when a player is consuming this item.
|
||||||
*/
|
*/
|
||||||
public enum ItemUseAnimation {
|
public enum ItemUseAnimation {
|
||||||
|
// Start generate - ItemUseAnimation
|
||||||
|
// @GeneratedFrom 1.21.4
|
||||||
NONE,
|
NONE,
|
||||||
EAT,
|
EAT,
|
||||||
DRINK,
|
DRINK,
|
||||||
@ -14,5 +16,6 @@ public enum ItemUseAnimation {
|
|||||||
SPYGLASS,
|
SPYGLASS,
|
||||||
TOOT_HORN,
|
TOOT_HORN,
|
||||||
BRUSH,
|
BRUSH,
|
||||||
BUNDLE
|
BUNDLE;
|
||||||
|
// End generate - ItemUseAnimation
|
||||||
}
|
}
|
||||||
|
@ -24,11 +24,14 @@ import static io.papermc.paper.registry.event.RegistryEventProviderImpl.create;
|
|||||||
@NullMarked
|
@NullMarked
|
||||||
public final class RegistryEvents {
|
public final class RegistryEvents {
|
||||||
|
|
||||||
|
// Start generate - RegistryEvents
|
||||||
|
// @GeneratedFrom 1.21.4
|
||||||
public static final RegistryEventProvider<GameEvent, GameEventRegistryEntry.Builder> GAME_EVENT = create(RegistryKey.GAME_EVENT);
|
public static final RegistryEventProvider<GameEvent, GameEventRegistryEntry.Builder> GAME_EVENT = create(RegistryKey.GAME_EVENT);
|
||||||
public static final RegistryEventProvider<Enchantment, EnchantmentRegistryEntry.Builder> ENCHANTMENT = create(RegistryKey.ENCHANTMENT);
|
|
||||||
public static final RegistryEventProvider<Art, PaintingVariantRegistryEntry.Builder> PAINTING_VARIANT = create(RegistryKey.PAINTING_VARIANT);
|
|
||||||
public static final RegistryEventProvider<PatternType, BannerPatternRegistryEntry.Builder> BANNER_PATTERN = create(RegistryKey.BANNER_PATTERN);
|
|
||||||
public static final RegistryEventProvider<DamageType, DamageTypeRegistryEntry.Builder> DAMAGE_TYPE = create(RegistryKey.DAMAGE_TYPE);
|
public static final RegistryEventProvider<DamageType, DamageTypeRegistryEntry.Builder> DAMAGE_TYPE = create(RegistryKey.DAMAGE_TYPE);
|
||||||
|
public static final RegistryEventProvider<Enchantment, EnchantmentRegistryEntry.Builder> ENCHANTMENT = create(RegistryKey.ENCHANTMENT);
|
||||||
|
public static final RegistryEventProvider<PatternType, BannerPatternRegistryEntry.Builder> BANNER_PATTERN = create(RegistryKey.BANNER_PATTERN);
|
||||||
|
public static final RegistryEventProvider<Art, PaintingVariantRegistryEntry.Builder> PAINTING_VARIANT = create(RegistryKey.PAINTING_VARIANT);
|
||||||
|
// End generate - RegistryEvents
|
||||||
|
|
||||||
private RegistryEvents() {
|
private RegistryEvents() {
|
||||||
}
|
}
|
||||||
|
@ -35,57 +35,109 @@ public interface Art extends OldEnum<Art>, Keyed {
|
|||||||
return InlinedRegistryBuilderProvider.instance().createPaintingVariant(value);
|
return InlinedRegistryBuilderProvider.instance().createPaintingVariant(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
Art KEBAB = getArt("kebab");
|
// Start generate - Art
|
||||||
Art AZTEC = getArt("aztec");
|
// @GeneratedFrom 1.21.4
|
||||||
Art ALBAN = getArt("alban");
|
Art ALBAN = getArt("alban");
|
||||||
|
|
||||||
|
Art AZTEC = getArt("aztec");
|
||||||
|
|
||||||
Art AZTEC2 = getArt("aztec2");
|
Art AZTEC2 = getArt("aztec2");
|
||||||
Art BOMB = getArt("bomb");
|
|
||||||
Art PLANT = getArt("plant");
|
|
||||||
Art WASTELAND = getArt("wasteland");
|
|
||||||
Art POOL = getArt("pool");
|
|
||||||
Art COURBET = getArt("courbet");
|
|
||||||
Art SEA = getArt("sea");
|
|
||||||
Art SUNSET = getArt("sunset");
|
|
||||||
Art CREEBET = getArt("creebet");
|
|
||||||
Art WANDERER = getArt("wanderer");
|
|
||||||
Art GRAHAM = getArt("graham");
|
|
||||||
Art MATCH = getArt("match");
|
|
||||||
Art BUST = getArt("bust");
|
|
||||||
Art STAGE = getArt("stage");
|
|
||||||
Art VOID = getArt("void");
|
|
||||||
Art SKULL_AND_ROSES = getArt("skull_and_roses");
|
|
||||||
Art WITHER = getArt("wither");
|
|
||||||
Art FIGHTERS = getArt("fighters");
|
|
||||||
Art POINTER = getArt("pointer");
|
|
||||||
Art PIGSCENE = getArt("pigscene");
|
|
||||||
Art BURNING_SKULL = getArt("burning_skull");
|
|
||||||
Art SKELETON = getArt("skeleton");
|
|
||||||
Art DONKEY_KONG = getArt("donkey_kong");
|
|
||||||
Art EARTH = getArt("earth");
|
|
||||||
Art WIND = getArt("wind");
|
|
||||||
Art WATER = getArt("water");
|
|
||||||
Art FIRE = getArt("fire");
|
|
||||||
Art BAROQUE = getArt("baroque");
|
|
||||||
Art HUMBLE = getArt("humble");
|
|
||||||
Art MEDITATIVE = getArt("meditative");
|
|
||||||
Art PRAIRIE_RIDE = getArt("prairie_ride");
|
|
||||||
Art UNPACKED = getArt("unpacked");
|
|
||||||
Art BACKYARD = getArt("backyard");
|
Art BACKYARD = getArt("backyard");
|
||||||
|
|
||||||
|
Art BAROQUE = getArt("baroque");
|
||||||
|
|
||||||
|
Art BOMB = getArt("bomb");
|
||||||
|
|
||||||
Art BOUQUET = getArt("bouquet");
|
Art BOUQUET = getArt("bouquet");
|
||||||
|
|
||||||
|
Art BURNING_SKULL = getArt("burning_skull");
|
||||||
|
|
||||||
|
Art BUST = getArt("bust");
|
||||||
|
|
||||||
Art CAVEBIRD = getArt("cavebird");
|
Art CAVEBIRD = getArt("cavebird");
|
||||||
|
|
||||||
Art CHANGING = getArt("changing");
|
Art CHANGING = getArt("changing");
|
||||||
|
|
||||||
Art COTAN = getArt("cotan");
|
Art COTAN = getArt("cotan");
|
||||||
|
|
||||||
|
Art COURBET = getArt("courbet");
|
||||||
|
|
||||||
|
Art CREEBET = getArt("creebet");
|
||||||
|
|
||||||
|
Art DONKEY_KONG = getArt("donkey_kong");
|
||||||
|
|
||||||
|
Art EARTH = getArt("earth");
|
||||||
|
|
||||||
Art ENDBOSS = getArt("endboss");
|
Art ENDBOSS = getArt("endboss");
|
||||||
|
|
||||||
Art FERN = getArt("fern");
|
Art FERN = getArt("fern");
|
||||||
|
|
||||||
|
Art FIGHTERS = getArt("fighters");
|
||||||
|
|
||||||
Art FINDING = getArt("finding");
|
Art FINDING = getArt("finding");
|
||||||
|
|
||||||
|
Art FIRE = getArt("fire");
|
||||||
|
|
||||||
|
Art GRAHAM = getArt("graham");
|
||||||
|
|
||||||
|
Art HUMBLE = getArt("humble");
|
||||||
|
|
||||||
|
Art KEBAB = getArt("kebab");
|
||||||
|
|
||||||
Art LOWMIST = getArt("lowmist");
|
Art LOWMIST = getArt("lowmist");
|
||||||
|
|
||||||
|
Art MATCH = getArt("match");
|
||||||
|
|
||||||
|
Art MEDITATIVE = getArt("meditative");
|
||||||
|
|
||||||
Art ORB = getArt("orb");
|
Art ORB = getArt("orb");
|
||||||
|
|
||||||
Art OWLEMONS = getArt("owlemons");
|
Art OWLEMONS = getArt("owlemons");
|
||||||
|
|
||||||
Art PASSAGE = getArt("passage");
|
Art PASSAGE = getArt("passage");
|
||||||
|
|
||||||
|
Art PIGSCENE = getArt("pigscene");
|
||||||
|
|
||||||
|
Art PLANT = getArt("plant");
|
||||||
|
|
||||||
|
Art POINTER = getArt("pointer");
|
||||||
|
|
||||||
Art POND = getArt("pond");
|
Art POND = getArt("pond");
|
||||||
|
|
||||||
|
Art POOL = getArt("pool");
|
||||||
|
|
||||||
|
Art PRAIRIE_RIDE = getArt("prairie_ride");
|
||||||
|
|
||||||
|
Art SEA = getArt("sea");
|
||||||
|
|
||||||
|
Art SKELETON = getArt("skeleton");
|
||||||
|
|
||||||
|
Art SKULL_AND_ROSES = getArt("skull_and_roses");
|
||||||
|
|
||||||
|
Art STAGE = getArt("stage");
|
||||||
|
|
||||||
Art SUNFLOWERS = getArt("sunflowers");
|
Art SUNFLOWERS = getArt("sunflowers");
|
||||||
|
|
||||||
|
Art SUNSET = getArt("sunset");
|
||||||
|
|
||||||
Art TIDES = getArt("tides");
|
Art TIDES = getArt("tides");
|
||||||
|
|
||||||
|
Art UNPACKED = getArt("unpacked");
|
||||||
|
|
||||||
|
Art VOID = getArt("void");
|
||||||
|
|
||||||
|
Art WANDERER = getArt("wanderer");
|
||||||
|
|
||||||
|
Art WASTELAND = getArt("wasteland");
|
||||||
|
|
||||||
|
Art WATER = getArt("water");
|
||||||
|
|
||||||
|
Art WIND = getArt("wind");
|
||||||
|
|
||||||
|
Art WITHER = getArt("wither");
|
||||||
|
// End generate - Art
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
private static Art getArt(@NotNull String key) {
|
private static Art getArt(@NotNull String key) {
|
||||||
return RegistryAccess.registryAccess().getRegistry(RegistryKey.PAINTING_VARIANT).getOrThrow(NamespacedKey.minecraft(key));
|
return RegistryAccess.registryAccess().getRegistry(RegistryKey.PAINTING_VARIANT).getOrThrow(NamespacedKey.minecraft(key));
|
||||||
|
@ -14,19 +14,19 @@ import org.jetbrains.annotations.ApiStatus;
|
|||||||
*/
|
*/
|
||||||
public interface FeatureFlag extends Keyed {
|
public interface FeatureFlag extends Keyed {
|
||||||
|
|
||||||
// Paper start - overhaul FeatureFlag API
|
// Start generate - FeatureFlag
|
||||||
/**
|
// @GeneratedFrom 1.21.4
|
||||||
* The {@code vanilla} feature flag.
|
@ApiStatus.Experimental
|
||||||
*/
|
FeatureFlag MINECART_IMPROVEMENTS = create("minecart_improvements");
|
||||||
FeatureFlag VANILLA = create("vanilla");
|
|
||||||
|
|
||||||
/**
|
@ApiStatus.Experimental
|
||||||
* <strong>AVAILABLE BETWEEN VERSIONS:</strong> 1.19.3 - 1.21.1
|
FeatureFlag REDSTONE_EXPERIMENTS = create("redstone_experiments");
|
||||||
*
|
|
||||||
* @deprecated not available since 1.21.2
|
@ApiStatus.Experimental
|
||||||
*/
|
FeatureFlag TRADE_REBALANCE = create("trade_rebalance");
|
||||||
@Deprecated(since = "1.21.2")
|
|
||||||
FeatureFlag BUNDLE = deprecated("bundle");
|
FeatureFlag VANILLA = create("vanilla");
|
||||||
|
// End generate - FeatureFlag
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <strong>AVAILABLE BETWEEN VERSIONS:</strong> 1.19 - 1.19.4
|
* <strong>AVAILABLE BETWEEN VERSIONS:</strong> 1.19 - 1.19.4
|
||||||
@ -37,9 +37,6 @@ public interface FeatureFlag extends Keyed {
|
|||||||
@Deprecated(since = "1.20")
|
@Deprecated(since = "1.20")
|
||||||
FeatureFlag UPDATE_1_20 = deprecated("update_1_20");
|
FeatureFlag UPDATE_1_20 = deprecated("update_1_20");
|
||||||
|
|
||||||
@ApiStatus.Experimental // Paper - add missing annotation
|
|
||||||
FeatureFlag TRADE_REBALANCE = create("trade_rebalance");
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <strong>AVAILABLE BETWEEN VERSIONS:</strong> 1.20.5 - 1.20.6
|
* <strong>AVAILABLE BETWEEN VERSIONS:</strong> 1.20.5 - 1.20.6
|
||||||
*
|
*
|
||||||
@ -48,6 +45,14 @@ public interface FeatureFlag extends Keyed {
|
|||||||
@Deprecated(since = "1.21")
|
@Deprecated(since = "1.21")
|
||||||
FeatureFlag UPDATE_121 = deprecated("update_1_21");
|
FeatureFlag UPDATE_121 = deprecated("update_1_21");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <strong>AVAILABLE BETWEEN VERSIONS:</strong> 1.19.3 - 1.21.1
|
||||||
|
*
|
||||||
|
* @deprecated not available since 1.21.2
|
||||||
|
*/
|
||||||
|
@Deprecated(since = "1.21.2")
|
||||||
|
FeatureFlag BUNDLE = deprecated("bundle");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <strong>AVAILABLE BETWEEN VERSIONS:</strong> 1.21.2 - 1.21.3
|
* <strong>AVAILABLE BETWEEN VERSIONS:</strong> 1.21.2 - 1.21.3
|
||||||
*
|
*
|
||||||
@ -56,12 +61,6 @@ public interface FeatureFlag extends Keyed {
|
|||||||
@Deprecated(since = "1.21.4")
|
@Deprecated(since = "1.21.4")
|
||||||
FeatureFlag WINTER_DROP = deprecated("winter_drop");
|
FeatureFlag WINTER_DROP = deprecated("winter_drop");
|
||||||
|
|
||||||
@ApiStatus.Experimental // Paper - add missing annotation
|
|
||||||
FeatureFlag REDSTONE_EXPERIMENTS = create("redstone_experiments");
|
|
||||||
|
|
||||||
@ApiStatus.Experimental // Paper - add missing annotation
|
|
||||||
FeatureFlag MINECART_IMPROVEMENTS = create("minecart_improvements");
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An index of all feature flags.
|
* An index of all feature flags.
|
||||||
*/
|
*/
|
||||||
|
@ -12,27 +12,19 @@ import org.jetbrains.annotations.NotNull;
|
|||||||
*/
|
*/
|
||||||
public interface Fluid extends OldEnum<Fluid>, Keyed {
|
public interface Fluid extends OldEnum<Fluid>, Keyed {
|
||||||
|
|
||||||
/**
|
// Start generate - Fluid
|
||||||
* No fluid.
|
// @GeneratedFrom 1.21.4
|
||||||
*/
|
|
||||||
Fluid EMPTY = getFluid("empty");
|
Fluid EMPTY = getFluid("empty");
|
||||||
/**
|
|
||||||
* Stationary water.
|
|
||||||
*/
|
|
||||||
Fluid WATER = getFluid("water");
|
|
||||||
/**
|
|
||||||
* Flowing water.
|
|
||||||
*/
|
|
||||||
Fluid FLOWING_WATER = getFluid("flowing_water");
|
|
||||||
/**
|
|
||||||
* Stationary lava.
|
|
||||||
*/
|
|
||||||
Fluid LAVA = getFluid("lava");
|
|
||||||
/**
|
|
||||||
* Flowing lava.
|
|
||||||
*/
|
|
||||||
Fluid FLOWING_LAVA = getFluid("flowing_lava");
|
Fluid FLOWING_LAVA = getFluid("flowing_lava");
|
||||||
|
|
||||||
|
Fluid FLOWING_WATER = getFluid("flowing_water");
|
||||||
|
|
||||||
|
Fluid LAVA = getFluid("lava");
|
||||||
|
|
||||||
|
Fluid WATER = getFluid("water");
|
||||||
|
// End generate - Fluid
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
private static Fluid getFluid(@NotNull String key) {
|
private static Fluid getFluid(@NotNull String key) {
|
||||||
return Registry.FLUID.getOrThrow(NamespacedKey.minecraft(key));
|
return Registry.FLUID.getOrThrow(NamespacedKey.minecraft(key));
|
||||||
|
@ -11,107 +11,229 @@ import org.jetbrains.annotations.Nullable;
|
|||||||
*/
|
*/
|
||||||
public abstract class GameEvent implements Keyed {
|
public abstract class GameEvent implements Keyed {
|
||||||
|
|
||||||
|
// Start generate - GameEvent
|
||||||
|
// @GeneratedFrom 1.21.4
|
||||||
public static final GameEvent BLOCK_ACTIVATE = getEvent("block_activate");
|
public static final GameEvent BLOCK_ACTIVATE = getEvent("block_activate");
|
||||||
|
|
||||||
public static final GameEvent BLOCK_ATTACH = getEvent("block_attach");
|
public static final GameEvent BLOCK_ATTACH = getEvent("block_attach");
|
||||||
|
|
||||||
public static final GameEvent BLOCK_CHANGE = getEvent("block_change");
|
public static final GameEvent BLOCK_CHANGE = getEvent("block_change");
|
||||||
|
|
||||||
public static final GameEvent BLOCK_CLOSE = getEvent("block_close");
|
public static final GameEvent BLOCK_CLOSE = getEvent("block_close");
|
||||||
|
|
||||||
public static final GameEvent BLOCK_DEACTIVATE = getEvent("block_deactivate");
|
public static final GameEvent BLOCK_DEACTIVATE = getEvent("block_deactivate");
|
||||||
|
|
||||||
public static final GameEvent BLOCK_DESTROY = getEvent("block_destroy");
|
public static final GameEvent BLOCK_DESTROY = getEvent("block_destroy");
|
||||||
|
|
||||||
public static final GameEvent BLOCK_DETACH = getEvent("block_detach");
|
public static final GameEvent BLOCK_DETACH = getEvent("block_detach");
|
||||||
|
|
||||||
public static final GameEvent BLOCK_OPEN = getEvent("block_open");
|
public static final GameEvent BLOCK_OPEN = getEvent("block_open");
|
||||||
|
|
||||||
public static final GameEvent BLOCK_PLACE = getEvent("block_place");
|
public static final GameEvent BLOCK_PLACE = getEvent("block_place");
|
||||||
@Deprecated(since = "1.19")
|
|
||||||
public static final GameEvent BLOCK_PRESS = getEvent("block_activate");
|
|
||||||
@Deprecated(since = "1.19")
|
|
||||||
public static final GameEvent BLOCK_SWITCH = getEvent("block_activate");
|
|
||||||
@Deprecated(since = "1.19")
|
|
||||||
public static final GameEvent BLOCK_UNPRESS = getEvent("block_deactivate");
|
|
||||||
@Deprecated(since = "1.19")
|
|
||||||
public static final GameEvent BLOCK_UNSWITCH = getEvent("block_deactivate");
|
|
||||||
public static final GameEvent CONTAINER_CLOSE = getEvent("container_close");
|
public static final GameEvent CONTAINER_CLOSE = getEvent("container_close");
|
||||||
|
|
||||||
public static final GameEvent CONTAINER_OPEN = getEvent("container_open");
|
public static final GameEvent CONTAINER_OPEN = getEvent("container_open");
|
||||||
@Deprecated(since = "1.20")
|
|
||||||
public static final GameEvent DISPENSE_FAIL = getEvent("block_activate");
|
|
||||||
public static final GameEvent DRINK = getEvent("drink");
|
public static final GameEvent DRINK = getEvent("drink");
|
||||||
@Deprecated(since = "1.19")
|
|
||||||
public static final GameEvent DRINKING_FINISH = getEvent("drink");
|
|
||||||
public static final GameEvent EAT = getEvent("eat");
|
public static final GameEvent EAT = getEvent("eat");
|
||||||
@Deprecated(since = "1.19")
|
|
||||||
public static final GameEvent ELYTRA_FREE_FALL = getEvent("elytra_glide");
|
|
||||||
public static final GameEvent ELYTRA_GLIDE = getEvent("elytra_glide");
|
public static final GameEvent ELYTRA_GLIDE = getEvent("elytra_glide");
|
||||||
public static final GameEvent ENTITY_DAMAGE = getEvent("entity_damage");
|
|
||||||
@Deprecated(since = "1.19")
|
|
||||||
public static final GameEvent ENTITY_DAMAGED = getEvent("entity_damage");
|
|
||||||
public static final GameEvent ENTITY_DIE = getEvent("entity_die");
|
|
||||||
public static final GameEvent ENTITY_DISMOUNT = getEvent("entity_dismount");
|
|
||||||
@Deprecated(since = "1.19")
|
|
||||||
public static final GameEvent ENTITY_DYING = getEvent("entity_die");
|
|
||||||
public static final GameEvent ENTITY_INTERACT = getEvent("entity_interact");
|
|
||||||
public static final GameEvent ENTITY_MOUNT = getEvent("entity_mount");
|
|
||||||
@Deprecated(since = "1.19")
|
|
||||||
public static final GameEvent ENTITY_KILLED = getEvent("entity_die");
|
|
||||||
public static final GameEvent ENTITY_PLACE = getEvent("entity_place");
|
|
||||||
public static final GameEvent ENTITY_ACTION = getEvent("entity_action");
|
public static final GameEvent ENTITY_ACTION = getEvent("entity_action");
|
||||||
@Deprecated(since = "1.20.2")
|
|
||||||
public static final GameEvent ENTITY_ROAR = getEvent("entity_action");
|
public static final GameEvent ENTITY_DAMAGE = getEvent("entity_damage");
|
||||||
@Deprecated(since = "1.20.2")
|
|
||||||
public static final GameEvent ENTITY_SHAKE = getEvent("entity_action");
|
public static final GameEvent ENTITY_DIE = getEvent("entity_die");
|
||||||
|
|
||||||
|
public static final GameEvent ENTITY_DISMOUNT = getEvent("entity_dismount");
|
||||||
|
|
||||||
|
public static final GameEvent ENTITY_INTERACT = getEvent("entity_interact");
|
||||||
|
|
||||||
|
public static final GameEvent ENTITY_MOUNT = getEvent("entity_mount");
|
||||||
|
|
||||||
|
public static final GameEvent ENTITY_PLACE = getEvent("entity_place");
|
||||||
|
|
||||||
public static final GameEvent EQUIP = getEvent("equip");
|
public static final GameEvent EQUIP = getEvent("equip");
|
||||||
|
|
||||||
public static final GameEvent EXPLODE = getEvent("explode");
|
public static final GameEvent EXPLODE = getEvent("explode");
|
||||||
|
|
||||||
public static final GameEvent FLAP = getEvent("flap");
|
public static final GameEvent FLAP = getEvent("flap");
|
||||||
|
|
||||||
public static final GameEvent FLUID_PICKUP = getEvent("fluid_pickup");
|
public static final GameEvent FLUID_PICKUP = getEvent("fluid_pickup");
|
||||||
|
|
||||||
public static final GameEvent FLUID_PLACE = getEvent("fluid_place");
|
public static final GameEvent FLUID_PLACE = getEvent("fluid_place");
|
||||||
|
|
||||||
public static final GameEvent HIT_GROUND = getEvent("hit_ground");
|
public static final GameEvent HIT_GROUND = getEvent("hit_ground");
|
||||||
|
|
||||||
public static final GameEvent INSTRUMENT_PLAY = getEvent("instrument_play");
|
public static final GameEvent INSTRUMENT_PLAY = getEvent("instrument_play");
|
||||||
|
|
||||||
public static final GameEvent ITEM_INTERACT_FINISH = getEvent("item_interact_finish");
|
public static final GameEvent ITEM_INTERACT_FINISH = getEvent("item_interact_finish");
|
||||||
|
|
||||||
public static final GameEvent ITEM_INTERACT_START = getEvent("item_interact_start");
|
public static final GameEvent ITEM_INTERACT_START = getEvent("item_interact_start");
|
||||||
|
|
||||||
public static final GameEvent JUKEBOX_PLAY = getEvent("jukebox_play");
|
public static final GameEvent JUKEBOX_PLAY = getEvent("jukebox_play");
|
||||||
|
|
||||||
public static final GameEvent JUKEBOX_STOP_PLAY = getEvent("jukebox_stop_play");
|
public static final GameEvent JUKEBOX_STOP_PLAY = getEvent("jukebox_stop_play");
|
||||||
|
|
||||||
public static final GameEvent LIGHTNING_STRIKE = getEvent("lightning_strike");
|
public static final GameEvent LIGHTNING_STRIKE = getEvent("lightning_strike");
|
||||||
@Deprecated(since = "1.19")
|
|
||||||
public static final GameEvent MOB_INTERACT = getEvent("entity_interact");
|
|
||||||
public static final GameEvent NOTE_BLOCK_PLAY = getEvent("note_block_play");
|
public static final GameEvent NOTE_BLOCK_PLAY = getEvent("note_block_play");
|
||||||
@Deprecated(since = "1.20")
|
|
||||||
public static final GameEvent PISTON_CONTRACT = getEvent("block_deactivate");
|
|
||||||
@Deprecated(since = "1.20")
|
|
||||||
public static final GameEvent PISTON_EXTEND = getEvent("block_activate");
|
|
||||||
public static final GameEvent PRIME_FUSE = getEvent("prime_fuse");
|
public static final GameEvent PRIME_FUSE = getEvent("prime_fuse");
|
||||||
|
|
||||||
public static final GameEvent PROJECTILE_LAND = getEvent("projectile_land");
|
public static final GameEvent PROJECTILE_LAND = getEvent("projectile_land");
|
||||||
|
|
||||||
public static final GameEvent PROJECTILE_SHOOT = getEvent("projectile_shoot");
|
public static final GameEvent PROJECTILE_SHOOT = getEvent("projectile_shoot");
|
||||||
@Deprecated(since = "1.19")
|
|
||||||
public static final GameEvent RAVAGER_ROAR = getEvent("entity_action");
|
|
||||||
@Deprecated(since = "1.19")
|
|
||||||
public static final GameEvent RING_BELL = getEvent("block_change");
|
|
||||||
public static final GameEvent SCULK_SENSOR_TENDRILS_CLICKING = getEvent("sculk_sensor_tendrils_clicking");
|
|
||||||
public static final GameEvent SHEAR = getEvent("shear");
|
|
||||||
public static final GameEvent SHRIEK = getEvent("shriek");
|
|
||||||
@Deprecated(since = "1.19")
|
|
||||||
public static final GameEvent SHULKER_CLOSE = getEvent("container_close");
|
|
||||||
@Deprecated(since = "1.19")
|
|
||||||
public static final GameEvent SHULKER_OPEN = getEvent("container_open");
|
|
||||||
public static final GameEvent SPLASH = getEvent("splash");
|
|
||||||
public static final GameEvent STEP = getEvent("step");
|
|
||||||
public static final GameEvent SWIM = getEvent("swim");
|
|
||||||
public static final GameEvent TELEPORT = getEvent("teleport");
|
|
||||||
public static final GameEvent UNEQUIP = getEvent("unequip");
|
|
||||||
@Deprecated(since = "1.19")
|
|
||||||
public static final GameEvent WOLF_SHAKING = getEvent("entity_action");
|
|
||||||
public static final GameEvent RESONATE_1 = getEvent("resonate_1");
|
public static final GameEvent RESONATE_1 = getEvent("resonate_1");
|
||||||
|
|
||||||
public static final GameEvent RESONATE_2 = getEvent("resonate_2");
|
public static final GameEvent RESONATE_2 = getEvent("resonate_2");
|
||||||
|
|
||||||
public static final GameEvent RESONATE_3 = getEvent("resonate_3");
|
public static final GameEvent RESONATE_3 = getEvent("resonate_3");
|
||||||
|
|
||||||
public static final GameEvent RESONATE_4 = getEvent("resonate_4");
|
public static final GameEvent RESONATE_4 = getEvent("resonate_4");
|
||||||
|
|
||||||
public static final GameEvent RESONATE_5 = getEvent("resonate_5");
|
public static final GameEvent RESONATE_5 = getEvent("resonate_5");
|
||||||
|
|
||||||
public static final GameEvent RESONATE_6 = getEvent("resonate_6");
|
public static final GameEvent RESONATE_6 = getEvent("resonate_6");
|
||||||
|
|
||||||
public static final GameEvent RESONATE_7 = getEvent("resonate_7");
|
public static final GameEvent RESONATE_7 = getEvent("resonate_7");
|
||||||
|
|
||||||
public static final GameEvent RESONATE_8 = getEvent("resonate_8");
|
public static final GameEvent RESONATE_8 = getEvent("resonate_8");
|
||||||
|
|
||||||
public static final GameEvent RESONATE_9 = getEvent("resonate_9");
|
public static final GameEvent RESONATE_9 = getEvent("resonate_9");
|
||||||
|
|
||||||
public static final GameEvent RESONATE_10 = getEvent("resonate_10");
|
public static final GameEvent RESONATE_10 = getEvent("resonate_10");
|
||||||
|
|
||||||
public static final GameEvent RESONATE_11 = getEvent("resonate_11");
|
public static final GameEvent RESONATE_11 = getEvent("resonate_11");
|
||||||
|
|
||||||
public static final GameEvent RESONATE_12 = getEvent("resonate_12");
|
public static final GameEvent RESONATE_12 = getEvent("resonate_12");
|
||||||
|
|
||||||
public static final GameEvent RESONATE_13 = getEvent("resonate_13");
|
public static final GameEvent RESONATE_13 = getEvent("resonate_13");
|
||||||
|
|
||||||
public static final GameEvent RESONATE_14 = getEvent("resonate_14");
|
public static final GameEvent RESONATE_14 = getEvent("resonate_14");
|
||||||
|
|
||||||
public static final GameEvent RESONATE_15 = getEvent("resonate_15");
|
public static final GameEvent RESONATE_15 = getEvent("resonate_15");
|
||||||
|
|
||||||
|
public static final GameEvent SCULK_SENSOR_TENDRILS_CLICKING = getEvent("sculk_sensor_tendrils_clicking");
|
||||||
|
|
||||||
|
public static final GameEvent SHEAR = getEvent("shear");
|
||||||
|
|
||||||
|
public static final GameEvent SHRIEK = getEvent("shriek");
|
||||||
|
|
||||||
|
public static final GameEvent SPLASH = getEvent("splash");
|
||||||
|
|
||||||
|
public static final GameEvent STEP = getEvent("step");
|
||||||
|
|
||||||
|
public static final GameEvent SWIM = getEvent("swim");
|
||||||
|
|
||||||
|
public static final GameEvent TELEPORT = getEvent("teleport");
|
||||||
|
|
||||||
|
public static final GameEvent UNEQUIP = getEvent("unequip");
|
||||||
|
// End generate - GameEvent
|
||||||
|
/**
|
||||||
|
* @deprecated in favor of {@link #BLOCK_ACTIVATE}
|
||||||
|
*/
|
||||||
|
@Deprecated(since = "1.19")
|
||||||
|
public static final GameEvent BLOCK_PRESS = BLOCK_ACTIVATE;
|
||||||
|
/**
|
||||||
|
* @deprecated in favor of {@link #BLOCK_ACTIVATE}
|
||||||
|
*/
|
||||||
|
@Deprecated(since = "1.19")
|
||||||
|
public static final GameEvent BLOCK_SWITCH = BLOCK_ACTIVATE;
|
||||||
|
/**
|
||||||
|
* @deprecated in favor of {@link #BLOCK_DEACTIVATE}
|
||||||
|
*/
|
||||||
|
@Deprecated(since = "1.19")
|
||||||
|
public static final GameEvent BLOCK_UNPRESS = BLOCK_DEACTIVATE;
|
||||||
|
/**
|
||||||
|
* @deprecated in favor of {@link #BLOCK_DEACTIVATE}
|
||||||
|
*/
|
||||||
|
@Deprecated(since = "1.19")
|
||||||
|
public static final GameEvent BLOCK_UNSWITCH = BLOCK_DEACTIVATE;
|
||||||
|
/**
|
||||||
|
* @deprecated in favor of {@link #BLOCK_ACTIVATE}
|
||||||
|
*/
|
||||||
|
@Deprecated(since = "1.20")
|
||||||
|
public static final GameEvent DISPENSE_FAIL = BLOCK_ACTIVATE;
|
||||||
|
/**
|
||||||
|
* @deprecated in favor of {@link #DRINK}
|
||||||
|
*/
|
||||||
|
@Deprecated(since = "1.19")
|
||||||
|
public static final GameEvent DRINKING_FINISH = DRINK;
|
||||||
|
/**
|
||||||
|
* @deprecated in favor of {@link #ELYTRA_GLIDE}
|
||||||
|
*/
|
||||||
|
@Deprecated(since = "1.19")
|
||||||
|
public static final GameEvent ELYTRA_FREE_FALL = ELYTRA_GLIDE;
|
||||||
|
/**
|
||||||
|
* @deprecated in favor of {@link #ENTITY_DAMAGE}
|
||||||
|
*/
|
||||||
|
@Deprecated(since = "1.19")
|
||||||
|
public static final GameEvent ENTITY_DAMAGED = ENTITY_DAMAGE;
|
||||||
|
/**
|
||||||
|
* @deprecated in favor of {@link #ENTITY_DIE}
|
||||||
|
*/
|
||||||
|
@Deprecated(since = "1.19")
|
||||||
|
public static final GameEvent ENTITY_DYING = ENTITY_DIE;
|
||||||
|
/**
|
||||||
|
* @deprecated in favor of {@link #ENTITY_DIE}
|
||||||
|
*/
|
||||||
|
@Deprecated(since = "1.19")
|
||||||
|
public static final GameEvent ENTITY_KILLED = ENTITY_DIE;
|
||||||
|
/**
|
||||||
|
* @deprecated in favor of {@link #ENTITY_ACTION}
|
||||||
|
*/
|
||||||
|
@Deprecated(since = "1.20.2")
|
||||||
|
public static final GameEvent ENTITY_ROAR = ENTITY_ACTION;
|
||||||
|
/**
|
||||||
|
* @deprecated in favor of {@link #ENTITY_ACTION}
|
||||||
|
*/
|
||||||
|
@Deprecated(since = "1.20.2")
|
||||||
|
public static final GameEvent ENTITY_SHAKE = ENTITY_ACTION;
|
||||||
|
/**
|
||||||
|
* @deprecated in favor of {@link #ENTITY_INTERACT}
|
||||||
|
*/
|
||||||
|
@Deprecated(since = "1.19")
|
||||||
|
public static final GameEvent MOB_INTERACT = ENTITY_INTERACT;
|
||||||
|
/**
|
||||||
|
* @deprecated in favor of {@link #BLOCK_DEACTIVATE}
|
||||||
|
*/
|
||||||
|
@Deprecated(since = "1.20")
|
||||||
|
public static final GameEvent PISTON_CONTRACT = BLOCK_DEACTIVATE;
|
||||||
|
/**
|
||||||
|
* @deprecated in favor of {@link #BLOCK_ACTIVATE}
|
||||||
|
*/
|
||||||
|
@Deprecated(since = "1.20")
|
||||||
|
public static final GameEvent PISTON_EXTEND = BLOCK_ACTIVATE;
|
||||||
|
/**
|
||||||
|
* @deprecated in favor of {@link #ENTITY_ACTION}
|
||||||
|
*/
|
||||||
|
@Deprecated(since = "1.19")
|
||||||
|
public static final GameEvent RAVAGER_ROAR = ENTITY_ACTION;
|
||||||
|
/**
|
||||||
|
* @deprecated in favor of {@link #BLOCK_CHANGE}
|
||||||
|
*/
|
||||||
|
@Deprecated(since = "1.19")
|
||||||
|
public static final GameEvent RING_BELL = BLOCK_CHANGE;
|
||||||
|
/**
|
||||||
|
* @deprecated in favor of {@link #CONTAINER_CLOSE}
|
||||||
|
*/
|
||||||
|
@Deprecated(since = "1.19")
|
||||||
|
public static final GameEvent SHULKER_CLOSE = CONTAINER_CLOSE;
|
||||||
|
/**
|
||||||
|
* @deprecated in favor of {@link #CONTAINER_OPEN}
|
||||||
|
*/
|
||||||
|
@Deprecated(since = "1.19")
|
||||||
|
public static final GameEvent SHULKER_OPEN = CONTAINER_OPEN;
|
||||||
|
/**
|
||||||
|
* @deprecated in favor of {@link #ENTITY_ACTION}
|
||||||
|
*/
|
||||||
|
@Deprecated(since = "1.19")
|
||||||
|
public static final GameEvent WOLF_SHAKING = ENTITY_ACTION;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a {@link GameEvent} by a {@link NamespacedKey}.
|
* Returns a {@link GameEvent} by a {@link NamespacedKey}.
|
||||||
*
|
*
|
||||||
|
@ -11,25 +11,46 @@ import org.jetbrains.annotations.NotNull;
|
|||||||
@ApiStatus.Experimental
|
@ApiStatus.Experimental
|
||||||
public interface JukeboxSong extends Keyed, Translatable {
|
public interface JukeboxSong extends Keyed, Translatable {
|
||||||
|
|
||||||
public static final JukeboxSong THIRTEEN = get("13");
|
// Start generate - JukeboxSong
|
||||||
public static final JukeboxSong CAT = get("cat");
|
// @GeneratedFrom 1.21.4
|
||||||
public static final JukeboxSong BLOCKS = get("blocks");
|
JukeboxSong ELEVEN = get("11");
|
||||||
public static final JukeboxSong CHIRP = get("chirp");
|
|
||||||
public static final JukeboxSong FAR = get("far");
|
JukeboxSong THIRTEEN = get("13");
|
||||||
public static final JukeboxSong MALL = get("mall");
|
|
||||||
public static final JukeboxSong MELLOHI = get("mellohi");
|
JukeboxSong FIVE = get("5");
|
||||||
public static final JukeboxSong STAL = get("stal");
|
|
||||||
public static final JukeboxSong STRAD = get("strad");
|
JukeboxSong BLOCKS = get("blocks");
|
||||||
public static final JukeboxSong WARD = get("ward");
|
|
||||||
public static final JukeboxSong ELEVEN = get("11");
|
JukeboxSong CAT = get("cat");
|
||||||
public static final JukeboxSong WAIT = get("wait");
|
|
||||||
public static final JukeboxSong PIGSTEP = get("pigstep");
|
JukeboxSong CHIRP = get("chirp");
|
||||||
public static final JukeboxSong OTHERSIDE = get("otherside");
|
|
||||||
public static final JukeboxSong FIVE = get("5");
|
JukeboxSong CREATOR = get("creator");
|
||||||
public static final JukeboxSong RELIC = get("relic");
|
|
||||||
public static final JukeboxSong PRECIPICE = get("precipice");
|
JukeboxSong CREATOR_MUSIC_BOX = get("creator_music_box");
|
||||||
public static final JukeboxSong CREATOR = get("creator");
|
|
||||||
public static final JukeboxSong CREATOR_MUSIC_BOX = get("creator_music_box");
|
JukeboxSong FAR = get("far");
|
||||||
|
|
||||||
|
JukeboxSong MALL = get("mall");
|
||||||
|
|
||||||
|
JukeboxSong MELLOHI = get("mellohi");
|
||||||
|
|
||||||
|
JukeboxSong OTHERSIDE = get("otherside");
|
||||||
|
|
||||||
|
JukeboxSong PIGSTEP = get("pigstep");
|
||||||
|
|
||||||
|
JukeboxSong PRECIPICE = get("precipice");
|
||||||
|
|
||||||
|
JukeboxSong RELIC = get("relic");
|
||||||
|
|
||||||
|
JukeboxSong STAL = get("stal");
|
||||||
|
|
||||||
|
JukeboxSong STRAD = get("strad");
|
||||||
|
|
||||||
|
JukeboxSong WAIT = get("wait");
|
||||||
|
|
||||||
|
JukeboxSong WARD = get("ward");
|
||||||
|
// End generate - JukeboxSong
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
private static JukeboxSong get(@NotNull String key) {
|
private static JukeboxSong get(@NotNull String key) {
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -10,15 +10,25 @@ import org.jetbrains.annotations.Nullable;
|
|||||||
|
|
||||||
public abstract class MusicInstrument implements Keyed, net.kyori.adventure.translation.Translatable { // Paper - translation keys
|
public abstract class MusicInstrument implements Keyed, net.kyori.adventure.translation.Translatable { // Paper - translation keys
|
||||||
|
|
||||||
public static final MusicInstrument PONDER_GOAT_HORN = getInstrument("ponder_goat_horn");
|
// Start generate - MusicInstrument
|
||||||
public static final MusicInstrument SING_GOAT_HORN = getInstrument("sing_goat_horn");
|
// @GeneratedFrom 1.21.4
|
||||||
public static final MusicInstrument SEEK_GOAT_HORN = getInstrument("seek_goat_horn");
|
|
||||||
public static final MusicInstrument FEEL_GOAT_HORN = getInstrument("feel_goat_horn");
|
|
||||||
public static final MusicInstrument ADMIRE_GOAT_HORN = getInstrument("admire_goat_horn");
|
public static final MusicInstrument ADMIRE_GOAT_HORN = getInstrument("admire_goat_horn");
|
||||||
|
|
||||||
public static final MusicInstrument CALL_GOAT_HORN = getInstrument("call_goat_horn");
|
public static final MusicInstrument CALL_GOAT_HORN = getInstrument("call_goat_horn");
|
||||||
public static final MusicInstrument YEARN_GOAT_HORN = getInstrument("yearn_goat_horn");
|
|
||||||
public static final MusicInstrument DREAM_GOAT_HORN = getInstrument("dream_goat_horn");
|
public static final MusicInstrument DREAM_GOAT_HORN = getInstrument("dream_goat_horn");
|
||||||
|
|
||||||
|
public static final MusicInstrument FEEL_GOAT_HORN = getInstrument("feel_goat_horn");
|
||||||
|
|
||||||
|
public static final MusicInstrument PONDER_GOAT_HORN = getInstrument("ponder_goat_horn");
|
||||||
|
|
||||||
|
public static final MusicInstrument SEEK_GOAT_HORN = getInstrument("seek_goat_horn");
|
||||||
|
|
||||||
|
public static final MusicInstrument SING_GOAT_HORN = getInstrument("sing_goat_horn");
|
||||||
|
|
||||||
|
public static final MusicInstrument YEARN_GOAT_HORN = getInstrument("yearn_goat_horn");
|
||||||
|
// End generate - MusicInstrument
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a {@link MusicInstrument} by a {@link NamespacedKey}.
|
* Returns a {@link MusicInstrument} by a {@link NamespacedKey}.
|
||||||
*
|
*
|
||||||
|
@ -291,15 +291,15 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
|||||||
*
|
*
|
||||||
* @see MemoryKey
|
* @see MemoryKey
|
||||||
*/
|
*/
|
||||||
Registry<MemoryKey> MEMORY_MODULE_TYPE = new NotARegistry<>() {
|
Registry<MemoryKey<?>> MEMORY_MODULE_TYPE = new NotARegistry<>() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Iterator iterator() {
|
public Iterator<MemoryKey<?>> iterator() {
|
||||||
return MemoryKey.values().iterator();
|
return MemoryKey.values().iterator();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public @Nullable MemoryKey get(final NamespacedKey key) {
|
public @Nullable MemoryKey<?> get(final NamespacedKey key) {
|
||||||
return MemoryKey.getByKey(key);
|
return MemoryKey.getByKey(key);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -7,92 +7,95 @@ import org.jetbrains.annotations.NotNull;
|
|||||||
* Represents a countable statistic, which is tracked by the server.
|
* Represents a countable statistic, which is tracked by the server.
|
||||||
*/
|
*/
|
||||||
public enum Statistic implements Keyed {
|
public enum Statistic implements Keyed {
|
||||||
DAMAGE_DEALT,
|
// Start generate - StatisticCustom
|
||||||
DAMAGE_TAKEN,
|
// @GeneratedFrom 1.21.4
|
||||||
DEATHS,
|
|
||||||
MOB_KILLS,
|
|
||||||
PLAYER_KILLS,
|
|
||||||
FISH_CAUGHT,
|
|
||||||
ANIMALS_BRED,
|
ANIMALS_BRED,
|
||||||
LEAVE_GAME,
|
|
||||||
JUMP,
|
|
||||||
DROP_COUNT,
|
|
||||||
DROP(Type.ITEM),
|
|
||||||
PICKUP(Type.ITEM),
|
|
||||||
/**
|
|
||||||
* Name is misleading, actually records ticks played.
|
|
||||||
*/
|
|
||||||
PLAY_ONE_MINUTE,
|
|
||||||
TOTAL_WORLD_TIME,
|
|
||||||
WALK_ONE_CM,
|
|
||||||
WALK_ON_WATER_ONE_CM,
|
|
||||||
FALL_ONE_CM,
|
|
||||||
SNEAK_TIME,
|
|
||||||
CLIMB_ONE_CM,
|
|
||||||
FLY_ONE_CM,
|
|
||||||
WALK_UNDER_WATER_ONE_CM,
|
|
||||||
MINECART_ONE_CM,
|
|
||||||
BOAT_ONE_CM,
|
|
||||||
PIG_ONE_CM,
|
|
||||||
HORSE_ONE_CM,
|
|
||||||
SPRINT_ONE_CM,
|
|
||||||
CROUCH_ONE_CM,
|
|
||||||
AVIATE_ONE_CM,
|
AVIATE_ONE_CM,
|
||||||
MINE_BLOCK(Type.BLOCK),
|
BELL_RING,
|
||||||
USE_ITEM(Type.ITEM),
|
BOAT_ONE_CM,
|
||||||
BREAK_ITEM(Type.ITEM),
|
|
||||||
CRAFT_ITEM(Type.ITEM),
|
|
||||||
KILL_ENTITY(Type.ENTITY),
|
|
||||||
ENTITY_KILLED_BY(Type.ENTITY),
|
|
||||||
TIME_SINCE_DEATH,
|
|
||||||
TALKED_TO_VILLAGER,
|
|
||||||
TRADED_WITH_VILLAGER,
|
|
||||||
CAKE_SLICES_EATEN,
|
|
||||||
CAULDRON_FILLED,
|
|
||||||
CAULDRON_USED,
|
|
||||||
ARMOR_CLEANED,
|
ARMOR_CLEANED,
|
||||||
BANNER_CLEANED,
|
BANNER_CLEANED,
|
||||||
BREWINGSTAND_INTERACTION,
|
CLEAN_SHULKER_BOX,
|
||||||
BEACON_INTERACTION,
|
CLIMB_ONE_CM,
|
||||||
DROPPER_INSPECTED,
|
CROUCH_ONE_CM,
|
||||||
HOPPER_INSPECTED,
|
DAMAGE_ABSORBED,
|
||||||
DISPENSER_INSPECTED,
|
DAMAGE_BLOCKED_BY_SHIELD,
|
||||||
NOTEBLOCK_PLAYED,
|
DAMAGE_DEALT,
|
||||||
NOTEBLOCK_TUNED,
|
|
||||||
FLOWER_POTTED,
|
|
||||||
TRAPPED_CHEST_TRIGGERED,
|
|
||||||
ENDERCHEST_OPENED,
|
|
||||||
ITEM_ENCHANTED,
|
|
||||||
RECORD_PLAYED,
|
|
||||||
FURNACE_INTERACTION,
|
|
||||||
CRAFTING_TABLE_INTERACTION,
|
|
||||||
CHEST_OPENED,
|
|
||||||
SLEEP_IN_BED,
|
|
||||||
SHULKER_BOX_OPENED,
|
|
||||||
TIME_SINCE_REST,
|
|
||||||
SWIM_ONE_CM,
|
|
||||||
DAMAGE_DEALT_ABSORBED,
|
DAMAGE_DEALT_ABSORBED,
|
||||||
DAMAGE_DEALT_RESISTED,
|
DAMAGE_DEALT_RESISTED,
|
||||||
DAMAGE_BLOCKED_BY_SHIELD,
|
|
||||||
DAMAGE_ABSORBED,
|
|
||||||
DAMAGE_RESISTED,
|
DAMAGE_RESISTED,
|
||||||
CLEAN_SHULKER_BOX,
|
DAMAGE_TAKEN,
|
||||||
OPEN_BARREL,
|
DEATHS,
|
||||||
|
DROP_COUNT,
|
||||||
|
CAKE_SLICES_EATEN,
|
||||||
|
ITEM_ENCHANTED,
|
||||||
|
FALL_ONE_CM,
|
||||||
|
CAULDRON_FILLED,
|
||||||
|
FISH_CAUGHT,
|
||||||
|
FLY_ONE_CM,
|
||||||
|
HORSE_ONE_CM,
|
||||||
|
DISPENSER_INSPECTED,
|
||||||
|
DROPPER_INSPECTED,
|
||||||
|
HOPPER_INSPECTED,
|
||||||
|
INTERACT_WITH_ANVIL,
|
||||||
|
BEACON_INTERACTION,
|
||||||
INTERACT_WITH_BLAST_FURNACE,
|
INTERACT_WITH_BLAST_FURNACE,
|
||||||
INTERACT_WITH_SMOKER,
|
BREWINGSTAND_INTERACTION,
|
||||||
INTERACT_WITH_LECTERN,
|
|
||||||
INTERACT_WITH_CAMPFIRE,
|
INTERACT_WITH_CAMPFIRE,
|
||||||
INTERACT_WITH_CARTOGRAPHY_TABLE,
|
INTERACT_WITH_CARTOGRAPHY_TABLE,
|
||||||
|
CRAFTING_TABLE_INTERACTION,
|
||||||
|
FURNACE_INTERACTION,
|
||||||
|
INTERACT_WITH_GRINDSTONE,
|
||||||
|
INTERACT_WITH_LECTERN,
|
||||||
INTERACT_WITH_LOOM,
|
INTERACT_WITH_LOOM,
|
||||||
|
INTERACT_WITH_SMITHING_TABLE,
|
||||||
|
INTERACT_WITH_SMOKER,
|
||||||
INTERACT_WITH_STONECUTTER,
|
INTERACT_WITH_STONECUTTER,
|
||||||
BELL_RING,
|
JUMP,
|
||||||
|
LEAVE_GAME,
|
||||||
|
MINECART_ONE_CM,
|
||||||
|
MOB_KILLS,
|
||||||
|
OPEN_BARREL,
|
||||||
|
CHEST_OPENED,
|
||||||
|
ENDERCHEST_OPENED,
|
||||||
|
SHULKER_BOX_OPENED,
|
||||||
|
PIG_ONE_CM,
|
||||||
|
NOTEBLOCK_PLAYED,
|
||||||
|
RECORD_PLAYED,
|
||||||
|
PLAY_ONE_MINUTE,
|
||||||
|
PLAYER_KILLS,
|
||||||
|
FLOWER_POTTED,
|
||||||
RAID_TRIGGER,
|
RAID_TRIGGER,
|
||||||
RAID_WIN,
|
RAID_WIN,
|
||||||
INTERACT_WITH_ANVIL,
|
SLEEP_IN_BED,
|
||||||
INTERACT_WITH_GRINDSTONE,
|
SNEAK_TIME,
|
||||||
|
SPRINT_ONE_CM,
|
||||||
|
STRIDER_ONE_CM,
|
||||||
|
SWIM_ONE_CM,
|
||||||
|
TALKED_TO_VILLAGER,
|
||||||
TARGET_HIT,
|
TARGET_HIT,
|
||||||
INTERACT_WITH_SMITHING_TABLE,
|
TIME_SINCE_DEATH,
|
||||||
STRIDER_ONE_CM;
|
TIME_SINCE_REST,
|
||||||
|
TOTAL_WORLD_TIME,
|
||||||
|
TRADED_WITH_VILLAGER,
|
||||||
|
TRAPPED_CHEST_TRIGGERED,
|
||||||
|
NOTEBLOCK_TUNED,
|
||||||
|
CAULDRON_USED,
|
||||||
|
WALK_ON_WATER_ONE_CM,
|
||||||
|
WALK_ONE_CM,
|
||||||
|
WALK_UNDER_WATER_ONE_CM,
|
||||||
|
// End generate - StatisticCustom
|
||||||
|
// Start generate - StatisticType
|
||||||
|
// @GeneratedFrom 1.21.4
|
||||||
|
BREAK_ITEM(Type.ITEM),
|
||||||
|
CRAFT_ITEM(Type.ITEM),
|
||||||
|
DROP(Type.ITEM),
|
||||||
|
KILL_ENTITY(Type.ENTITY),
|
||||||
|
ENTITY_KILLED_BY(Type.ENTITY),
|
||||||
|
MINE_BLOCK(Type.BLOCK),
|
||||||
|
PICKUP(Type.ITEM),
|
||||||
|
USE_ITEM(Type.ITEM);
|
||||||
|
// End generate - StatisticType
|
||||||
|
|
||||||
private final Type type;
|
private final Type type;
|
||||||
private final NamespacedKey key;
|
private final NamespacedKey key;
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -17,135 +17,73 @@ import org.jetbrains.annotations.NotNull;
|
|||||||
*/
|
*/
|
||||||
public interface Attribute extends OldEnum<Attribute>, Keyed, Translatable, net.kyori.adventure.translation.Translatable { // Paper - Adventure translations
|
public interface Attribute extends OldEnum<Attribute>, Keyed, Translatable, net.kyori.adventure.translation.Translatable { // Paper - Adventure translations
|
||||||
|
|
||||||
/**
|
// Start generate - Attribute
|
||||||
* Maximum health of an Entity.
|
// @GeneratedFrom 1.21.4
|
||||||
*/
|
|
||||||
Attribute MAX_HEALTH = getAttribute("max_health");
|
|
||||||
/**
|
|
||||||
* Range at which an Entity will follow others.
|
|
||||||
*/
|
|
||||||
Attribute FOLLOW_RANGE = getAttribute("follow_range");
|
|
||||||
/**
|
|
||||||
* Resistance of an Entity to knockback.
|
|
||||||
*/
|
|
||||||
Attribute KNOCKBACK_RESISTANCE = getAttribute("knockback_resistance");
|
|
||||||
/**
|
|
||||||
* Movement speed of an Entity.
|
|
||||||
*/
|
|
||||||
Attribute MOVEMENT_SPEED = getAttribute("movement_speed");
|
|
||||||
/**
|
|
||||||
* Flying speed of an Entity.
|
|
||||||
*/
|
|
||||||
Attribute FLYING_SPEED = getAttribute("flying_speed");
|
|
||||||
/**
|
|
||||||
* Attack damage of an Entity.
|
|
||||||
*/
|
|
||||||
Attribute ATTACK_DAMAGE = getAttribute("attack_damage");
|
|
||||||
/**
|
|
||||||
* Attack knockback of an Entity.
|
|
||||||
*/
|
|
||||||
Attribute ATTACK_KNOCKBACK = getAttribute("attack_knockback");
|
|
||||||
/**
|
|
||||||
* Attack speed of an Entity.
|
|
||||||
*/
|
|
||||||
Attribute ATTACK_SPEED = getAttribute("attack_speed");
|
|
||||||
/**
|
|
||||||
* Armor bonus of an Entity.
|
|
||||||
*/
|
|
||||||
Attribute ARMOR = getAttribute("armor");
|
Attribute ARMOR = getAttribute("armor");
|
||||||
/**
|
|
||||||
* Armor durability bonus of an Entity.
|
|
||||||
*/
|
|
||||||
Attribute ARMOR_TOUGHNESS = getAttribute("armor_toughness");
|
Attribute ARMOR_TOUGHNESS = getAttribute("armor_toughness");
|
||||||
/**
|
|
||||||
* The fall damage multiplier of an Entity.
|
Attribute ATTACK_DAMAGE = getAttribute("attack_damage");
|
||||||
*/
|
|
||||||
Attribute FALL_DAMAGE_MULTIPLIER = getAttribute("fall_damage_multiplier");
|
Attribute ATTACK_KNOCKBACK = getAttribute("attack_knockback");
|
||||||
/**
|
|
||||||
* Luck bonus of an Entity.
|
Attribute ATTACK_SPEED = getAttribute("attack_speed");
|
||||||
*/
|
|
||||||
Attribute LUCK = getAttribute("luck");
|
|
||||||
/**
|
|
||||||
* Maximum absorption of an Entity.
|
|
||||||
*/
|
|
||||||
Attribute MAX_ABSORPTION = getAttribute("max_absorption");
|
|
||||||
/**
|
|
||||||
* The distance which an Entity can fall without damage.
|
|
||||||
*/
|
|
||||||
Attribute SAFE_FALL_DISTANCE = getAttribute("safe_fall_distance");
|
|
||||||
/**
|
|
||||||
* The relative scale of an Entity.
|
|
||||||
*/
|
|
||||||
Attribute SCALE = getAttribute("scale");
|
|
||||||
/**
|
|
||||||
* The height which an Entity can walk over.
|
|
||||||
*/
|
|
||||||
Attribute STEP_HEIGHT = getAttribute("step_height");
|
|
||||||
/**
|
|
||||||
* The gravity applied to an Entity.
|
|
||||||
*/
|
|
||||||
Attribute GRAVITY = getAttribute("gravity");
|
|
||||||
/**
|
|
||||||
* Strength with which an Entity will jump.
|
|
||||||
*/
|
|
||||||
Attribute JUMP_STRENGTH = getAttribute("jump_strength");
|
|
||||||
/**
|
|
||||||
* How long an entity remains burning after ignition.
|
|
||||||
*/
|
|
||||||
Attribute BURNING_TIME = getAttribute("burning_time");
|
|
||||||
/**
|
|
||||||
* Resistance to knockback from explosions.
|
|
||||||
*/
|
|
||||||
Attribute EXPLOSION_KNOCKBACK_RESISTANCE = getAttribute("explosion_knockback_resistance");
|
|
||||||
/**
|
|
||||||
* Movement speed through difficult terrain.
|
|
||||||
*/
|
|
||||||
Attribute MOVEMENT_EFFICIENCY = getAttribute("movement_efficiency");
|
|
||||||
/**
|
|
||||||
* Oxygen use underwater.
|
|
||||||
*/
|
|
||||||
Attribute OXYGEN_BONUS = getAttribute("oxygen_bonus");
|
|
||||||
/**
|
|
||||||
* Movement speed through water.
|
|
||||||
*/
|
|
||||||
Attribute WATER_MOVEMENT_EFFICIENCY = getAttribute("water_movement_efficiency");
|
|
||||||
/**
|
|
||||||
* Range at which mobs will be tempted by items.
|
|
||||||
*/
|
|
||||||
Attribute TEMPT_RANGE = getAttribute("tempt_range");
|
|
||||||
/**
|
|
||||||
* The block reach distance of a Player.
|
|
||||||
*/
|
|
||||||
Attribute BLOCK_INTERACTION_RANGE = getAttribute("block_interaction_range");
|
|
||||||
/**
|
|
||||||
* The entity reach distance of a Player.
|
|
||||||
*/
|
|
||||||
Attribute ENTITY_INTERACTION_RANGE = getAttribute("entity_interaction_range");
|
|
||||||
/**
|
|
||||||
* Block break speed of a Player.
|
|
||||||
*/
|
|
||||||
Attribute BLOCK_BREAK_SPEED = getAttribute("block_break_speed");
|
Attribute BLOCK_BREAK_SPEED = getAttribute("block_break_speed");
|
||||||
/**
|
|
||||||
* Mining speed for correct tools.
|
Attribute BLOCK_INTERACTION_RANGE = getAttribute("block_interaction_range");
|
||||||
*/
|
|
||||||
|
Attribute BURNING_TIME = getAttribute("burning_time");
|
||||||
|
|
||||||
|
Attribute ENTITY_INTERACTION_RANGE = getAttribute("entity_interaction_range");
|
||||||
|
|
||||||
|
Attribute EXPLOSION_KNOCKBACK_RESISTANCE = getAttribute("explosion_knockback_resistance");
|
||||||
|
|
||||||
|
Attribute FALL_DAMAGE_MULTIPLIER = getAttribute("fall_damage_multiplier");
|
||||||
|
|
||||||
|
Attribute FLYING_SPEED = getAttribute("flying_speed");
|
||||||
|
|
||||||
|
Attribute FOLLOW_RANGE = getAttribute("follow_range");
|
||||||
|
|
||||||
|
Attribute GRAVITY = getAttribute("gravity");
|
||||||
|
|
||||||
|
Attribute JUMP_STRENGTH = getAttribute("jump_strength");
|
||||||
|
|
||||||
|
Attribute KNOCKBACK_RESISTANCE = getAttribute("knockback_resistance");
|
||||||
|
|
||||||
|
Attribute LUCK = getAttribute("luck");
|
||||||
|
|
||||||
|
Attribute MAX_ABSORPTION = getAttribute("max_absorption");
|
||||||
|
|
||||||
|
Attribute MAX_HEALTH = getAttribute("max_health");
|
||||||
|
|
||||||
Attribute MINING_EFFICIENCY = getAttribute("mining_efficiency");
|
Attribute MINING_EFFICIENCY = getAttribute("mining_efficiency");
|
||||||
/**
|
|
||||||
* Sneaking speed.
|
Attribute MOVEMENT_EFFICIENCY = getAttribute("movement_efficiency");
|
||||||
*/
|
|
||||||
|
Attribute MOVEMENT_SPEED = getAttribute("movement_speed");
|
||||||
|
|
||||||
|
Attribute OXYGEN_BONUS = getAttribute("oxygen_bonus");
|
||||||
|
|
||||||
|
Attribute SAFE_FALL_DISTANCE = getAttribute("safe_fall_distance");
|
||||||
|
|
||||||
|
Attribute SCALE = getAttribute("scale");
|
||||||
|
|
||||||
Attribute SNEAKING_SPEED = getAttribute("sneaking_speed");
|
Attribute SNEAKING_SPEED = getAttribute("sneaking_speed");
|
||||||
/**
|
|
||||||
* Underwater mining speed.
|
|
||||||
*/
|
|
||||||
Attribute SUBMERGED_MINING_SPEED = getAttribute("submerged_mining_speed");
|
|
||||||
/**
|
|
||||||
* Sweeping damage.
|
|
||||||
*/
|
|
||||||
Attribute SWEEPING_DAMAGE_RATIO = getAttribute("sweeping_damage_ratio");
|
|
||||||
/**
|
|
||||||
* Chance of a zombie to spawn reinforcements.
|
|
||||||
*/
|
|
||||||
Attribute SPAWN_REINFORCEMENTS = getAttribute("spawn_reinforcements");
|
Attribute SPAWN_REINFORCEMENTS = getAttribute("spawn_reinforcements");
|
||||||
|
|
||||||
|
Attribute STEP_HEIGHT = getAttribute("step_height");
|
||||||
|
|
||||||
|
Attribute SUBMERGED_MINING_SPEED = getAttribute("submerged_mining_speed");
|
||||||
|
|
||||||
|
Attribute SWEEPING_DAMAGE_RATIO = getAttribute("sweeping_damage_ratio");
|
||||||
|
|
||||||
|
Attribute TEMPT_RANGE = getAttribute("tempt_range");
|
||||||
|
|
||||||
|
Attribute WATER_MOVEMENT_EFFICIENCY = getAttribute("water_movement_efficiency");
|
||||||
|
// End generate - Attribute
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
private static Attribute getAttribute(@NotNull String key) {
|
private static Attribute getAttribute(@NotNull String key) {
|
||||||
return Registry.ATTRIBUTE.getOrThrow(NamespacedKey.minecraft(key));
|
return Registry.ATTRIBUTE.getOrThrow(NamespacedKey.minecraft(key));
|
||||||
|
@ -23,72 +23,139 @@ import org.jetbrains.annotations.NotNull;
|
|||||||
*/
|
*/
|
||||||
public interface Biome extends OldEnum<Biome>, Keyed, net.kyori.adventure.translation.Translatable { // Paper - Adventure translations
|
public interface Biome extends OldEnum<Biome>, Keyed, net.kyori.adventure.translation.Translatable { // Paper - Adventure translations
|
||||||
|
|
||||||
Biome OCEAN = getBiome("ocean");
|
// Start generate - Biome
|
||||||
Biome PLAINS = getBiome("plains");
|
// @GeneratedFrom 1.21.4
|
||||||
Biome DESERT = getBiome("desert");
|
|
||||||
Biome WINDSWEPT_HILLS = getBiome("windswept_hills");
|
|
||||||
Biome FOREST = getBiome("forest");
|
|
||||||
Biome TAIGA = getBiome("taiga");
|
|
||||||
Biome SWAMP = getBiome("swamp");
|
|
||||||
Biome MANGROVE_SWAMP = getBiome("mangrove_swamp");
|
|
||||||
Biome RIVER = getBiome("river");
|
|
||||||
Biome NETHER_WASTES = getBiome("nether_wastes");
|
|
||||||
Biome THE_END = getBiome("the_end");
|
|
||||||
Biome FROZEN_OCEAN = getBiome("frozen_ocean");
|
|
||||||
Biome FROZEN_RIVER = getBiome("frozen_river");
|
|
||||||
Biome SNOWY_PLAINS = getBiome("snowy_plains");
|
|
||||||
Biome MUSHROOM_FIELDS = getBiome("mushroom_fields");
|
|
||||||
Biome BEACH = getBiome("beach");
|
|
||||||
Biome JUNGLE = getBiome("jungle");
|
|
||||||
Biome SPARSE_JUNGLE = getBiome("sparse_jungle");
|
|
||||||
Biome DEEP_OCEAN = getBiome("deep_ocean");
|
|
||||||
Biome STONY_SHORE = getBiome("stony_shore");
|
|
||||||
Biome SNOWY_BEACH = getBiome("snowy_beach");
|
|
||||||
Biome BIRCH_FOREST = getBiome("birch_forest");
|
|
||||||
Biome DARK_FOREST = getBiome("dark_forest");
|
|
||||||
Biome PALE_GARDEN = getBiome("pale_garden");
|
|
||||||
Biome SNOWY_TAIGA = getBiome("snowy_taiga");
|
|
||||||
Biome OLD_GROWTH_PINE_TAIGA = getBiome("old_growth_pine_taiga");
|
|
||||||
Biome WINDSWEPT_FOREST = getBiome("windswept_forest");
|
|
||||||
Biome SAVANNA = getBiome("savanna");
|
|
||||||
Biome SAVANNA_PLATEAU = getBiome("savanna_plateau");
|
|
||||||
Biome BADLANDS = getBiome("badlands");
|
Biome BADLANDS = getBiome("badlands");
|
||||||
Biome WOODED_BADLANDS = getBiome("wooded_badlands");
|
|
||||||
Biome SMALL_END_ISLANDS = getBiome("small_end_islands");
|
|
||||||
Biome END_MIDLANDS = getBiome("end_midlands");
|
|
||||||
Biome END_HIGHLANDS = getBiome("end_highlands");
|
|
||||||
Biome END_BARRENS = getBiome("end_barrens");
|
|
||||||
Biome WARM_OCEAN = getBiome("warm_ocean");
|
|
||||||
Biome LUKEWARM_OCEAN = getBiome("lukewarm_ocean");
|
|
||||||
Biome COLD_OCEAN = getBiome("cold_ocean");
|
|
||||||
Biome DEEP_LUKEWARM_OCEAN = getBiome("deep_lukewarm_ocean");
|
|
||||||
Biome DEEP_COLD_OCEAN = getBiome("deep_cold_ocean");
|
|
||||||
Biome DEEP_FROZEN_OCEAN = getBiome("deep_frozen_ocean");
|
|
||||||
Biome THE_VOID = getBiome("the_void");
|
|
||||||
Biome SUNFLOWER_PLAINS = getBiome("sunflower_plains");
|
|
||||||
Biome WINDSWEPT_GRAVELLY_HILLS = getBiome("windswept_gravelly_hills");
|
|
||||||
Biome FLOWER_FOREST = getBiome("flower_forest");
|
|
||||||
Biome ICE_SPIKES = getBiome("ice_spikes");
|
|
||||||
Biome OLD_GROWTH_BIRCH_FOREST = getBiome("old_growth_birch_forest");
|
|
||||||
Biome OLD_GROWTH_SPRUCE_TAIGA = getBiome("old_growth_spruce_taiga");
|
|
||||||
Biome WINDSWEPT_SAVANNA = getBiome("windswept_savanna");
|
|
||||||
Biome ERODED_BADLANDS = getBiome("eroded_badlands");
|
|
||||||
Biome BAMBOO_JUNGLE = getBiome("bamboo_jungle");
|
Biome BAMBOO_JUNGLE = getBiome("bamboo_jungle");
|
||||||
Biome SOUL_SAND_VALLEY = getBiome("soul_sand_valley");
|
|
||||||
Biome CRIMSON_FOREST = getBiome("crimson_forest");
|
|
||||||
Biome WARPED_FOREST = getBiome("warped_forest");
|
|
||||||
Biome BASALT_DELTAS = getBiome("basalt_deltas");
|
Biome BASALT_DELTAS = getBiome("basalt_deltas");
|
||||||
Biome DRIPSTONE_CAVES = getBiome("dripstone_caves");
|
|
||||||
Biome LUSH_CAVES = getBiome("lush_caves");
|
Biome BEACH = getBiome("beach");
|
||||||
Biome DEEP_DARK = getBiome("deep_dark");
|
|
||||||
Biome MEADOW = getBiome("meadow");
|
Biome BIRCH_FOREST = getBiome("birch_forest");
|
||||||
Biome GROVE = getBiome("grove");
|
|
||||||
Biome SNOWY_SLOPES = getBiome("snowy_slopes");
|
|
||||||
Biome FROZEN_PEAKS = getBiome("frozen_peaks");
|
|
||||||
Biome JAGGED_PEAKS = getBiome("jagged_peaks");
|
|
||||||
Biome STONY_PEAKS = getBiome("stony_peaks");
|
|
||||||
Biome CHERRY_GROVE = getBiome("cherry_grove");
|
Biome CHERRY_GROVE = getBiome("cherry_grove");
|
||||||
|
|
||||||
|
Biome COLD_OCEAN = getBiome("cold_ocean");
|
||||||
|
|
||||||
|
Biome CRIMSON_FOREST = getBiome("crimson_forest");
|
||||||
|
|
||||||
|
Biome DARK_FOREST = getBiome("dark_forest");
|
||||||
|
|
||||||
|
Biome DEEP_COLD_OCEAN = getBiome("deep_cold_ocean");
|
||||||
|
|
||||||
|
Biome DEEP_DARK = getBiome("deep_dark");
|
||||||
|
|
||||||
|
Biome DEEP_FROZEN_OCEAN = getBiome("deep_frozen_ocean");
|
||||||
|
|
||||||
|
Biome DEEP_LUKEWARM_OCEAN = getBiome("deep_lukewarm_ocean");
|
||||||
|
|
||||||
|
Biome DEEP_OCEAN = getBiome("deep_ocean");
|
||||||
|
|
||||||
|
Biome DESERT = getBiome("desert");
|
||||||
|
|
||||||
|
Biome DRIPSTONE_CAVES = getBiome("dripstone_caves");
|
||||||
|
|
||||||
|
Biome END_BARRENS = getBiome("end_barrens");
|
||||||
|
|
||||||
|
Biome END_HIGHLANDS = getBiome("end_highlands");
|
||||||
|
|
||||||
|
Biome END_MIDLANDS = getBiome("end_midlands");
|
||||||
|
|
||||||
|
Biome ERODED_BADLANDS = getBiome("eroded_badlands");
|
||||||
|
|
||||||
|
Biome FLOWER_FOREST = getBiome("flower_forest");
|
||||||
|
|
||||||
|
Biome FOREST = getBiome("forest");
|
||||||
|
|
||||||
|
Biome FROZEN_OCEAN = getBiome("frozen_ocean");
|
||||||
|
|
||||||
|
Biome FROZEN_PEAKS = getBiome("frozen_peaks");
|
||||||
|
|
||||||
|
Biome FROZEN_RIVER = getBiome("frozen_river");
|
||||||
|
|
||||||
|
Biome GROVE = getBiome("grove");
|
||||||
|
|
||||||
|
Biome ICE_SPIKES = getBiome("ice_spikes");
|
||||||
|
|
||||||
|
Biome JAGGED_PEAKS = getBiome("jagged_peaks");
|
||||||
|
|
||||||
|
Biome JUNGLE = getBiome("jungle");
|
||||||
|
|
||||||
|
Biome LUKEWARM_OCEAN = getBiome("lukewarm_ocean");
|
||||||
|
|
||||||
|
Biome LUSH_CAVES = getBiome("lush_caves");
|
||||||
|
|
||||||
|
Biome MANGROVE_SWAMP = getBiome("mangrove_swamp");
|
||||||
|
|
||||||
|
Biome MEADOW = getBiome("meadow");
|
||||||
|
|
||||||
|
Biome MUSHROOM_FIELDS = getBiome("mushroom_fields");
|
||||||
|
|
||||||
|
Biome NETHER_WASTES = getBiome("nether_wastes");
|
||||||
|
|
||||||
|
Biome OCEAN = getBiome("ocean");
|
||||||
|
|
||||||
|
Biome OLD_GROWTH_BIRCH_FOREST = getBiome("old_growth_birch_forest");
|
||||||
|
|
||||||
|
Biome OLD_GROWTH_PINE_TAIGA = getBiome("old_growth_pine_taiga");
|
||||||
|
|
||||||
|
Biome OLD_GROWTH_SPRUCE_TAIGA = getBiome("old_growth_spruce_taiga");
|
||||||
|
|
||||||
|
Biome PALE_GARDEN = getBiome("pale_garden");
|
||||||
|
|
||||||
|
Biome PLAINS = getBiome("plains");
|
||||||
|
|
||||||
|
Biome RIVER = getBiome("river");
|
||||||
|
|
||||||
|
Biome SAVANNA = getBiome("savanna");
|
||||||
|
|
||||||
|
Biome SAVANNA_PLATEAU = getBiome("savanna_plateau");
|
||||||
|
|
||||||
|
Biome SMALL_END_ISLANDS = getBiome("small_end_islands");
|
||||||
|
|
||||||
|
Biome SNOWY_BEACH = getBiome("snowy_beach");
|
||||||
|
|
||||||
|
Biome SNOWY_PLAINS = getBiome("snowy_plains");
|
||||||
|
|
||||||
|
Biome SNOWY_SLOPES = getBiome("snowy_slopes");
|
||||||
|
|
||||||
|
Biome SNOWY_TAIGA = getBiome("snowy_taiga");
|
||||||
|
|
||||||
|
Biome SOUL_SAND_VALLEY = getBiome("soul_sand_valley");
|
||||||
|
|
||||||
|
Biome SPARSE_JUNGLE = getBiome("sparse_jungle");
|
||||||
|
|
||||||
|
Biome STONY_PEAKS = getBiome("stony_peaks");
|
||||||
|
|
||||||
|
Biome STONY_SHORE = getBiome("stony_shore");
|
||||||
|
|
||||||
|
Biome SUNFLOWER_PLAINS = getBiome("sunflower_plains");
|
||||||
|
|
||||||
|
Biome SWAMP = getBiome("swamp");
|
||||||
|
|
||||||
|
Biome TAIGA = getBiome("taiga");
|
||||||
|
|
||||||
|
Biome THE_END = getBiome("the_end");
|
||||||
|
|
||||||
|
Biome THE_VOID = getBiome("the_void");
|
||||||
|
|
||||||
|
Biome WARM_OCEAN = getBiome("warm_ocean");
|
||||||
|
|
||||||
|
Biome WARPED_FOREST = getBiome("warped_forest");
|
||||||
|
|
||||||
|
Biome WINDSWEPT_FOREST = getBiome("windswept_forest");
|
||||||
|
|
||||||
|
Biome WINDSWEPT_GRAVELLY_HILLS = getBiome("windswept_gravelly_hills");
|
||||||
|
|
||||||
|
Biome WINDSWEPT_HILLS = getBiome("windswept_hills");
|
||||||
|
|
||||||
|
Biome WINDSWEPT_SAVANNA = getBiome("windswept_savanna");
|
||||||
|
|
||||||
|
Biome WOODED_BADLANDS = getBiome("wooded_badlands");
|
||||||
|
// End generate - Biome
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents a custom Biome
|
* Represents a custom Biome
|
||||||
*
|
*
|
||||||
|
File diff suppressed because it is too large
Load Diff
20
paper-api/src/main/java/org/bukkit/block/Orientation.java
Normal file
20
paper-api/src/main/java/org/bukkit/block/Orientation.java
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
package org.bukkit.block;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Represents the face and the direction of a block
|
||||||
|
*/
|
||||||
|
public enum Orientation {
|
||||||
|
|
||||||
|
DOWN_EAST,
|
||||||
|
DOWN_NORTH,
|
||||||
|
DOWN_SOUTH,
|
||||||
|
DOWN_WEST,
|
||||||
|
UP_EAST,
|
||||||
|
UP_NORTH,
|
||||||
|
UP_SOUTH,
|
||||||
|
UP_WEST,
|
||||||
|
WEST_UP,
|
||||||
|
EAST_UP,
|
||||||
|
NORTH_UP,
|
||||||
|
SOUTH_UP
|
||||||
|
}
|
@ -14,50 +14,96 @@ import org.jetbrains.annotations.NotNull;
|
|||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
public interface PatternType extends OldEnum<PatternType>, Keyed {
|
public interface PatternType extends OldEnum<PatternType>, Keyed {
|
||||||
|
|
||||||
|
// Start generate - PatternType
|
||||||
|
// @GeneratedFrom 1.21.4
|
||||||
PatternType BASE = getType("base");
|
PatternType BASE = getType("base");
|
||||||
PatternType SQUARE_BOTTOM_LEFT = getType("square_bottom_left");
|
|
||||||
PatternType SQUARE_BOTTOM_RIGHT = getType("square_bottom_right");
|
|
||||||
PatternType SQUARE_TOP_LEFT = getType("square_top_left");
|
|
||||||
PatternType SQUARE_TOP_RIGHT = getType("square_top_right");
|
|
||||||
PatternType STRIPE_BOTTOM = getType("stripe_bottom");
|
|
||||||
PatternType STRIPE_TOP = getType("stripe_top");
|
|
||||||
PatternType STRIPE_LEFT = getType("stripe_left");
|
|
||||||
PatternType STRIPE_RIGHT = getType("stripe_right");
|
|
||||||
PatternType STRIPE_CENTER = getType("stripe_center");
|
|
||||||
PatternType STRIPE_MIDDLE = getType("stripe_middle");
|
|
||||||
PatternType STRIPE_DOWNRIGHT = getType("stripe_downright");
|
|
||||||
PatternType STRIPE_DOWNLEFT = getType("stripe_downleft");
|
|
||||||
PatternType SMALL_STRIPES = getType("small_stripes");
|
|
||||||
PatternType CROSS = getType("cross");
|
|
||||||
PatternType STRAIGHT_CROSS = getType("straight_cross");
|
|
||||||
PatternType TRIANGLE_BOTTOM = getType("triangle_bottom");
|
|
||||||
PatternType TRIANGLE_TOP = getType("triangle_top");
|
|
||||||
PatternType TRIANGLES_BOTTOM = getType("triangles_bottom");
|
|
||||||
PatternType TRIANGLES_TOP = getType("triangles_top");
|
|
||||||
PatternType DIAGONAL_LEFT = getType("diagonal_left");
|
|
||||||
PatternType DIAGONAL_UP_RIGHT = getType("diagonal_up_right");
|
|
||||||
PatternType DIAGONAL_UP_LEFT = getType("diagonal_up_left");
|
|
||||||
PatternType DIAGONAL_RIGHT = getType("diagonal_right");
|
|
||||||
PatternType CIRCLE = getType("circle");
|
|
||||||
PatternType RHOMBUS = getType("rhombus");
|
|
||||||
PatternType HALF_VERTICAL = getType("half_vertical");
|
|
||||||
PatternType HALF_HORIZONTAL = getType("half_horizontal");
|
|
||||||
PatternType HALF_VERTICAL_RIGHT = getType("half_vertical_right");
|
|
||||||
PatternType HALF_HORIZONTAL_BOTTOM = getType("half_horizontal_bottom");
|
|
||||||
PatternType BORDER = getType("border");
|
PatternType BORDER = getType("border");
|
||||||
PatternType CURLY_BORDER = getType("curly_border");
|
|
||||||
PatternType CREEPER = getType("creeper");
|
|
||||||
PatternType GRADIENT = getType("gradient");
|
|
||||||
PatternType GRADIENT_UP = getType("gradient_up");
|
|
||||||
PatternType BRICKS = getType("bricks");
|
PatternType BRICKS = getType("bricks");
|
||||||
PatternType SKULL = getType("skull");
|
|
||||||
PatternType FLOWER = getType("flower");
|
PatternType CIRCLE = getType("circle");
|
||||||
PatternType MOJANG = getType("mojang");
|
|
||||||
PatternType GLOBE = getType("globe");
|
PatternType CREEPER = getType("creeper");
|
||||||
PatternType PIGLIN = getType("piglin");
|
|
||||||
|
PatternType CROSS = getType("cross");
|
||||||
|
|
||||||
|
PatternType CURLY_BORDER = getType("curly_border");
|
||||||
|
|
||||||
|
PatternType DIAGONAL_LEFT = getType("diagonal_left");
|
||||||
|
|
||||||
|
PatternType DIAGONAL_RIGHT = getType("diagonal_right");
|
||||||
|
|
||||||
|
PatternType DIAGONAL_UP_LEFT = getType("diagonal_up_left");
|
||||||
|
|
||||||
|
PatternType DIAGONAL_UP_RIGHT = getType("diagonal_up_right");
|
||||||
|
|
||||||
PatternType FLOW = getType("flow");
|
PatternType FLOW = getType("flow");
|
||||||
|
|
||||||
|
PatternType FLOWER = getType("flower");
|
||||||
|
|
||||||
|
PatternType GLOBE = getType("globe");
|
||||||
|
|
||||||
|
PatternType GRADIENT = getType("gradient");
|
||||||
|
|
||||||
|
PatternType GRADIENT_UP = getType("gradient_up");
|
||||||
|
|
||||||
PatternType GUSTER = getType("guster");
|
PatternType GUSTER = getType("guster");
|
||||||
|
|
||||||
|
PatternType HALF_HORIZONTAL = getType("half_horizontal");
|
||||||
|
|
||||||
|
PatternType HALF_HORIZONTAL_BOTTOM = getType("half_horizontal_bottom");
|
||||||
|
|
||||||
|
PatternType HALF_VERTICAL = getType("half_vertical");
|
||||||
|
|
||||||
|
PatternType HALF_VERTICAL_RIGHT = getType("half_vertical_right");
|
||||||
|
|
||||||
|
PatternType MOJANG = getType("mojang");
|
||||||
|
|
||||||
|
PatternType PIGLIN = getType("piglin");
|
||||||
|
|
||||||
|
PatternType RHOMBUS = getType("rhombus");
|
||||||
|
|
||||||
|
PatternType SKULL = getType("skull");
|
||||||
|
|
||||||
|
PatternType SMALL_STRIPES = getType("small_stripes");
|
||||||
|
|
||||||
|
PatternType SQUARE_BOTTOM_LEFT = getType("square_bottom_left");
|
||||||
|
|
||||||
|
PatternType SQUARE_BOTTOM_RIGHT = getType("square_bottom_right");
|
||||||
|
|
||||||
|
PatternType SQUARE_TOP_LEFT = getType("square_top_left");
|
||||||
|
|
||||||
|
PatternType SQUARE_TOP_RIGHT = getType("square_top_right");
|
||||||
|
|
||||||
|
PatternType STRAIGHT_CROSS = getType("straight_cross");
|
||||||
|
|
||||||
|
PatternType STRIPE_BOTTOM = getType("stripe_bottom");
|
||||||
|
|
||||||
|
PatternType STRIPE_CENTER = getType("stripe_center");
|
||||||
|
|
||||||
|
PatternType STRIPE_DOWNLEFT = getType("stripe_downleft");
|
||||||
|
|
||||||
|
PatternType STRIPE_DOWNRIGHT = getType("stripe_downright");
|
||||||
|
|
||||||
|
PatternType STRIPE_LEFT = getType("stripe_left");
|
||||||
|
|
||||||
|
PatternType STRIPE_MIDDLE = getType("stripe_middle");
|
||||||
|
|
||||||
|
PatternType STRIPE_RIGHT = getType("stripe_right");
|
||||||
|
|
||||||
|
PatternType STRIPE_TOP = getType("stripe_top");
|
||||||
|
|
||||||
|
PatternType TRIANGLE_BOTTOM = getType("triangle_bottom");
|
||||||
|
|
||||||
|
PatternType TRIANGLE_TOP = getType("triangle_top");
|
||||||
|
|
||||||
|
PatternType TRIANGLES_BOTTOM = getType("triangles_bottom");
|
||||||
|
|
||||||
|
PatternType TRIANGLES_TOP = getType("triangles_top");
|
||||||
|
// End generate - PatternType
|
||||||
|
|
||||||
// Paper start - deprecate getKey
|
// Paper start - deprecate getKey
|
||||||
/**
|
/**
|
||||||
* @deprecated use {@link Registry#getKey(Keyed)}, {@link io.papermc.paper.registry.RegistryAccess#getRegistry(io.papermc.paper.registry.RegistryKey)},
|
* @deprecated use {@link Registry#getKey(Keyed)}, {@link io.papermc.paper.registry.RegistryAccess#getRegistry(io.papermc.paper.registry.RegistryKey)},
|
||||||
|
@ -11,8 +11,19 @@ public interface CaveVinesPlant extends BlockData {
|
|||||||
* Gets the value of the 'berries' property.
|
* Gets the value of the 'berries' property.
|
||||||
*
|
*
|
||||||
* @return the 'berries' value
|
* @return the 'berries' value
|
||||||
|
* @deprecated bad name, use {@link #hasBerries()}
|
||||||
*/
|
*/
|
||||||
boolean isBerries();
|
@Deprecated
|
||||||
|
default boolean isBerries() {
|
||||||
|
return this.hasBerries();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the value of the 'berries' property.
|
||||||
|
*
|
||||||
|
* @return the 'berries' value
|
||||||
|
*/
|
||||||
|
boolean hasBerries();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the value of the 'berries' property.
|
* Sets the value of the 'berries' property.
|
||||||
|
@ -48,18 +48,23 @@ public interface Crafter extends BlockData {
|
|||||||
* @return the 'orientation' value
|
* @return the 'orientation' value
|
||||||
*/
|
*/
|
||||||
@NotNull
|
@NotNull
|
||||||
Orientation getOrientation();
|
org.bukkit.block.Orientation getOrientation();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the value of the 'orientation' property.
|
* Sets the value of the 'orientation' property.
|
||||||
*
|
*
|
||||||
* @param orientation the new 'orientation' value
|
* @param orientation the new 'orientation' value
|
||||||
*/
|
*/
|
||||||
void setOrientation(@NotNull Orientation orientation);
|
void setOrientation(@NotNull org.bukkit.block.Orientation orientation);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The directions the Crafter can be oriented.
|
* The directions the Crafter can be oriented.
|
||||||
|
*
|
||||||
|
* @deprecated this property is not specific to the Crafter, use
|
||||||
|
* {@link org.bukkit.block.Orientation} instead. All references
|
||||||
|
* to this enum will be redirected to that enum at runtime.
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
public enum Orientation {
|
public enum Orientation {
|
||||||
|
|
||||||
DOWN_EAST,
|
DOWN_EAST,
|
||||||
|
@ -4,17 +4,18 @@ import org.bukkit.block.data.Directional;
|
|||||||
import org.bukkit.block.data.Waterlogged;
|
import org.bukkit.block.data.Waterlogged;
|
||||||
|
|
||||||
public interface DecoratedPot extends Directional, Waterlogged {
|
public interface DecoratedPot extends Directional, Waterlogged {
|
||||||
// Paper start - add missing block data api
|
|
||||||
/**
|
|
||||||
* @return whether the pot is cracked
|
|
||||||
*/
|
|
||||||
public boolean isCracked();
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set whether the pot is cracked.
|
* Gets the value of the 'cracked' property.
|
||||||
*
|
*
|
||||||
* @param cracked whether the pot is cracked
|
* @return the 'cracked' value
|
||||||
*/
|
*/
|
||||||
public void setCracked(boolean cracked);
|
boolean isCracked();
|
||||||
// Paper end - add missing block data api
|
|
||||||
|
/**
|
||||||
|
* Sets the value of the 'cracked' property.
|
||||||
|
*
|
||||||
|
* @param cracked the new 'cracked' value
|
||||||
|
*/
|
||||||
|
void setCracked(boolean cracked);
|
||||||
}
|
}
|
||||||
|
@ -14,18 +14,23 @@ public interface Jigsaw extends BlockData {
|
|||||||
* @return the 'orientation' value
|
* @return the 'orientation' value
|
||||||
*/
|
*/
|
||||||
@NotNull
|
@NotNull
|
||||||
Orientation getOrientation();
|
org.bukkit.block.Orientation getOrientation();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the value of the 'orientation' property.
|
* Sets the value of the 'orientation' property.
|
||||||
*
|
*
|
||||||
* @param orientation the new 'orientation' value
|
* @param orientation the new 'orientation' value
|
||||||
*/
|
*/
|
||||||
void setOrientation(@NotNull Orientation orientation);
|
void setOrientation(@NotNull org.bukkit.block.Orientation orientation);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The directions the Jigsaw can be oriented.
|
* The directions the Jigsaw can be oriented.
|
||||||
|
*
|
||||||
|
* @deprecated this property is not specific to the Jigsaw, use
|
||||||
|
* {@link org.bukkit.block.Orientation} instead. All references
|
||||||
|
* to this enum will be redirected to that enum at runtime.
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
public enum Orientation {
|
public enum Orientation {
|
||||||
|
|
||||||
DOWN_EAST,
|
DOWN_EAST,
|
||||||
|
@ -14,4 +14,11 @@ public interface Jukebox extends BlockData {
|
|||||||
* @return the 'has_record' value
|
* @return the 'has_record' value
|
||||||
*/
|
*/
|
||||||
boolean hasRecord();
|
boolean hasRecord();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the value of the 'has_record' property.
|
||||||
|
*
|
||||||
|
* @param hasRecord the new 'has_record' value
|
||||||
|
*/
|
||||||
|
void setHasRecord(boolean hasRecord);
|
||||||
}
|
}
|
||||||
|
@ -15,4 +15,11 @@ public interface Lectern extends Directional, Powerable {
|
|||||||
* @return the 'has_book' value
|
* @return the 'has_book' value
|
||||||
*/
|
*/
|
||||||
boolean hasBook();
|
boolean hasBook();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the value of the 'has_book' property.
|
||||||
|
*
|
||||||
|
* @param hasBook the new 'has_book' value
|
||||||
|
*/
|
||||||
|
void setHasBook(boolean hasBook);
|
||||||
}
|
}
|
||||||
|
@ -35,7 +35,7 @@ public interface MossyCarpet extends BlockData {
|
|||||||
* @return if face is enabled
|
* @return if face is enabled
|
||||||
*/
|
*/
|
||||||
@NotNull
|
@NotNull
|
||||||
Height getHeight(@NotNull BlockFace face);
|
Wall.Height getHeight(@NotNull BlockFace face);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the height of the specified face.
|
* Set the height of the specified face.
|
||||||
@ -43,11 +43,16 @@ public interface MossyCarpet extends BlockData {
|
|||||||
* @param face to set
|
* @param face to set
|
||||||
* @param height the height
|
* @param height the height
|
||||||
*/
|
*/
|
||||||
void setHeight(@NotNull BlockFace face, @NotNull Height height);
|
void setHeight(@NotNull BlockFace face, @NotNull Wall.Height height);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The different heights a face may have.
|
* The different heights a face may have.
|
||||||
|
*
|
||||||
|
* @deprecated this property is not specific to the MossyCarpet, use
|
||||||
|
* {@link org.bukkit.block.data.type.Wall.Height} instead. All references
|
||||||
|
* to this enum will be redirected to that enum at runtime.
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
public enum Height {
|
public enum Height {
|
||||||
/**
|
/**
|
||||||
* Not present.
|
* Not present.
|
||||||
|
@ -13,16 +13,39 @@ public interface SculkSensor extends AnaloguePowerable, Waterlogged {
|
|||||||
* Gets the value of the 'sculk_sensor_phase' property.
|
* Gets the value of the 'sculk_sensor_phase' property.
|
||||||
*
|
*
|
||||||
* @return the 'sculk_sensor_phase' value
|
* @return the 'sculk_sensor_phase' value
|
||||||
|
* @deprecated bad name, use {@link #getSculkSensorPhase()}
|
||||||
*/
|
*/
|
||||||
@NotNull
|
@NotNull
|
||||||
Phase getPhase();
|
@Deprecated
|
||||||
|
default Phase getPhase() {
|
||||||
|
return this.getSculkSensorPhase();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the value of the 'sculk_sensor_phase' property.
|
||||||
|
*
|
||||||
|
* @param phase the new 'sculk_sensor_phase' value
|
||||||
|
* @deprecated bad name, use {@link #setSculkSensorPhase(Phase)}
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
|
default void setPhase(@NotNull Phase phase) {
|
||||||
|
this.setSculkSensorPhase(phase);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the value of the 'sculk_sensor_phase' property.
|
||||||
|
*
|
||||||
|
* @return the 'sculk_sensor_phase' value
|
||||||
|
*/
|
||||||
|
@NotNull
|
||||||
|
Phase getSculkSensorPhase();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the value of the 'sculk_sensor_phase' property.
|
* Sets the value of the 'sculk_sensor_phase' property.
|
||||||
*
|
*
|
||||||
* @param phase the new 'sculk_sensor_phase' value
|
* @param phase the new 'sculk_sensor_phase' value
|
||||||
*/
|
*/
|
||||||
void setPhase(@NotNull Phase phase);
|
void setSculkSensorPhase(@NotNull Phase phase);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The Phase of the sensor.
|
* The Phase of the sensor.
|
||||||
|
@ -7,6 +7,11 @@ import org.jetbrains.annotations.NotNull;
|
|||||||
|
|
||||||
public interface Switch extends Directional, FaceAttachable, Powerable {
|
public interface Switch extends Directional, FaceAttachable, Powerable {
|
||||||
|
|
||||||
|
@NotNull
|
||||||
|
AttachedFace getAttachedFace();
|
||||||
|
|
||||||
|
void setAttachedFace(@NotNull AttachedFace face);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the value of the 'face' property.
|
* Gets the value of the 'face' property.
|
||||||
*
|
*
|
||||||
@ -15,7 +20,9 @@ public interface Switch extends Directional, FaceAttachable, Powerable {
|
|||||||
*/
|
*/
|
||||||
@NotNull
|
@NotNull
|
||||||
@Deprecated(since = "1.15.2")
|
@Deprecated(since = "1.15.2")
|
||||||
Face getFace();
|
default Face getFace() {
|
||||||
|
return Face.valueOf(this.getAttachedFace().name());
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the value of the 'face' property.
|
* Sets the value of the 'face' property.
|
||||||
@ -24,7 +31,9 @@ public interface Switch extends Directional, FaceAttachable, Powerable {
|
|||||||
* @deprecated use {@link #setAttachedFace(AttachedFace)}
|
* @deprecated use {@link #setAttachedFace(AttachedFace)}
|
||||||
*/
|
*/
|
||||||
@Deprecated(since = "1.15.2")
|
@Deprecated(since = "1.15.2")
|
||||||
void setFace(@NotNull Face face);
|
default void setFace(@NotNull Face face) {
|
||||||
|
this.setAttachedFace(AttachedFace.valueOf(face.name()));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The face to which a switch type block is stuck.
|
* The face to which a switch type block is stuck.
|
||||||
|
@ -26,7 +26,9 @@ public interface Vault extends Directional {
|
|||||||
*/
|
*/
|
||||||
@Deprecated(since = "1.21.3", forRemoval = true)
|
@Deprecated(since = "1.21.3", forRemoval = true)
|
||||||
@NotNull
|
@NotNull
|
||||||
State getTrialSpawnerState();
|
default State getTrialSpawnerState() {
|
||||||
|
return this.getVaultState();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the value of the 'vault_state' property.
|
* Sets the value of the 'vault_state' property.
|
||||||
@ -42,7 +44,9 @@ public interface Vault extends Directional {
|
|||||||
* @deprecated see {@link #setVaultState(State)}
|
* @deprecated see {@link #setVaultState(State)}
|
||||||
*/
|
*/
|
||||||
@Deprecated(since = "1.21.3", forRemoval = true)
|
@Deprecated(since = "1.21.3", forRemoval = true)
|
||||||
void setTrialSpawnerState(@NotNull State state);
|
default void setTrialSpawnerState(@NotNull State state) {
|
||||||
|
this.setVaultState(state);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the value of the 'ominous' property.
|
* Gets the value of the 'ominous' property.
|
||||||
|
@ -21,55 +21,106 @@ import org.jetbrains.annotations.NotNull;
|
|||||||
@ApiStatus.Experimental
|
@ApiStatus.Experimental
|
||||||
public interface DamageType extends Keyed, Translatable {
|
public interface DamageType extends Keyed, Translatable {
|
||||||
|
|
||||||
public static final DamageType IN_FIRE = getDamageType("in_fire");
|
// Start generate - DamageType
|
||||||
public static final DamageType CAMPFIRE = getDamageType("campfire");
|
// @GeneratedFrom 1.21.4
|
||||||
public static final DamageType LIGHTNING_BOLT = getDamageType("lightning_bolt");
|
DamageType ARROW = getDamageType("arrow");
|
||||||
public static final DamageType ON_FIRE = getDamageType("on_fire");
|
|
||||||
public static final DamageType LAVA = getDamageType("lava");
|
DamageType BAD_RESPAWN_POINT = getDamageType("bad_respawn_point");
|
||||||
public static final DamageType HOT_FLOOR = getDamageType("hot_floor");
|
|
||||||
public static final DamageType IN_WALL = getDamageType("in_wall");
|
DamageType CACTUS = getDamageType("cactus");
|
||||||
public static final DamageType CRAMMING = getDamageType("cramming");
|
|
||||||
public static final DamageType DROWN = getDamageType("drown");
|
DamageType CAMPFIRE = getDamageType("campfire");
|
||||||
public static final DamageType STARVE = getDamageType("starve");
|
|
||||||
public static final DamageType CACTUS = getDamageType("cactus");
|
DamageType CRAMMING = getDamageType("cramming");
|
||||||
public static final DamageType FALL = getDamageType("fall");
|
|
||||||
public static final DamageType ENDER_PEARL = getDamageType("ender_pearl");
|
DamageType DRAGON_BREATH = getDamageType("dragon_breath");
|
||||||
public static final DamageType FLY_INTO_WALL = getDamageType("fly_into_wall");
|
|
||||||
public static final DamageType OUT_OF_WORLD = getDamageType("out_of_world");
|
DamageType DROWN = getDamageType("drown");
|
||||||
public static final DamageType GENERIC = getDamageType("generic");
|
|
||||||
public static final DamageType MAGIC = getDamageType("magic");
|
DamageType DRY_OUT = getDamageType("dry_out");
|
||||||
public static final DamageType WITHER = getDamageType("wither");
|
|
||||||
public static final DamageType DRAGON_BREATH = getDamageType("dragon_breath");
|
DamageType ENDER_PEARL = getDamageType("ender_pearl");
|
||||||
public static final DamageType DRY_OUT = getDamageType("dry_out");
|
|
||||||
public static final DamageType SWEET_BERRY_BUSH = getDamageType("sweet_berry_bush");
|
DamageType EXPLOSION = getDamageType("explosion");
|
||||||
public static final DamageType FREEZE = getDamageType("freeze");
|
|
||||||
public static final DamageType STALAGMITE = getDamageType("stalagmite");
|
DamageType FALL = getDamageType("fall");
|
||||||
public static final DamageType FALLING_BLOCK = getDamageType("falling_block");
|
|
||||||
public static final DamageType FALLING_ANVIL = getDamageType("falling_anvil");
|
DamageType FALLING_ANVIL = getDamageType("falling_anvil");
|
||||||
public static final DamageType FALLING_STALACTITE = getDamageType("falling_stalactite");
|
|
||||||
public static final DamageType STING = getDamageType("sting");
|
DamageType FALLING_BLOCK = getDamageType("falling_block");
|
||||||
public static final DamageType MOB_ATTACK = getDamageType("mob_attack");
|
|
||||||
public static final DamageType MOB_ATTACK_NO_AGGRO = getDamageType("mob_attack_no_aggro");
|
DamageType FALLING_STALACTITE = getDamageType("falling_stalactite");
|
||||||
public static final DamageType PLAYER_ATTACK = getDamageType("player_attack");
|
|
||||||
public static final DamageType ARROW = getDamageType("arrow");
|
DamageType FIREBALL = getDamageType("fireball");
|
||||||
public static final DamageType TRIDENT = getDamageType("trident");
|
|
||||||
public static final DamageType MOB_PROJECTILE = getDamageType("mob_projectile");
|
DamageType FIREWORKS = getDamageType("fireworks");
|
||||||
public static final DamageType SPIT = getDamageType("spit");
|
|
||||||
public static final DamageType FIREWORKS = getDamageType("fireworks");
|
DamageType FLY_INTO_WALL = getDamageType("fly_into_wall");
|
||||||
public static final DamageType FIREBALL = getDamageType("fireball");
|
|
||||||
public static final DamageType UNATTRIBUTED_FIREBALL = getDamageType("unattributed_fireball");
|
DamageType FREEZE = getDamageType("freeze");
|
||||||
public static final DamageType WITHER_SKULL = getDamageType("wither_skull");
|
|
||||||
public static final DamageType THROWN = getDamageType("thrown");
|
DamageType GENERIC = getDamageType("generic");
|
||||||
public static final DamageType INDIRECT_MAGIC = getDamageType("indirect_magic");
|
|
||||||
public static final DamageType THORNS = getDamageType("thorns");
|
DamageType GENERIC_KILL = getDamageType("generic_kill");
|
||||||
public static final DamageType EXPLOSION = getDamageType("explosion");
|
|
||||||
public static final DamageType PLAYER_EXPLOSION = getDamageType("player_explosion");
|
DamageType HOT_FLOOR = getDamageType("hot_floor");
|
||||||
public static final DamageType SONIC_BOOM = getDamageType("sonic_boom");
|
|
||||||
public static final DamageType BAD_RESPAWN_POINT = getDamageType("bad_respawn_point");
|
DamageType IN_FIRE = getDamageType("in_fire");
|
||||||
public static final DamageType OUTSIDE_BORDER = getDamageType("outside_border");
|
|
||||||
public static final DamageType GENERIC_KILL = getDamageType("generic_kill");
|
DamageType IN_WALL = getDamageType("in_wall");
|
||||||
public static final DamageType WIND_CHARGE = getDamageType("wind_charge");
|
|
||||||
public static final DamageType MACE_SMASH = getDamageType("mace_smash");
|
DamageType INDIRECT_MAGIC = getDamageType("indirect_magic");
|
||||||
|
|
||||||
|
DamageType LAVA = getDamageType("lava");
|
||||||
|
|
||||||
|
DamageType LIGHTNING_BOLT = getDamageType("lightning_bolt");
|
||||||
|
|
||||||
|
DamageType MACE_SMASH = getDamageType("mace_smash");
|
||||||
|
|
||||||
|
DamageType MAGIC = getDamageType("magic");
|
||||||
|
|
||||||
|
DamageType MOB_ATTACK = getDamageType("mob_attack");
|
||||||
|
|
||||||
|
DamageType MOB_ATTACK_NO_AGGRO = getDamageType("mob_attack_no_aggro");
|
||||||
|
|
||||||
|
DamageType MOB_PROJECTILE = getDamageType("mob_projectile");
|
||||||
|
|
||||||
|
DamageType ON_FIRE = getDamageType("on_fire");
|
||||||
|
|
||||||
|
DamageType OUT_OF_WORLD = getDamageType("out_of_world");
|
||||||
|
|
||||||
|
DamageType OUTSIDE_BORDER = getDamageType("outside_border");
|
||||||
|
|
||||||
|
DamageType PLAYER_ATTACK = getDamageType("player_attack");
|
||||||
|
|
||||||
|
DamageType PLAYER_EXPLOSION = getDamageType("player_explosion");
|
||||||
|
|
||||||
|
DamageType SONIC_BOOM = getDamageType("sonic_boom");
|
||||||
|
|
||||||
|
DamageType SPIT = getDamageType("spit");
|
||||||
|
|
||||||
|
DamageType STALAGMITE = getDamageType("stalagmite");
|
||||||
|
|
||||||
|
DamageType STARVE = getDamageType("starve");
|
||||||
|
|
||||||
|
DamageType STING = getDamageType("sting");
|
||||||
|
|
||||||
|
DamageType SWEET_BERRY_BUSH = getDamageType("sweet_berry_bush");
|
||||||
|
|
||||||
|
DamageType THORNS = getDamageType("thorns");
|
||||||
|
|
||||||
|
DamageType THROWN = getDamageType("thrown");
|
||||||
|
|
||||||
|
DamageType TRIDENT = getDamageType("trident");
|
||||||
|
|
||||||
|
DamageType UNATTRIBUTED_FIREBALL = getDamageType("unattributed_fireball");
|
||||||
|
|
||||||
|
DamageType WIND_CHARGE = getDamageType("wind_charge");
|
||||||
|
|
||||||
|
DamageType WITHER = getDamageType("wither");
|
||||||
|
|
||||||
|
DamageType WITHER_SKULL = getDamageType("wither_skull");
|
||||||
|
// End generate - DamageType
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
private static DamageType getDamageType(@NotNull String key) {
|
private static DamageType getDamageType(@NotNull String key) {
|
||||||
|
@ -6,7 +6,10 @@ import org.jetbrains.annotations.NotNull;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents the applicable target for a {@link Enchantment}
|
* Represents the applicable target for a {@link Enchantment}
|
||||||
|
*
|
||||||
|
* @deprecated enchantment groupings are now managed by tags, not categories
|
||||||
*/
|
*/
|
||||||
|
@Deprecated(since = "1.20.5", forRemoval = true)
|
||||||
public enum EnchantmentTarget {
|
public enum EnchantmentTarget {
|
||||||
/**
|
/**
|
||||||
* Allows the Enchantment to be placed on all items
|
* Allows the Enchantment to be placed on all items
|
||||||
|
@ -175,12 +175,15 @@ public interface Boat extends Vehicle, io.papermc.paper.entity.Leashable { // Pa
|
|||||||
*/
|
*/
|
||||||
public enum Status {
|
public enum Status {
|
||||||
|
|
||||||
NOT_IN_WORLD, // Paper
|
NOT_IN_WORLD,
|
||||||
|
// Start generate - BoatStatus
|
||||||
|
// @GeneratedFrom 1.21.4
|
||||||
IN_WATER,
|
IN_WATER,
|
||||||
UNDER_WATER,
|
UNDER_WATER,
|
||||||
UNDER_FLOWING_WATER,
|
UNDER_FLOWING_WATER,
|
||||||
ON_LAND,
|
ON_LAND,
|
||||||
IN_AIR;
|
IN_AIR;
|
||||||
|
// End generate - BoatStatus
|
||||||
}
|
}
|
||||||
|
|
||||||
// Paper start
|
// Paper start
|
||||||
|
@ -52,18 +52,31 @@ public interface Cat extends Tameable, Sittable, io.papermc.paper.entity.CollarC
|
|||||||
*/
|
*/
|
||||||
interface Type extends OldEnum<Type>, Keyed {
|
interface Type extends OldEnum<Type>, Keyed {
|
||||||
|
|
||||||
Type TABBY = getType("tabby");
|
// Start generate - CatType
|
||||||
Type BLACK = getType("black");
|
// @GeneratedFrom 1.21.4
|
||||||
Type RED = getType("red");
|
|
||||||
Type SIAMESE = getType("siamese");
|
|
||||||
Type BRITISH_SHORTHAIR = getType("british_shorthair");
|
|
||||||
Type CALICO = getType("calico");
|
|
||||||
Type PERSIAN = getType("persian");
|
|
||||||
Type RAGDOLL = getType("ragdoll");
|
|
||||||
Type WHITE = getType("white");
|
|
||||||
Type JELLIE = getType("jellie");
|
|
||||||
Type ALL_BLACK = getType("all_black");
|
Type ALL_BLACK = getType("all_black");
|
||||||
|
|
||||||
|
Type BLACK = getType("black");
|
||||||
|
|
||||||
|
Type BRITISH_SHORTHAIR = getType("british_shorthair");
|
||||||
|
|
||||||
|
Type CALICO = getType("calico");
|
||||||
|
|
||||||
|
Type JELLIE = getType("jellie");
|
||||||
|
|
||||||
|
Type PERSIAN = getType("persian");
|
||||||
|
|
||||||
|
Type RAGDOLL = getType("ragdoll");
|
||||||
|
|
||||||
|
Type RED = getType("red");
|
||||||
|
|
||||||
|
Type SIAMESE = getType("siamese");
|
||||||
|
|
||||||
|
Type TABBY = getType("tabby");
|
||||||
|
|
||||||
|
Type WHITE = getType("white");
|
||||||
|
// End generate - CatType
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
private static Type getType(@NotNull String key) {
|
private static Type getType(@NotNull String key) {
|
||||||
return Registry.CAT_VARIANT.getOrThrow(NamespacedKey.minecraft(key));
|
return Registry.CAT_VARIANT.getOrThrow(NamespacedKey.minecraft(key));
|
||||||
|
@ -45,299 +45,158 @@ import org.jetbrains.annotations.Nullable;
|
|||||||
|
|
||||||
public enum EntityType implements Keyed, Translatable, net.kyori.adventure.translation.Translatable, io.papermc.paper.world.flag.FeatureDependant { // Paper - translatable
|
public enum EntityType implements Keyed, Translatable, net.kyori.adventure.translation.Translatable, io.papermc.paper.world.flag.FeatureDependant { // Paper - translatable
|
||||||
|
|
||||||
// These strings MUST match the strings in nms.EntityTypes and are case sensitive.
|
// Start generate - EntityType
|
||||||
/**
|
// @GeneratedFrom 1.21.4
|
||||||
* An item resting on the ground.
|
ACACIA_BOAT("acacia_boat", AcaciaBoat.class, -1),
|
||||||
* <p>
|
ACACIA_CHEST_BOAT("acacia_chest_boat", AcaciaChestBoat.class, -1),
|
||||||
* Spawn with {@link World#dropItem(Location, ItemStack)} or {@link
|
ALLAY("allay", Allay.class, -1),
|
||||||
* World#dropItemNaturally(Location, ItemStack)}
|
|
||||||
*/
|
|
||||||
ITEM("item", Item.class, 1),
|
|
||||||
/**
|
|
||||||
* An experience orb.
|
|
||||||
*/
|
|
||||||
EXPERIENCE_ORB("experience_orb", ExperienceOrb.class, 2),
|
|
||||||
/**
|
|
||||||
* @see AreaEffectCloud
|
|
||||||
*/
|
|
||||||
AREA_EFFECT_CLOUD("area_effect_cloud", AreaEffectCloud.class, 3),
|
AREA_EFFECT_CLOUD("area_effect_cloud", AreaEffectCloud.class, 3),
|
||||||
/**
|
ARMADILLO("armadillo", Armadillo.class, -1),
|
||||||
* @see ElderGuardian
|
|
||||||
*/
|
|
||||||
ELDER_GUARDIAN("elder_guardian", ElderGuardian.class, 4),
|
|
||||||
/**
|
|
||||||
* @see WitherSkeleton
|
|
||||||
*/
|
|
||||||
WITHER_SKELETON("wither_skeleton", WitherSkeleton.class, 5),
|
|
||||||
/**
|
|
||||||
* @see Stray
|
|
||||||
*/
|
|
||||||
STRAY("stray", Stray.class, 6),
|
|
||||||
/**
|
|
||||||
* A flying chicken egg.
|
|
||||||
*/
|
|
||||||
EGG("egg", Egg.class, 7),
|
|
||||||
/**
|
|
||||||
* A leash attached to a fencepost.
|
|
||||||
*/
|
|
||||||
LEASH_KNOT("leash_knot", LeashHitch.class, 8),
|
|
||||||
/**
|
|
||||||
* A painting on a wall.
|
|
||||||
*/
|
|
||||||
PAINTING("painting", Painting.class, 9),
|
|
||||||
/**
|
|
||||||
* An arrow projectile; may get stuck in the ground.
|
|
||||||
*/
|
|
||||||
ARROW("arrow", Arrow.class, 10),
|
|
||||||
/**
|
|
||||||
* A flying snowball.
|
|
||||||
*/
|
|
||||||
SNOWBALL("snowball", Snowball.class, 11),
|
|
||||||
/**
|
|
||||||
* A flying large fireball, as thrown by a Ghast for example.
|
|
||||||
*/
|
|
||||||
FIREBALL("fireball", LargeFireball.class, 12),
|
|
||||||
/**
|
|
||||||
* A flying small fireball, such as thrown by a Blaze or player.
|
|
||||||
*/
|
|
||||||
SMALL_FIREBALL("small_fireball", SmallFireball.class, 13),
|
|
||||||
/**
|
|
||||||
* A flying ender pearl.
|
|
||||||
*/
|
|
||||||
ENDER_PEARL("ender_pearl", EnderPearl.class, 14),
|
|
||||||
/**
|
|
||||||
* An ender eye signal.
|
|
||||||
*/
|
|
||||||
EYE_OF_ENDER("eye_of_ender", EnderSignal.class, 15),
|
|
||||||
/**
|
|
||||||
* A flying splash potion.
|
|
||||||
*/
|
|
||||||
POTION("potion", ThrownPotion.class, 16),
|
|
||||||
/**
|
|
||||||
* A flying experience bottle.
|
|
||||||
*/
|
|
||||||
EXPERIENCE_BOTTLE("experience_bottle", ThrownExpBottle.class, 17),
|
|
||||||
/**
|
|
||||||
* An item frame on a wall.
|
|
||||||
*/
|
|
||||||
ITEM_FRAME("item_frame", ItemFrame.class, 18),
|
|
||||||
/**
|
|
||||||
* A flying wither skull projectile.
|
|
||||||
*/
|
|
||||||
WITHER_SKULL("wither_skull", WitherSkull.class, 19),
|
|
||||||
/**
|
|
||||||
* Primed TNT that is about to explode.
|
|
||||||
*/
|
|
||||||
TNT("tnt", TNTPrimed.class, 20),
|
|
||||||
/**
|
|
||||||
* A block that is going to or is about to fall.
|
|
||||||
*/
|
|
||||||
FALLING_BLOCK("falling_block", FallingBlock.class, 21),
|
|
||||||
/**
|
|
||||||
* Internal representation of a Firework once it has been launched.
|
|
||||||
*/
|
|
||||||
FIREWORK_ROCKET("firework_rocket", Firework.class, 22),
|
|
||||||
/**
|
|
||||||
* @see Husk
|
|
||||||
*/
|
|
||||||
HUSK("husk", Husk.class, 23),
|
|
||||||
/**
|
|
||||||
* Like {@link #ARROW} but causes the {@link PotionEffectType#GLOWING} effect on all team members.
|
|
||||||
*/
|
|
||||||
SPECTRAL_ARROW("spectral_arrow", SpectralArrow.class, 24),
|
|
||||||
/**
|
|
||||||
* Bullet fired by {@link #SHULKER}.
|
|
||||||
*/
|
|
||||||
SHULKER_BULLET("shulker_bullet", ShulkerBullet.class, 25),
|
|
||||||
/**
|
|
||||||
* Like {@link #FIREBALL} but with added effects.
|
|
||||||
*/
|
|
||||||
DRAGON_FIREBALL("dragon_fireball", DragonFireball.class, 26),
|
|
||||||
/**
|
|
||||||
* @see ZombieVillager
|
|
||||||
*/
|
|
||||||
ZOMBIE_VILLAGER("zombie_villager", ZombieVillager.class, 27),
|
|
||||||
/**
|
|
||||||
* @see SkeletonHorse
|
|
||||||
*/
|
|
||||||
SKELETON_HORSE("skeleton_horse", SkeletonHorse.class, 28),
|
|
||||||
/**
|
|
||||||
* @see ZombieHorse
|
|
||||||
*/
|
|
||||||
ZOMBIE_HORSE("zombie_horse", ZombieHorse.class, 29),
|
|
||||||
/**
|
|
||||||
* Mechanical entity with an inventory for placing weapons / armor into.
|
|
||||||
*/
|
|
||||||
ARMOR_STAND("armor_stand", ArmorStand.class, 30),
|
ARMOR_STAND("armor_stand", ArmorStand.class, 30),
|
||||||
/**
|
ARROW("arrow", Arrow.class, 10),
|
||||||
* @see Donkey
|
|
||||||
*/
|
|
||||||
DONKEY("donkey", Donkey.class, 31),
|
|
||||||
/**
|
|
||||||
* @see Mule
|
|
||||||
*/
|
|
||||||
MULE("mule", Mule.class, 32),
|
|
||||||
/**
|
|
||||||
* @see EvokerFangs
|
|
||||||
*/
|
|
||||||
EVOKER_FANGS("evoker_fangs", EvokerFangs.class, 33),
|
|
||||||
/**
|
|
||||||
* @see Evoker
|
|
||||||
*/
|
|
||||||
EVOKER("evoker", Evoker.class, 34),
|
|
||||||
/**
|
|
||||||
* @see Vex
|
|
||||||
*/
|
|
||||||
VEX("vex", Vex.class, 35),
|
|
||||||
/**
|
|
||||||
* @see Vindicator
|
|
||||||
*/
|
|
||||||
VINDICATOR("vindicator", Vindicator.class, 36),
|
|
||||||
/**
|
|
||||||
* @see Illusioner
|
|
||||||
*/
|
|
||||||
ILLUSIONER("illusioner", Illusioner.class, 37),
|
|
||||||
/**
|
|
||||||
* @see CommandMinecart
|
|
||||||
*/
|
|
||||||
COMMAND_BLOCK_MINECART("command_block_minecart", CommandMinecart.class, 40),
|
|
||||||
/**
|
|
||||||
* @see RideableMinecart
|
|
||||||
*/
|
|
||||||
MINECART("minecart", RideableMinecart.class, 42),
|
|
||||||
/**
|
|
||||||
* @see StorageMinecart
|
|
||||||
*/
|
|
||||||
CHEST_MINECART("chest_minecart", StorageMinecart.class, 43),
|
|
||||||
/**
|
|
||||||
* @see PoweredMinecart
|
|
||||||
*/
|
|
||||||
FURNACE_MINECART("furnace_minecart", PoweredMinecart.class, 44),
|
|
||||||
/**
|
|
||||||
* @see ExplosiveMinecart
|
|
||||||
*/
|
|
||||||
TNT_MINECART("tnt_minecart", ExplosiveMinecart.class, 45),
|
|
||||||
/**
|
|
||||||
* @see HopperMinecart
|
|
||||||
*/
|
|
||||||
HOPPER_MINECART("hopper_minecart", HopperMinecart.class, 46),
|
|
||||||
/**
|
|
||||||
* @see SpawnerMinecart
|
|
||||||
*/
|
|
||||||
SPAWNER_MINECART("spawner_minecart", SpawnerMinecart.class, 47),
|
|
||||||
CREEPER("creeper", Creeper.class, 50),
|
|
||||||
SKELETON("skeleton", Skeleton.class, 51),
|
|
||||||
SPIDER("spider", Spider.class, 52),
|
|
||||||
GIANT("giant", Giant.class, 53),
|
|
||||||
ZOMBIE("zombie", Zombie.class, 54),
|
|
||||||
SLIME("slime", Slime.class, 55),
|
|
||||||
GHAST("ghast", Ghast.class, 56),
|
|
||||||
ZOMBIFIED_PIGLIN("zombified_piglin", PigZombie.class, 57),
|
|
||||||
ENDERMAN("enderman", Enderman.class, 58),
|
|
||||||
CAVE_SPIDER("cave_spider", CaveSpider.class, 59),
|
|
||||||
SILVERFISH("silverfish", Silverfish.class, 60),
|
|
||||||
BLAZE("blaze", Blaze.class, 61),
|
|
||||||
MAGMA_CUBE("magma_cube", MagmaCube.class, 62),
|
|
||||||
ENDER_DRAGON("ender_dragon", EnderDragon.class, 63),
|
|
||||||
WITHER("wither", Wither.class, 64),
|
|
||||||
BAT("bat", Bat.class, 65),
|
|
||||||
WITCH("witch", Witch.class, 66),
|
|
||||||
ENDERMITE("endermite", Endermite.class, 67),
|
|
||||||
GUARDIAN("guardian", Guardian.class, 68),
|
|
||||||
SHULKER("shulker", Shulker.class, 69),
|
|
||||||
PIG("pig", Pig.class, 90),
|
|
||||||
SHEEP("sheep", Sheep.class, 91),
|
|
||||||
COW("cow", Cow.class, 92),
|
|
||||||
CHICKEN("chicken", Chicken.class, 93),
|
|
||||||
SQUID("squid", Squid.class, 94),
|
|
||||||
WOLF("wolf", Wolf.class, 95),
|
|
||||||
MOOSHROOM("mooshroom", MushroomCow.class, 96),
|
|
||||||
SNOW_GOLEM("snow_golem", Snowman.class, 97),
|
|
||||||
OCELOT("ocelot", Ocelot.class, 98),
|
|
||||||
IRON_GOLEM("iron_golem", IronGolem.class, 99),
|
|
||||||
HORSE("horse", Horse.class, 100),
|
|
||||||
RABBIT("rabbit", Rabbit.class, 101),
|
|
||||||
POLAR_BEAR("polar_bear", PolarBear.class, 102),
|
|
||||||
LLAMA("llama", Llama.class, 103),
|
|
||||||
LLAMA_SPIT("llama_spit", LlamaSpit.class, 104),
|
|
||||||
PARROT("parrot", Parrot.class, 105),
|
|
||||||
VILLAGER("villager", Villager.class, 120),
|
|
||||||
END_CRYSTAL("end_crystal", EnderCrystal.class, 200),
|
|
||||||
TURTLE("turtle", Turtle.class, -1),
|
|
||||||
PHANTOM("phantom", Phantom.class, -1),
|
|
||||||
TRIDENT("trident", Trident.class, -1),
|
|
||||||
COD("cod", Cod.class, -1),
|
|
||||||
SALMON("salmon", Salmon.class, -1),
|
|
||||||
PUFFERFISH("pufferfish", PufferFish.class, -1),
|
|
||||||
TROPICAL_FISH("tropical_fish", TropicalFish.class, -1),
|
|
||||||
DROWNED("drowned", Drowned.class, -1),
|
|
||||||
DOLPHIN("dolphin", Dolphin.class, -1),
|
|
||||||
CAT("cat", Cat.class, -1),
|
|
||||||
PANDA("panda", Panda.class, -1),
|
|
||||||
PILLAGER("pillager", Pillager.class, -1),
|
|
||||||
RAVAGER("ravager", Ravager.class, -1),
|
|
||||||
TRADER_LLAMA("trader_llama", TraderLlama.class, -1),
|
|
||||||
WANDERING_TRADER("wandering_trader", WanderingTrader.class, -1),
|
|
||||||
FOX("fox", Fox.class, -1),
|
|
||||||
BEE("bee", Bee.class, -1),
|
|
||||||
HOGLIN("hoglin", Hoglin.class, -1),
|
|
||||||
PIGLIN("piglin", Piglin.class, -1),
|
|
||||||
STRIDER("strider", Strider.class, -1),
|
|
||||||
ZOGLIN("zoglin", Zoglin.class, -1),
|
|
||||||
PIGLIN_BRUTE("piglin_brute", PiglinBrute.class, -1),
|
|
||||||
AXOLOTL("axolotl", Axolotl.class, -1),
|
AXOLOTL("axolotl", Axolotl.class, -1),
|
||||||
|
BAMBOO_CHEST_RAFT("bamboo_chest_raft", BambooChestRaft.class, -1),
|
||||||
|
BAMBOO_RAFT("bamboo_raft", BambooRaft.class, -1),
|
||||||
|
BAT("bat", Bat.class, 65),
|
||||||
|
BEE("bee", Bee.class, -1),
|
||||||
|
BIRCH_BOAT("birch_boat", BirchBoat.class, -1),
|
||||||
|
BIRCH_CHEST_BOAT("birch_chest_boat", BirchChestBoat.class, -1),
|
||||||
|
BLAZE("blaze", Blaze.class, 61),
|
||||||
|
BLOCK_DISPLAY("block_display", BlockDisplay.class, -1),
|
||||||
|
BOGGED("bogged", Bogged.class, -1),
|
||||||
|
BREEZE("breeze", Breeze.class, -1),
|
||||||
|
BREEZE_WIND_CHARGE("breeze_wind_charge", BreezeWindCharge.class, -1),
|
||||||
|
CAMEL("camel", Camel.class, -1),
|
||||||
|
CAT("cat", Cat.class, -1),
|
||||||
|
CAVE_SPIDER("cave_spider", CaveSpider.class, 59),
|
||||||
|
CHERRY_BOAT("cherry_boat", CherryBoat.class, -1),
|
||||||
|
CHERRY_CHEST_BOAT("cherry_chest_boat", CherryChestBoat.class, -1),
|
||||||
|
CHEST_MINECART("chest_minecart", StorageMinecart.class, 43),
|
||||||
|
CHICKEN("chicken", Chicken.class, 93),
|
||||||
|
COD("cod", Cod.class, -1),
|
||||||
|
COMMAND_BLOCK_MINECART("command_block_minecart", CommandMinecart.class, 40),
|
||||||
|
COW("cow", Cow.class, 92),
|
||||||
|
CREAKING("creaking", Creaking.class, -1),
|
||||||
|
CREEPER("creeper", Creeper.class, 50),
|
||||||
|
DARK_OAK_BOAT("dark_oak_boat", DarkOakBoat.class, -1),
|
||||||
|
DARK_OAK_CHEST_BOAT("dark_oak_chest_boat", DarkOakChestBoat.class, -1),
|
||||||
|
DOLPHIN("dolphin", Dolphin.class, -1),
|
||||||
|
DONKEY("donkey", Donkey.class, 31),
|
||||||
|
DRAGON_FIREBALL("dragon_fireball", DragonFireball.class, 26),
|
||||||
|
DROWNED("drowned", Drowned.class, -1),
|
||||||
|
EGG("egg", Egg.class, 7),
|
||||||
|
ELDER_GUARDIAN("elder_guardian", ElderGuardian.class, 4),
|
||||||
|
END_CRYSTAL("end_crystal", EnderCrystal.class, 200),
|
||||||
|
ENDER_DRAGON("ender_dragon", EnderDragon.class, 63),
|
||||||
|
ENDER_PEARL("ender_pearl", EnderPearl.class, 14),
|
||||||
|
ENDERMAN("enderman", Enderman.class, 58),
|
||||||
|
ENDERMITE("endermite", Endermite.class, 67),
|
||||||
|
EVOKER("evoker", Evoker.class, 34),
|
||||||
|
EVOKER_FANGS("evoker_fangs", EvokerFangs.class, 33),
|
||||||
|
EXPERIENCE_BOTTLE("experience_bottle", ThrownExpBottle.class, 17),
|
||||||
|
EXPERIENCE_ORB("experience_orb", ExperienceOrb.class, 2),
|
||||||
|
EYE_OF_ENDER("eye_of_ender", EnderSignal.class, 15),
|
||||||
|
FALLING_BLOCK("falling_block", FallingBlock.class, 21),
|
||||||
|
FIREBALL("fireball", Fireball.class, 12),
|
||||||
|
FIREWORK_ROCKET("firework_rocket", Firework.class, 22),
|
||||||
|
FISHING_BOBBER("fishing_bobber", FishHook.class, -1, false),
|
||||||
|
FOX("fox", Fox.class, -1),
|
||||||
|
FROG("frog", Frog.class, -1),
|
||||||
|
FURNACE_MINECART("furnace_minecart", PoweredMinecart.class, 44),
|
||||||
|
GHAST("ghast", Ghast.class, 56),
|
||||||
|
GIANT("giant", Giant.class, 53),
|
||||||
GLOW_ITEM_FRAME("glow_item_frame", GlowItemFrame.class, -1),
|
GLOW_ITEM_FRAME("glow_item_frame", GlowItemFrame.class, -1),
|
||||||
GLOW_SQUID("glow_squid", GlowSquid.class, -1),
|
GLOW_SQUID("glow_squid", GlowSquid.class, -1),
|
||||||
GOAT("goat", Goat.class, -1),
|
GOAT("goat", Goat.class, -1),
|
||||||
MARKER("marker", Marker.class, -1),
|
GUARDIAN("guardian", Guardian.class, 68),
|
||||||
ALLAY("allay", Allay.class, -1),
|
HOGLIN("hoglin", Hoglin.class, -1),
|
||||||
FROG("frog", Frog.class, -1),
|
HOPPER_MINECART("hopper_minecart", HopperMinecart.class, 46),
|
||||||
TADPOLE("tadpole", Tadpole.class, -1),
|
HORSE("horse", Horse.class, 100),
|
||||||
WARDEN("warden", Warden.class, -1),
|
HUSK("husk", Husk.class, 23),
|
||||||
CAMEL("camel", Camel.class, -1),
|
ILLUSIONER("illusioner", Illusioner.class, 37),
|
||||||
BLOCK_DISPLAY("block_display", BlockDisplay.class, -1),
|
|
||||||
INTERACTION("interaction", Interaction.class, -1),
|
INTERACTION("interaction", Interaction.class, -1),
|
||||||
|
IRON_GOLEM("iron_golem", IronGolem.class, 99),
|
||||||
|
ITEM("item", Item.class, 1),
|
||||||
ITEM_DISPLAY("item_display", ItemDisplay.class, -1),
|
ITEM_DISPLAY("item_display", ItemDisplay.class, -1),
|
||||||
SNIFFER("sniffer", Sniffer.class, -1),
|
ITEM_FRAME("item_frame", ItemFrame.class, 18),
|
||||||
TEXT_DISPLAY("text_display", TextDisplay.class, -1),
|
|
||||||
BREEZE("breeze", Breeze.class, -1),
|
|
||||||
WIND_CHARGE("wind_charge", WindCharge.class, -1),
|
|
||||||
BREEZE_WIND_CHARGE("breeze_wind_charge", BreezeWindCharge.class, -1),
|
|
||||||
ARMADILLO("armadillo", Armadillo.class, -1),
|
|
||||||
BOGGED("bogged", Bogged.class, -1),
|
|
||||||
OMINOUS_ITEM_SPAWNER("ominous_item_spawner", OminousItemSpawner.class, -1),
|
|
||||||
ACACIA_BOAT("acacia_boat", AcaciaBoat.class, -1),
|
|
||||||
ACACIA_CHEST_BOAT("acacia_chest_boat", AcaciaChestBoat.class, -1),
|
|
||||||
BAMBOO_RAFT("bamboo_raft", BambooRaft.class, -1),
|
|
||||||
BAMBOO_CHEST_RAFT("bamboo_chest_raft", BambooChestRaft.class, -1),
|
|
||||||
BIRCH_BOAT("birch_boat", BirchBoat.class, -1),
|
|
||||||
BIRCH_CHEST_BOAT("birch_chest_boat", BirchChestBoat.class, -1),
|
|
||||||
CHERRY_BOAT("cherry_boat", CherryBoat.class, -1),
|
|
||||||
CHERRY_CHEST_BOAT("cherry_chest_boat", CherryChestBoat.class, -1),
|
|
||||||
DARK_OAK_BOAT("dark_oak_boat", DarkOakBoat.class, -1),
|
|
||||||
DARK_OAK_CHEST_BOAT("dark_oak_chest_boat", DarkOakChestBoat.class, -1),
|
|
||||||
JUNGLE_BOAT("jungle_boat", JungleBoat.class, -1),
|
JUNGLE_BOAT("jungle_boat", JungleBoat.class, -1),
|
||||||
JUNGLE_CHEST_BOAT("jungle_chest_boat", JungleChestBoat.class, -1),
|
JUNGLE_CHEST_BOAT("jungle_chest_boat", JungleChestBoat.class, -1),
|
||||||
|
LEASH_KNOT("leash_knot", LeashHitch.class, 8),
|
||||||
|
LIGHTNING_BOLT("lightning_bolt", LightningStrike.class, -1),
|
||||||
|
LLAMA("llama", Llama.class, 103),
|
||||||
|
LLAMA_SPIT("llama_spit", LlamaSpit.class, 104),
|
||||||
|
MAGMA_CUBE("magma_cube", MagmaCube.class, 62),
|
||||||
MANGROVE_BOAT("mangrove_boat", MangroveBoat.class, -1),
|
MANGROVE_BOAT("mangrove_boat", MangroveBoat.class, -1),
|
||||||
MANGROVE_CHEST_BOAT("mangrove_chest_boat", MangroveChestBoat.class, -1),
|
MANGROVE_CHEST_BOAT("mangrove_chest_boat", MangroveChestBoat.class, -1),
|
||||||
|
MARKER("marker", Marker.class, -1),
|
||||||
|
MINECART("minecart", Minecart.class, 42),
|
||||||
|
MOOSHROOM("mooshroom", MushroomCow.class, 96),
|
||||||
|
MULE("mule", Mule.class, 32),
|
||||||
OAK_BOAT("oak_boat", OakBoat.class, -1),
|
OAK_BOAT("oak_boat", OakBoat.class, -1),
|
||||||
OAK_CHEST_BOAT("oak_chest_boat", OakChestBoat.class, -1),
|
OAK_CHEST_BOAT("oak_chest_boat", OakChestBoat.class, -1),
|
||||||
|
OCELOT("ocelot", Ocelot.class, 98),
|
||||||
|
OMINOUS_ITEM_SPAWNER("ominous_item_spawner", OminousItemSpawner.class, -1),
|
||||||
|
PAINTING("painting", Painting.class, 9),
|
||||||
PALE_OAK_BOAT("pale_oak_boat", PaleOakBoat.class, -1),
|
PALE_OAK_BOAT("pale_oak_boat", PaleOakBoat.class, -1),
|
||||||
PALE_OAK_CHEST_BOAT("pale_oak_chest_boat", PaleOakChestBoat.class, -1),
|
PALE_OAK_CHEST_BOAT("pale_oak_chest_boat", PaleOakChestBoat.class, -1),
|
||||||
|
PANDA("panda", Panda.class, -1),
|
||||||
|
PARROT("parrot", Parrot.class, 105),
|
||||||
|
PHANTOM("phantom", Phantom.class, -1),
|
||||||
|
PIG("pig", Pig.class, 90),
|
||||||
|
PIGLIN("piglin", Piglin.class, -1),
|
||||||
|
PIGLIN_BRUTE("piglin_brute", PiglinBrute.class, -1),
|
||||||
|
PILLAGER("pillager", Pillager.class, -1),
|
||||||
|
PLAYER("player", Player.class, -1, false),
|
||||||
|
POLAR_BEAR("polar_bear", PolarBear.class, 102),
|
||||||
|
POTION("potion", ThrownPotion.class, 16),
|
||||||
|
PUFFERFISH("pufferfish", PufferFish.class, -1),
|
||||||
|
RABBIT("rabbit", Rabbit.class, 101),
|
||||||
|
RAVAGER("ravager", Ravager.class, -1),
|
||||||
|
SALMON("salmon", Salmon.class, -1),
|
||||||
|
SHEEP("sheep", Sheep.class, 91),
|
||||||
|
SHULKER("shulker", Shulker.class, 69),
|
||||||
|
SHULKER_BULLET("shulker_bullet", ShulkerBullet.class, 25),
|
||||||
|
SILVERFISH("silverfish", Silverfish.class, 60),
|
||||||
|
SKELETON("skeleton", Skeleton.class, 51),
|
||||||
|
SKELETON_HORSE("skeleton_horse", SkeletonHorse.class, 28),
|
||||||
|
SLIME("slime", Slime.class, 55),
|
||||||
|
SMALL_FIREBALL("small_fireball", SmallFireball.class, 13),
|
||||||
|
SNIFFER("sniffer", Sniffer.class, -1),
|
||||||
|
SNOW_GOLEM("snow_golem", Snowman.class, 97),
|
||||||
|
SNOWBALL("snowball", Snowball.class, 11),
|
||||||
|
SPAWNER_MINECART("spawner_minecart", SpawnerMinecart.class, 47),
|
||||||
|
SPECTRAL_ARROW("spectral_arrow", SpectralArrow.class, 24),
|
||||||
|
SPIDER("spider", Spider.class, 52),
|
||||||
SPRUCE_BOAT("spruce_boat", SpruceBoat.class, -1),
|
SPRUCE_BOAT("spruce_boat", SpruceBoat.class, -1),
|
||||||
SPRUCE_CHEST_BOAT("spruce_chest_boat", SpruceChestBoat.class, -1),
|
SPRUCE_CHEST_BOAT("spruce_chest_boat", SpruceChestBoat.class, -1),
|
||||||
CREAKING("creaking", Creaking.class, -1),
|
SQUID("squid", Squid.class, 94),
|
||||||
/**
|
STRAY("stray", Stray.class, 6),
|
||||||
* A fishing line and bobber.
|
STRIDER("strider", Strider.class, -1),
|
||||||
*/
|
TADPOLE("tadpole", Tadpole.class, -1),
|
||||||
FISHING_BOBBER("fishing_bobber", FishHook.class, -1, false),
|
TEXT_DISPLAY("text_display", TextDisplay.class, -1),
|
||||||
/**
|
TNT("tnt", TNTPrimed.class, 20),
|
||||||
* A bolt of lightning.
|
TNT_MINECART("tnt_minecart", ExplosiveMinecart.class, 45),
|
||||||
* <p>
|
TRADER_LLAMA("trader_llama", TraderLlama.class, -1),
|
||||||
* Spawn with {@link World#strikeLightning(Location)}.
|
TRIDENT("trident", Trident.class, -1),
|
||||||
*/
|
TROPICAL_FISH("tropical_fish", TropicalFish.class, -1),
|
||||||
LIGHTNING_BOLT("lightning_bolt", LightningStrike.class, -1),
|
TURTLE("turtle", Turtle.class, -1),
|
||||||
PLAYER("player", Player.class, -1, false),
|
VEX("vex", Vex.class, 35),
|
||||||
|
VILLAGER("villager", Villager.class, 120),
|
||||||
|
VINDICATOR("vindicator", Vindicator.class, 36),
|
||||||
|
WANDERING_TRADER("wandering_trader", WanderingTrader.class, -1),
|
||||||
|
WARDEN("warden", Warden.class, -1),
|
||||||
|
WIND_CHARGE("wind_charge", WindCharge.class, -1),
|
||||||
|
WITCH("witch", Witch.class, 66),
|
||||||
|
WITHER("wither", Wither.class, 64),
|
||||||
|
WITHER_SKELETON("wither_skeleton", WitherSkeleton.class, 5),
|
||||||
|
WITHER_SKULL("wither_skull", WitherSkull.class, 19),
|
||||||
|
WOLF("wolf", Wolf.class, 95),
|
||||||
|
ZOGLIN("zoglin", Zoglin.class, -1),
|
||||||
|
ZOMBIE("zombie", Zombie.class, 54),
|
||||||
|
ZOMBIE_HORSE("zombie_horse", ZombieHorse.class, 29),
|
||||||
|
ZOMBIE_VILLAGER("zombie_villager", ZombieVillager.class, 27),
|
||||||
|
ZOMBIFIED_PIGLIN("zombified_piglin", PigZombie.class, 57),
|
||||||
|
// End generate - EntityType
|
||||||
/**
|
/**
|
||||||
* An unknown entity without an Entity Class
|
* An unknown entity without an Entity Class
|
||||||
*/
|
*/
|
||||||
|
@ -89,8 +89,11 @@ public interface Fox extends Animals, Sittable {
|
|||||||
* Represents the various different fox types there are.
|
* Represents the various different fox types there are.
|
||||||
*/
|
*/
|
||||||
public enum Type {
|
public enum Type {
|
||||||
|
// Start generate - FoxType
|
||||||
|
// @GeneratedFrom 1.21.4
|
||||||
RED,
|
RED,
|
||||||
SNOW;
|
SNOW;
|
||||||
|
// End generate - FoxType
|
||||||
}
|
}
|
||||||
|
|
||||||
// Paper start - Add more fox behavior API
|
// Paper start - Add more fox behavior API
|
||||||
|
@ -50,19 +50,15 @@ public interface Frog extends Animals {
|
|||||||
*/
|
*/
|
||||||
interface Variant extends OldEnum<Variant>, Keyed {
|
interface Variant extends OldEnum<Variant>, Keyed {
|
||||||
|
|
||||||
/**
|
// Start generate - FrogVariant
|
||||||
* Temperate (brown-orange) frog.
|
// @GeneratedFrom 1.21.4
|
||||||
*/
|
|
||||||
Variant TEMPERATE = getVariant("temperate");
|
|
||||||
/**
|
|
||||||
* Warm (gray) frog.
|
|
||||||
*/
|
|
||||||
Variant WARM = getVariant("warm");
|
|
||||||
/**
|
|
||||||
* Cold (green) frog.
|
|
||||||
*/
|
|
||||||
Variant COLD = getVariant("cold");
|
Variant COLD = getVariant("cold");
|
||||||
|
|
||||||
|
Variant TEMPERATE = getVariant("temperate");
|
||||||
|
|
||||||
|
Variant WARM = getVariant("warm");
|
||||||
|
// End generate - FrogVariant
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
private static Variant getVariant(@NotNull String key) {
|
private static Variant getVariant(@NotNull String key) {
|
||||||
return Registry.FROG_VARIANT.getOrThrow(NamespacedKey.minecraft(key));
|
return Registry.FROG_VARIANT.getOrThrow(NamespacedKey.minecraft(key));
|
||||||
|
@ -201,6 +201,8 @@ public interface Panda extends Animals, Sittable {
|
|||||||
|
|
||||||
public enum Gene {
|
public enum Gene {
|
||||||
|
|
||||||
|
// Start generate - PandaGene
|
||||||
|
// @GeneratedFrom 1.21.4
|
||||||
NORMAL(false),
|
NORMAL(false),
|
||||||
LAZY(false),
|
LAZY(false),
|
||||||
WORRIED(false),
|
WORRIED(false),
|
||||||
@ -208,6 +210,7 @@ public interface Panda extends Animals, Sittable {
|
|||||||
BROWN(true),
|
BROWN(true),
|
||||||
WEAK(true),
|
WEAK(true),
|
||||||
AGGRESSIVE(false);
|
AGGRESSIVE(false);
|
||||||
|
// End generate - PandaGene
|
||||||
|
|
||||||
private final boolean recessive;
|
private final boolean recessive;
|
||||||
|
|
||||||
|
@ -27,17 +27,11 @@ public interface Salmon extends io.papermc.paper.entity.SchoolableFish { // Pape
|
|||||||
*/
|
*/
|
||||||
public enum Variant {
|
public enum Variant {
|
||||||
|
|
||||||
/**
|
// Start generate - SalmonVariant
|
||||||
* Small salmon.
|
// @GeneratedFrom 1.21.4
|
||||||
*/
|
|
||||||
SMALL,
|
SMALL,
|
||||||
/**
|
|
||||||
* Default salmon.
|
|
||||||
*/
|
|
||||||
MEDIUM,
|
MEDIUM,
|
||||||
/**
|
|
||||||
* Large salmon.
|
|
||||||
*/
|
|
||||||
LARGE;
|
LARGE;
|
||||||
|
// End generate - SalmonVariant
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -74,6 +74,8 @@ public interface Sniffer extends Animals {
|
|||||||
* Represents the current state of the Sniffer.
|
* Represents the current state of the Sniffer.
|
||||||
*/
|
*/
|
||||||
public enum State {
|
public enum State {
|
||||||
|
// Start generate - SnifferState
|
||||||
|
// @GeneratedFrom 1.21.4
|
||||||
IDLING,
|
IDLING,
|
||||||
FEELING_HAPPY,
|
FEELING_HAPPY,
|
||||||
SCENTING,
|
SCENTING,
|
||||||
@ -81,5 +83,6 @@ public interface Sniffer extends Animals {
|
|||||||
SEARCHING,
|
SEARCHING,
|
||||||
DIGGING,
|
DIGGING,
|
||||||
RISING;
|
RISING;
|
||||||
|
// End generate - SnifferState
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -60,6 +60,8 @@ public interface TropicalFish extends io.papermc.paper.entity.SchoolableFish { /
|
|||||||
*/
|
*/
|
||||||
public static enum Pattern {
|
public static enum Pattern {
|
||||||
|
|
||||||
|
// Start generate - TropicalFishPattern
|
||||||
|
// @GeneratedFrom 1.21.4
|
||||||
KOB,
|
KOB,
|
||||||
SUNSTREAK,
|
SUNSTREAK,
|
||||||
SNOOPER,
|
SNOOPER,
|
||||||
@ -72,5 +74,6 @@ public interface TropicalFish extends io.papermc.paper.entity.SchoolableFish { /
|
|||||||
BLOCKFISH,
|
BLOCKFISH,
|
||||||
BETTY,
|
BETTY,
|
||||||
CLAYFISH;
|
CLAYFISH;
|
||||||
|
// End generate - TropicalFishPattern
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -171,13 +171,22 @@ public interface Villager extends AbstractVillager {
|
|||||||
*/
|
*/
|
||||||
interface Type extends OldEnum<Type>, Keyed {
|
interface Type extends OldEnum<Type>, Keyed {
|
||||||
|
|
||||||
|
// Start generate - VillagerType
|
||||||
|
// @GeneratedFrom 1.21.4
|
||||||
Type DESERT = getType("desert");
|
Type DESERT = getType("desert");
|
||||||
|
|
||||||
Type JUNGLE = getType("jungle");
|
Type JUNGLE = getType("jungle");
|
||||||
|
|
||||||
Type PLAINS = getType("plains");
|
Type PLAINS = getType("plains");
|
||||||
|
|
||||||
Type SAVANNA = getType("savanna");
|
Type SAVANNA = getType("savanna");
|
||||||
|
|
||||||
Type SNOW = getType("snow");
|
Type SNOW = getType("snow");
|
||||||
|
|
||||||
Type SWAMP = getType("swamp");
|
Type SWAMP = getType("swamp");
|
||||||
|
|
||||||
Type TAIGA = getType("taiga");
|
Type TAIGA = getType("taiga");
|
||||||
|
// End generate - VillagerType
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
private static Type getType(@NotNull String key) {
|
private static Type getType(@NotNull String key) {
|
||||||
@ -214,77 +223,94 @@ public interface Villager extends AbstractVillager {
|
|||||||
*/
|
*/
|
||||||
interface Profession extends OldEnum<Profession>, Keyed, net.kyori.adventure.translation.Translatable {
|
interface Profession extends OldEnum<Profession>, Keyed, net.kyori.adventure.translation.Translatable {
|
||||||
|
|
||||||
Profession NONE = getProfession("none");
|
// Start generate - VillagerProfession
|
||||||
|
// @GeneratedFrom 1.21.4
|
||||||
/**
|
/**
|
||||||
* Armorer profession. Wears a black apron. Armorers primarily trade for
|
* Armorer profession. Wears a black apron. Armorers primarily trade for
|
||||||
* iron armor, chainmail armor, and sometimes diamond armor.
|
* iron armor, chainmail armor, and sometimes diamond armor.
|
||||||
*/
|
*/
|
||||||
Profession ARMORER = getProfession("armorer");
|
Profession ARMORER = getProfession("armorer");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Butcher profession. Wears a white apron. Butchers primarily trade for
|
* Butcher profession. Wears a white apron. Butchers primarily trade for
|
||||||
* raw and cooked food.
|
* raw and cooked food.
|
||||||
*/
|
*/
|
||||||
Profession BUTCHER = getProfession("butcher");
|
Profession BUTCHER = getProfession("butcher");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Cartographer profession. Wears a white robe. Cartographers primarily
|
* Cartographer profession. Wears a white robe. Cartographers primarily
|
||||||
* trade for explorer maps and some paper.
|
* trade for explorer maps and some paper.
|
||||||
*/
|
*/
|
||||||
Profession CARTOGRAPHER = getProfession("cartographer");
|
Profession CARTOGRAPHER = getProfession("cartographer");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Cleric profession. Wears a purple robe. Clerics primarily trade for
|
* Cleric profession. Wears a purple robe. Clerics primarily trade for
|
||||||
* rotten flesh, gold ingot, redstone, lapis, ender pearl, glowstone,
|
* rotten flesh, gold ingot, redstone, lapis, ender pearl, glowstone,
|
||||||
* and bottle o' enchanting.
|
* and bottle o' enchanting.
|
||||||
*/
|
*/
|
||||||
Profession CLERIC = getProfession("cleric");
|
Profession CLERIC = getProfession("cleric");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Farmer profession. Wears a brown robe. Farmers primarily trade for
|
* Farmer profession. Wears a brown robe. Farmers primarily trade for
|
||||||
* food-related items.
|
* food-related items.
|
||||||
*/
|
*/
|
||||||
Profession FARMER = getProfession("farmer");
|
Profession FARMER = getProfession("farmer");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fisherman profession. Wears a brown robe. Fisherman primarily trade
|
* Fisherman profession. Wears a brown robe. Fisherman primarily trade
|
||||||
* for fish, as well as possibly selling string and/or coal.
|
* for fish, as well as possibly selling string and/or coal.
|
||||||
*/
|
*/
|
||||||
Profession FISHERMAN = getProfession("fisherman");
|
Profession FISHERMAN = getProfession("fisherman");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fletcher profession. Wears a brown robe. Fletchers primarily trade
|
* Fletcher profession. Wears a brown robe. Fletchers primarily trade
|
||||||
* for string, bows, and arrows.
|
* for string, bows, and arrows.
|
||||||
*/
|
*/
|
||||||
Profession FLETCHER = getProfession("fletcher");
|
Profession FLETCHER = getProfession("fletcher");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Leatherworker profession. Wears a white apron. Leatherworkers
|
* Leatherworker profession. Wears a white apron. Leatherworkers
|
||||||
* primarily trade for leather, and leather armor, as well as saddles.
|
* primarily trade for leather, and leather armor, as well as saddles.
|
||||||
*/
|
*/
|
||||||
Profession LEATHERWORKER = getProfession("leatherworker");
|
Profession LEATHERWORKER = getProfession("leatherworker");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Librarian profession. Wears a white robe. Librarians primarily trade
|
* Librarian profession. Wears a white robe. Librarians primarily trade
|
||||||
* for paper, books, and enchanted books.
|
* for paper, books, and enchanted books.
|
||||||
*/
|
*/
|
||||||
Profession LIBRARIAN = getProfession("librarian");
|
Profession LIBRARIAN = getProfession("librarian");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Mason profession.
|
* Mason profession.
|
||||||
*/
|
*/
|
||||||
Profession MASON = getProfession("mason");
|
Profession MASON = getProfession("mason");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Nitwit profession. Wears a green apron, cannot trade. Nitwit
|
* Nitwit profession. Wears a green apron, cannot trade. Nitwit
|
||||||
* villagers do not do anything. They do not have any trades by default.
|
* villagers do not do anything. They do not have any trades by default.
|
||||||
*/
|
*/
|
||||||
Profession NITWIT = getProfession("nitwit");
|
Profession NITWIT = getProfession("nitwit");
|
||||||
|
|
||||||
|
Profession NONE = getProfession("none");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Shepherd profession. Wears a brown robe. Shepherds primarily trade for
|
* Shepherd profession. Wears a brown robe. Shepherds primarily trade for
|
||||||
* wool items, and shears.
|
* wool items, and shears.
|
||||||
*/
|
*/
|
||||||
Profession SHEPHERD = getProfession("shepherd");
|
Profession SHEPHERD = getProfession("shepherd");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Toolsmith profession. Wears a black apron. Tool smiths primarily
|
* Toolsmith profession. Wears a black apron. Tool smiths primarily
|
||||||
* trade for iron and diamond tools.
|
* trade for iron and diamond tools.
|
||||||
*/
|
*/
|
||||||
Profession TOOLSMITH = getProfession("toolsmith");
|
Profession TOOLSMITH = getProfession("toolsmith");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Weaponsmith profession. Wears a black apron. Weapon smiths primarily
|
* Weaponsmith profession. Wears a black apron. Weapon smiths primarily
|
||||||
* trade for iron and diamond weapons, sometimes enchanted.
|
* trade for iron and diamond weapons, sometimes enchanted.
|
||||||
*/
|
*/
|
||||||
Profession WEAPONSMITH = getProfession("weaponsmith");
|
Profession WEAPONSMITH = getProfession("weaponsmith");
|
||||||
|
// End generate - VillagerProfession
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
private static Profession getProfession(@NotNull String key) {
|
private static Profession getProfession(@NotNull String key) {
|
||||||
|
@ -95,16 +95,27 @@ public interface Wolf extends Tameable, Sittable, io.papermc.paper.entity.Collar
|
|||||||
*/
|
*/
|
||||||
interface Variant extends Keyed {
|
interface Variant extends Keyed {
|
||||||
|
|
||||||
Variant PALE = getVariant("pale");
|
// Start generate - WolfVariant
|
||||||
Variant SPOTTED = getVariant("spotted");
|
// @GeneratedFrom 1.21.4
|
||||||
Variant SNOWY = getVariant("snowy");
|
|
||||||
Variant BLACK = getVariant("black");
|
|
||||||
Variant ASHEN = getVariant("ashen");
|
Variant ASHEN = getVariant("ashen");
|
||||||
Variant RUSTY = getVariant("rusty");
|
|
||||||
Variant WOODS = getVariant("woods");
|
Variant BLACK = getVariant("black");
|
||||||
|
|
||||||
Variant CHESTNUT = getVariant("chestnut");
|
Variant CHESTNUT = getVariant("chestnut");
|
||||||
|
|
||||||
|
Variant PALE = getVariant("pale");
|
||||||
|
|
||||||
|
Variant RUSTY = getVariant("rusty");
|
||||||
|
|
||||||
|
Variant SNOWY = getVariant("snowy");
|
||||||
|
|
||||||
|
Variant SPOTTED = getVariant("spotted");
|
||||||
|
|
||||||
Variant STRIPED = getVariant("striped");
|
Variant STRIPED = getVariant("striped");
|
||||||
|
|
||||||
|
Variant WOODS = getVariant("woods");
|
||||||
|
// End generate - WolfVariant
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
private static Variant getVariant(@NotNull String key) {
|
private static Variant getVariant(@NotNull String key) {
|
||||||
return RegistryAccess.registryAccess().getRegistry(RegistryKey.WOLF_VARIANT).getOrThrow(NamespacedKey.minecraft(key));
|
return RegistryAccess.registryAccess().getRegistry(RegistryKey.WOLF_VARIANT).getOrThrow(NamespacedKey.minecraft(key));
|
||||||
|
@ -44,31 +44,90 @@ public final class MemoryKey<T> implements Keyed {
|
|||||||
return tClass;
|
return tClass;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final Map<NamespacedKey, MemoryKey> MEMORY_KEYS = new HashMap<>();
|
private static final Map<NamespacedKey, MemoryKey<?>> MEMORY_KEYS = new HashMap<>();
|
||||||
//
|
|
||||||
public static final MemoryKey<Location> HOME = new MemoryKey<>(NamespacedKey.minecraft("home"), Location.class);
|
// Start generate - MemoryKey
|
||||||
public static final MemoryKey<Location> POTENTIAL_JOB_SITE = new MemoryKey<>(NamespacedKey.minecraft("potential_job_site"), Location.class);
|
// @GeneratedFrom 1.21.4
|
||||||
public static final MemoryKey<Location> JOB_SITE = new MemoryKey<>(NamespacedKey.minecraft("job_site"), Location.class);
|
|
||||||
public static final MemoryKey<Location> MEETING_POINT = new MemoryKey<>(NamespacedKey.minecraft("meeting_point"), Location.class);
|
|
||||||
public static final MemoryKey<Boolean> GOLEM_DETECTED_RECENTLY = new MemoryKey<>(NamespacedKey.minecraft("golem_detected_recently"), Boolean.class);
|
|
||||||
public static final MemoryKey<Long> LAST_SLEPT = new MemoryKey<>(NamespacedKey.minecraft("last_slept"), Long.class);
|
|
||||||
public static final MemoryKey<Long> LAST_WOKEN = new MemoryKey<>(NamespacedKey.minecraft("last_woken"), Long.class);
|
|
||||||
public static final MemoryKey<Long> LAST_WORKED_AT_POI = new MemoryKey<>(NamespacedKey.minecraft("last_worked_at_poi"), Long.class);
|
|
||||||
public static final MemoryKey<Boolean> UNIVERSAL_ANGER = new MemoryKey<>(NamespacedKey.minecraft("universal_anger"), Boolean.class);
|
|
||||||
public static final MemoryKey<UUID> ANGRY_AT = new MemoryKey<>(NamespacedKey.minecraft("angry_at"), UUID.class);
|
|
||||||
public static final MemoryKey<Boolean> ADMIRING_ITEM = new MemoryKey<>(NamespacedKey.minecraft("admiring_item"), Boolean.class);
|
|
||||||
public static final MemoryKey<Boolean> ADMIRING_DISABLED = new MemoryKey<>(NamespacedKey.minecraft("admiring_disabled"), Boolean.class);
|
public static final MemoryKey<Boolean> ADMIRING_DISABLED = new MemoryKey<>(NamespacedKey.minecraft("admiring_disabled"), Boolean.class);
|
||||||
public static final MemoryKey<Boolean> HUNTED_RECENTLY = new MemoryKey<>(NamespacedKey.minecraft("hunted_recently"), Boolean.class);
|
|
||||||
public static final MemoryKey<Integer> PLAY_DEAD_TICKS = new MemoryKey<>(NamespacedKey.minecraft("play_dead_ticks"), Integer.class);
|
public static final MemoryKey<Boolean> ADMIRING_ITEM = new MemoryKey<>(NamespacedKey.minecraft("admiring_item"), Boolean.class);
|
||||||
public static final MemoryKey<Integer> TEMPTATION_COOLDOWN_TICKS = new MemoryKey<>(NamespacedKey.minecraft("temptation_cooldown_ticks"), Integer.class);
|
|
||||||
public static final MemoryKey<Boolean> IS_TEMPTED = new MemoryKey<>(NamespacedKey.minecraft("is_tempted"), Boolean.class);
|
public static final MemoryKey<UUID> ANGRY_AT = new MemoryKey<>(NamespacedKey.minecraft("angry_at"), UUID.class);
|
||||||
public static final MemoryKey<Integer> LONG_JUMP_COOLING_DOWN = new MemoryKey<>(NamespacedKey.minecraft("long_jump_cooling_down"), Integer.class);
|
|
||||||
|
public static final MemoryKey<Boolean> ATE_RECENTLY = new MemoryKey<>(NamespacedKey.minecraft("ate_recently"), Boolean.class);
|
||||||
|
|
||||||
|
public static final MemoryKey<Boolean> ATTACK_COOLING_DOWN = new MemoryKey<>(NamespacedKey.minecraft("attack_cooling_down"), Boolean.class);
|
||||||
|
|
||||||
|
public static final MemoryKey<Long> CANT_REACH_WALK_TARGET_SINCE = new MemoryKey<>(NamespacedKey.minecraft("cant_reach_walk_target_since"), Long.class);
|
||||||
|
|
||||||
|
public static final MemoryKey<Boolean> DANCING = new MemoryKey<>(NamespacedKey.minecraft("dancing"), Boolean.class);
|
||||||
|
|
||||||
|
public static final MemoryKey<Boolean> DANGER_DETECTED_RECENTLY = new MemoryKey<>(NamespacedKey.minecraft("danger_detected_recently"), Boolean.class);
|
||||||
|
|
||||||
|
public static final MemoryKey<Boolean> DISABLE_WALK_TO_ADMIRE_ITEM = new MemoryKey<>(NamespacedKey.minecraft("disable_walk_to_admire_item"), Boolean.class);
|
||||||
|
|
||||||
|
public static final MemoryKey<Integer> GAZE_COOLDOWN_TICKS = new MemoryKey<>(NamespacedKey.minecraft("gaze_cooldown_ticks"), Integer.class);
|
||||||
|
|
||||||
|
public static final MemoryKey<Boolean> GOLEM_DETECTED_RECENTLY = new MemoryKey<>(NamespacedKey.minecraft("golem_detected_recently"), Boolean.class);
|
||||||
|
|
||||||
public static final MemoryKey<Boolean> HAS_HUNTING_COOLDOWN = new MemoryKey<>(NamespacedKey.minecraft("has_hunting_cooldown"), Boolean.class);
|
public static final MemoryKey<Boolean> HAS_HUNTING_COOLDOWN = new MemoryKey<>(NamespacedKey.minecraft("has_hunting_cooldown"), Boolean.class);
|
||||||
public static final MemoryKey<Integer> RAM_COOLDOWN_TICKS = new MemoryKey<>(NamespacedKey.minecraft("ram_cooldown_ticks"), Integer.class);
|
|
||||||
public static final MemoryKey<UUID> LIKED_PLAYER = new MemoryKey<>(NamespacedKey.minecraft("liked_player"), UUID.class);
|
public static final MemoryKey<Long> HEARD_BELL_TIME = new MemoryKey<>(NamespacedKey.minecraft("heard_bell_time"), Long.class);
|
||||||
public static final MemoryKey<Location> LIKED_NOTEBLOCK_POSITION = new MemoryKey<>(NamespacedKey.minecraft("liked_noteblock"), Location.class);
|
|
||||||
public static final MemoryKey<Integer> LIKED_NOTEBLOCK_COOLDOWN_TICKS = new MemoryKey<>(NamespacedKey.minecraft("liked_noteblock_cooldown_ticks"), Integer.class);
|
public static final MemoryKey<Location> HIDING_PLACE = new MemoryKey<>(NamespacedKey.minecraft("hiding_place"), Location.class);
|
||||||
|
|
||||||
|
public static final MemoryKey<Location> HOME = new MemoryKey<>(NamespacedKey.minecraft("home"), Location.class);
|
||||||
|
|
||||||
|
public static final MemoryKey<Boolean> HUNTED_RECENTLY = new MemoryKey<>(NamespacedKey.minecraft("hunted_recently"), Boolean.class);
|
||||||
|
|
||||||
|
public static final MemoryKey<Boolean> IS_PANICKING = new MemoryKey<>(NamespacedKey.minecraft("is_panicking"), Boolean.class);
|
||||||
|
|
||||||
|
public static final MemoryKey<Boolean> IS_TEMPTED = new MemoryKey<>(NamespacedKey.minecraft("is_tempted"), Boolean.class);
|
||||||
|
|
||||||
public static final MemoryKey<Integer> ITEM_PICKUP_COOLDOWN_TICKS = new MemoryKey<>(NamespacedKey.minecraft("item_pickup_cooldown_ticks"), Integer.class);
|
public static final MemoryKey<Integer> ITEM_PICKUP_COOLDOWN_TICKS = new MemoryKey<>(NamespacedKey.minecraft("item_pickup_cooldown_ticks"), Integer.class);
|
||||||
|
|
||||||
|
public static final MemoryKey<Location> JOB_SITE = new MemoryKey<>(NamespacedKey.minecraft("job_site"), Location.class);
|
||||||
|
|
||||||
|
public static final MemoryKey<Long> LAST_SLEPT = new MemoryKey<>(NamespacedKey.minecraft("last_slept"), Long.class);
|
||||||
|
|
||||||
|
public static final MemoryKey<Long> LAST_WOKEN = new MemoryKey<>(NamespacedKey.minecraft("last_woken"), Long.class);
|
||||||
|
|
||||||
|
public static final MemoryKey<Long> LAST_WORKED_AT_POI = new MemoryKey<>(NamespacedKey.minecraft("last_worked_at_poi"), Long.class);
|
||||||
|
|
||||||
|
public static final MemoryKey<Location> LIKED_NOTEBLOCK_POSITION = new MemoryKey<>(NamespacedKey.minecraft("liked_noteblock"), Location.class);
|
||||||
|
|
||||||
|
public static final MemoryKey<Integer> LIKED_NOTEBLOCK_COOLDOWN_TICKS = new MemoryKey<>(NamespacedKey.minecraft("liked_noteblock_cooldown_ticks"), Integer.class);
|
||||||
|
|
||||||
|
public static final MemoryKey<UUID> LIKED_PLAYER = new MemoryKey<>(NamespacedKey.minecraft("liked_player"), UUID.class);
|
||||||
|
|
||||||
|
public static final MemoryKey<Integer> LONG_JUMP_COOLING_DOWN = new MemoryKey<>(NamespacedKey.minecraft("long_jump_cooling_down"), Integer.class);
|
||||||
|
|
||||||
|
public static final MemoryKey<Boolean> LONG_JUMP_MID_JUMP = new MemoryKey<>(NamespacedKey.minecraft("long_jump_mid_jump"), Boolean.class);
|
||||||
|
|
||||||
|
public static final MemoryKey<Location> MEETING_POINT = new MemoryKey<>(NamespacedKey.minecraft("meeting_point"), Location.class);
|
||||||
|
|
||||||
|
public static final MemoryKey<Boolean> PACIFIED = new MemoryKey<>(NamespacedKey.minecraft("pacified"), Boolean.class);
|
||||||
|
|
||||||
|
public static final MemoryKey<Integer> PLAY_DEAD_TICKS = new MemoryKey<>(NamespacedKey.minecraft("play_dead_ticks"), Integer.class);
|
||||||
|
|
||||||
|
public static final MemoryKey<Location> POTENTIAL_JOB_SITE = new MemoryKey<>(NamespacedKey.minecraft("potential_job_site"), Location.class);
|
||||||
|
|
||||||
|
public static final MemoryKey<Integer> RAM_COOLDOWN_TICKS = new MemoryKey<>(NamespacedKey.minecraft("ram_cooldown_ticks"), Integer.class);
|
||||||
|
|
||||||
|
public static final MemoryKey<Boolean> SNIFFER_DIGGING = new MemoryKey<>(NamespacedKey.minecraft("sniffer_digging"), Boolean.class);
|
||||||
|
|
||||||
|
public static final MemoryKey<Boolean> SNIFFER_HAPPY = new MemoryKey<>(NamespacedKey.minecraft("sniffer_happy"), Boolean.class);
|
||||||
|
|
||||||
|
public static final MemoryKey<Integer> TEMPTATION_COOLDOWN_TICKS = new MemoryKey<>(NamespacedKey.minecraft("temptation_cooldown_ticks"), Integer.class);
|
||||||
|
|
||||||
|
public static final MemoryKey<Integer> TIME_TRYING_TO_REACH_ADMIRE_ITEM = new MemoryKey<>(NamespacedKey.minecraft("time_trying_to_reach_admire_item"), Integer.class);
|
||||||
|
|
||||||
|
public static final MemoryKey<Boolean> UNIVERSAL_ANGER = new MemoryKey<>(NamespacedKey.minecraft("universal_anger"), Boolean.class);
|
||||||
|
|
||||||
|
public static final MemoryKey<Integer> VISIBLE_ADULT_HOGLIN_COUNT = new MemoryKey<>(NamespacedKey.minecraft("visible_adult_hoglin_count"), Integer.class);
|
||||||
|
|
||||||
|
public static final MemoryKey<Integer> VISIBLE_ADULT_PIGLIN_COUNT = new MemoryKey<>(NamespacedKey.minecraft("visible_adult_piglin_count"), Integer.class);
|
||||||
|
// End generate - MemoryKey
|
||||||
/**
|
/**
|
||||||
* @deprecated this constant uses the wrong generic type, the sniffer now stores different positions
|
* @deprecated this constant uses the wrong generic type, the sniffer now stores different positions
|
||||||
* from possibly different worlds. Use the relevant methods in {@link org.bukkit.entity.Sniffer} directly
|
* from possibly different worlds. Use the relevant methods in {@link org.bukkit.entity.Sniffer} directly
|
||||||
@ -86,7 +145,7 @@ public final class MemoryKey<T> implements Keyed {
|
|||||||
* available under that key
|
* available under that key
|
||||||
*/
|
*/
|
||||||
@Nullable
|
@Nullable
|
||||||
public static MemoryKey getByKey(@NotNull NamespacedKey namespacedKey) {
|
public static MemoryKey<?> getByKey(@NotNull NamespacedKey namespacedKey) {
|
||||||
return MEMORY_KEYS.get(namespacedKey);
|
return MEMORY_KEYS.get(namespacedKey);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -96,7 +155,7 @@ public final class MemoryKey<T> implements Keyed {
|
|||||||
* @return the memoryKeys
|
* @return the memoryKeys
|
||||||
*/
|
*/
|
||||||
@NotNull
|
@NotNull
|
||||||
public static Set<MemoryKey> values() {
|
public static Set<MemoryKey<?>> values() {
|
||||||
return new HashSet<>(MEMORY_KEYS.values());
|
return new HashSet<>(MEMORY_KEYS.values());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -16,41 +16,77 @@ import org.jetbrains.annotations.NotNull;
|
|||||||
*/
|
*/
|
||||||
public abstract class Structure implements Keyed {
|
public abstract class Structure implements Keyed {
|
||||||
|
|
||||||
public static final Structure PILLAGER_OUTPOST = getStructure("pillager_outpost");
|
// Start generate - Structure
|
||||||
public static final Structure MINESHAFT = getStructure("mineshaft");
|
// @GeneratedFrom 1.21.4
|
||||||
public static final Structure MINESHAFT_MESA = getStructure("mineshaft_mesa");
|
|
||||||
public static final Structure MANSION = getStructure("mansion");
|
|
||||||
public static final Structure JUNGLE_PYRAMID = getStructure("jungle_pyramid");
|
|
||||||
public static final Structure DESERT_PYRAMID = getStructure("desert_pyramid");
|
|
||||||
public static final Structure IGLOO = getStructure("igloo");
|
|
||||||
public static final Structure SHIPWRECK = getStructure("shipwreck");
|
|
||||||
public static final Structure SHIPWRECK_BEACHED = getStructure("shipwreck_beached");
|
|
||||||
public static final Structure SWAMP_HUT = getStructure("swamp_hut");
|
|
||||||
public static final Structure STRONGHOLD = getStructure("stronghold");
|
|
||||||
public static final Structure MONUMENT = getStructure("monument");
|
|
||||||
public static final Structure OCEAN_RUIN_COLD = getStructure("ocean_ruin_cold");
|
|
||||||
public static final Structure OCEAN_RUIN_WARM = getStructure("ocean_ruin_warm");
|
|
||||||
public static final Structure FORTRESS = getStructure("fortress");
|
|
||||||
public static final Structure NETHER_FOSSIL = getStructure("nether_fossil");
|
|
||||||
public static final Structure END_CITY = getStructure("end_city");
|
|
||||||
public static final Structure BURIED_TREASURE = getStructure("buried_treasure");
|
|
||||||
public static final Structure BASTION_REMNANT = getStructure("bastion_remnant");
|
|
||||||
public static final Structure VILLAGE_PLAINS = getStructure("village_plains");
|
|
||||||
public static final Structure VILLAGE_DESERT = getStructure("village_desert");
|
|
||||||
public static final Structure VILLAGE_SAVANNA = getStructure("village_savanna");
|
|
||||||
public static final Structure VILLAGE_SNOWY = getStructure("village_snowy");
|
|
||||||
public static final Structure VILLAGE_TAIGA = getStructure("village_taiga");
|
|
||||||
public static final Structure RUINED_PORTAL = getStructure("ruined_portal");
|
|
||||||
public static final Structure RUINED_PORTAL_DESERT = getStructure("ruined_portal_desert");
|
|
||||||
public static final Structure RUINED_PORTAL_JUNGLE = getStructure("ruined_portal_jungle");
|
|
||||||
public static final Structure RUINED_PORTAL_SWAMP = getStructure("ruined_portal_swamp");
|
|
||||||
public static final Structure RUINED_PORTAL_MOUNTAIN = getStructure("ruined_portal_mountain");
|
|
||||||
public static final Structure RUINED_PORTAL_OCEAN = getStructure("ruined_portal_ocean");
|
|
||||||
public static final Structure RUINED_PORTAL_NETHER = getStructure("ruined_portal_nether");
|
|
||||||
public static final Structure ANCIENT_CITY = getStructure("ancient_city");
|
public static final Structure ANCIENT_CITY = getStructure("ancient_city");
|
||||||
|
|
||||||
|
public static final Structure BASTION_REMNANT = getStructure("bastion_remnant");
|
||||||
|
|
||||||
|
public static final Structure BURIED_TREASURE = getStructure("buried_treasure");
|
||||||
|
|
||||||
|
public static final Structure DESERT_PYRAMID = getStructure("desert_pyramid");
|
||||||
|
|
||||||
|
public static final Structure END_CITY = getStructure("end_city");
|
||||||
|
|
||||||
|
public static final Structure FORTRESS = getStructure("fortress");
|
||||||
|
|
||||||
|
public static final Structure IGLOO = getStructure("igloo");
|
||||||
|
|
||||||
|
public static final Structure JUNGLE_PYRAMID = getStructure("jungle_pyramid");
|
||||||
|
|
||||||
|
public static final Structure MANSION = getStructure("mansion");
|
||||||
|
|
||||||
|
public static final Structure MINESHAFT = getStructure("mineshaft");
|
||||||
|
|
||||||
|
public static final Structure MINESHAFT_MESA = getStructure("mineshaft_mesa");
|
||||||
|
|
||||||
|
public static final Structure MONUMENT = getStructure("monument");
|
||||||
|
|
||||||
|
public static final Structure NETHER_FOSSIL = getStructure("nether_fossil");
|
||||||
|
|
||||||
|
public static final Structure OCEAN_RUIN_COLD = getStructure("ocean_ruin_cold");
|
||||||
|
|
||||||
|
public static final Structure OCEAN_RUIN_WARM = getStructure("ocean_ruin_warm");
|
||||||
|
|
||||||
|
public static final Structure PILLAGER_OUTPOST = getStructure("pillager_outpost");
|
||||||
|
|
||||||
|
public static final Structure RUINED_PORTAL = getStructure("ruined_portal");
|
||||||
|
|
||||||
|
public static final Structure RUINED_PORTAL_DESERT = getStructure("ruined_portal_desert");
|
||||||
|
|
||||||
|
public static final Structure RUINED_PORTAL_JUNGLE = getStructure("ruined_portal_jungle");
|
||||||
|
|
||||||
|
public static final Structure RUINED_PORTAL_MOUNTAIN = getStructure("ruined_portal_mountain");
|
||||||
|
|
||||||
|
public static final Structure RUINED_PORTAL_NETHER = getStructure("ruined_portal_nether");
|
||||||
|
|
||||||
|
public static final Structure RUINED_PORTAL_OCEAN = getStructure("ruined_portal_ocean");
|
||||||
|
|
||||||
|
public static final Structure RUINED_PORTAL_SWAMP = getStructure("ruined_portal_swamp");
|
||||||
|
|
||||||
|
public static final Structure SHIPWRECK = getStructure("shipwreck");
|
||||||
|
|
||||||
|
public static final Structure SHIPWRECK_BEACHED = getStructure("shipwreck_beached");
|
||||||
|
|
||||||
|
public static final Structure STRONGHOLD = getStructure("stronghold");
|
||||||
|
|
||||||
|
public static final Structure SWAMP_HUT = getStructure("swamp_hut");
|
||||||
|
|
||||||
public static final Structure TRAIL_RUINS = getStructure("trail_ruins");
|
public static final Structure TRAIL_RUINS = getStructure("trail_ruins");
|
||||||
|
|
||||||
public static final Structure TRIAL_CHAMBERS = getStructure("trial_chambers");
|
public static final Structure TRIAL_CHAMBERS = getStructure("trial_chambers");
|
||||||
|
|
||||||
|
public static final Structure VILLAGE_DESERT = getStructure("village_desert");
|
||||||
|
|
||||||
|
public static final Structure VILLAGE_PLAINS = getStructure("village_plains");
|
||||||
|
|
||||||
|
public static final Structure VILLAGE_SAVANNA = getStructure("village_savanna");
|
||||||
|
|
||||||
|
public static final Structure VILLAGE_SNOWY = getStructure("village_snowy");
|
||||||
|
|
||||||
|
public static final Structure VILLAGE_TAIGA = getStructure("village_taiga");
|
||||||
|
// End generate - Structure
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
private static Structure getStructure(@NotNull String name) {
|
private static Structure getStructure(@NotNull String name) {
|
||||||
return RegistryAccess.registryAccess().getRegistry(RegistryKey.STRUCTURE).getOrThrow(NamespacedKey.minecraft(name));
|
return RegistryAccess.registryAccess().getRegistry(RegistryKey.STRUCTURE).getOrThrow(NamespacedKey.minecraft(name));
|
||||||
|
@ -15,22 +15,40 @@ import org.jetbrains.annotations.NotNull;
|
|||||||
*/
|
*/
|
||||||
public abstract class StructureType implements Keyed {
|
public abstract class StructureType implements Keyed {
|
||||||
|
|
||||||
|
// Start generate - StructureType
|
||||||
|
// @GeneratedFrom 1.21.4
|
||||||
public static final StructureType BURIED_TREASURE = getStructureType("buried_treasure");
|
public static final StructureType BURIED_TREASURE = getStructureType("buried_treasure");
|
||||||
|
|
||||||
public static final StructureType DESERT_PYRAMID = getStructureType("desert_pyramid");
|
public static final StructureType DESERT_PYRAMID = getStructureType("desert_pyramid");
|
||||||
|
|
||||||
public static final StructureType END_CITY = getStructureType("end_city");
|
public static final StructureType END_CITY = getStructureType("end_city");
|
||||||
|
|
||||||
public static final StructureType FORTRESS = getStructureType("fortress");
|
public static final StructureType FORTRESS = getStructureType("fortress");
|
||||||
|
|
||||||
public static final StructureType IGLOO = getStructureType("igloo");
|
public static final StructureType IGLOO = getStructureType("igloo");
|
||||||
|
|
||||||
public static final StructureType JIGSAW = getStructureType("jigsaw");
|
public static final StructureType JIGSAW = getStructureType("jigsaw");
|
||||||
|
|
||||||
public static final StructureType JUNGLE_TEMPLE = getStructureType("jungle_temple");
|
public static final StructureType JUNGLE_TEMPLE = getStructureType("jungle_temple");
|
||||||
|
|
||||||
public static final StructureType MINESHAFT = getStructureType("mineshaft");
|
public static final StructureType MINESHAFT = getStructureType("mineshaft");
|
||||||
|
|
||||||
public static final StructureType NETHER_FOSSIL = getStructureType("nether_fossil");
|
public static final StructureType NETHER_FOSSIL = getStructureType("nether_fossil");
|
||||||
|
|
||||||
public static final StructureType OCEAN_MONUMENT = getStructureType("ocean_monument");
|
public static final StructureType OCEAN_MONUMENT = getStructureType("ocean_monument");
|
||||||
|
|
||||||
public static final StructureType OCEAN_RUIN = getStructureType("ocean_ruin");
|
public static final StructureType OCEAN_RUIN = getStructureType("ocean_ruin");
|
||||||
|
|
||||||
public static final StructureType RUINED_PORTAL = getStructureType("ruined_portal");
|
public static final StructureType RUINED_PORTAL = getStructureType("ruined_portal");
|
||||||
|
|
||||||
public static final StructureType SHIPWRECK = getStructureType("shipwreck");
|
public static final StructureType SHIPWRECK = getStructureType("shipwreck");
|
||||||
|
|
||||||
public static final StructureType STRONGHOLD = getStructureType("stronghold");
|
public static final StructureType STRONGHOLD = getStructureType("stronghold");
|
||||||
|
|
||||||
public static final StructureType SWAMP_HUT = getStructureType("swamp_hut");
|
public static final StructureType SWAMP_HUT = getStructureType("swamp_hut");
|
||||||
|
|
||||||
public static final StructureType WOODLAND_MANSION = getStructureType("woodland_mansion");
|
public static final StructureType WOODLAND_MANSION = getStructureType("woodland_mansion");
|
||||||
|
// End generate - StructureType
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
private static StructureType getStructureType(@NotNull String name) {
|
private static StructureType getStructureType(@NotNull String name) {
|
||||||
|
@ -1,30 +1,26 @@
|
|||||||
package org.bukkit.inventory;
|
package org.bukkit.inventory;
|
||||||
|
|
||||||
|
import net.kyori.adventure.text.format.NamedTextColor;
|
||||||
|
import net.kyori.adventure.text.format.TextColor;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A item's rarity determines the default color of its name. This enum is
|
* A item's rarity determines the default color of its name. This enum is
|
||||||
* ordered from least rare to most rare.
|
* ordered from least rare to most rare.
|
||||||
*/
|
*/
|
||||||
public enum ItemRarity {
|
public enum ItemRarity {
|
||||||
|
|
||||||
/**
|
// Start generate - ItemRarity
|
||||||
* White item name.
|
// @GeneratedFrom 1.21.4
|
||||||
*/
|
COMMON(NamedTextColor.WHITE),
|
||||||
COMMON(net.kyori.adventure.text.format.NamedTextColor.WHITE), // Paper
|
UNCOMMON(NamedTextColor.YELLOW),
|
||||||
/**
|
RARE(NamedTextColor.AQUA),
|
||||||
* Yellow item name.
|
EPIC(NamedTextColor.LIGHT_PURPLE);
|
||||||
*/
|
// End generate - ItemRarity
|
||||||
UNCOMMON(net.kyori.adventure.text.format.NamedTextColor.YELLOW), // Paper
|
|
||||||
/**
|
|
||||||
* Aqua item name.
|
|
||||||
*/
|
|
||||||
RARE(net.kyori.adventure.text.format.NamedTextColor.AQUA), // Paper
|
|
||||||
/**
|
|
||||||
* Light purple item name.
|
|
||||||
*/
|
|
||||||
EPIC(net.kyori.adventure.text.format.NamedTextColor.LIGHT_PURPLE); // Paper
|
|
||||||
// Paper start - improve ItemRarity
|
// Paper start - improve ItemRarity
|
||||||
private final net.kyori.adventure.text.format.NamedTextColor color;
|
private final NamedTextColor color;
|
||||||
ItemRarity(final net.kyori.adventure.text.format.NamedTextColor color) {
|
|
||||||
|
ItemRarity(final NamedTextColor color) {
|
||||||
this.color = color;
|
this.color = color;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -33,7 +29,7 @@ public enum ItemRarity {
|
|||||||
*
|
*
|
||||||
* @return the color
|
* @return the color
|
||||||
*/
|
*/
|
||||||
public net.kyori.adventure.text.format.@org.jetbrains.annotations.NotNull TextColor color() {
|
public @org.jetbrains.annotations.NotNull TextColor color() {
|
||||||
return this.color;
|
return this.color;
|
||||||
}
|
}
|
||||||
// Paper end
|
// Paper end
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -14,50 +14,30 @@ import org.jetbrains.annotations.NotNull;
|
|||||||
*/
|
*/
|
||||||
public interface TrimMaterial extends Keyed, Translatable {
|
public interface TrimMaterial extends Keyed, Translatable {
|
||||||
|
|
||||||
/**
|
// Start generate - TrimMaterial
|
||||||
* {@link Material#QUARTZ}.
|
// @GeneratedFrom 1.21.4
|
||||||
*/
|
TrimMaterial AMETHYST = getTrimMaterial("amethyst");
|
||||||
public static final TrimMaterial QUARTZ = getTrimMaterial("quartz");
|
|
||||||
/**
|
TrimMaterial COPPER = getTrimMaterial("copper");
|
||||||
* {@link Material#IRON_INGOT}.
|
|
||||||
*/
|
TrimMaterial DIAMOND = getTrimMaterial("diamond");
|
||||||
public static final TrimMaterial IRON = getTrimMaterial("iron");
|
|
||||||
/**
|
TrimMaterial EMERALD = getTrimMaterial("emerald");
|
||||||
* {@link Material#NETHERITE_INGOT}.
|
|
||||||
*/
|
TrimMaterial GOLD = getTrimMaterial("gold");
|
||||||
public static final TrimMaterial NETHERITE = getTrimMaterial("netherite");
|
|
||||||
/**
|
TrimMaterial IRON = getTrimMaterial("iron");
|
||||||
* {@link Material#REDSTONE}.
|
|
||||||
*/
|
TrimMaterial LAPIS = getTrimMaterial("lapis");
|
||||||
public static final TrimMaterial REDSTONE = getTrimMaterial("redstone");
|
|
||||||
/**
|
TrimMaterial NETHERITE = getTrimMaterial("netherite");
|
||||||
* {@link Material#COPPER_INGOT}.
|
|
||||||
*/
|
TrimMaterial QUARTZ = getTrimMaterial("quartz");
|
||||||
public static final TrimMaterial COPPER = getTrimMaterial("copper");
|
|
||||||
/**
|
TrimMaterial REDSTONE = getTrimMaterial("redstone");
|
||||||
* {@link Material#GOLD_INGOT}.
|
|
||||||
*/
|
TrimMaterial RESIN = getTrimMaterial("resin");
|
||||||
public static final TrimMaterial GOLD = getTrimMaterial("gold");
|
// End generate - TrimMaterial
|
||||||
/**
|
|
||||||
* {@link Material#EMERALD}.
|
|
||||||
*/
|
|
||||||
public static final TrimMaterial EMERALD = getTrimMaterial("emerald");
|
|
||||||
/**
|
|
||||||
* {@link Material#DIAMOND}.
|
|
||||||
*/
|
|
||||||
public static final TrimMaterial DIAMOND = getTrimMaterial("diamond");
|
|
||||||
/**
|
|
||||||
* {@link Material#LAPIS_LAZULI}.
|
|
||||||
*/
|
|
||||||
public static final TrimMaterial LAPIS = getTrimMaterial("lapis");
|
|
||||||
/**
|
|
||||||
* {@link Material#AMETHYST_SHARD}.
|
|
||||||
*/
|
|
||||||
public static final TrimMaterial AMETHYST = getTrimMaterial("amethyst");
|
|
||||||
/**
|
|
||||||
* {@link Material#RESIN_BRICK}.
|
|
||||||
*/
|
|
||||||
public static final TrimMaterial RESIN = getTrimMaterial("resin");
|
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
private static TrimMaterial getTrimMaterial(@NotNull String key) {
|
private static TrimMaterial getTrimMaterial(@NotNull String key) {
|
||||||
@ -99,6 +79,5 @@ public interface TrimMaterial extends Keyed, Translatable {
|
|||||||
default net.kyori.adventure.key.@org.jetbrains.annotations.NotNull Key key() {
|
default net.kyori.adventure.key.@org.jetbrains.annotations.NotNull Key key() {
|
||||||
return org.bukkit.Keyed.super.key();
|
return org.bukkit.Keyed.super.key();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Paper end - Registry#getKey
|
// Paper end - Registry#getKey
|
||||||
}
|
}
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user