Compare commits

..
1339 changed files with 29424 additions and 31942 deletions

No files matched your search

+4 -4
View File
@@ -47,10 +47,10 @@ jobs:
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: JDK 25
- name: JDK 21
uses: actions/setup-java@v4
with:
java-version: 25
java-version: 21
distribution: 'zulu'
- name: Setup Gradle
@@ -115,14 +115,14 @@ jobs:
- name: Create Paperclip Jar
if: fromJSON(steps.determine.outputs.result).action == 'paperclip'
run: ./gradlew createPaperclipJar --stacktrace
run: ./gradlew createMojmapPaperclipJar --stacktrace
- name: Upload Paperclip Jar
if: fromJSON(steps.determine.outputs.result).action == 'paperclip'
uses: actions/upload-artifact@v4
with:
name: paper-${{ fromJSON(steps.determine.outputs.result).pr }}
path: paper-server/build/libs/paper-paperclip-*.jar
path: paper-server/build/libs/paper-paperclip-*-mojmap.jar
- name: Publish Artifacts
if: fromJSON(steps.determine.outputs.result).action == 'paperclip'
-1
View File
@@ -20,7 +20,6 @@ nbactions.xml
bin/
dist/
manifest.mf
__pycache__/
# Mac filesystem dust
.DS_Store/
+30 -9
View File
@@ -21,12 +21,12 @@ which can be obtained in (most) package managers such as `apt` (Debian / Ubuntu;
you will most likely use this for WSL), `homebrew` (macOS / Linux), and more:
- `git` (package `git` everywhere);
- A Java 25 or later JDK (packages vary, use Google/DuckDuckGo/etc.).
- A Java 21 or later JDK (packages vary, use Google/DuckDuckGo/etc.).
- [Adoptium](https://adoptium.net/) has builds for most operating systems.
- Paper requires JDK 25 to build, however, makes use of Gradle's
- Paper requires JDK 21 to build, however, makes use of Gradle's
[Toolchains](https://docs.gradle.org/current/userguide/toolchains.html)
feature to allow building with only JRE 21 or later installed. (Gradle will
automatically provision JDK 25 for compilation if it cannot find an existing
feature to allow building with only JRE 17 or later installed. (Gradle will
automatically provision JDK 21 for compilation if it cannot find an existing
installation).
If you're on Windows, check
@@ -36,11 +36,11 @@ If you're compiling with Docker, you can use Adoptium's
[`eclipse-temurin`](https://hub.docker.com/_/eclipse-temurin/) images like so:
```console
# docker run -it -v "$(pwd)":/data --rm eclipse-temurin:25.0.2_10-jdk bash
# docker run -it -v "$(pwd)":/data --rm eclipse-temurin:21.0.5_11-jdk bash
Pulling image...
root@abcdefg1234:/# javac -version
javac 25.0.2
javac 21.0.5
```
## Understanding Patches
@@ -66,7 +66,7 @@ On Windows, remove the `./` the beginning of `gradlew` commands;
**Only changes made in `paper-server/src/minecraft` have to deal with the patch system.**
`paper-server/src/minecraft` is not a git repositories in the traditional sense. Its
initial commits are the decompiled Minecraft source files. The per-file
initial commits are the decompiled and deobfuscated Minecraft source files. The per-file
patches are applied on top of these files as a single, large commit, which is then followed
by the individual feature-patch commits.
@@ -184,7 +184,8 @@ These steps assume the `origin` remote is your fork of this repository and `upst
## PR Policy
We'll accept changes that make sense. You should be able to justify their
existence, along with any maintenance costs that come with them.
existence, along with any maintenance costs that come with them. Using
[obfuscation helpers](#obfuscation-helpers) aids in the maintenance costs.
Remember that these changes will affect everyone who runs Paper, not just you
and your server.
@@ -280,7 +281,7 @@ public class SomeVanillaClass {
We are in the process of switching nullability annotation libraries, so you might need to use one or the other:
**For classes, we add or modifications to Vanilla Files**: Fields, method parameters and return types that are nullable should be marked via the
**For classes we add**: Fields, method parameters and return types that are nullable should be marked via the
`@Nullable` annotation from `org.jspecify.annotations`. Whenever you create a new class, add `@NullMarked`, meaning types
are assumed to be non-null by default. For less obvious placing such as on generics or arrays, see the [JSpecify docs](https://jspecify.dev/docs/user-guide/).
@@ -381,6 +382,26 @@ index a92bf8967..d0ab87d0f 100644
```
-->
## Obfuscation Helpers
While rarely needed, obfuscation helpers are sometimes useful when it comes
to unmapped local variables, or poorly named method parameters. In an effort
to make future updates easier on ourselves, Paper tries to use obfuscation
helpers wherever it makes sense. The purpose of these helpers is to make the
code more readable and maintainable. These helpers should be made easy to
inline by the JVM wherever possible.
An example of an obfuscation helper for a local variable:
```java
double d0 = entity.getX(); final double fromX = d0; // Paper - OBFHELPER
// ...
this.someMethod(fromX); // Paper
```
While they may not always be done in exactly the same way, the general goal is
always to improve readability and maintainability. Use your best judgment and do
what fits best in your situation.
## Configuration files
To use a configurable value in your patch, add a new field in either the
+20 -23
View File
@@ -1,6 +1,4 @@
Paper [![Version](https://img.shields.io/maven-metadata/v?metadataUrl=https%3A%2F%2Fartifactory.papermc.io%2Fartifactory%2Funiverse%2Fio%2Fpapermc%2Fpaper%2Fpaper-api%2Fmaven-metadata.xml&strategy=highestVersion&filter=26.1*&label=version&color=%23344ceb
)](https://papermc.io/downloads/paper)
[![Paper Build Status](https://img.shields.io/github/actions/workflow/status/PaperMC/Paper/build.yml?branch=main)](https://github.com/PaperMC/Paper/actions)
Paper [![Paper Build Status](https://img.shields.io/github/actions/workflow/status/PaperMC/Paper/build.yml?branch=main)](https://github.com/PaperMC/Paper/actions)
[![Discord](https://img.shields.io/discord/289587909051416579.svg?label=&logo=discord&logoColor=ffffff&color=7389D8&labelColor=6A7EC2)](https://discord.gg/papermc)
[![GitHub Sponsors](https://img.shields.io/github/sponsors/papermc?label=GitHub%20Sponsors)](https://github.com/sponsors/PaperMC)
[![Open Collective](https://img.shields.io/opencollective/all/papermc?label=OpenCollective%20Sponsors)](https://opencollective.com/papermc)
@@ -29,23 +27,6 @@ How To (Plugin Developers)
* See upcoming, pending, and recently added API [here](https://github.com/orgs/PaperMC/projects/2/views/4)
* Paper API javadocs here: [papermc.io/javadocs](https://papermc.io/javadocs/)
#### Repository (for paper-api)
See [the docs](https://docs.papermc.io/paper/dev/project-setup/#adding-paper-as-a-dependency) for more details.
##### Gradle
```kotlin
repositories {
maven {
url = uri("https://repo.papermc.io/repository/maven-public/")
}
}
dependencies {
compileOnly("io.papermc.paper:paper-api:26.1.2.build.+")
}
java {
toolchain.languageVersion.set(JavaLanguageVersion.of(25))
}
```
##### Maven
```xml
@@ -59,16 +40,32 @@ java {
<dependency>
<groupId>io.papermc.paper</groupId>
<artifactId>paper-api</artifactId>
<version>[26.1.2.build,)</version>
<version>1.21.11-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
```
##### Gradle
```kotlin
repositories {
maven {
url = uri("https://repo.papermc.io/repository/maven-public/")
}
}
dependencies {
compileOnly("io.papermc.paper:paper-api:1.21.11-R0.1-SNAPSHOT")
}
java {
toolchain.languageVersion.set(JavaLanguageVersion.of(21))
}
```
How To (Compiling Jar From Source)
------
To compile Paper, you need JDK 25 and an internet connection.
To compile Paper, you need JDK 21 and an internet connection.
Clone this repo, run `./gradlew applyPatches`, then `./gradlew createPaperclipJar` from your terminal. You can find the compiled jar in the `paper-server/build/libs` directory.
Clone this repo, run `./gradlew applyPatches`, then `./gradlew createMojmapBundlerJar` from your terminal. You can find the compiled jar in the `paper-server/build/libs` directory.
To get a full list of tasks, run `./gradlew tasks`.
+24 -41
View File
@@ -3,7 +3,6 @@
private-f net.minecraft.network.CompressionDecoder inflater
private-f net.minecraft.server.MinecraftServer connection
private-f net.minecraft.server.MinecraftServer levels
private-f net.minecraft.server.jsonrpc.internalapi.MinecraftGameRuleServiceImpl gameRules
private-f net.minecraft.world.item.ItemStack components
private-f net.minecraft.world.item.ItemStack item
private-f net.minecraft.world.level.block.entity.BeehiveBlockEntity stored
@@ -33,7 +32,7 @@ public net.minecraft.network.protocol.game.ServerboundMovePlayerPacket z
public net.minecraft.network.syncher.SynchedEntityData getItem(Lnet/minecraft/network/syncher/EntityDataAccessor;)Lnet/minecraft/network/syncher/SynchedEntityData$DataItem;
public net.minecraft.resources.RegistryOps lookupProvider
public net.minecraft.resources.RegistryOps$HolderLookupAdapter
public net.minecraft.server.Main forceUpgrade(Lnet/minecraft/world/level/storage/LevelStorageSource$LevelStorageAccess;Lcom/mojang/datafixers/DataFixer;ZLjava/util/function/BooleanSupplier;Lnet/minecraft/core/RegistryAccess;Z)V
public net.minecraft.server.Main forceUpgrade(Lnet/minecraft/world/level/storage/LevelStorageSource$LevelStorageAccess;Lnet/minecraft/world/level/storage/WorldData;Lcom/mojang/datafixers/DataFixer;ZLjava/util/function/BooleanSupplier;Lnet/minecraft/core/RegistryAccess;Z)V
public net.minecraft.server.MinecraftServer LOGGER
public net.minecraft.server.MinecraftServer doRunTask(Lnet/minecraft/server/TickTask;)V
public net.minecraft.server.MinecraftServer executor
@@ -42,13 +41,11 @@ public net.minecraft.server.MinecraftServer playerDataStorage
public net.minecraft.server.MinecraftServer resources
public net.minecraft.server.MinecraftServer serverThread
public net.minecraft.server.MinecraftServer$ReloadableResources
public net.minecraft.server.MinecraftServer$ReloadableResources <init>(Lnet/minecraft/server/packs/resources/CloseableResourceManager;Lnet/minecraft/server/ReloadableServerResources;)V
public net.minecraft.server.RegistryLayer STATIC_ACCESS
public net.minecraft.server.ReloadableServerResources
public net.minecraft.server.ServerAdvancementManager advancements
public net.minecraft.server.Services USERID_CACHE_FILE
public net.minecraft.server.dedicated.DedicatedServerProperties$WorldDimensionData
public net.minecraft.server.dedicated.DedicatedServerProperties$WorldDimensionData <init>(Lcom/google/gson/JsonObject;Ljava/lang/String;)V
public net.minecraft.server.dedicated.Settings getStringRaw(Ljava/lang/String;)Ljava/lang/String;
public net.minecraft.server.dedicated.Settings properties
public net.minecraft.server.level.ChunkHolder oldTicketLevel
@@ -99,7 +96,6 @@ public net.minecraft.server.level.ServerPlayer setShoulderEntityRight(Lnet/minec
public net.minecraft.server.level.ServerPlayer triggerDimensionChangeTriggers(Lnet/minecraft/server/level/ServerLevel;)V
public net.minecraft.server.level.ServerPlayer wardenSpawnTracker
public net.minecraft.server.level.ServerPlayer$RespawnPosAngle
public net.minecraft.server.level.ServerPlayer$RespawnPosAngle <init>(Lnet/minecraft/world/phys/Vec3;FF)V
public net.minecraft.server.level.ServerPlayerGameMode level
public net.minecraft.server.network.ServerConfigurationPacketListenerImpl clientInformation
public net.minecraft.server.network.ServerConfigurationPacketListenerImpl currentTask
@@ -122,6 +118,7 @@ public net.minecraft.stats.ServerRecipeBook known
public net.minecraft.tags.TagEntry id
public net.minecraft.tags.TagEntry required
public net.minecraft.tags.TagEntry tag
public net.minecraft.util.AbstractListBuilder
public net.minecraft.util.Util onThreadException(Ljava/lang/Thread;Ljava/lang/Throwable;)V
public net.minecraft.util.datafix.fixes.BlockStateData register(ILcom/mojang/serialization/Dynamic;[Lcom/mojang/serialization/Dynamic;)V
public net.minecraft.util.datafix.fixes.ItemIdFix ITEM_NAMES
@@ -140,10 +137,8 @@ public net.minecraft.world.damagesource.CombatTracker takingDamage
public net.minecraft.world.damagesource.DamageSource <init>(Lnet/minecraft/core/Holder;Lnet/minecraft/world/entity/Entity;Lnet/minecraft/world/entity/Entity;Lnet/minecraft/world/phys/Vec3;)V
public net.minecraft.world.effect.MobEffect attributeModifiers
public net.minecraft.world.effect.MobEffect$AttributeTemplate
public net.minecraft.world.effect.MobEffect$AttributeTemplate <init>(Lnet/minecraft/resources/Identifier;DLnet/minecraft/world/entity/ai/attributes/AttributeModifier$Operation;)V
public net.minecraft.world.effect.MobEffectInstance hiddenEffect
public net.minecraft.world.effect.MobEffectInstance isShorterDurationThan(Lnet/minecraft/world/effect/MobEffectInstance;)Z
public net.minecraft.world.entity.AgeableMob setAgeLocked(Z)V
public net.minecraft.world.entity.AreaEffectCloud durationOnUse
public net.minecraft.world.entity.AreaEffectCloud owner
public net.minecraft.world.entity.AreaEffectCloud potionContents
@@ -224,7 +219,6 @@ public net.minecraft.world.entity.Interaction setHeight(F)V
public net.minecraft.world.entity.Interaction setResponse(Z)V
public net.minecraft.world.entity.Interaction setWidth(F)V
public net.minecraft.world.entity.Interaction$PlayerAction
public net.minecraft.world.entity.Interaction$PlayerAction <init>(Ljava/util/UUID;J)V
public net.minecraft.world.entity.ItemBasedSteering boostTime
public net.minecraft.world.entity.ItemBasedSteering boostTimeTotal()I
public net.minecraft.world.entity.ItemBasedSteering boosting
@@ -256,7 +250,6 @@ public net.minecraft.world.entity.Mob getAmbientSound()Lnet/minecraft/sounds/Sou
public net.minecraft.world.entity.Mob isSunBurnTick()Z
public net.minecraft.world.entity.Mob lootTable
public net.minecraft.world.entity.Mob lootTableSeed
public net.minecraft.world.entity.Mob persistenceRequired
public net.minecraft.world.entity.OminousItemSpawner setItem(Lnet/minecraft/world/item/ItemStack;)V
public net.minecraft.world.entity.OminousItemSpawner spawnItemAfterTicks
public net.minecraft.world.entity.ai.attributes.Attribute sentiment
@@ -284,10 +277,6 @@ public net.minecraft.world.entity.animal.bee.Bee setRolling(Z)V
public net.minecraft.world.entity.animal.bee.Bee stayOutOfHiveCountdown
public net.minecraft.world.entity.animal.bee.Bee ticksWithoutNectarSinceExitingHive
public net.minecraft.world.entity.animal.bee.Bee timeSinceSting
public net.minecraft.world.entity.animal.chicken.Chicken getSoundVariant()Lnet/minecraft/core/Holder;
public net.minecraft.world.entity.animal.chicken.Chicken setSoundVariant(Lnet/minecraft/core/Holder;)V
public net.minecraft.world.entity.animal.cow.Cow getSoundVariant()Lnet/minecraft/core/Holder;
public net.minecraft.world.entity.animal.cow.Cow setSoundVariant(Lnet/minecraft/core/Holder;)V
public net.minecraft.world.entity.animal.cow.MushroomCow setVariant(Lnet/minecraft/world/entity/animal/cow/MushroomCow$Variant;)V
public net.minecraft.world.entity.animal.cow.MushroomCow stewEffects
public net.minecraft.world.entity.animal.dolphin.Dolphin treasurePos
@@ -297,11 +286,9 @@ public net.minecraft.world.entity.animal.equine.AbstractHorse owner
public net.minecraft.world.entity.animal.equine.Horse setVariantAndMarkings(Lnet/minecraft/world/entity/animal/equine/Variant;Lnet/minecraft/world/entity/animal/equine/Markings;)V
public net.minecraft.world.entity.animal.equine.Llama setVariant(Lnet/minecraft/world/entity/animal/equine/Llama$Variant;)V
public net.minecraft.world.entity.animal.equine.SkeletonHorse trapTime
public net.minecraft.world.entity.animal.feline.Cat getSoundVariant()Lnet/minecraft/core/Holder;
public net.minecraft.world.entity.animal.feline.Cat isRelaxStateOne()Z
public net.minecraft.world.entity.animal.feline.Cat setCollarColor(Lnet/minecraft/world/item/DyeColor;)V
public net.minecraft.world.entity.animal.feline.Cat setRelaxStateOne(Z)V
public net.minecraft.world.entity.animal.feline.Cat setSoundVariant(Lnet/minecraft/core/Holder;)V
public net.minecraft.world.entity.animal.feline.Cat setVariant(Lnet/minecraft/core/Holder;)V
public net.minecraft.world.entity.animal.feline.Ocelot isTrusting()Z
public net.minecraft.world.entity.animal.feline.Ocelot setTrusting(Z)V
@@ -325,8 +312,6 @@ public net.minecraft.world.entity.animal.nautilus.AbstractNautilus inventory
public net.minecraft.world.entity.animal.panda.Panda getEatCounter()I
public net.minecraft.world.entity.animal.panda.Panda setEatCounter(I)V
public net.minecraft.world.entity.animal.parrot.Parrot setVariant(Lnet/minecraft/world/entity/animal/parrot/Parrot$Variant;)V
public net.minecraft.world.entity.animal.pig.Pig getSoundVariant()Lnet/minecraft/core/Holder;
public net.minecraft.world.entity.animal.pig.Pig setSoundVariant(Lnet/minecraft/core/Holder;)V
public net.minecraft.world.entity.animal.pig.Pig setVariant(Lnet/minecraft/core/Holder;)V
public net.minecraft.world.entity.animal.pig.Pig steering
public net.minecraft.world.entity.animal.rabbit.Rabbit moreCarrotTicks
@@ -550,21 +535,20 @@ public net.minecraft.world.inventory.Slot slot
public net.minecraft.world.item.AdventureModePredicate predicates
public net.minecraft.world.item.BucketItem content
public net.minecraft.world.item.CrossbowItem FIREWORK_POWER
public net.minecraft.world.item.DebugStickItem handleInteraction(Lnet/minecraft/server/level/ServerPlayer;Lnet/minecraft/world/level/block/state/BlockState;Lnet/minecraft/world/level/LevelAccessor;Lnet/minecraft/core/BlockPos;ZLnet/minecraft/world/item/ItemStack;)Z
public net.minecraft.world.item.DebugStickItem handleInteraction(Lnet/minecraft/world/entity/player/Player;Lnet/minecraft/world/level/block/state/BlockState;Lnet/minecraft/world/level/LevelAccessor;Lnet/minecraft/core/BlockPos;ZLnet/minecraft/world/item/ItemStack;)Z
public net.minecraft.world.item.ItemCooldowns cooldowns
public net.minecraft.world.item.ItemCooldowns tickCount
public net.minecraft.world.item.ItemCooldowns$CooldownInstance
public net.minecraft.world.item.ItemCooldowns$CooldownInstance <init>(II)V
public net.minecraft.world.item.ItemStackLinkedSet TYPE_AND_TAG
public net.minecraft.world.item.JukeboxSongPlayer song
public net.minecraft.world.item.MapItem createNewSavedData(Lnet/minecraft/server/level/ServerLevel;IIIZZLnet/minecraft/resources/ResourceKey;)Lnet/minecraft/world/level/saveddata/maps/MapId;
public net.minecraft.world.item.StandingAndWallBlockItem wallBlock
public net.minecraft.world.item.component.BundleContents$Mutable getMaxAmountToAdd(Lnet/minecraft/world/item/ItemStack;)I
public net.minecraft.world.item.component.ItemContainerContents MAX_SIZE
public net.minecraft.world.item.component.ItemContainerContents items
public net.minecraft.world.item.component.ResolvableProfile unpack()Lcom/mojang/datafixers/util/Either;
public net.minecraft.world.item.component.ResolvableProfile$Dynamic <init>(Lcom/mojang/datafixers/util/Either;Lnet/minecraft/world/entity/player/PlayerSkin$Patch;)V
public net.minecraft.world.item.component.ResolvableProfile$Partial
public net.minecraft.world.item.component.ResolvableProfile$Partial <init>(Ljava/util/Optional;Ljava/util/Optional;Lcom/mojang/authlib/properties/PropertyMap;)V
public net.minecraft.world.item.component.ResolvableProfile$Partial MAP_CODEC
public net.minecraft.world.item.component.ResolvableProfile$Static <init>(Lcom/mojang/datafixers/util/Either;Lnet/minecraft/world/entity/player/PlayerSkin$Patch;)V
public net.minecraft.world.item.context.UseOnContext <init>(Lnet/minecraft/world/level/Level;Lnet/minecraft/world/entity/player/Player;Lnet/minecraft/world/InteractionHand;Lnet/minecraft/world/item/ItemStack;Lnet/minecraft/world/phys/BlockHitResult;)V
@@ -601,7 +585,6 @@ public net.minecraft.world.level.TicketStorage tickets
public net.minecraft.world.level.biome.Biome climateSettings
public net.minecraft.world.level.biome.Biome getTemperature(Lnet/minecraft/core/BlockPos;I)F
public net.minecraft.world.level.biome.Biome$ClimateSettings
public net.minecraft.world.level.biome.Biome$ClimateSettings <init>(ZFLnet/minecraft/world/level/biome/Biome$TemperatureModifier;F)V
public net.minecraft.world.level.block.Block popExperience(Lnet/minecraft/server/level/ServerLevel;Lnet/minecraft/core/BlockPos;I)V
public net.minecraft.world.level.block.ChestBlock isBlockedChestByBlock(Lnet/minecraft/world/level/BlockGetter;Lnet/minecraft/core/BlockPos;)Z
public net.minecraft.world.level.block.ComposterBlock$EmptyContainer
@@ -717,20 +700,20 @@ public net.minecraft.world.level.chunk.status.ChunkStatusTasks postLoadProtoChun
public net.minecraft.world.level.chunk.storage.EntityStorage entityDeserializerQueue
public net.minecraft.world.level.chunk.storage.EntityStorage level
public net.minecraft.world.level.chunk.storage.RegionFileStorage regionCache
public net.minecraft.world.level.dimension.end.EnderDragonFight GATEWAY_COUNT
public net.minecraft.world.level.dimension.end.EnderDragonFight dragonEvent
public net.minecraft.world.level.dimension.end.EnderDragonFight dragonUUID
public net.minecraft.world.level.dimension.end.EnderDragonFight exitPortalLocation
public net.minecraft.world.level.dimension.end.EnderDragonFight findExitPortal()Lnet/minecraft/world/level/block/state/pattern/BlockPattern$BlockPatternMatch;
public net.minecraft.world.level.dimension.end.EnderDragonFight gateways
public net.minecraft.world.level.dimension.end.EnderDragonFight hasPreviouslyKilledDragon
public net.minecraft.world.level.dimension.end.EnderDragonFight level
public net.minecraft.world.level.dimension.end.EnderDragonFight respawnCrystals
public net.minecraft.world.level.dimension.end.EnderDragonFight respawnDragon(Ljava/util/List;)V
public net.minecraft.world.level.dimension.end.EnderDragonFight respawnStage
public net.minecraft.world.level.dimension.end.EnderDragonFight setRespawnStage(Lnet/minecraft/world/level/dimension/end/DragonRespawnStage;)V
public net.minecraft.world.level.dimension.end.EnderDragonFight spawnExitPortal(Z)V
public net.minecraft.world.level.dimension.end.EnderDragonFight spawnNewGateway(Lnet/minecraft/core/BlockPos;)V
public net.minecraft.world.level.dimension.end.EndDragonFight GATEWAY_COUNT
public net.minecraft.world.level.dimension.end.EndDragonFight dragonEvent
public net.minecraft.world.level.dimension.end.EndDragonFight dragonUUID
public net.minecraft.world.level.dimension.end.EndDragonFight findExitPortal()Lnet/minecraft/world/level/block/state/pattern/BlockPattern$BlockPatternMatch;
public net.minecraft.world.level.dimension.end.EndDragonFight gateways
public net.minecraft.world.level.dimension.end.EndDragonFight level
public net.minecraft.world.level.dimension.end.EndDragonFight portalLocation
public net.minecraft.world.level.dimension.end.EndDragonFight previouslyKilled
public net.minecraft.world.level.dimension.end.EndDragonFight respawnCrystals
public net.minecraft.world.level.dimension.end.EndDragonFight respawnDragon(Ljava/util/List;)V
public net.minecraft.world.level.dimension.end.EndDragonFight respawnStage
public net.minecraft.world.level.dimension.end.EndDragonFight setRespawnStage(Lnet/minecraft/world/level/dimension/end/DragonRespawnAnimation;)V
public net.minecraft.world.level.dimension.end.EndDragonFight spawnExitPortal(Z)V
public net.minecraft.world.level.dimension.end.EndDragonFight spawnNewGateway(Lnet/minecraft/core/BlockPos;)V
public net.minecraft.world.level.entity.PersistentEntitySectionManager ensureChunkQueuedForLoad(J)V
public net.minecraft.world.level.entity.PersistentEntitySectionManager permanentStorage
public net.minecraft.world.level.gamerules.GameRules rules
@@ -746,7 +729,6 @@ public net.minecraft.world.level.levelgen.SurfaceRules$LazyCondition
public net.minecraft.world.level.levelgen.SurfaceRules$LazyYCondition
public net.minecraft.world.level.levelgen.SurfaceRules$SurfaceRule
public net.minecraft.world.level.levelgen.SurfaceRules$VerticalGradientConditionSource
public net.minecraft.world.level.levelgen.SurfaceRules$VerticalGradientConditionSource <init>(Lnet/minecraft/resources/Identifier;Lnet/minecraft/world/level/levelgen/VerticalAnchor;Lnet/minecraft/world/level/levelgen/VerticalAnchor;)V
public net.minecraft.world.level.levelgen.structure.StructurePiece SHAPE_CHECK_BLOCKS
public net.minecraft.world.level.levelgen.structure.placement.StructurePlacement exclusionZone
public net.minecraft.world.level.levelgen.structure.placement.StructurePlacement frequency
@@ -755,11 +737,10 @@ public net.minecraft.world.level.levelgen.structure.placement.StructurePlacement
public net.minecraft.world.level.levelgen.structure.placement.StructurePlacement salt
public net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate entityInfoList
public net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate palettes
public net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplateManager resourceManagerSource
public net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplateManager loadFromGenerated(Lnet/minecraft/resources/Identifier;)Ljava/util/Optional;
public net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplateManager loadFromResource(Lnet/minecraft/resources/Identifier;)Ljava/util/Optional;
public net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplateManager readStructure(Ljava/io/InputStream;)Lnet/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplate;
public net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplateManager structureRepository
public net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplateManager tryLoad(Lnet/minecraft/resources/Identifier;)Ljava/util/Optional;
public net.minecraft.world.level.levelgen.structure.templatesystem.loader.TemplateSource readStructure(Ljava/io/InputStream;)Lnet/minecraft/nbt/CompoundTag;
public net.minecraft.world.level.levelgen.structure.templatesystem.loader.TemplateSource readStructure(Lnet/minecraft/nbt/CompoundTag;)Lnet/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplate;
public net.minecraft.world.level.material.MapColor MATERIAL_COLORS
public net.minecraft.world.level.pathfinder.Path nodes
public net.minecraft.world.level.pathfinder.PathFinder nodeEvaluator
@@ -768,10 +749,10 @@ public net.minecraft.world.level.saveddata.maps.MapItemSavedData carriedByPlayer
public net.minecraft.world.level.saveddata.maps.MapItemSavedData decorations
public net.minecraft.world.level.saveddata.maps.MapItemSavedData setColorsDirty(II)V
public net.minecraft.world.level.saveddata.maps.MapItemSavedData setDecorationsDirty()V
public net.minecraft.world.level.storage.DimensionDataStorage cache
public net.minecraft.world.level.storage.LevelStorageSource baseDir
public net.minecraft.world.level.storage.LevelStorageSource$LevelStorageAccess levelDirectory
public net.minecraft.world.level.storage.PrimaryLevelData settings
public net.minecraft.world.level.storage.SavedDataStorage cache
public net.minecraft.world.level.storage.TagValueInput input
public net.minecraft.world.scores.Objective displayName
public net.minecraft.world.scores.criteria.ObjectiveCriteria CRITERIA_CACHE
@@ -798,6 +779,8 @@ public-f net.minecraft.world.item.trading.MerchantOffer maxUses
public-f net.minecraft.world.item.trading.MerchantOffer priceMultiplier
public-f net.minecraft.world.item.trading.MerchantOffer rewardExp
public-f net.minecraft.world.item.trading.MerchantOffer xp
public-f net.minecraft.world.level.LevelSettings hardcore
public-f net.minecraft.world.level.LevelSettings levelName
public-f net.minecraft.world.level.block.ChestBlock MENU_PROVIDER_COMBINER
public-f net.minecraft.world.level.block.entity.BannerBlockEntity baseColor
public-f net.minecraft.world.level.saveddata.maps.MapItemSavedData centerX
+5 -5
View File
@@ -2,7 +2,7 @@ import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import org.gradle.api.tasks.testing.logging.TestLogEvent
plugins {
id("io.papermc.paperweight.core") version "2.0.0-SNAPSHOT" apply false
id("io.papermc.paperweight.core") version "2.0.0-beta.19" apply false
}
subprojects {
@@ -11,7 +11,7 @@ subprojects {
extensions.configure<JavaPluginExtension> {
toolchain {
languageVersion = JavaLanguageVersion.of(25)
languageVersion = JavaLanguageVersion.of(21)
}
}
}
@@ -21,7 +21,7 @@ val paperMavenPublicUrl = "https://repo.papermc.io/repository/maven-public/"
subprojects {
tasks.withType<JavaCompile>().configureEach {
options.encoding = Charsets.UTF_8.name()
options.release = 25
options.release = 21
options.isFork = true
options.compilerArgs.addAll(listOf("-Xlint:-deprecation", "-Xlint:-removal"))
}
@@ -46,8 +46,8 @@ subprojects {
extensions.configure<PublishingExtension> {
repositories {
maven("https://artifactory.papermc.io/artifactory/releases/") {
name = "paperReleases"
maven("https://artifactory.papermc.io/artifactory/snapshots/") {
name = "paperSnapshots"
credentials(PasswordCredentials::class)
}
}
+3 -3
View File
@@ -1,9 +1,9 @@
group=io.papermc.paper
mcVersion=26.1.2
version=1.21.11-R0.1-SNAPSHOT
mcVersion=1.21.11
# This is the current API version for use in (paper-)plugin.yml files
# During snapshot cycles this should be the anticipated version of the release target
apiVersion=26.1.2
channel=ALPHA
apiVersion=1.21.11
# Set to true while updating Minecraft version
updatingMinecraft=false
Binary file not shown.
+1 -1
View File
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.0-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Vendored
+1 -1
View File
@@ -57,7 +57,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/2d6327017519d23b96af35865dc997fcb544fb40/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
+12 -12
View File
@@ -14,8 +14,8 @@ java {
val annotationsVersion = "26.0.2"
val adventureVersion = "4.26.1"
val bungeeCordChatVersion = "1.21-R0.2-deprecated+build.21"
val slf4jVersion = "2.0.17"
val log4jVersion = "2.25.2"
val slf4jVersion = "2.0.16"
val log4jVersion = "2.24.1"
val apiAndDocs: Configuration by configurations.creating {
attributes {
@@ -42,13 +42,13 @@ abstract class MockitoAgentProvider : CommandLineArgumentProvider {
dependencies {
// api dependencies are listed transitively to API consumers
api("com.google.guava:guava:33.5.0-jre")
api("com.google.code.gson:gson:2.13.2")
api("com.google.guava:guava:33.3.1-jre")
api("com.google.code.gson:gson:2.11.0")
api("org.yaml:snakeyaml:2.2")
api("org.joml:joml:1.10.8") {
isTransitive = false // https://github.com/JOML-CI/JOML/issues/352
}
api("it.unimi.dsi:fastutil:8.5.18")
api("it.unimi.dsi:fastutil:8.5.15")
api("org.apache.logging.log4j:log4j-api:$log4jVersion")
api("org.slf4j:slf4j-api:$slf4jVersion")
api("com.mojang:brigadier:1.3.10")
@@ -82,13 +82,13 @@ dependencies {
api("org.jspecify:jspecify:1.0.0")
// Test dependencies
testImplementation("org.apache.commons:commons-lang3:3.20.0")
testImplementation("org.junit.jupiter:junit-jupiter:6.0.3")
testImplementation("org.apache.commons:commons-lang3:3.17.0")
testImplementation("org.junit.jupiter:junit-jupiter:5.12.2")
testImplementation("org.hamcrest:hamcrest:2.2")
testImplementation("org.mockito:mockito-core:5.22.0")
testImplementation("org.mockito:mockito-core:5.14.1")
testImplementation("org.ow2.asm:asm-tree:9.9.1")
mockitoAgent("org.mockito:mockito-core:5.22.0") { isTransitive = false } // configure mockito agent that is needed in newer java versions
testRuntimeOnly("org.junit.platform:junit-platform-launcher:6.0.3")
mockitoAgent("org.mockito:mockito-core:5.14.1") { isTransitive = false } // configure mockito agent that is needed in newer java versions
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
}
val generatedDir: java.nio.file.Path = layout.projectDirectory.dir("src/generated/java").asFile.toPath()
@@ -187,11 +187,11 @@ tasks.withType<Javadoc>().configureEach {
options.use()
options.isDocFilesSubDirs = true
options.links(
"https://guava.dev/releases/33.5.0-jre/api/docs/",
"https://guava.dev/releases/33.3.1-jre/api/docs/",
"https://www.javadocs.dev/org.yaml/snakeyaml/2.2/",
"https://www.javadocs.dev/org.jetbrains/annotations/$annotationsVersion/",
"https://www.javadocs.dev/org.joml/joml/1.10.8/",
"https://www.javadocs.dev/com.google.code.gson/gson/2.13.2",
"https://www.javadocs.dev/com.google.code.gson/gson/2.11.0",
"https://jspecify.dev/docs/api/",
"https://jd.advntr.dev/api/$adventureVersion/",
"https://jd.advntr.dev/key/$adventureVersion/",
@@ -130,7 +130,7 @@ public interface VanillaGoal<T extends Mob> extends Goal<T> {
GoalKey<Creature> FLEE_SUN = create("flee_sun", Creature.class);
GoalKey<Creature> FOLLOW_PLAYER_RIDDEN_ENTITY = create("follow_player_ridden_entity", Creature.class);
GoalKey<Creature> FOLLOW_BOAT = create("follow_boat", Creature.class);
GoalKey<Creature> GOLEM_RANDOM_STROLL_IN_VILLAGE = create("golem_random_stroll_in_village", Creature.class);
@@ -2937,13 +2937,6 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> GOLD_ORE = create(key("gold_ore"));
/**
* {@code minecraft:golden_dandelion}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> GOLDEN_DANDELION = create(key("golden_dandelion"));
/**
* {@code minecraft:granite}
*
@@ -5520,13 +5513,6 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> POTTED_FLOWERING_AZALEA_BUSH = create(key("potted_flowering_azalea_bush"));
/**
* {@code minecraft:potted_golden_dandelion}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> POTTED_GOLDEN_DANDELION = create(key("potted_golden_dandelion"));
/**
* {@code minecraft:potted_jungle_sapling}
*
@@ -1,54 +0,0 @@
package io.papermc.paper.registry.keys;
import static net.kyori.adventure.key.Key.key;
import io.papermc.paper.annotation.GeneratedClass;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key;
import org.bukkit.entity.Cat;
import org.jspecify.annotations.NullMarked;
/**
* Vanilla keys for {@link RegistryKey#CAT_SOUND_VARIANT}.
*
* @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
@GeneratedClass
public final class CatSoundVariantKeys {
/**
* {@code minecraft:classic}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Cat.SoundVariant> CLASSIC = create(key("classic"));
/**
* {@code minecraft:royal}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Cat.SoundVariant> ROYAL = create(key("royal"));
private CatSoundVariantKeys() {
}
/**
* Creates a typed key for {@link Cat.SoundVariant} in the registry {@code minecraft:cat_sound_variant}.
*
* @param key the value's key in the registry
* @return a new typed key
*/
public static TypedKey<Cat.SoundVariant> create(final Key key) {
return TypedKey.create(RegistryKey.CAT_SOUND_VARIANT, key);
}
}
@@ -1,54 +0,0 @@
package io.papermc.paper.registry.keys;
import static net.kyori.adventure.key.Key.key;
import io.papermc.paper.annotation.GeneratedClass;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key;
import org.bukkit.entity.Chicken;
import org.jspecify.annotations.NullMarked;
/**
* Vanilla keys for {@link RegistryKey#CHICKEN_SOUND_VARIANT}.
*
* @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
@GeneratedClass
public final class ChickenSoundVariantKeys {
/**
* {@code minecraft:classic}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Chicken.SoundVariant> CLASSIC = create(key("classic"));
/**
* {@code minecraft:picky}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Chicken.SoundVariant> PICKY = create(key("picky"));
private ChickenSoundVariantKeys() {
}
/**
* Creates a typed key for {@link Chicken.SoundVariant} in the registry {@code minecraft:chicken_sound_variant}.
*
* @param key the value's key in the registry
* @return a new typed key
*/
public static TypedKey<Chicken.SoundVariant> create(final Key key) {
return TypedKey.create(RegistryKey.CHICKEN_SOUND_VARIANT, key);
}
}
@@ -1,54 +0,0 @@
package io.papermc.paper.registry.keys;
import static net.kyori.adventure.key.Key.key;
import io.papermc.paper.annotation.GeneratedClass;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key;
import org.bukkit.entity.Cow;
import org.jspecify.annotations.NullMarked;
/**
* Vanilla keys for {@link RegistryKey#COW_SOUND_VARIANT}.
*
* @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
@GeneratedClass
public final class CowSoundVariantKeys {
/**
* {@code minecraft:classic}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Cow.SoundVariant> CLASSIC = create(key("classic"));
/**
* {@code minecraft:moody}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Cow.SoundVariant> MOODY = create(key("moody"));
private CowSoundVariantKeys() {
}
/**
* Creates a typed key for {@link Cow.SoundVariant} in the registry {@code minecraft:cow_sound_variant}.
*
* @param key the value's key in the registry
* @return a new typed key
*/
public static TypedKey<Cow.SoundVariant> create(final Key key) {
return TypedKey.create(RegistryKey.COW_SOUND_VARIANT, key);
}
}
@@ -25,13 +25,6 @@ import org.jspecify.annotations.NullMarked;
@NullMarked
@GeneratedClass
public final class DataComponentTypeKeys {
/**
* {@code minecraft:additional_trade_cost}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> ADDITIONAL_TRADE_COST = create(key("additional_trade_cost"));
/**
* {@code minecraft:attack_range}
*
@@ -137,13 +130,6 @@ public final class DataComponentTypeKeys {
*/
public static final TypedKey<DataComponentType> CAT_COLLAR = create(key("cat/collar"));
/**
* {@code minecraft:cat/sound_variant}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> CAT_SOUND_VARIANT = create(key("cat/sound_variant"));
/**
* {@code minecraft:cat/variant}
*
@@ -158,13 +144,6 @@ public final class DataComponentTypeKeys {
*/
public static final TypedKey<DataComponentType> CHARGED_PROJECTILES = create(key("charged_projectiles"));
/**
* {@code minecraft:chicken/sound_variant}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> CHICKEN_SOUND_VARIANT = create(key("chicken/sound_variant"));
/**
* {@code minecraft:chicken/variant}
*
@@ -193,13 +172,6 @@ public final class DataComponentTypeKeys {
*/
public static final TypedKey<DataComponentType> CONTAINER_LOOT = create(key("container_loot"));
/**
* {@code minecraft:cow/sound_variant}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> COW_SOUND_VARIANT = create(key("cow/sound_variant"));
/**
* {@code minecraft:cow/variant}
*
@@ -270,13 +242,6 @@ public final class DataComponentTypeKeys {
*/
public static final TypedKey<DataComponentType> DEBUG_STICK_STATE = create(key("debug_stick_state"));
/**
* {@code minecraft:dye}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> DYE = create(key("dye"));
/**
* {@code minecraft:dyed_color}
*
@@ -529,13 +494,6 @@ public final class DataComponentTypeKeys {
*/
public static final TypedKey<DataComponentType> PIERCING_WEAPON = create(key("piercing_weapon"));
/**
* {@code minecraft:pig/sound_variant}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> PIG_SOUND_VARIANT = create(key("pig/sound_variant"));
/**
* {@code minecraft:pig/variant}
*
@@ -3959,13 +3959,6 @@ public final class ItemTypeKeys {
*/
public static final TypedKey<ItemType> GOLDEN_CHESTPLATE = create(key("golden_chestplate"));
/**
* {@code minecraft:golden_dandelion}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> GOLDEN_DANDELION = create(key("golden_dandelion"));
/**
* {@code minecraft:golden_helmet}
*
@@ -1,61 +0,0 @@
package io.papermc.paper.registry.keys;
import static net.kyori.adventure.key.Key.key;
import io.papermc.paper.annotation.GeneratedClass;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key;
import org.bukkit.entity.Pig;
import org.jspecify.annotations.NullMarked;
/**
* Vanilla keys for {@link RegistryKey#PIG_SOUND_VARIANT}.
*
* @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
@GeneratedClass
public final class PigSoundVariantKeys {
/**
* {@code minecraft:big}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Pig.SoundVariant> BIG = create(key("big"));
/**
* {@code minecraft:classic}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Pig.SoundVariant> CLASSIC = create(key("classic"));
/**
* {@code minecraft:mini}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Pig.SoundVariant> MINI = create(key("mini"));
private PigSoundVariantKeys() {
}
/**
* Creates a typed key for {@link Pig.SoundVariant} in the registry {@code minecraft:pig_sound_variant}.
*
* @param key the value's key in the registry
* @return a new typed key
*/
public static TypedKey<Pig.SoundVariant> create(final Key key) {
return TypedKey.create(RegistryKey.PIG_SOUND_VARIANT, key);
}
}
@@ -3707,34 +3707,6 @@ public final class SoundEventKeys {
*/
public static final TypedKey<Sound> BLOCK_NOTE_BLOCK_SNARE = create(key("block.note_block.snare"));
/**
* {@code minecraft:block.note_block.trumpet}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> BLOCK_NOTE_BLOCK_TRUMPET = create(key("block.note_block.trumpet"));
/**
* {@code minecraft:block.note_block.trumpet_exposed}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> BLOCK_NOTE_BLOCK_TRUMPET_EXPOSED = create(key("block.note_block.trumpet_exposed"));
/**
* {@code minecraft:block.note_block.trumpet_oxidized}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> BLOCK_NOTE_BLOCK_TRUMPET_OXIDIZED = create(key("block.note_block.trumpet_oxidized"));
/**
* {@code minecraft:block.note_block.trumpet_weathered}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> BLOCK_NOTE_BLOCK_TRUMPET_WEATHERED = create(key("block.note_block.trumpet_weathered"));
/**
* {@code minecraft:block.note_block.xylophone}
*
@@ -6059,153 +6031,6 @@ public final class SoundEventKeys {
*/
public static final TypedKey<Sound> ENTITY_AXOLOTL_SWIM = create(key("entity.axolotl.swim"));
/**
* {@code minecraft:entity.baby_cat.ambient}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_BABY_CAT_AMBIENT = create(key("entity.baby_cat.ambient"));
/**
* {@code minecraft:entity.baby_cat.beg_for_food}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_BABY_CAT_BEG_FOR_FOOD = create(key("entity.baby_cat.beg_for_food"));
/**
* {@code minecraft:entity.baby_cat.death}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_BABY_CAT_DEATH = create(key("entity.baby_cat.death"));
/**
* {@code minecraft:entity.baby_cat.eat}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_BABY_CAT_EAT = create(key("entity.baby_cat.eat"));
/**
* {@code minecraft:entity.baby_cat.hiss}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_BABY_CAT_HISS = create(key("entity.baby_cat.hiss"));
/**
* {@code minecraft:entity.baby_cat.hurt}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_BABY_CAT_HURT = create(key("entity.baby_cat.hurt"));
/**
* {@code minecraft:entity.baby_cat.purr}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_BABY_CAT_PURR = create(key("entity.baby_cat.purr"));
/**
* {@code minecraft:entity.baby_cat.purreow}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_BABY_CAT_PURREOW = create(key("entity.baby_cat.purreow"));
/**
* {@code minecraft:entity.baby_cat.stray_ambient}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_BABY_CAT_STRAY_AMBIENT = create(key("entity.baby_cat.stray_ambient"));
/**
* {@code minecraft:entity.baby_chicken.ambient}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_BABY_CHICKEN_AMBIENT = create(key("entity.baby_chicken.ambient"));
/**
* {@code minecraft:entity.baby_chicken.death}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_BABY_CHICKEN_DEATH = create(key("entity.baby_chicken.death"));
/**
* {@code minecraft:entity.baby_chicken.hurt}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_BABY_CHICKEN_HURT = create(key("entity.baby_chicken.hurt"));
/**
* {@code minecraft:entity.baby_chicken.step}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_BABY_CHICKEN_STEP = create(key("entity.baby_chicken.step"));
/**
* {@code minecraft:entity.baby_horse.ambient}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_BABY_HORSE_AMBIENT = create(key("entity.baby_horse.ambient"));
/**
* {@code minecraft:entity.baby_horse.angry}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_BABY_HORSE_ANGRY = create(key("entity.baby_horse.angry"));
/**
* {@code minecraft:entity.baby_horse.breathe}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_BABY_HORSE_BREATHE = create(key("entity.baby_horse.breathe"));
/**
* {@code minecraft:entity.baby_horse.death}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_BABY_HORSE_DEATH = create(key("entity.baby_horse.death"));
/**
* {@code minecraft:entity.baby_horse.eat}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_BABY_HORSE_EAT = create(key("entity.baby_horse.eat"));
/**
* {@code minecraft:entity.baby_horse.hurt}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_BABY_HORSE_HURT = create(key("entity.baby_horse.hurt"));
/**
* {@code minecraft:entity.baby_horse.land}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_BABY_HORSE_LAND = create(key("entity.baby_horse.land"));
/**
* {@code minecraft:entity.baby_horse.step}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_BABY_HORSE_STEP = create(key("entity.baby_horse.step"));
/**
* {@code minecraft:entity.baby_nautilus.ambient}
*
@@ -6262,90 +6087,6 @@ public final class SoundEventKeys {
*/
public static final TypedKey<Sound> ENTITY_BABY_NAUTILUS_SWIM = create(key("entity.baby_nautilus.swim"));
/**
* {@code minecraft:entity.baby_pig.ambient}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_BABY_PIG_AMBIENT = create(key("entity.baby_pig.ambient"));
/**
* {@code minecraft:entity.baby_pig.death}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_BABY_PIG_DEATH = create(key("entity.baby_pig.death"));
/**
* {@code minecraft:entity.baby_pig.eat}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_BABY_PIG_EAT = create(key("entity.baby_pig.eat"));
/**
* {@code minecraft:entity.baby_pig.hurt}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_BABY_PIG_HURT = create(key("entity.baby_pig.hurt"));
/**
* {@code minecraft:entity.baby_pig.step}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_BABY_PIG_STEP = create(key("entity.baby_pig.step"));
/**
* {@code minecraft:entity.baby_wolf.ambient}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_BABY_WOLF_AMBIENT = create(key("entity.baby_wolf.ambient"));
/**
* {@code minecraft:entity.baby_wolf.death}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_BABY_WOLF_DEATH = create(key("entity.baby_wolf.death"));
/**
* {@code minecraft:entity.baby_wolf.growl}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_BABY_WOLF_GROWL = create(key("entity.baby_wolf.growl"));
/**
* {@code minecraft:entity.baby_wolf.hurt}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_BABY_WOLF_HURT = create(key("entity.baby_wolf.hurt"));
/**
* {@code minecraft:entity.baby_wolf.pant}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_BABY_WOLF_PANT = create(key("entity.baby_wolf.pant"));
/**
* {@code minecraft:entity.baby_wolf.step}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_BABY_WOLF_STEP = create(key("entity.baby_wolf.step"));
/**
* {@code minecraft:entity.baby_wolf.whine}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_BABY_WOLF_WHINE = create(key("entity.baby_wolf.whine"));
/**
* {@code minecraft:entity.bat.ambient}
*
@@ -6815,69 +6556,6 @@ public final class SoundEventKeys {
*/
public static final TypedKey<Sound> ENTITY_CAT_STRAY_AMBIENT = create(key("entity.cat.stray_ambient"));
/**
* {@code minecraft:entity.cat_royal.ambient}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_CAT_ROYAL_AMBIENT = create(key("entity.cat_royal.ambient"));
/**
* {@code minecraft:entity.cat_royal.beg_for_food}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_CAT_ROYAL_BEG_FOR_FOOD = create(key("entity.cat_royal.beg_for_food"));
/**
* {@code minecraft:entity.cat_royal.death}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_CAT_ROYAL_DEATH = create(key("entity.cat_royal.death"));
/**
* {@code minecraft:entity.cat_royal.eat}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_CAT_ROYAL_EAT = create(key("entity.cat_royal.eat"));
/**
* {@code minecraft:entity.cat_royal.hiss}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_CAT_ROYAL_HISS = create(key("entity.cat_royal.hiss"));
/**
* {@code minecraft:entity.cat_royal.hurt}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_CAT_ROYAL_HURT = create(key("entity.cat_royal.hurt"));
/**
* {@code minecraft:entity.cat_royal.purr}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_CAT_ROYAL_PURR = create(key("entity.cat_royal.purr"));
/**
* {@code minecraft:entity.cat_royal.purreow}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_CAT_ROYAL_PURREOW = create(key("entity.cat_royal.purreow"));
/**
* {@code minecraft:entity.cat_royal.stray_ambient}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_CAT_ROYAL_STRAY_AMBIENT = create(key("entity.cat_royal.stray_ambient"));
/**
* {@code minecraft:entity.chicken.ambient}
*
@@ -6913,27 +6591,6 @@ public final class SoundEventKeys {
*/
public static final TypedKey<Sound> ENTITY_CHICKEN_STEP = create(key("entity.chicken.step"));
/**
* {@code minecraft:entity.chicken_picky.ambient}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_CHICKEN_PICKY_AMBIENT = create(key("entity.chicken_picky.ambient"));
/**
* {@code minecraft:entity.chicken_picky.death}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_CHICKEN_PICKY_DEATH = create(key("entity.chicken_picky.death"));
/**
* {@code minecraft:entity.chicken_picky.hurt}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_CHICKEN_PICKY_HURT = create(key("entity.chicken_picky.hurt"));
/**
* {@code minecraft:entity.cod.ambient}
*
@@ -7130,34 +6787,6 @@ public final class SoundEventKeys {
*/
public static final TypedKey<Sound> ENTITY_COW_STEP = create(key("entity.cow.step"));
/**
* {@code minecraft:entity.cow_moody.ambient}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_COW_MOODY_AMBIENT = create(key("entity.cow_moody.ambient"));
/**
* {@code minecraft:entity.cow_moody.death}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_COW_MOODY_DEATH = create(key("entity.cow_moody.death"));
/**
* {@code minecraft:entity.cow_moody.hurt}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_COW_MOODY_HURT = create(key("entity.cow_moody.hurt"));
/**
* {@code minecraft:entity.cow_moody.step}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_COW_MOODY_STEP = create(key("entity.cow_moody.step"));
/**
* {@code minecraft:entity.creaking.activate}
*
@@ -9594,13 +9223,6 @@ public final class SoundEventKeys {
*/
public static final TypedKey<Sound> ENTITY_PIG_DEATH = create(key("entity.pig.death"));
/**
* {@code minecraft:entity.pig.eat}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_PIG_EAT = create(key("entity.pig.eat"));
/**
* {@code minecraft:entity.pig.hurt}
*
@@ -9622,62 +9244,6 @@ public final class SoundEventKeys {
*/
public static final TypedKey<Sound> ENTITY_PIG_STEP = create(key("entity.pig.step"));
/**
* {@code minecraft:entity.pig_big.ambient}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_PIG_BIG_AMBIENT = create(key("entity.pig_big.ambient"));
/**
* {@code minecraft:entity.pig_big.death}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_PIG_BIG_DEATH = create(key("entity.pig_big.death"));
/**
* {@code minecraft:entity.pig_big.eat}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_PIG_BIG_EAT = create(key("entity.pig_big.eat"));
/**
* {@code minecraft:entity.pig_big.hurt}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_PIG_BIG_HURT = create(key("entity.pig_big.hurt"));
/**
* {@code minecraft:entity.pig_mini.ambient}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_PIG_MINI_AMBIENT = create(key("entity.pig_mini.ambient"));
/**
* {@code minecraft:entity.pig_mini.death}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_PIG_MINI_DEATH = create(key("entity.pig_mini.death"));
/**
* {@code minecraft:entity.pig_mini.eat}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_PIG_MINI_EAT = create(key("entity.pig_mini.eat"));
/**
* {@code minecraft:entity.pig_mini.hurt}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_PIG_MINI_HURT = create(key("entity.pig_mini.hurt"));
/**
* {@code minecraft:entity.piglin.admiring_item}
*
@@ -12541,20 +12107,6 @@ public final class SoundEventKeys {
*/
public static final TypedKey<Sound> ITEM_GOAT_HORN_SOUND_7 = create(key("item.goat_horn.sound.7"));
/**
* {@code minecraft:item.golden_dandelion.unuse}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ITEM_GOLDEN_DANDELION_UNUSE = create(key("item.golden_dandelion.unuse"));
/**
* {@code minecraft:item.golden_dandelion.use}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ITEM_GOLDEN_DANDELION_USE = create(key("item.golden_dandelion.use"));
/**
* {@code minecraft:item.hoe.till}
*
@@ -1,68 +0,0 @@
package io.papermc.paper.registry.keys;
import static net.kyori.adventure.key.Key.key;
import io.papermc.paper.annotation.GeneratedClass;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey;
import io.papermc.paper.world.Timeline;
import net.kyori.adventure.key.Key;
import org.jspecify.annotations.NullMarked;
/**
* Vanilla keys for {@link RegistryKey#TIMELINE}.
*
* @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
@GeneratedClass
public final class TimelineKeys {
/**
* {@code minecraft:day}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Timeline> DAY = create(key("day"));
/**
* {@code minecraft:early_game}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Timeline> EARLY_GAME = create(key("early_game"));
/**
* {@code minecraft:moon}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Timeline> MOON = create(key("moon"));
/**
* {@code minecraft:villager_schedule}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Timeline> VILLAGER_SCHEDULE = create(key("villager_schedule"));
private TimelineKeys() {
}
/**
* Creates a typed key for {@link Timeline} in the registry {@code minecraft:timeline}.
*
* @param key the value's key in the registry
* @return a new typed key
*/
public static TypedKey<Timeline> create(final Key key) {
return TypedKey.create(RegistryKey.TIMELINE, key);
}
}
@@ -1,54 +0,0 @@
package io.papermc.paper.registry.keys;
import static net.kyori.adventure.key.Key.key;
import io.papermc.paper.annotation.GeneratedClass;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey;
import io.papermc.paper.world.WorldClock;
import net.kyori.adventure.key.Key;
import org.jspecify.annotations.NullMarked;
/**
* Vanilla keys for {@link RegistryKey#WORLD_CLOCK}.
*
* @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
@GeneratedClass
public final class WorldClockKeys {
/**
* {@code minecraft:overworld}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<WorldClock> OVERWORLD = create(key("overworld"));
/**
* {@code minecraft:the_end}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<WorldClock> THE_END = create(key("the_end"));
private WorldClockKeys() {
}
/**
* Creates a typed key for {@link WorldClock} in the registry {@code minecraft:world_clock}.
*
* @param key the value's key in the registry
* @return a new typed key
*/
public static TypedKey<WorldClock> create(final Key key) {
return TypedKey.create(RegistryKey.WORLD_CLOCK, key);
}
}
@@ -116,6 +116,13 @@ public final class BlockTypeTagKeys {
*/
public static final TagKey<BlockType> BAMBOO_BLOCKS = create(key("bamboo_blocks"));
/**
* {@code #minecraft:bamboo_plantable_on}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> BAMBOO_PLANTABLE_ON = create(key("bamboo_plantable_on"));
/**
* {@code #minecraft:banners}
*
@@ -187,18 +194,11 @@ public final class BlockTypeTagKeys {
public static final TagKey<BlockType> BEEHIVES = create(key("beehives"));
/**
* {@code #minecraft:beneath_bamboo_podzol_replaceable}
* {@code #minecraft:big_dripleaf_placeable}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> BENEATH_BAMBOO_PODZOL_REPLACEABLE = create(key("beneath_bamboo_podzol_replaceable"));
/**
* {@code #minecraft:beneath_tree_podzol_replaceable}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> BENEATH_TREE_PODZOL_REPLACEABLE = create(key("beneath_tree_podzol_replaceable"));
public static final TagKey<BlockType> BIG_DRIPLEAF_PLACEABLE = create(key("big_dripleaf_placeable"));
/**
* {@code #minecraft:birch_logs}
@@ -263,34 +263,6 @@ public final class BlockTypeTagKeys {
*/
public static final TagKey<BlockType> CANDLES = create(key("candles"));
/**
* {@code #minecraft:cannot_replace_below_tree_trunk}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> CANNOT_REPLACE_BELOW_TREE_TRUNK = create(key("cannot_replace_below_tree_trunk"));
/**
* {@code #minecraft:cannot_support_kelp}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> CANNOT_SUPPORT_KELP = create(key("cannot_support_kelp"));
/**
* {@code #minecraft:cannot_support_seagrass}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> CANNOT_SUPPORT_SEAGRASS = create(key("cannot_support_seagrass"));
/**
* {@code #minecraft:cannot_support_snow_layer}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> CANNOT_SUPPORT_SNOW_LAYER = create(key("cannot_support_snow_layer"));
/**
* {@code #minecraft:cauldrons}
*
@@ -508,6 +480,13 @@ public final class BlockTypeTagKeys {
*/
public static final TagKey<BlockType> DRIPSTONE_REPLACEABLE_BLOCKS = create(key("dripstone_replaceable_blocks"));
/**
* {@code #minecraft:dry_vegetation_may_place_on}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> DRY_VEGETATION_MAY_PLACE_ON = create(key("dry_vegetation_may_place_on"));
/**
* {@code #minecraft:edible_for_sheep}
*
@@ -522,20 +501,6 @@ public final class BlockTypeTagKeys {
*/
public static final TagKey<BlockType> EMERALD_ORES = create(key("emerald_ores"));
/**
* {@code #minecraft:enables_bubble_column_drag_down}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> ENABLES_BUBBLE_COLUMN_DRAG_DOWN = create(key("enables_bubble_column_drag_down"));
/**
* {@code #minecraft:enables_bubble_column_push_up}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> ENABLES_BUBBLE_COLUMN_PUSH_UP = create(key("enables_bubble_column_push_up"));
/**
* {@code #minecraft:enchantment_power_provider}
*
@@ -606,13 +571,6 @@ public final class BlockTypeTagKeys {
*/
public static final TagKey<BlockType> FLOWERS = create(key("flowers"));
/**
* {@code #minecraft:forest_rock_can_place_on}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> FOREST_ROCK_CAN_PLACE_ON = create(key("forest_rock_can_place_on"));
/**
* {@code #minecraft:foxes_spawnable_on}
*
@@ -655,20 +613,6 @@ public final class BlockTypeTagKeys {
*/
public static final TagKey<BlockType> GOLD_ORES = create(key("gold_ores"));
/**
* {@code #minecraft:grass_blocks}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> GRASS_BLOCKS = create(key("grass_blocks"));
/**
* {@code #minecraft:grows_crops}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> GROWS_CROPS = create(key("grows_crops"));
/**
* {@code #minecraft:guarded_by_piglins}
*
@@ -690,20 +634,6 @@ public final class BlockTypeTagKeys {
*/
public static final TagKey<BlockType> HOGLIN_REPELLENTS = create(key("hoglin_repellents"));
/**
* {@code #minecraft:huge_brown_mushroom_can_place_on}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> HUGE_BROWN_MUSHROOM_CAN_PLACE_ON = create(key("huge_brown_mushroom_can_place_on"));
/**
* {@code #minecraft:huge_red_mushroom_can_place_on}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> HUGE_RED_MUSHROOM_CAN_PLACE_ON = create(key("huge_red_mushroom_can_place_on"));
/**
* {@code #minecraft:ice}
*
@@ -711,13 +641,6 @@ public final class BlockTypeTagKeys {
*/
public static final TagKey<BlockType> ICE = create(key("ice"));
/**
* {@code #minecraft:ice_spike_replaceable}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> ICE_SPIKE_REPLACEABLE = create(key("ice_spike_replaceable"));
/**
* {@code #minecraft:impermeable}
*
@@ -949,13 +872,6 @@ public final class BlockTypeTagKeys {
*/
public static final TagKey<BlockType> MOOSHROOMS_SPAWNABLE_ON = create(key("mooshrooms_spawnable_on"));
/**
* {@code #minecraft:moss_blocks}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> MOSS_BLOCKS = create(key("moss_blocks"));
/**
* {@code #minecraft:moss_replaceable}
*
@@ -964,11 +880,11 @@ public final class BlockTypeTagKeys {
public static final TagKey<BlockType> MOSS_REPLACEABLE = create(key("moss_replaceable"));
/**
* {@code #minecraft:mud}
* {@code #minecraft:mushroom_grow_block}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> MUD = create(key("mud"));
public static final TagKey<BlockType> MUSHROOM_GROW_BLOCK = create(key("mushroom_grow_block"));
/**
* {@code #minecraft:needs_diamond_tool}
@@ -1019,13 +935,6 @@ public final class BlockTypeTagKeys {
*/
public static final TagKey<BlockType> OCCLUDES_VIBRATION_SIGNALS = create(key("occludes_vibration_signals"));
/**
* {@code #minecraft:overrides_mushroom_light_requirement}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> OVERRIDES_MUSHROOM_LIGHT_REQUIREMENT = create(key("overrides_mushroom_light_requirement"));
/**
* {@code #minecraft:overworld_carver_replaceables}
*
@@ -1096,13 +1005,6 @@ public final class BlockTypeTagKeys {
*/
public static final TagKey<BlockType> PREVENT_MOB_SPAWNING_INSIDE = create(key("prevent_mob_spawning_inside"));
/**
* {@code #minecraft:prevents_nearby_leaf_decay}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> PREVENTS_NEARBY_LEAF_DECAY = create(key("prevents_nearby_leaf_decay"));
/**
* {@code #minecraft:rabbits_spawnable_on}
*
@@ -1194,6 +1096,13 @@ public final class BlockTypeTagKeys {
*/
public static final TagKey<BlockType> SLABS = create(key("slabs"));
/**
* {@code #minecraft:small_dripleaf_placeable}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> SMALL_DRIPLEAF_PLACEABLE = create(key("small_dripleaf_placeable"));
/**
* {@code #minecraft:small_flowers}
*
@@ -1236,6 +1145,20 @@ public final class BlockTypeTagKeys {
*/
public static final TagKey<BlockType> SNOW = create(key("snow"));
/**
* {@code #minecraft:snow_layer_can_survive_on}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> SNOW_LAYER_CAN_SURVIVE_ON = create(key("snow_layer_can_survive_on"));
/**
* {@code #minecraft:snow_layer_cannot_survive_on}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> SNOW_LAYER_CANNOT_SURVIVE_ON = create(key("snow_layer_cannot_survive_on"));
/**
* {@code #minecraft:soul_fire_base_blocks}
*
@@ -1306,237 +1229,6 @@ public final class BlockTypeTagKeys {
*/
public static final TagKey<BlockType> STRIDER_WARM_BLOCKS = create(key("strider_warm_blocks"));
/**
* {@code #minecraft:substrate_overworld}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> SUBSTRATE_OVERWORLD = create(key("substrate_overworld"));
/**
* {@code #minecraft:support_override_cactus_flower}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> SUPPORT_OVERRIDE_CACTUS_FLOWER = create(key("support_override_cactus_flower"));
/**
* {@code #minecraft:support_override_snow_layer}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> SUPPORT_OVERRIDE_SNOW_LAYER = create(key("support_override_snow_layer"));
/**
* {@code #minecraft:supports_azalea}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> SUPPORTS_AZALEA = create(key("supports_azalea"));
/**
* {@code #minecraft:supports_bamboo}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> SUPPORTS_BAMBOO = create(key("supports_bamboo"));
/**
* {@code #minecraft:supports_big_dripleaf}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> SUPPORTS_BIG_DRIPLEAF = create(key("supports_big_dripleaf"));
/**
* {@code #minecraft:supports_cactus}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> SUPPORTS_CACTUS = create(key("supports_cactus"));
/**
* {@code #minecraft:supports_chorus_flower}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> SUPPORTS_CHORUS_FLOWER = create(key("supports_chorus_flower"));
/**
* {@code #minecraft:supports_chorus_plant}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> SUPPORTS_CHORUS_PLANT = create(key("supports_chorus_plant"));
/**
* {@code #minecraft:supports_cocoa}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> SUPPORTS_COCOA = create(key("supports_cocoa"));
/**
* {@code #minecraft:supports_crimson_fungus}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> SUPPORTS_CRIMSON_FUNGUS = create(key("supports_crimson_fungus"));
/**
* {@code #minecraft:supports_crimson_roots}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> SUPPORTS_CRIMSON_ROOTS = create(key("supports_crimson_roots"));
/**
* {@code #minecraft:supports_crops}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> SUPPORTS_CROPS = create(key("supports_crops"));
/**
* {@code #minecraft:supports_dry_vegetation}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> SUPPORTS_DRY_VEGETATION = create(key("supports_dry_vegetation"));
/**
* {@code #minecraft:supports_frogspawn}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> SUPPORTS_FROGSPAWN = create(key("supports_frogspawn"));
/**
* {@code #minecraft:supports_hanging_mangrove_propagule}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> SUPPORTS_HANGING_MANGROVE_PROPAGULE = create(key("supports_hanging_mangrove_propagule"));
/**
* {@code #minecraft:supports_lily_pad}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> SUPPORTS_LILY_PAD = create(key("supports_lily_pad"));
/**
* {@code #minecraft:supports_mangrove_propagule}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> SUPPORTS_MANGROVE_PROPAGULE = create(key("supports_mangrove_propagule"));
/**
* {@code #minecraft:supports_melon_stem}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> SUPPORTS_MELON_STEM = create(key("supports_melon_stem"));
/**
* {@code #minecraft:supports_melon_stem_fruit}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> SUPPORTS_MELON_STEM_FRUIT = create(key("supports_melon_stem_fruit"));
/**
* {@code #minecraft:supports_nether_sprouts}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> SUPPORTS_NETHER_SPROUTS = create(key("supports_nether_sprouts"));
/**
* {@code #minecraft:supports_nether_wart}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> SUPPORTS_NETHER_WART = create(key("supports_nether_wart"));
/**
* {@code #minecraft:supports_pumpkin_stem}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> SUPPORTS_PUMPKIN_STEM = create(key("supports_pumpkin_stem"));
/**
* {@code #minecraft:supports_pumpkin_stem_fruit}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> SUPPORTS_PUMPKIN_STEM_FRUIT = create(key("supports_pumpkin_stem_fruit"));
/**
* {@code #minecraft:supports_small_dripleaf}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> SUPPORTS_SMALL_DRIPLEAF = create(key("supports_small_dripleaf"));
/**
* {@code #minecraft:supports_stem_crops}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> SUPPORTS_STEM_CROPS = create(key("supports_stem_crops"));
/**
* {@code #minecraft:supports_stem_fruit}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> SUPPORTS_STEM_FRUIT = create(key("supports_stem_fruit"));
/**
* {@code #minecraft:supports_sugar_cane}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> SUPPORTS_SUGAR_CANE = create(key("supports_sugar_cane"));
/**
* {@code #minecraft:supports_sugar_cane_adjacently}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> SUPPORTS_SUGAR_CANE_ADJACENTLY = create(key("supports_sugar_cane_adjacently"));
/**
* {@code #minecraft:supports_vegetation}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> SUPPORTS_VEGETATION = create(key("supports_vegetation"));
/**
* {@code #minecraft:supports_warped_fungus}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> SUPPORTS_WARPED_FUNGUS = create(key("supports_warped_fungus"));
/**
* {@code #minecraft:supports_warped_roots}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> SUPPORTS_WARPED_ROOTS = create(key("supports_warped_roots"));
/**
* {@code #minecraft:supports_wither_rose}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> SUPPORTS_WITHER_ROSE = create(key("supports_wither_rose"));
/**
* {@code #minecraft:sword_efficient}
*
@@ -183,6 +183,15 @@ public final class EnchantmentTagKeys {
@MinecraftExperimental(MinecraftExperimental.Requires.TRADE_REBALANCE)
public static final TagKey<Enchantment> TRADES_DESERT_COMMON = create(key("trades/desert_common"));
/**
* {@code #minecraft:trades/desert_special}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
@ApiStatus.Experimental
@MinecraftExperimental(MinecraftExperimental.Requires.TRADE_REBALANCE)
public static final TagKey<Enchantment> TRADES_DESERT_SPECIAL = create(key("trades/desert_special"));
/**
* {@code #minecraft:trades/jungle_common}
*
@@ -192,6 +201,15 @@ public final class EnchantmentTagKeys {
@MinecraftExperimental(MinecraftExperimental.Requires.TRADE_REBALANCE)
public static final TagKey<Enchantment> TRADES_JUNGLE_COMMON = create(key("trades/jungle_common"));
/**
* {@code #minecraft:trades/jungle_special}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
@ApiStatus.Experimental
@MinecraftExperimental(MinecraftExperimental.Requires.TRADE_REBALANCE)
public static final TagKey<Enchantment> TRADES_JUNGLE_SPECIAL = create(key("trades/jungle_special"));
/**
* {@code #minecraft:trades/plains_common}
*
@@ -201,6 +219,15 @@ public final class EnchantmentTagKeys {
@MinecraftExperimental(MinecraftExperimental.Requires.TRADE_REBALANCE)
public static final TagKey<Enchantment> TRADES_PLAINS_COMMON = create(key("trades/plains_common"));
/**
* {@code #minecraft:trades/plains_special}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
@ApiStatus.Experimental
@MinecraftExperimental(MinecraftExperimental.Requires.TRADE_REBALANCE)
public static final TagKey<Enchantment> TRADES_PLAINS_SPECIAL = create(key("trades/plains_special"));
/**
* {@code #minecraft:trades/savanna_common}
*
@@ -210,6 +237,15 @@ public final class EnchantmentTagKeys {
@MinecraftExperimental(MinecraftExperimental.Requires.TRADE_REBALANCE)
public static final TagKey<Enchantment> TRADES_SAVANNA_COMMON = create(key("trades/savanna_common"));
/**
* {@code #minecraft:trades/savanna_special}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
@ApiStatus.Experimental
@MinecraftExperimental(MinecraftExperimental.Requires.TRADE_REBALANCE)
public static final TagKey<Enchantment> TRADES_SAVANNA_SPECIAL = create(key("trades/savanna_special"));
/**
* {@code #minecraft:trades/snow_common}
*
@@ -219,6 +255,15 @@ public final class EnchantmentTagKeys {
@MinecraftExperimental(MinecraftExperimental.Requires.TRADE_REBALANCE)
public static final TagKey<Enchantment> TRADES_SNOW_COMMON = create(key("trades/snow_common"));
/**
* {@code #minecraft:trades/snow_special}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
@ApiStatus.Experimental
@MinecraftExperimental(MinecraftExperimental.Requires.TRADE_REBALANCE)
public static final TagKey<Enchantment> TRADES_SNOW_SPECIAL = create(key("trades/snow_special"));
/**
* {@code #minecraft:trades/swamp_common}
*
@@ -228,6 +273,15 @@ public final class EnchantmentTagKeys {
@MinecraftExperimental(MinecraftExperimental.Requires.TRADE_REBALANCE)
public static final TagKey<Enchantment> TRADES_SWAMP_COMMON = create(key("trades/swamp_common"));
/**
* {@code #minecraft:trades/swamp_special}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
@ApiStatus.Experimental
@MinecraftExperimental(MinecraftExperimental.Requires.TRADE_REBALANCE)
public static final TagKey<Enchantment> TRADES_SWAMP_SPECIAL = create(key("trades/swamp_special"));
/**
* {@code #minecraft:trades/taiga_common}
*
@@ -237,6 +291,15 @@ public final class EnchantmentTagKeys {
@MinecraftExperimental(MinecraftExperimental.Requires.TRADE_REBALANCE)
public static final TagKey<Enchantment> TRADES_TAIGA_COMMON = create(key("trades/taiga_common"));
/**
* {@code #minecraft:trades/taiga_special}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
@ApiStatus.Experimental
@MinecraftExperimental(MinecraftExperimental.Requires.TRADE_REBALANCE)
public static final TagKey<Enchantment> TRADES_TAIGA_SPECIAL = create(key("trades/taiga_special"));
/**
* {@code #minecraft:treasure}
*
@@ -144,13 +144,6 @@ public final class EntityTypeTagKeys {
*/
public static final TagKey<EntityType> CANDIDATE_FOR_IRON_GOLEM_GIFT = create(key("candidate_for_iron_golem_gift"));
/**
* {@code #minecraft:cannot_be_age_locked}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<EntityType> CANNOT_BE_AGE_LOCKED = create(key("cannot_be_age_locked"));
/**
* {@code #minecraft:cannot_be_pushed_onto_boats}
*
@@ -25,13 +25,6 @@ import org.jspecify.annotations.NullMarked;
@NullMarked
@GeneratedClass
public final class FluidTagKeys {
/**
* {@code #minecraft:bubble_column_can_occupy}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Fluid> BUBBLE_COLUMN_CAN_OCCUPY = create(key("bubble_column_can_occupy"));
/**
* {@code #minecraft:lava}
*
@@ -39,27 +32,6 @@ public final class FluidTagKeys {
*/
public static final TagKey<Fluid> LAVA = create(key("lava"));
/**
* {@code #minecraft:supports_frogspawn}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Fluid> SUPPORTS_FROGSPAWN = create(key("supports_frogspawn"));
/**
* {@code #minecraft:supports_lily_pad}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Fluid> SUPPORTS_LILY_PAD = create(key("supports_lily_pad"));
/**
* {@code #minecraft:supports_sugar_cane_adjacently}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Fluid> SUPPORTS_SUGAR_CANE_ADJACENTLY = create(key("supports_sugar_cane_adjacently"));
/**
* {@code #minecraft:water}
*
@@ -186,13 +186,6 @@ public final class ItemTypeTagKeys {
*/
public static final TagKey<ItemType> CANDLES = create(key("candles"));
/**
* {@code #minecraft:cat_collar_dyes}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<ItemType> CAT_COLLAR_DYES = create(key("cat_collar_dyes"));
/**
* {@code #minecraft:cat_food}
*
@@ -200,13 +193,6 @@ public final class ItemTypeTagKeys {
*/
public static final TagKey<ItemType> CAT_FOOD = create(key("cat_food"));
/**
* {@code #minecraft:cauldron_can_remove_dye}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<ItemType> CAULDRON_CAN_REMOVE_DYE = create(key("cauldron_can_remove_dye"));
/**
* {@code #minecraft:chains}
*
@@ -411,11 +397,11 @@ public final class ItemTypeTagKeys {
public static final TagKey<ItemType> DUPLICATES_ALLAYS = create(key("duplicates_allays"));
/**
* {@code #minecraft:dyes}
* {@code #minecraft:dyeable}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<ItemType> DYES = create(key("dyes"));
public static final TagKey<ItemType> DYEABLE = create(key("dyeable"));
/**
* {@code #minecraft:eggs}
@@ -669,13 +655,6 @@ public final class ItemTypeTagKeys {
*/
public static final TagKey<ItemType> GOLD_TOOL_MATERIALS = create(key("gold_tool_materials"));
/**
* {@code #minecraft:grass_blocks}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<ItemType> GRASS_BLOCKS = create(key("grass_blocks"));
/**
* {@code #minecraft:hanging_signs}
*
@@ -837,20 +816,6 @@ public final class ItemTypeTagKeys {
*/
public static final TagKey<ItemType> LOGS_THAT_BURN = create(key("logs_that_burn"));
/**
* {@code #minecraft:loom_dyes}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<ItemType> LOOM_DYES = create(key("loom_dyes"));
/**
* {@code #minecraft:loom_patterns}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<ItemType> LOOM_PATTERNS = create(key("loom_patterns"));
/**
* {@code #minecraft:mangrove_logs}
*
@@ -872,27 +837,6 @@ public final class ItemTypeTagKeys {
*/
public static final TagKey<ItemType> MEAT = create(key("meat"));
/**
* {@code #minecraft:metal_nuggets}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<ItemType> METAL_NUGGETS = create(key("metal_nuggets"));
/**
* {@code #minecraft:moss_blocks}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<ItemType> MOSS_BLOCKS = create(key("moss_blocks"));
/**
* {@code #minecraft:mud}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<ItemType> MUD = create(key("mud"));
/**
* {@code #minecraft:nautilus_bucket_food}
*
@@ -1376,13 +1320,6 @@ public final class ItemTypeTagKeys {
*/
public static final TagKey<ItemType> WITHER_SKELETON_DISLIKED_WEAPONS = create(key("wither_skeleton_disliked_weapons"));
/**
* {@code #minecraft:wolf_collar_dyes}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<ItemType> WOLF_COLLAR_DYES = create(key("wolf_collar_dyes"));
/**
* {@code #minecraft:wolf_food}
*
@@ -1,47 +0,0 @@
package io.papermc.paper.registry.keys.tags;
import static net.kyori.adventure.key.Key.key;
import io.papermc.paper.annotation.GeneratedClass;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.tag.TagKey;
import net.kyori.adventure.key.Key;
import org.bukkit.potion.PotionType;
import org.jspecify.annotations.NullMarked;
/**
* Vanilla tag keys for {@link RegistryKey#POTION}.
*
* @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
@GeneratedClass
public final class PotionTypeTagKeys {
/**
* {@code #minecraft:tradeable}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<PotionType> TRADEABLE = create(key("tradeable"));
private PotionTypeTagKeys() {
}
/**
* Creates a tag key for {@link PotionType} in the registry {@code minecraft:potion}.
*
* @param key the tag key's key
* @return a new tag key
*/
public static TagKey<PotionType> create(final Key key) {
return TagKey.create(RegistryKey.POTION, key);
}
}
@@ -1,68 +0,0 @@
package io.papermc.paper.registry.keys.tags;
import static net.kyori.adventure.key.Key.key;
import io.papermc.paper.annotation.GeneratedClass;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.tag.TagKey;
import io.papermc.paper.world.Timeline;
import net.kyori.adventure.key.Key;
import org.jspecify.annotations.NullMarked;
/**
* Vanilla tag keys for {@link RegistryKey#TIMELINE}.
*
* @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
@GeneratedClass
public final class TimelineTagKeys {
/**
* {@code #minecraft:in_end}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Timeline> IN_END = create(key("in_end"));
/**
* {@code #minecraft:in_nether}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Timeline> IN_NETHER = create(key("in_nether"));
/**
* {@code #minecraft:in_overworld}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Timeline> IN_OVERWORLD = create(key("in_overworld"));
/**
* {@code #minecraft:universal}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Timeline> UNIVERSAL = create(key("universal"));
private TimelineTagKeys() {
}
/**
* Creates a tag key for {@link Timeline} in the registry {@code minecraft:timeline}.
*
* @param key the tag key's key
* @return a new tag key
*/
public static TagKey<Timeline> create(final Key key) {
return TagKey.create(RegistryKey.TIMELINE, key);
}
}
@@ -134,7 +134,7 @@ public class TimingHistory {
}
}
return pair(
worldMap.get(world.getKey().toString()),
worldMap.get(world.getName()),
toArrayMapper(regions.values(),new Function<RegionData, Object>() {
@NotNull
@Override
@@ -165,7 +165,8 @@ public class ParticleBuilder implements Cloneable {
throw new IllegalStateException("Please set location first");
}
this.receivers = Lists.newArrayList();
for (final Player nearbyPlayer : this.location.getWorld().getNearbyPlayers(this.location, radius, radius, radius)) {
for (final Player nearbyPlayer : this.location.getWorld()
.getNearbyPlayers(this.location, radius, radius, radius)) {
final Location loc = nearbyPlayer.getLocation();
final double x = NumberConversions.square(this.location.getX() - loc.getX());
final double y = NumberConversions.square(this.location.getY() - loc.getY());
@@ -18,7 +18,7 @@ public final class Reputation {
}
public Reputation(final Map<ReputationType, Integer> reputation) {
Preconditions.checkArgument(reputation != null, "reputation cannot be null");
Preconditions.checkNotNull(reputation, "reputation cannot be null");
this.reputation = reputation;
}
@@ -29,7 +29,7 @@ public final class Reputation {
* @return The value of the {@link ReputationType type}.
*/
public int getReputation(final ReputationType type) {
Preconditions.checkArgument(type != null, "type cannot be null");
Preconditions.checkNotNull(type, "the reputation type cannot be null");
return this.reputation.getOrDefault(type, 0);
}
@@ -40,7 +40,7 @@ public final class Reputation {
* @param value The value of the {@link ReputationType type}.
*/
public void setReputation(final ReputationType type, final int value) {
Preconditions.checkArgument(type != null, "type cannot be null");
Preconditions.checkNotNull(type, "the reputation type cannot be null");
this.reputation.put(type, value);
}
@@ -45,7 +45,7 @@ import io.papermc.paper.datacomponent.item.Weapon;
import io.papermc.paper.datacomponent.item.WritableBookContent;
import io.papermc.paper.datacomponent.item.WrittenBookContent;
import io.papermc.paper.item.MapPostProcessing;
import io.papermc.paper.registry.set.RegistryKeySet;
import io.papermc.paper.registry.tag.TagKey;
import java.util.List;
import net.kyori.adventure.key.Key;
import net.kyori.adventure.key.KeyPattern;
@@ -237,9 +237,8 @@ public final class DataComponentTypes {
* @see #ENCHANTMENTS
*/
public static final DataComponentType.Valued<ItemEnchantments> STORED_ENCHANTMENTS = valued("stored_enchantments");
public static final DataComponentType.Valued<DyeColor> DYE = valued("dye");
/**
* Represents a color applied to a dyeable item.
* 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");
/**
@@ -305,7 +304,7 @@ public final class DataComponentTypes {
*/
public static final DataComponentType.Valued<OminousBottleAmplifier> OMINOUS_BOTTLE_AMPLIFIER = valued("ominous_bottle_amplifier");
public static final DataComponentType.Valued<JukeboxPlayable> JUKEBOX_PLAYABLE = valued("jukebox_playable");
public static final DataComponentType.Valued<RegistryKeySet<PatternType>> PROVIDES_BANNER_PATTERNS = valued("provides_banner_patterns");
public static final DataComponentType.Valued<TagKey<PatternType>> PROVIDES_BANNER_PATTERNS = valued("provides_banner_patterns");
/**
* List of recipes that should be unlocked when using the Knowledge Book item.
*/
@@ -377,11 +376,9 @@ public final class DataComponentTypes {
public static final DataComponentType.Valued<MushroomCow.Variant> MOOSHROOM_VARIANT = valued("mooshroom/variant");
public static final DataComponentType.Valued<Rabbit.Type> RABBIT_VARIANT = valued("rabbit/variant");
public static final DataComponentType.Valued<Pig.Variant> PIG_VARIANT = valued("pig/variant");
public static final DataComponentType.Valued<Pig.SoundVariant> PIG_SOUND_VARIANT = valued("pig/sound_variant");
public static final DataComponentType.Valued<Cow.Variant> COW_VARIANT = valued("cow/variant");
public static final DataComponentType.Valued<Cow.SoundVariant> COW_SOUND_VARIANT = valued("cow/sound_variant");
public static final DataComponentType.Valued<Chicken.Variant> CHICKEN_VARIANT = valued("chicken/variant");
public static final DataComponentType.Valued<Chicken.SoundVariant> CHICKEN_SOUND_VARIANT = valued("chicken/sound_variant");
// This is a eitherholder? Why specifically the chicken?? Oh wait this is prolly for chicken egg cause legacy item loading
public static final DataComponentType.Valued<Frog.Variant> FROG_VARIANT = valued("frog/variant");
public static final DataComponentType.Valued<Horse.Color> HORSE_VARIANT = valued("horse/variant");
public static final DataComponentType.Valued<Art> PAINTING_VARIANT = valued("painting/variant");
@@ -389,7 +386,6 @@ public final class DataComponentTypes {
public static final DataComponentType.Valued<Axolotl.Variant> AXOLOTL_VARIANT = valued("axolotl/variant");
public static final DataComponentType.Valued<ZombieNautilus.Variant> ZOMBIE_NAUTILUS_VARIANT = valued("zombie_nautilus/variant");
public static final DataComponentType.Valued<Cat.Type> CAT_VARIANT = valued("cat/variant");
public static final DataComponentType.Valued<Cat.SoundVariant> CAT_SOUND_VARIANT = valued("cat/sound_variant");
public static final DataComponentType.Valued<DyeColor> CAT_COLLAR = valued("cat/collar");
public static final DataComponentType.Valued<DyeColor> SHEEP_COLOR = valued("sheep/color");
public static final DataComponentType.Valued<DyeColor> SHULKER_COLOR = valued("shulker/color");
@@ -3,7 +3,7 @@ package io.papermc.paper.datacomponent.item;
import io.papermc.paper.datacomponent.DataComponentBuilder;
import io.papermc.paper.datacomponent.item.blocksattacks.DamageReduction;
import io.papermc.paper.datacomponent.item.blocksattacks.ItemDamageFunction;
import io.papermc.paper.registry.set.RegistryKeySet;
import io.papermc.paper.registry.tag.TagKey;
import java.util.List;
import net.kyori.adventure.key.Key;
import org.bukkit.damage.DamageType;
@@ -68,7 +68,7 @@ public interface BlocksAttacks {
* @return a damage type tag key, or null if there is no such tag key
*/
@Contract(pure = true)
@Nullable RegistryKeySet<DamageType> bypassedBy();
@Nullable TagKey<DamageType> bypassedBy();
/**
* Gets the key sound to play when an attack is successfully blocked.
@@ -109,7 +109,7 @@ public interface BlocksAttacks {
Builder itemDamage(ItemDamageFunction function);
@Contract(value = "_ -> this", mutates = "this")
Builder bypassedBy(@Nullable RegistryKeySet<DamageType> bypassedBy);
Builder bypassedBy(@Nullable TagKey<DamageType> bypassedBy);
@Contract(value = "_ -> this", mutates = "this")
Builder blockSound(@Nullable Key sound);
@@ -1,6 +1,6 @@
package io.papermc.paper.datacomponent.item;
import io.papermc.paper.registry.set.RegistryKeySet;
import io.papermc.paper.registry.tag.TagKey;
import org.bukkit.damage.DamageType;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.Contract;
@@ -16,15 +16,15 @@ import org.jspecify.annotations.NullMarked;
public interface DamageResistant {
@Contract(value = "_ -> new", pure = true)
static DamageResistant damageResistant(final RegistryKeySet<DamageType> types) {
static DamageResistant damageResistant(final TagKey<DamageType> types) {
return ItemComponentTypesBridge.bridge().damageResistant(types);
}
/**
* The types that this damage type is invincible to.
*
* @return the registry key set holding the respective damage types.
* @return the key of the tag holding the respective damage types.
*/
@Contract(value = "-> new", pure = true)
RegistryKeySet<DamageType> types();
TagKey<DamageType> types();
}
@@ -100,7 +100,7 @@ interface ItemComponentTypesBridge {
UseCooldown.Builder useCooldown(final float seconds);
DamageResistant damageResistant(RegistryKeySet<DamageType> types);
DamageResistant damageResistant(TagKey<DamageType> types);
Enchantable enchantable(int level);
@@ -1,71 +0,0 @@
package io.papermc.paper.event.entity;
import org.bukkit.entity.LivingEntity;
import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList;
import org.bukkit.event.entity.EntityEvent;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Called when a living entity tries to lunge with a spear.
*/
@NullMarked
public class EntityLungeEvent extends EntityEvent implements Cancellable {
private static final HandlerList HANDLER_LIST = new HandlerList();
private int lungePower;
private boolean cancelled;
@ApiStatus.Internal
public EntityLungeEvent(final LivingEntity entity, final int lungePower) {
super(entity);
this.lungePower = lungePower;
}
/**
* Gets the lunge power, which when initially passed, matches the enchantment level of the item, but can be higher.
*
* @return the lunge power
*/
public int getLungePower() {
return this.lungePower;
}
/**
* Sets the lunge power. This commonly matches the enchantment level of the item, and can be set higher.
* <p>
* If set higher than 3, the power of the lunge will continue to scale like normal, as if the max enchantment
* level is higher.
*
* @param lungePower the new lunge power
*/
public void setLungePower(final int lungePower) {
this.lungePower = lungePower;
}
@Override
public boolean isCancelled() {
return this.cancelled;
}
/**
* Set whether to cancel the lunge. If cancelled, the living entity will not lunge forward.
*
* @param cancel {@code true} if you wish to cancel this event
*/
@Override
public void setCancelled(final boolean cancel) {
this.cancelled = cancel;
}
@Override
public HandlerList getHandlers() {
return HANDLER_LIST;
}
public static HandlerList getHandlerList() {
return HANDLER_LIST;
}
}
@@ -8,7 +8,7 @@ import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
@NullMarked
public class PlayerArmSwingEvent extends PlayerAnimationEvent { // todo redundant with parent?
public class PlayerArmSwingEvent extends PlayerAnimationEvent {
private final EquipmentSlot equipmentSlot;
@@ -1,81 +0,0 @@
package io.papermc.paper.event.player;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Player;
import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList;
import org.bukkit.event.player.PlayerEvent;
import org.bukkit.inventory.EquipmentSlot;
import org.bukkit.inventory.ItemStack;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Called when a player toggles the age lock of an entity using an item.
*/
@NullMarked
public class PlayerToggleEntityAgeLockEvent extends PlayerEvent implements Cancellable {
private static final HandlerList HANDLER_LIST = new HandlerList();
private final LivingEntity entity;
private final ItemStack item;
private final EquipmentSlot hand;
private final boolean ageLocked;
private boolean cancelled;
@ApiStatus.Internal
public PlayerToggleEntityAgeLockEvent(final Player player, final LivingEntity entity, final ItemStack item, final EquipmentSlot hand, final boolean ageLocked) {
super(player);
this.entity = entity;
this.item = item;
this.hand = hand;
this.ageLocked = ageLocked;
}
/**
* {@return the entity that is having its age locked or unlocked}
*/
public LivingEntity getEntity() {
return this.entity;
}
/**
* {@return the item being used to toggle the age lock of the entity}
*/
public ItemStack getItem() {
return this.item.clone();
}
/**
* {@return the hand being used to toggle the age lock of the entity}
*/
public EquipmentSlot getHand() {
return this.hand;
}
/**
* {@return whether the age of the entity is going to be locked or not}
*/
public boolean isAgeLocked() {
return this.ageLocked;
}
@Override
public boolean isCancelled() {
return this.cancelled;
}
@Override
public void setCancelled(final boolean cancel) {
this.cancelled = cancel;
}
@Override
public HandlerList getHandlers() {
return HANDLER_LIST;
}
public static HandlerList getHandlerList() {
return HANDLER_LIST;
}
}
@@ -11,8 +11,7 @@ import org.jspecify.annotations.NullMarked;
import org.jspecify.annotations.Nullable;
/**
* Called when a world's gamerule is changed, either by command, world options menu, or by api.
* @see <a href="https://minecraft.wiki/w/Game_rule#Modifying_game_rules">Modifying game rules - Minecraft wiki</a>
* Called when a world's gamerule is changed, either by command or by api.
*/
@NullMarked
public class WorldGameRuleChangeEvent extends WorldEvent implements Cancellable {
@@ -68,7 +68,7 @@ public class WorldBorderBoundsChangeEvent extends WorldBorderEvent implements Ca
* @param newSize the new size
*/
public void setNewSize(final double newSize) {
this.newSize = Math.clamp(newSize, 1.0, this.worldBorder.getMaxSize());
this.newSize = Math.clamp(newSize, 1.0D, this.worldBorder.getMaxSize());
}
/**
@@ -1,8 +1,6 @@
package io.papermc.paper.item;
public enum MapPostProcessing {
// Start generate - MapPostProcessing
LOCK,
SCALE;
// End generate - MapPostProcessing
SCALE
}
@@ -3,8 +3,6 @@ package io.papermc.paper.registry;
import io.papermc.paper.datacomponent.DataComponentType;
import io.papermc.paper.dialog.Dialog;
import io.papermc.paper.registry.tag.TagKey;
import io.papermc.paper.world.Timeline;
import io.papermc.paper.world.WorldClock;
import net.kyori.adventure.key.Key;
import net.kyori.adventure.key.KeyPattern;
import net.kyori.adventure.key.Keyed;
@@ -203,11 +201,6 @@ public sealed interface RegistryKey<T> extends Keyed permits RegistryKeyImpl {
* @see io.papermc.paper.registry.keys.CatVariantKeys
*/
RegistryKey<Cat.Type> CAT_VARIANT = create("cat_variant");
/**
* Data-driven registry for cat sound variants.
* @see io.papermc.paper.registry.keys.CatSoundVariantKeys
*/
RegistryKey<Cat.SoundVariant> CAT_SOUND_VARIANT = create("cat_sound_variant");
/**
* Data-driven registry for frog variants.
* @see io.papermc.paper.registry.keys.FrogVariantKeys
@@ -218,31 +211,16 @@ public sealed interface RegistryKey<T> extends Keyed permits RegistryKeyImpl {
* @see io.papermc.paper.registry.keys.ChickenVariantKeys
*/
RegistryKey<Chicken.Variant> CHICKEN_VARIANT = create("chicken_variant");
/**
* Data-driven registry for chicken sound variants.
* @see io.papermc.paper.registry.keys.ChickenSoundVariantKeys
*/
RegistryKey<Chicken.SoundVariant> CHICKEN_SOUND_VARIANT = create("chicken_sound_variant");
/**
* Data-driven registry for cow variants.
* @see io.papermc.paper.registry.keys.CowVariantKeys
*/
RegistryKey<Cow.Variant> COW_VARIANT = create("cow_variant");
/**
* Data-driven registry for cow sound variants.
* @see io.papermc.paper.registry.keys.CowSoundVariantKeys
*/
RegistryKey<Cow.SoundVariant> COW_SOUND_VARIANT = create("cow_sound_variant");
/**
* Data-driven registry for pig variants.
* @see io.papermc.paper.registry.keys.PigVariantKeys
*/
RegistryKey<Pig.Variant> PIG_VARIANT = create("pig_variant");
/**
* Data-driven registry for pig sound variants.
* @see io.papermc.paper.registry.keys.PigSoundVariantKeys
*/
RegistryKey<Pig.SoundVariant> PIG_SOUND_VARIANT = create("pig_sound_variant");
/**
* Data-driven registry for zombie nautilus variants.
* @see io.papermc.paper.registry.keys.ZombieNautilusVariantKeys
@@ -253,16 +231,6 @@ public sealed interface RegistryKey<T> extends Keyed permits RegistryKeyImpl {
* @see io.papermc.paper.registry.keys.DialogKeys
*/
RegistryKey<Dialog> DIALOG = create("dialog");
/**
* Data-driven registry for world clocks.
* @see io.papermc.paper.registry.keys.WorldClockKeys
*/
RegistryKey<WorldClock> WORLD_CLOCK = create("world_clock");
/**
* Data-driven registry for timelines.
* @see io.papermc.paper.registry.keys.TimelineKeys
*/
RegistryKey<Timeline> TIMELINE = create("timeline");
/* ******************* *
@@ -20,20 +20,12 @@ public interface CatTypeRegistryEntry {
*/
ClientTextureAsset clientTextureAsset();
/**
* Provides the client texture asset of the cat type for baby cats.
*
* @return the baby client texture asset.
*/
ClientTextureAsset babyClientTextureAsset();
/**
* A mutable builder for the {@link CatTypeRegistryEntry} plugins may change in applicable registry events.
* <p>
* The following values are required for each builder:
* <ul>
* <li>{@link #clientTextureAsset(ClientTextureAsset)}</li>
* <li>{@link #babyClientTextureAsset(ClientTextureAsset)}</li>
* </ul>
*/
@ApiStatus.Experimental
@@ -49,15 +41,5 @@ public interface CatTypeRegistryEntry {
*/
@Contract(value = "_ -> this", mutates = "this")
Builder clientTextureAsset(ClientTextureAsset clientTextureAsset);
/**
* Sets the client texture asset of the cat type for baby cats.
*
* @param babyClientTextureAsset the baby client texture asset.
* @return this builder instance.
* @see CatTypeRegistryEntry#babyClientTextureAsset()
*/
@Contract(value = "_ -> this", mutates = "this")
Builder babyClientTextureAsset(ClientTextureAsset babyClientTextureAsset);
}
}
@@ -35,13 +35,6 @@ public interface ChickenVariantRegistryEntry {
*/
ClientTextureAsset clientTextureAsset();
/**
* Provides the client texture asset of the baby chicken variant, which represents the texture to use.
*
* @return the baby client texture asset.
*/
ClientTextureAsset babyClientTextureAsset();
/**
* Provides the model of the chicken variant.
*
@@ -55,7 +48,6 @@ public interface ChickenVariantRegistryEntry {
* The following values are required for each builder:
* <ul>
* <li>{@link #clientTextureAsset(ClientTextureAsset)}</li>
* <li>{@link #babyClientTextureAsset(ClientTextureAsset)}</li>
* <li>{@link #model(Model)}</li>
* </ul>
*/
@@ -73,16 +65,6 @@ public interface ChickenVariantRegistryEntry {
@Contract(value = "_ -> this", mutates = "this")
Builder clientTextureAsset(ClientTextureAsset clientTextureAsset);
/**
* Sets the client texture asset of the baby chicken variant, which is the location of the texture to use.
*
* @param babyClientTextureAsset the baby client texture asset.
* @return this builder instance.
* @see ChickenVariantRegistryEntry#babyClientTextureAsset()
*/
@Contract(value = "_ -> this", mutates = "this")
Builder babyClientTextureAsset(ClientTextureAsset babyClientTextureAsset);
/**
* Sets the model to use for this chicken variant.
*
@@ -40,13 +40,6 @@ public interface CowVariantRegistryEntry {
*/
ClientTextureAsset clientTextureAsset();
/**
* Provides the client texture asset of the baby cow variant, which represents the texture to use.
*
* @return the baby client texture asset.
*/
ClientTextureAsset babyClientTextureAsset();
/**
* Provides the model of the cow variant.
*
@@ -60,7 +53,6 @@ public interface CowVariantRegistryEntry {
* The following values are required for each builder:
* <ul>
* <li>{@link #clientTextureAsset(ClientTextureAsset)}</li>
* <li>{@link #babyClientTextureAsset(ClientTextureAsset)}</li>
* <li>{@link #model(Model)}</li>
* </ul>
*/
@@ -78,16 +70,6 @@ public interface CowVariantRegistryEntry {
@Contract(value = "_ -> this", mutates = "this")
Builder clientTextureAsset(ClientTextureAsset clientTextureAsset);
/**
* Sets the client texture asset of the baby cow variant, which is the location of the texture to use.
*
* @param babyClientTextureAsset the baby client texture asset.
* @return this builder instance.
* @see CowVariantRegistryEntry#babyClientTextureAsset()
*/
@Contract(value = "_ -> this", mutates = "this")
Builder babyClientTextureAsset(ClientTextureAsset babyClientTextureAsset);
/**
* Sets the model to use for this cow variant.
*
@@ -35,13 +35,6 @@ public interface PigVariantRegistryEntry {
*/
ClientTextureAsset clientTextureAsset();
/**
* Provides the client texture asset of the baby pig variant, which represents the texture to use.
*
* @return the baby client texture asset.
*/
ClientTextureAsset babyClientTextureAsset();
/**
* Provides the model of the pig variant.
*
@@ -55,7 +48,6 @@ public interface PigVariantRegistryEntry {
* The following values are required for each builder:
* <ul>
* <li>{@link #clientTextureAsset(ClientTextureAsset)}</li>
* <li>{@link #babyClientTextureAsset(ClientTextureAsset)}</li>
* <li>{@link #model(Model)}</li>
* </ul>
*/
@@ -73,16 +65,6 @@ public interface PigVariantRegistryEntry {
@Contract(value = "_ -> this", mutates = "this")
Builder clientTextureAsset(ClientTextureAsset clientTextureAsset);
/**
* Sets the client texture asset of the baby pig variant, which is the location of the texture to use.
*
* @param babyClientTextureAsset the baby client texture asset.
* @return this builder instance.
* @see PigVariantRegistryEntry#babyClientTextureAsset()
*/
@Contract(value = "_ -> this", mutates = "this")
Builder babyClientTextureAsset(ClientTextureAsset babyClientTextureAsset);
/**
* Sets the model to use for this pig variant.
*
@@ -1,103 +0,0 @@
package io.papermc.paper.registry.data;
import io.papermc.paper.registry.RegistryBuilder;
import io.papermc.paper.registry.TypedKey;
import io.papermc.paper.world.Timeline;
import io.papermc.paper.world.WorldClock;
import java.util.Map;
import java.util.OptionalInt;
import net.kyori.adventure.key.Key;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.Contract;
import org.jetbrains.annotations.Range;
/**
* A data-centric version-specific registry entry for the {@link Timeline} type.
*/
@ApiStatus.Experimental
@ApiStatus.NonExtendable
public interface TimelineRegistryEntry {
/**
* Gets the clock that drives this timeline.
*
* @return the clock
*/
@Contract(pure = true)
TypedKey<WorldClock> clock();
/**
* Gets the timeline period, if any.
*
* @return the timeline period
*/
@Contract(pure = true)
OptionalInt periodTicks();
/**
* Gets the time markers defined by this timeline.
*
* @return the time markers
*/
@Contract(pure = true)
Map<Key, TimeMarker> timeMarkers();
/**
* A mutable builder for the {@link TimelineRegistryEntry} plugins may change in applicable registry events.
* <p>
* The following values are required for each builder:
* <ul>
* <li>{@link #clock(TypedKey)}</li>
* </ul>
*/
@ApiStatus.Experimental
@ApiStatus.NonExtendable
interface Builder extends TimelineRegistryEntry, RegistryBuilder<Timeline> {
/**
* Sets the clock that drives this timeline.
*
* @param clock the clock
* @return this builder
*/
@Contract(value = "_ -> this", mutates = "this")
Builder clock(TypedKey<WorldClock> clock);
/**
* Sets the timeline period.
*
* @param periodTicks the period in ticks
* @return this builder
*/
@Contract(value = "_ -> this", mutates = "this")
Builder periodTicks(@Range(from = 1, to = Integer.MAX_VALUE) int periodTicks);
/**
* Clears the timeline period.
*
* @return this builder
*/
@Contract(value = "-> this", mutates = "this")
Builder clearPeriodTicks();
/**
* Adds or replaces a time marker on this timeline.
*
* @param key the time marker key
* @param ticks the marker tick
* @param showInCommands whether the marker should be suggested in commands
* @return this builder
*/
@Contract(value = "_, _, _ -> this", mutates = "this")
Builder addTimeMarker(Key key, @Range(from = 0, to = Integer.MAX_VALUE) int ticks, boolean showInCommands);
}
/**
* A time marker defined by a timeline.
*
* @param ticks the tick this marker occurs on
* @param showInCommands whether the marker should be suggested in commands
*/
record TimeMarker(@Range(from = 0, to = Integer.MAX_VALUE) int ticks, boolean showInCommands) {
}
}
@@ -34,27 +34,6 @@ public interface WolfVariantRegistryEntry {
*/
ClientTextureAsset tameClientTextureAsset();
/**
* Provides the client texture asset of the wolf variant for when it is an angry baby.
*
* @return the baby angry client texture asset.
*/
ClientTextureAsset babyAngryClientTextureAsset();
/**
* Provides the client texture asset of the wolf variant for when it is a wild baby.
*
* @return the baby wild client texture asset.
*/
ClientTextureAsset babyWildClientTextureAsset();
/**
* Provides the client texture asset of the wolf variant for when it is a tame baby.
*
* @return the baby tame client texture asset.
*/
ClientTextureAsset babyTameClientTextureAsset();
/**
* A mutable builder for the {@link WolfVariantRegistryEntry} plugins may change in applicable registry events.
* <p>
@@ -63,9 +42,6 @@ public interface WolfVariantRegistryEntry {
* <li>{@link #angryClientTextureAsset(ClientTextureAsset)}</li>
* <li>{@link #wildClientTextureAsset(ClientTextureAsset)}</li>
* <li>{@link #tameClientTextureAsset(ClientTextureAsset)}</li>
* <li>{@link #babyAngryClientTextureAsset(ClientTextureAsset)}</li>
* <li>{@link #babyWildClientTextureAsset(ClientTextureAsset)}</li>
* <li>{@link #babyTameClientTextureAsset(ClientTextureAsset)}</li>
* </ul>
*/
@ApiStatus.Experimental
@@ -101,35 +77,5 @@ public interface WolfVariantRegistryEntry {
*/
@Contract(value = "_ -> this", mutates = "this")
Builder tameClientTextureAsset(ClientTextureAsset tameClientTextureAsset);
/**
* Sets the client texture asset of the wolf variant for when it is an angry baby.
*
* @param babyAngryClientTextureAsset the baby angry client texture asset.
* @return this builder instance.
* @see WolfVariantRegistryEntry#babyAngryClientTextureAsset()
*/
@Contract(value = "_ -> this", mutates = "this")
Builder babyAngryClientTextureAsset(ClientTextureAsset babyAngryClientTextureAsset);
/**
* Sets the client texture asset of the wolf variant for when it is a wild baby.
*
* @param babyWildClientTextureAsset the baby wild client texture asset.
* @return this builder instance.
* @see WolfVariantRegistryEntry#babyWildClientTextureAsset()
*/
@Contract(value = "_ -> this", mutates = "this")
Builder babyWildClientTextureAsset(ClientTextureAsset babyWildClientTextureAsset);
/**
* Sets the client texture asset of the wolf variant for when it is a tame baby.
*
* @param babyTameClientTextureAsset the baby tame client texture asset.
* @return this builder instance.
* @see WolfVariantRegistryEntry#babyTameClientTextureAsset()
*/
@Contract(value = "_ -> this", mutates = "this")
Builder babyTameClientTextureAsset(ClientTextureAsset babyTameClientTextureAsset);
}
}
@@ -1,21 +0,0 @@
package io.papermc.paper.registry.data;
import io.papermc.paper.registry.RegistryBuilder;
import io.papermc.paper.world.WorldClock;
import org.jetbrains.annotations.ApiStatus;
/**
* A data-centric version-specific registry entry for the {@link WorldClock} type.
*/
@ApiStatus.Experimental
@ApiStatus.NonExtendable
public interface WorldClockRegistryEntry {
/**
* A mutable builder for the {@link WorldClockRegistryEntry} plugins may change in applicable registry events.
*/
@ApiStatus.Experimental
@ApiStatus.NonExtendable
interface Builder extends WorldClockRegistryEntry, RegistryBuilder<WorldClock> {
}
}
@@ -14,13 +14,9 @@ import io.papermc.paper.registry.data.InstrumentRegistryEntry;
import io.papermc.paper.registry.data.JukeboxSongRegistryEntry;
import io.papermc.paper.registry.data.PaintingVariantRegistryEntry;
import io.papermc.paper.registry.data.PigVariantRegistryEntry;
import io.papermc.paper.registry.data.TimelineRegistryEntry;
import io.papermc.paper.registry.data.WolfVariantRegistryEntry;
import io.papermc.paper.registry.data.WorldClockRegistryEntry;
import io.papermc.paper.registry.data.ZombieNautilusVariantRegistryEntry;
import io.papermc.paper.registry.data.dialog.DialogRegistryEntry;
import io.papermc.paper.world.Timeline;
import io.papermc.paper.world.WorldClock;
import org.bukkit.Art;
import org.bukkit.GameEvent;
import org.bukkit.JukeboxSong;
@@ -60,8 +56,6 @@ public final class RegistryEvents {
public static final RegistryEventProvider<Pig.Variant, PigVariantRegistryEntry.Builder> PIG_VARIANT = create(RegistryKey.PIG_VARIANT);
public static final RegistryEventProvider<ZombieNautilus.Variant, ZombieNautilusVariantRegistryEntry.Builder> ZOMBIE_NAUTILUS_VARIANT = create(RegistryKey.ZOMBIE_NAUTILUS_VARIANT);
public static final RegistryEventProvider<Dialog, DialogRegistryEntry.Builder> DIALOG = create(RegistryKey.DIALOG);
public static final RegistryEventProvider<WorldClock, WorldClockRegistryEntry.Builder> WORLD_CLOCK = create(RegistryKey.WORLD_CLOCK);
public static final RegistryEventProvider<Timeline, TimelineRegistryEntry.Builder> TIMELINE = create(RegistryKey.TIMELINE);
// End generate - RegistryEvents
private RegistryEvents() {
@@ -1,11 +0,0 @@
package io.papermc.paper.world;
import org.bukkit.Keyed;
import org.jetbrains.annotations.ApiStatus;
/**
* Represents a timeline that can apply world attributes or define time markers for a {@link WorldClock}.
*/
@ApiStatus.Experimental
public interface Timeline extends Keyed {
}
@@ -1,11 +0,0 @@
package io.papermc.paper.world;
import org.bukkit.Keyed;
import org.jetbrains.annotations.ApiStatus;
/**
* Represents a world clock.
*/
@ApiStatus.Experimental
public interface WorldClock extends Keyed {
}
@@ -1753,7 +1753,7 @@ public final class Bukkit {
// Paper end
/**
* Gets the folder that contains all the various {@link World}s.
* Gets the folder that contains all of the various {@link World}s.
*
* @return folder that contains all worlds
*/
@@ -1,9 +1,7 @@
package org.bukkit;
import net.kyori.adventure.key.Key;
import org.bukkit.block.Biome;
import org.bukkit.block.data.BlockData;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.NotNull;
/**
@@ -31,23 +29,11 @@ public interface ChunkSnapshot {
/**
* Gets name of the world containing this chunk
*
* <p>This method is considered obsolete and is a candidate for future deprecation.
* Prefer using {@link #getWorldKey()} as the world identity.</p>
*
* @return Parent World Name
*/
@NotNull
@ApiStatus.Obsolete
String getWorldName();
/**
* Gets the key of the world containing this chunk
*
* @return Parent World Key
*/
@NotNull
Key getWorldKey();
/**
* Get block type for block at corresponding coordinate in the chunk
*
@@ -488,14 +488,6 @@ public abstract class GameRule<T> implements net.kyori.adventure.translation.Tra
@NotNull
public abstract Class<T> getType();
/**
* Get the default value of this rule.
*
* @return the default value
*/
@NotNull
public abstract T getDefaultValue();
/**
* Get a {@link GameRule} by its name.
*
@@ -1,6 +1,7 @@
package org.bukkit;
import org.apache.commons.lang3.ArrayUtils;
import com.google.common.collect.Maps;
import java.util.Map;
import org.jetbrains.annotations.Nullable;
public enum Instrument {
@@ -8,120 +9,109 @@ public enum Instrument {
/**
* Piano (Harp) is the standard instrument for a note block.
*/
PIANO(Sound.BLOCK_NOTE_BLOCK_HARP),
PIANO(0x0, Sound.BLOCK_NOTE_BLOCK_HARP),
/**
* Bass drum is normally played when a note block is on top of a
* stone-like block.
*/
BASS_DRUM(Sound.BLOCK_NOTE_BLOCK_BASEDRUM),
BASS_DRUM(0x1, Sound.BLOCK_NOTE_BLOCK_BASEDRUM),
/**
* Snare drum is normally played when a note block is on top of a sandy
* block.
*/
SNARE_DRUM(Sound.BLOCK_NOTE_BLOCK_SNARE),
SNARE_DRUM(0x2, Sound.BLOCK_NOTE_BLOCK_SNARE),
/**
* Sticks (Hat) are normally played when a note block is on top of a glass
* block.
*/
STICKS(Sound.BLOCK_NOTE_BLOCK_HAT),
STICKS(0x3, Sound.BLOCK_NOTE_BLOCK_HAT),
/**
* Bass guitar is normally played when a note block is on top of a wooden
* block.
*/
BASS_GUITAR(Sound.BLOCK_NOTE_BLOCK_BASS),
BASS_GUITAR(0x4, Sound.BLOCK_NOTE_BLOCK_BASS),
/**
* Flute is normally played when a note block is on top of a clay block.
*/
FLUTE(Sound.BLOCK_NOTE_BLOCK_FLUTE),
FLUTE(0x5, Sound.BLOCK_NOTE_BLOCK_FLUTE),
/**
* Bell is normally played when a note block is on top of a gold block.
*/
BELL(Sound.BLOCK_NOTE_BLOCK_BELL),
BELL(0x6, Sound.BLOCK_NOTE_BLOCK_BELL),
/**
* Guitar is normally played when a note block is on top of a woolen block.
*/
GUITAR(Sound.BLOCK_NOTE_BLOCK_GUITAR),
GUITAR(0x7, Sound.BLOCK_NOTE_BLOCK_GUITAR),
/**
* Chime is normally played when a note block is on top of a packed ice
* block.
*/
CHIME(Sound.BLOCK_NOTE_BLOCK_CHIME),
CHIME(0x8, Sound.BLOCK_NOTE_BLOCK_CHIME),
/**
* Xylophone is normally played when a note block is on top of a bone block.
*/
XYLOPHONE(Sound.BLOCK_NOTE_BLOCK_XYLOPHONE),
XYLOPHONE(0x9, Sound.BLOCK_NOTE_BLOCK_XYLOPHONE),
/**
* Iron Xylophone is normally played when a note block is on top of an iron block.
*/
IRON_XYLOPHONE(Sound.BLOCK_NOTE_BLOCK_IRON_XYLOPHONE),
IRON_XYLOPHONE(0xA, Sound.BLOCK_NOTE_BLOCK_IRON_XYLOPHONE),
/**
* Cow Bell is normally played when a note block is on top of a soul sand block.
*/
COW_BELL(Sound.BLOCK_NOTE_BLOCK_COW_BELL),
COW_BELL(0xB, Sound.BLOCK_NOTE_BLOCK_COW_BELL),
/**
* Didgeridoo is normally played when a note block is on top of a pumpkin block.
*/
DIDGERIDOO(Sound.BLOCK_NOTE_BLOCK_DIDGERIDOO),
DIDGERIDOO(0xC, Sound.BLOCK_NOTE_BLOCK_DIDGERIDOO),
/**
* Bit is normally played when a note block is on top of an emerald block.
*/
BIT(Sound.BLOCK_NOTE_BLOCK_BIT),
BIT(0xD, Sound.BLOCK_NOTE_BLOCK_BIT),
/**
* Banjo is normally played when a note block is on top of a hay block.
*/
BANJO(Sound.BLOCK_NOTE_BLOCK_BANJO),
BANJO(0xE, Sound.BLOCK_NOTE_BLOCK_BANJO),
/**
* Pling is normally played when a note block is on top of a glowstone block.
*/
PLING(Sound.BLOCK_NOTE_BLOCK_PLING),
/**
* Trumpet is normally played when a note block is on top of a copper block.
*/
TRUMPET(Sound.BLOCK_NOTE_BLOCK_TRUMPET),
/**
* Trumpet exposed is normally played when a note block is on top of an exposed copper block.
*/
TRUMPET_EXPOSED(Sound.BLOCK_NOTE_BLOCK_TRUMPET_EXPOSED),
/**
* Trumpet oxidized is normally played when a note block is on top of an oxidized copper block.
*/
TRUMPET_OXIDIZED(Sound.BLOCK_NOTE_BLOCK_TRUMPET_OXIDIZED),
/**
* Trumpet weathered is normally played when a note block is on top of a weathered copper block.
*/
TRUMPET_WEATHERED(Sound.BLOCK_NOTE_BLOCK_TRUMPET_WEATHERED),
PLING(0xF, Sound.BLOCK_NOTE_BLOCK_PLING),
/**
* Zombie is normally played when a Zombie Head is on top of the note block.
*/
ZOMBIE(Sound.BLOCK_NOTE_BLOCK_IMITATE_ZOMBIE),
ZOMBIE(0x10, Sound.BLOCK_NOTE_BLOCK_IMITATE_ZOMBIE), // Paper
/**
* Skeleton is normally played when a Skeleton Head is on top of the note block.
*/
SKELETON(Sound.BLOCK_NOTE_BLOCK_IMITATE_SKELETON),
SKELETON(0x11, Sound.BLOCK_NOTE_BLOCK_IMITATE_SKELETON), // Paper
/**
* Creeper is normally played when a Creeper Head is on top of the note block.
*/
CREEPER(Sound.BLOCK_NOTE_BLOCK_IMITATE_CREEPER),
CREEPER(0x12, Sound.BLOCK_NOTE_BLOCK_IMITATE_CREEPER), // Paper
/**
* Dragon is normally played when a Dragon Head is on top of the note block.
*/
DRAGON(Sound.BLOCK_NOTE_BLOCK_IMITATE_ENDER_DRAGON),
DRAGON(0x13, Sound.BLOCK_NOTE_BLOCK_IMITATE_ENDER_DRAGON), // Paper
/**
* Wither Skeleton is normally played when a Wither Skeleton Head is on top of the note block.
*/
WITHER_SKELETON(Sound.BLOCK_NOTE_BLOCK_IMITATE_WITHER_SKELETON),
WITHER_SKELETON(0x14, Sound.BLOCK_NOTE_BLOCK_IMITATE_WITHER_SKELETON), // Paper
/**
* Piglin is normally played when a Piglin Head is on top of the note block.
*/
PIGLIN(Sound.BLOCK_NOTE_BLOCK_IMITATE_PIGLIN),
PIGLIN(0x15, Sound.BLOCK_NOTE_BLOCK_IMITATE_PIGLIN), // Paper
/**
* Custom Sound is normally played when a Player Head with the required data is on top of the note block.
*/
CUSTOM_HEAD(null);
CUSTOM_HEAD(0x16, null); // Paper
private final byte type;
private final Sound sound;
private static final Map<Byte, Instrument> BY_DATA = Maps.newHashMap();
Instrument(final Sound sound) {
// Paper - remove ctor (the server still uses the byte magic value)
private Instrument(final int type, final Sound sound) {
this.type = (byte) type;
this.sound = sound;
}
@@ -138,11 +128,10 @@ public enum Instrument {
/**
* @return The type ID of this instrument.
* @deprecated use {@link #ordinal()}, there's no meaning to this id
*/
@Deprecated(since = "26.1")
@org.jetbrains.annotations.ApiStatus.Internal // Paper
public byte getType() {
return (byte) this.ordinal();
return this.type;
}
/**
@@ -150,11 +139,16 @@ public enum Instrument {
*
* @param type The type ID
* @return The instrument
* @deprecated type is just the ordinal of the enum, no meaning in the game
*/
@org.jetbrains.annotations.ApiStatus.Internal // Paper
@Nullable
@Deprecated(since = "26.1")
public static Instrument getByType(final byte type) {
return ArrayUtils.get(values(), type);
return BY_DATA.get(type);
}
static {
for (Instrument instrument : Instrument.values()) {
BY_DATA.put(instrument.getType(), instrument);
}
}
}
@@ -574,7 +574,7 @@ public class Location implements Cloneable, ConfigurationSerializable, io.paperm
} else if (o.getWorld() == null || getWorld() == null) {
throw new IllegalArgumentException("Cannot measure distance to a null world");
} else if (o.getWorld() != getWorld()) {
throw new IllegalArgumentException("Cannot measure distance between " + getWorld().getKey() + " and " + o.getWorld().getKey());
throw new IllegalArgumentException("Cannot measure distance between " + getWorld().getName() + " and " + o.getWorld().getName());
}
return NumberConversions.square(x - o.x) + NumberConversions.square(y - o.y) + NumberConversions.square(z - o.z);
@@ -1189,7 +1189,7 @@ public class Location implements Cloneable, ConfigurationSerializable, io.paperm
Map<String, Object> data = new HashMap<String, Object>();
if (this.world != null) {
data.put("world_key", getWorld().getKey().toString());
data.put("world", getWorld().getName());
}
data.put("x", this.x);
@@ -1213,20 +1213,12 @@ public class Location implements Cloneable, ConfigurationSerializable, io.paperm
@NotNull
public static Location deserialize(@NotNull Map<String, Object> args) {
World world = null;
boolean requiresWorld = false;
if (args.containsKey("world")) {
world = Bukkit.getWorld((String) args.get("world"));
requiresWorld = true;
if (world == null) {
throw new IllegalArgumentException("unknown world");
}
}
if (args.containsKey("world_key")) {
world = Bukkit.getWorld(NamespacedKey.fromString((String) args.get("world_key")));
requiresWorld = true;
}
if (requiresWorld && world == null) {
throw new IllegalArgumentException("unknown world");
}
return new Location(world, NumberConversions.toDouble(args.get("x")), NumberConversions.toDouble(args.get("y")), NumberConversions.toDouble(args.get("z")), NumberConversions.toFloat(args.get("yaw")), NumberConversions.toFloat(args.get("pitch")));
}
@@ -1057,7 +1057,6 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
GLOWSTONE(-1),
GOLD_BLOCK(-1),
GOLD_ORE(-1),
GOLDEN_DANDELION(-1),
GRANITE(-1),
GRANITE_SLAB(-1, Slab.class),
GRANITE_STAIRS(-1, Stairs.class),
@@ -1426,7 +1425,6 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
POTTED_DEAD_BUSH(-1),
POTTED_FERN(-1),
POTTED_FLOWERING_AZALEA_BUSH(-1),
POTTED_GOLDEN_DANDELION(-1),
POTTED_JUNGLE_SAPLING(-1),
POTTED_LILY_OF_THE_VALLEY(-1),
POTTED_MANGROVE_PROPAGULE(-1),
@@ -3556,12 +3554,10 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
/**
* Get the {@link CreativeCategory} to which this material belongs.
*
* @return the creative category. null if it does not belong to a category
* @deprecated items can belong to multiple creative categories and this is no
* longer implemented, will always be {@link CreativeCategory#BUILDING_BLOCKS} if not null
* @return the creative category. null if does not belong to a category
*/
@Deprecated(since = "1.20.6", forRemoval = true)
public @Nullable CreativeCategory getCreativeCategory() {
@Nullable
public CreativeCategory getCreativeCategory() {
ItemType type = asItemType();
return type == null ? null : type.getCreativeCategory();
}
@@ -81,7 +81,7 @@ public final class NamespacedKey implements Key, com.destroystokyo.paper.Namespa
private void validate() {
Preconditions.checkArgument(this.namespace.length() + 1 + this.key.length() <= Short.MAX_VALUE, "NamespacedKey must be less than 32768 characters");
checkError("[a-z0-9_-.]", "namespace", this.namespace, Key.checkNamespace(this.namespace)); // note: for now we will pretend ".." is a valid namespace like adventure to not break conversion
checkError("[a-z0-9_-.]", "namespace", this.namespace, Key.checkNamespace(this.namespace));
checkError("[a-z0-9_-./]", "key", this.key, Key.checkValue(this.key));
}
@@ -175,8 +175,6 @@ public enum Particle implements Keyed {
*/
BLOCK_MARKER("block_marker", BlockData.class),
COPPER_FIRE_FLAME("copper_fire_flame"),
PAUSE_MOB_GROWTH("pause_mob_growth"),
RESET_MOB_GROWTH("reset_mob_growth"),
;
private final NamespacedKey key;
+7 -106
View File
@@ -5,7 +5,6 @@ import java.awt.image.BufferedImage;
import java.io.File;
import java.io.Serializable;
import java.net.InetAddress;
import java.nio.file.Path;
import java.util.Collection;
import java.util.Collections;
import java.util.Iterator;
@@ -16,7 +15,6 @@ import java.util.UUID;
import java.util.function.Consumer;
import java.util.logging.Logger;
import io.papermc.paper.configuration.ServerConfiguration;
import io.papermc.paper.world.WorldClock;
import net.kyori.adventure.text.Component;
import net.kyori.adventure.text.minimessage.MiniMessage;
import net.kyori.adventure.text.minimessage.tag.resolver.TagResolver;
@@ -166,85 +164,6 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
@NotNull
public Collection<? extends Player> getOnlinePlayers();
/**
* Gets the relative in-game time of the specified clock.
* <p>
* The relative time is analogous to hours * 1000
*
* @param clock the clock
* @return The current relative time
* @see #getFullTime(WorldClock) Returns an absolute time of the clock
*/
public long getTime(@NotNull WorldClock clock);
/**
* Sets the relative in-game time of the specified clock.
* <p>
* The relative time is analogous to hours * 1000
* <p>
* Note that setting the relative time below the current relative time
* will actually move the clock forward a day. If you require to rewind
* time, please see {@link #setFullTime(WorldClock, long)}
*
* @param clock the clock
* @param time The new relative time to set the clock to (in hours*1000)
* @see #setFullTime(WorldClock, long) Sets the absolute time of a specific clock
*/
public void setTime(@NotNull WorldClock clock, long time);
/**
* Gets the full in-game time of the specified clock.
*
* @param clock the clock
* @return The current absolute time
* @see #getTime(WorldClock) Returns a relative time of the clock
*/
public long getFullTime(@NotNull WorldClock clock);
/**
* Sets the in-game time of the specified clock.
* <p>
* Note that this sets the full time of the clock, which may cause adverse
* effects such as breaking redstone clocks and any scheduled events
*
* @param clock the clock
* @param time The new absolute time to set this clock to
* @see #setTime(WorldClock, long) Sets the relative time of a specific clock
*/
public void setFullTime(@NotNull WorldClock clock, long time);
/**
* Gets whether the specified clock is paused.
*
* @param clock the clock
* @return whether the clock is paused
*/
public boolean isClockPaused(@NotNull WorldClock clock);
/**
* Sets whether the specified clock is paused.
*
* @param clock the clock
* @param paused whether the clock is paused
*/
public void setClockPaused(@NotNull WorldClock clock, boolean paused);
/**
* Gets the rate of the specified clock.
*
* @param clock the clock
* @return the clock rate
*/
public float getClockRate(@NotNull WorldClock clock);
/**
* Sets the rate of the specified clock.
*
* @param clock the clock
* @param rate the clock rate
*/
public void setClockRate(@NotNull WorldClock clock, float rate);
/**
* Get the maximum amount of players which can login to this server.
*
@@ -873,15 +792,11 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
public void setRespawnWorld(@NotNull World world);
/**
* Gets the world with the given legacy Bukkit name.
* Gets the world with the given name.
*
* <p>This method is considered obsolete and is a candidate for future deprecation.
* Prefer using {@link #getWorld(NamespacedKey)}.</p>
*
* @param name the legacy Bukkit name of the world to retrieve
* @return a world with the given legacy Bukkit name, or null if none exists
* @param name the name of the world to retrieve
* @return a world with the given name, or null if none exists
*/
@ApiStatus.Obsolete
@Nullable
public World getWorld(@NotNull String name);
@@ -1650,6 +1565,7 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
@NotNull
public ConsoleCommandSender getConsoleSender();
// Paper start
/**
* Creates a special {@link CommandSender} which redirects command feedback (in the form of chat messages) to the
* specified listener. The returned sender will have the same effective permissions as {@link #getConsoleSender()}.
@@ -1659,31 +1575,16 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
*/
@NotNull
public CommandSender createCommandSender(final @NotNull java.util.function.Consumer<? super net.kyori.adventure.text.Component> feedback);
// Paper end
/**
* Gets the folder that contains {@link #getLevelDirectory()}.
* Gets the folder that contains all of the various {@link World}s.
*
* <p>This is usually the server's current working directory
* but can be overridden using command line flags (i.e. {@code --universe} or {@code --world-container}).</p>
*
* @return folder that contains the level directory
* @return folder that contains all worlds
*/
@ApiStatus.Obsolete
@NotNull
public File getWorldContainer();
/**
* Gets the level directory.
*
* <p>This is the {@code ./world} directory in a fresh default server. Contains player data, dimensions, datapacks,
* and other world data.</p>
*
* @return the level directory
*/
@ApiStatus.Experimental
@NotNull
Path getLevelDirectory();
/**
* Gets every player that has ever played on this server.
* <p>
@@ -1076,14 +1076,6 @@ public interface Sound extends OldEnum<Sound>, Keyed, net.kyori.adventure.sound.
Sound BLOCK_NOTE_BLOCK_SNARE = getSound("block.note_block.snare");
Sound BLOCK_NOTE_BLOCK_TRUMPET = getSound("block.note_block.trumpet");
Sound BLOCK_NOTE_BLOCK_TRUMPET_EXPOSED = getSound("block.note_block.trumpet_exposed");
Sound BLOCK_NOTE_BLOCK_TRUMPET_OXIDIZED = getSound("block.note_block.trumpet_oxidized");
Sound BLOCK_NOTE_BLOCK_TRUMPET_WEATHERED = getSound("block.note_block.trumpet_weathered");
Sound BLOCK_NOTE_BLOCK_XYLOPHONE = getSound("block.note_block.xylophone");
Sound BLOCK_NYLIUM_BREAK = getSound("block.nylium.break");
@@ -1748,48 +1740,6 @@ public interface Sound extends OldEnum<Sound>, Keyed, net.kyori.adventure.sound.
Sound ENTITY_AXOLOTL_SWIM = getSound("entity.axolotl.swim");
Sound ENTITY_BABY_CAT_AMBIENT = getSound("entity.baby_cat.ambient");
Sound ENTITY_BABY_CAT_BEG_FOR_FOOD = getSound("entity.baby_cat.beg_for_food");
Sound ENTITY_BABY_CAT_DEATH = getSound("entity.baby_cat.death");
Sound ENTITY_BABY_CAT_EAT = getSound("entity.baby_cat.eat");
Sound ENTITY_BABY_CAT_HISS = getSound("entity.baby_cat.hiss");
Sound ENTITY_BABY_CAT_HURT = getSound("entity.baby_cat.hurt");
Sound ENTITY_BABY_CAT_PURR = getSound("entity.baby_cat.purr");
Sound ENTITY_BABY_CAT_PURREOW = getSound("entity.baby_cat.purreow");
Sound ENTITY_BABY_CAT_STRAY_AMBIENT = getSound("entity.baby_cat.stray_ambient");
Sound ENTITY_BABY_CHICKEN_AMBIENT = getSound("entity.baby_chicken.ambient");
Sound ENTITY_BABY_CHICKEN_DEATH = getSound("entity.baby_chicken.death");
Sound ENTITY_BABY_CHICKEN_HURT = getSound("entity.baby_chicken.hurt");
Sound ENTITY_BABY_CHICKEN_STEP = getSound("entity.baby_chicken.step");
Sound ENTITY_BABY_HORSE_AMBIENT = getSound("entity.baby_horse.ambient");
Sound ENTITY_BABY_HORSE_ANGRY = getSound("entity.baby_horse.angry");
Sound ENTITY_BABY_HORSE_BREATHE = getSound("entity.baby_horse.breathe");
Sound ENTITY_BABY_HORSE_DEATH = getSound("entity.baby_horse.death");
Sound ENTITY_BABY_HORSE_EAT = getSound("entity.baby_horse.eat");
Sound ENTITY_BABY_HORSE_HURT = getSound("entity.baby_horse.hurt");
Sound ENTITY_BABY_HORSE_LAND = getSound("entity.baby_horse.land");
Sound ENTITY_BABY_HORSE_STEP = getSound("entity.baby_horse.step");
Sound ENTITY_BABY_NAUTILUS_AMBIENT = getSound("entity.baby_nautilus.ambient");
Sound ENTITY_BABY_NAUTILUS_AMBIENT_LAND = getSound("entity.baby_nautilus.ambient_land");
@@ -1806,30 +1756,6 @@ public interface Sound extends OldEnum<Sound>, Keyed, net.kyori.adventure.sound.
Sound ENTITY_BABY_NAUTILUS_SWIM = getSound("entity.baby_nautilus.swim");
Sound ENTITY_BABY_PIG_AMBIENT = getSound("entity.baby_pig.ambient");
Sound ENTITY_BABY_PIG_DEATH = getSound("entity.baby_pig.death");
Sound ENTITY_BABY_PIG_EAT = getSound("entity.baby_pig.eat");
Sound ENTITY_BABY_PIG_HURT = getSound("entity.baby_pig.hurt");
Sound ENTITY_BABY_PIG_STEP = getSound("entity.baby_pig.step");
Sound ENTITY_BABY_WOLF_AMBIENT = getSound("entity.baby_wolf.ambient");
Sound ENTITY_BABY_WOLF_DEATH = getSound("entity.baby_wolf.death");
Sound ENTITY_BABY_WOLF_GROWL = getSound("entity.baby_wolf.growl");
Sound ENTITY_BABY_WOLF_HURT = getSound("entity.baby_wolf.hurt");
Sound ENTITY_BABY_WOLF_PANT = getSound("entity.baby_wolf.pant");
Sound ENTITY_BABY_WOLF_STEP = getSound("entity.baby_wolf.step");
Sound ENTITY_BABY_WOLF_WHINE = getSound("entity.baby_wolf.whine");
Sound ENTITY_BAT_AMBIENT = getSound("entity.bat.ambient");
Sound ENTITY_BAT_DEATH = getSound("entity.bat.death");
@@ -1964,24 +1890,6 @@ public interface Sound extends OldEnum<Sound>, Keyed, net.kyori.adventure.sound.
Sound ENTITY_CAT_STRAY_AMBIENT = getSound("entity.cat.stray_ambient");
Sound ENTITY_CAT_ROYAL_AMBIENT = getSound("entity.cat_royal.ambient");
Sound ENTITY_CAT_ROYAL_BEG_FOR_FOOD = getSound("entity.cat_royal.beg_for_food");
Sound ENTITY_CAT_ROYAL_DEATH = getSound("entity.cat_royal.death");
Sound ENTITY_CAT_ROYAL_EAT = getSound("entity.cat_royal.eat");
Sound ENTITY_CAT_ROYAL_HISS = getSound("entity.cat_royal.hiss");
Sound ENTITY_CAT_ROYAL_HURT = getSound("entity.cat_royal.hurt");
Sound ENTITY_CAT_ROYAL_PURR = getSound("entity.cat_royal.purr");
Sound ENTITY_CAT_ROYAL_PURREOW = getSound("entity.cat_royal.purreow");
Sound ENTITY_CAT_ROYAL_STRAY_AMBIENT = getSound("entity.cat_royal.stray_ambient");
Sound ENTITY_CHICKEN_AMBIENT = getSound("entity.chicken.ambient");
Sound ENTITY_CHICKEN_DEATH = getSound("entity.chicken.death");
@@ -1992,12 +1900,6 @@ public interface Sound extends OldEnum<Sound>, Keyed, net.kyori.adventure.sound.
Sound ENTITY_CHICKEN_STEP = getSound("entity.chicken.step");
Sound ENTITY_CHICKEN_PICKY_AMBIENT = getSound("entity.chicken_picky.ambient");
Sound ENTITY_CHICKEN_PICKY_DEATH = getSound("entity.chicken_picky.death");
Sound ENTITY_CHICKEN_PICKY_HURT = getSound("entity.chicken_picky.hurt");
Sound ENTITY_COD_AMBIENT = getSound("entity.cod.ambient");
Sound ENTITY_COD_DEATH = getSound("entity.cod.death");
@@ -2054,14 +1956,6 @@ public interface Sound extends OldEnum<Sound>, Keyed, net.kyori.adventure.sound.
Sound ENTITY_COW_STEP = getSound("entity.cow.step");
Sound ENTITY_COW_MOODY_AMBIENT = getSound("entity.cow_moody.ambient");
Sound ENTITY_COW_MOODY_DEATH = getSound("entity.cow_moody.death");
Sound ENTITY_COW_MOODY_HURT = getSound("entity.cow_moody.hurt");
Sound ENTITY_COW_MOODY_STEP = getSound("entity.cow_moody.step");
Sound ENTITY_CREAKING_ACTIVATE = getSound("entity.creaking.activate");
Sound ENTITY_CREAKING_AMBIENT = getSound("entity.creaking.ambient");
@@ -2758,30 +2652,12 @@ public interface Sound extends OldEnum<Sound>, Keyed, net.kyori.adventure.sound.
Sound ENTITY_PIG_DEATH = getSound("entity.pig.death");
Sound ENTITY_PIG_EAT = getSound("entity.pig.eat");
Sound ENTITY_PIG_HURT = getSound("entity.pig.hurt");
Sound ENTITY_PIG_SADDLE = getSound("entity.pig.saddle");
Sound ENTITY_PIG_STEP = getSound("entity.pig.step");
Sound ENTITY_PIG_BIG_AMBIENT = getSound("entity.pig_big.ambient");
Sound ENTITY_PIG_BIG_DEATH = getSound("entity.pig_big.death");
Sound ENTITY_PIG_BIG_EAT = getSound("entity.pig_big.eat");
Sound ENTITY_PIG_BIG_HURT = getSound("entity.pig_big.hurt");
Sound ENTITY_PIG_MINI_AMBIENT = getSound("entity.pig_mini.ambient");
Sound ENTITY_PIG_MINI_DEATH = getSound("entity.pig_mini.death");
Sound ENTITY_PIG_MINI_EAT = getSound("entity.pig_mini.eat");
Sound ENTITY_PIG_MINI_HURT = getSound("entity.pig_mini.hurt");
Sound ENTITY_PIGLIN_ADMIRING_ITEM = getSound("entity.piglin.admiring_item");
Sound ENTITY_PIGLIN_AMBIENT = getSound("entity.piglin.ambient");
@@ -3600,10 +3476,6 @@ public interface Sound extends OldEnum<Sound>, Keyed, net.kyori.adventure.sound.
Sound ITEM_GOAT_HORN_SOUND_7 = getSound("item.goat_horn.sound.7");
Sound ITEM_GOLDEN_DANDELION_UNUSE = getSound("item.golden_dandelion.unuse");
Sound ITEM_GOLDEN_DANDELION_USE = getSound("item.golden_dandelion.use");
Sound ITEM_HOE_TILL = getSound("item.hoe.till");
Sound ITEM_HONEY_BOTTLE_DRINK = getSound("item.honey_bottle.drink");
+27 -181
View File
@@ -48,6 +48,8 @@ public interface Tag<T extends Keyed> extends Keyed {
Tag<Material> BAMBOO_BLOCKS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("bamboo_blocks"), Material.class);
Tag<Material> BAMBOO_PLANTABLE_ON = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("bamboo_plantable_on"), Material.class);
Tag<Material> BANNERS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("banners"), Material.class);
Tag<Material> BARS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("bars"), Material.class);
@@ -68,9 +70,7 @@ public interface Tag<T extends Keyed> extends Keyed {
Tag<Material> BEEHIVES = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("beehives"), Material.class);
Tag<Material> BENEATH_BAMBOO_PODZOL_REPLACEABLE = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("beneath_bamboo_podzol_replaceable"), Material.class);
Tag<Material> BENEATH_TREE_PODZOL_REPLACEABLE = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("beneath_tree_podzol_replaceable"), Material.class);
Tag<Material> BIG_DRIPLEAF_PLACEABLE = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("big_dripleaf_placeable"), Material.class);
Tag<Material> BIRCH_LOGS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("birch_logs"), Material.class);
@@ -90,14 +90,6 @@ public interface Tag<T extends Keyed> extends Keyed {
Tag<Material> CANDLES = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("candles"), Material.class);
Tag<Material> CANNOT_REPLACE_BELOW_TREE_TRUNK = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("cannot_replace_below_tree_trunk"), Material.class);
Tag<Material> CANNOT_SUPPORT_KELP = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("cannot_support_kelp"), Material.class);
Tag<Material> CANNOT_SUPPORT_SEAGRASS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("cannot_support_seagrass"), Material.class);
Tag<Material> CANNOT_SUPPORT_SNOW_LAYER = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("cannot_support_snow_layer"), Material.class);
Tag<Material> CAULDRONS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("cauldrons"), Material.class);
Tag<Material> CAVE_VINES = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("cave_vines"), Material.class);
@@ -160,14 +152,12 @@ public interface Tag<T extends Keyed> extends Keyed {
Tag<Material> DRIPSTONE_REPLACEABLE_BLOCKS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("dripstone_replaceable_blocks"), Material.class);
Tag<Material> DRY_VEGETATION_MAY_PLACE_ON = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("dry_vegetation_may_place_on"), Material.class);
Tag<Material> EDIBLE_FOR_SHEEP = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("edible_for_sheep"), Material.class);
Tag<Material> EMERALD_ORES = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("emerald_ores"), Material.class);
Tag<Material> ENABLES_BUBBLE_COLUMN_DRAG_DOWN = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("enables_bubble_column_drag_down"), Material.class);
Tag<Material> ENABLES_BUBBLE_COLUMN_PUSH_UP = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("enables_bubble_column_push_up"), Material.class);
Tag<Material> ENCHANTMENT_POWER_PROVIDER = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("enchantment_power_provider"), Material.class);
Tag<Material> ENCHANTMENT_POWER_TRANSMITTER = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("enchantment_power_transmitter"), Material.class);
@@ -188,8 +178,6 @@ public interface Tag<T extends Keyed> extends Keyed {
Tag<Material> FLOWERS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("flowers"), Material.class);
Tag<Material> FOREST_ROCK_CAN_PLACE_ON = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("forest_rock_can_place_on"), Material.class);
Tag<Material> FOXES_SPAWNABLE_ON = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("foxes_spawnable_on"), Material.class);
Tag<Material> FROG_PREFER_JUMP_TO = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("frog_prefer_jump_to"), Material.class);
@@ -202,24 +190,14 @@ public interface Tag<T extends Keyed> extends Keyed {
Tag<Material> GOLD_ORES = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("gold_ores"), Material.class);
Tag<Material> GRASS_BLOCKS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("grass_blocks"), Material.class);
Tag<Material> GROWS_CROPS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("grows_crops"), Material.class);
Tag<Material> GUARDED_BY_PIGLINS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("guarded_by_piglins"), Material.class);
Tag<Material> HAPPY_GHAST_AVOIDS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("happy_ghast_avoids"), Material.class);
Tag<Material> HOGLIN_REPELLENTS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("hoglin_repellents"), Material.class);
Tag<Material> HUGE_BROWN_MUSHROOM_CAN_PLACE_ON = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("huge_brown_mushroom_can_place_on"), Material.class);
Tag<Material> HUGE_RED_MUSHROOM_CAN_PLACE_ON = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("huge_red_mushroom_can_place_on"), Material.class);
Tag<Material> ICE = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("ice"), Material.class);
Tag<Material> ICE_SPIKE_REPLACEABLE = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("ice_spike_replaceable"), Material.class);
Tag<Material> IMPERMEABLE = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("impermeable"), Material.class);
Tag<Material> INCORRECT_FOR_COPPER_TOOL = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("incorrect_for_copper_tool"), Material.class);
@@ -286,11 +264,9 @@ public interface Tag<T extends Keyed> extends Keyed {
Tag<Material> MOOSHROOMS_SPAWNABLE_ON = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("mooshrooms_spawnable_on"), Material.class);
Tag<Material> MOSS_BLOCKS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("moss_blocks"), Material.class);
Tag<Material> MOSS_REPLACEABLE = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("moss_replaceable"), Material.class);
Tag<Material> MUD = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("mud"), Material.class);
Tag<Material> MUSHROOM_GROW_BLOCK = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("mushroom_grow_block"), Material.class);
Tag<Material> NEEDS_DIAMOND_TOOL = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("needs_diamond_tool"), Material.class);
@@ -306,8 +282,6 @@ public interface Tag<T extends Keyed> extends Keyed {
Tag<Material> OCCLUDES_VIBRATION_SIGNALS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("occludes_vibration_signals"), Material.class);
Tag<Material> OVERRIDES_MUSHROOM_LIGHT_REQUIREMENT = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("overrides_mushroom_light_requirement"), Material.class);
Tag<Material> OVERWORLD_CARVER_REPLACEABLES = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("overworld_carver_replaceables"), Material.class);
Tag<Material> OVERWORLD_NATURAL_LOGS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("overworld_natural_logs"), Material.class);
@@ -328,8 +302,6 @@ public interface Tag<T extends Keyed> extends Keyed {
Tag<Material> PREVENT_MOB_SPAWNING_INSIDE = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("prevent_mob_spawning_inside"), Material.class);
Tag<Material> PREVENTS_NEARBY_LEAF_DECAY = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("prevents_nearby_leaf_decay"), Material.class);
Tag<Material> RABBITS_SPAWNABLE_ON = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("rabbits_spawnable_on"), Material.class);
Tag<Material> RAILS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("rails"), Material.class);
@@ -356,6 +328,8 @@ public interface Tag<T extends Keyed> extends Keyed {
Tag<Material> SLABS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("slabs"), Material.class);
Tag<Material> SMALL_DRIPLEAF_PLACEABLE = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("small_dripleaf_placeable"), Material.class);
Tag<Material> SMALL_FLOWERS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("small_flowers"), Material.class);
Tag<Material> SMELTS_TO_GLASS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("smelts_to_glass"), Material.class);
@@ -368,6 +342,10 @@ public interface Tag<T extends Keyed> extends Keyed {
Tag<Material> SNOW = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("snow"), Material.class);
Tag<Material> SNOW_LAYER_CAN_SURVIVE_ON = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("snow_layer_can_survive_on"), Material.class);
Tag<Material> SNOW_LAYER_CANNOT_SURVIVE_ON = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("snow_layer_cannot_survive_on"), Material.class);
Tag<Material> SOUL_FIRE_BASE_BLOCKS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("soul_fire_base_blocks"), Material.class);
Tag<Material> SOUL_SPEED_BLOCKS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("soul_speed_blocks"), Material.class);
@@ -388,72 +366,6 @@ public interface Tag<T extends Keyed> extends Keyed {
Tag<Material> STRIDER_WARM_BLOCKS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("strider_warm_blocks"), Material.class);
Tag<Material> SUBSTRATE_OVERWORLD = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("substrate_overworld"), Material.class);
Tag<Material> SUPPORT_OVERRIDE_CACTUS_FLOWER = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("support_override_cactus_flower"), Material.class);
Tag<Material> SUPPORT_OVERRIDE_SNOW_LAYER = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("support_override_snow_layer"), Material.class);
Tag<Material> SUPPORTS_AZALEA = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("supports_azalea"), Material.class);
Tag<Material> SUPPORTS_BAMBOO = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("supports_bamboo"), Material.class);
Tag<Material> SUPPORTS_BIG_DRIPLEAF = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("supports_big_dripleaf"), Material.class);
Tag<Material> SUPPORTS_CACTUS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("supports_cactus"), Material.class);
Tag<Material> SUPPORTS_CHORUS_FLOWER = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("supports_chorus_flower"), Material.class);
Tag<Material> SUPPORTS_CHORUS_PLANT = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("supports_chorus_plant"), Material.class);
Tag<Material> SUPPORTS_COCOA = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("supports_cocoa"), Material.class);
Tag<Material> SUPPORTS_CRIMSON_FUNGUS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("supports_crimson_fungus"), Material.class);
Tag<Material> SUPPORTS_CRIMSON_ROOTS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("supports_crimson_roots"), Material.class);
Tag<Material> SUPPORTS_CROPS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("supports_crops"), Material.class);
Tag<Material> SUPPORTS_DRY_VEGETATION = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("supports_dry_vegetation"), Material.class);
Tag<Material> SUPPORTS_FROGSPAWN = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("supports_frogspawn"), Material.class);
Tag<Material> SUPPORTS_HANGING_MANGROVE_PROPAGULE = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("supports_hanging_mangrove_propagule"), Material.class);
Tag<Material> SUPPORTS_LILY_PAD = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("supports_lily_pad"), Material.class);
Tag<Material> SUPPORTS_MANGROVE_PROPAGULE = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("supports_mangrove_propagule"), Material.class);
Tag<Material> SUPPORTS_MELON_STEM = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("supports_melon_stem"), Material.class);
Tag<Material> SUPPORTS_MELON_STEM_FRUIT = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("supports_melon_stem_fruit"), Material.class);
Tag<Material> SUPPORTS_NETHER_SPROUTS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("supports_nether_sprouts"), Material.class);
Tag<Material> SUPPORTS_NETHER_WART = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("supports_nether_wart"), Material.class);
Tag<Material> SUPPORTS_PUMPKIN_STEM = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("supports_pumpkin_stem"), Material.class);
Tag<Material> SUPPORTS_PUMPKIN_STEM_FRUIT = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("supports_pumpkin_stem_fruit"), Material.class);
Tag<Material> SUPPORTS_SMALL_DRIPLEAF = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("supports_small_dripleaf"), Material.class);
Tag<Material> SUPPORTS_STEM_CROPS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("supports_stem_crops"), Material.class);
Tag<Material> SUPPORTS_STEM_FRUIT = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("supports_stem_fruit"), Material.class);
Tag<Material> SUPPORTS_SUGAR_CANE = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("supports_sugar_cane"), Material.class);
Tag<Material> SUPPORTS_SUGAR_CANE_ADJACENTLY = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("supports_sugar_cane_adjacently"), Material.class);
Tag<Material> SUPPORTS_VEGETATION = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("supports_vegetation"), Material.class);
Tag<Material> SUPPORTS_WARPED_FUNGUS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("supports_warped_fungus"), Material.class);
Tag<Material> SUPPORTS_WARPED_ROOTS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("supports_warped_roots"), Material.class);
Tag<Material> SUPPORTS_WITHER_ROSE = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("supports_wither_rose"), Material.class);
Tag<Material> SWORD_EFFICIENT = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("sword_efficient"), Material.class);
Tag<Material> SWORD_INSTANTLY_MINES = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("sword_instantly_mines"), Material.class);
@@ -566,12 +478,8 @@ public interface Tag<T extends Keyed> extends Keyed {
Tag<Material> ITEMS_CANDLES = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("candles"), Material.class);
Tag<Material> ITEMS_CAT_COLLAR_DYES = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("cat_collar_dyes"), Material.class);
Tag<Material> ITEMS_CAT_FOOD = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("cat_food"), Material.class);
Tag<Material> ITEMS_CAULDRON_CAN_REMOVE_DYE = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("cauldron_can_remove_dye"), Material.class);
Tag<Material> ITEMS_CHAINS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("chains"), Material.class);
Tag<Material> ITEMS_CHERRY_LOGS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("cherry_logs"), Material.class);
@@ -630,7 +538,7 @@ public interface Tag<T extends Keyed> extends Keyed {
Tag<Material> ITEMS_DUPLICATES_ALLAYS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("duplicates_allays"), Material.class);
Tag<Material> ITEMS_DYES = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("dyes"), Material.class);
Tag<Material> ITEMS_DYEABLE = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("dyeable"), Material.class);
Tag<Material> ITEMS_EGGS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("eggs"), Material.class);
@@ -704,8 +612,6 @@ public interface Tag<T extends Keyed> extends Keyed {
Tag<Material> ITEMS_GOLD_TOOL_MATERIALS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("gold_tool_materials"), Material.class);
Tag<Material> ITEMS_GRASS_BLOCKS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("grass_blocks"), Material.class);
Tag<Material> ITEMS_HANGING_SIGNS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("hanging_signs"), Material.class);
Tag<Material> ITEMS_HAPPY_GHAST_FOOD = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("happy_ghast_food"), Material.class);
@@ -752,22 +658,12 @@ public interface Tag<T extends Keyed> extends Keyed {
Tag<Material> ITEMS_LOGS_THAT_BURN = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("logs_that_burn"), Material.class);
Tag<Material> ITEMS_LOOM_DYES = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("loom_dyes"), Material.class);
Tag<Material> ITEMS_LOOM_PATTERNS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("loom_patterns"), Material.class);
Tag<Material> ITEMS_MANGROVE_LOGS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("mangrove_logs"), Material.class);
Tag<Material> ITEMS_MAP_INVISIBILITY_EQUIPMENT = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("map_invisibility_equipment"), Material.class);
Tag<Material> ITEMS_MEAT = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("meat"), Material.class);
Tag<Material> ITEMS_METAL_NUGGETS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("metal_nuggets"), Material.class);
Tag<Material> ITEMS_MOSS_BLOCKS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("moss_blocks"), Material.class);
Tag<Material> ITEMS_MUD = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("mud"), Material.class);
Tag<Material> ITEMS_NAUTILUS_BUCKET_FOOD = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("nautilus_bucket_food"), Material.class);
Tag<Material> ITEMS_NAUTILUS_FOOD = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("nautilus_food"), Material.class);
@@ -906,8 +802,6 @@ public interface Tag<T extends Keyed> extends Keyed {
Tag<Material> ITEMS_WITHER_SKELETON_DISLIKED_WEAPONS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("wither_skeleton_disliked_weapons"), Material.class);
Tag<Material> ITEMS_WOLF_COLLAR_DYES = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("wolf_collar_dyes"), Material.class);
Tag<Material> ITEMS_WOLF_FOOD = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("wolf_food"), Material.class);
Tag<Material> ITEMS_WOODEN_BUTTONS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("wooden_buttons"), Material.class);
@@ -936,16 +830,8 @@ public interface Tag<T extends Keyed> extends Keyed {
String REGISTRY_FLUIDS = "fluids";
Tag<Fluid> FLUIDS_BUBBLE_COLUMN_CAN_OCCUPY = Bukkit.getTag(REGISTRY_FLUIDS, NamespacedKey.minecraft("bubble_column_can_occupy"), Fluid.class);
Tag<Fluid> FLUIDS_LAVA = Bukkit.getTag(REGISTRY_FLUIDS, NamespacedKey.minecraft("lava"), Fluid.class);
Tag<Fluid> FLUIDS_SUPPORTS_FROGSPAWN = Bukkit.getTag(REGISTRY_FLUIDS, NamespacedKey.minecraft("supports_frogspawn"), Fluid.class);
Tag<Fluid> FLUIDS_SUPPORTS_LILY_PAD = Bukkit.getTag(REGISTRY_FLUIDS, NamespacedKey.minecraft("supports_lily_pad"), Fluid.class);
Tag<Fluid> FLUIDS_SUPPORTS_SUGAR_CANE_ADJACENTLY = Bukkit.getTag(REGISTRY_FLUIDS, NamespacedKey.minecraft("supports_sugar_cane_adjacently"), Fluid.class);
Tag<Fluid> FLUIDS_WATER = Bukkit.getTag(REGISTRY_FLUIDS, NamespacedKey.minecraft("water"), Fluid.class);
String REGISTRY_ENTITY_TYPES = "entity_types";
@@ -984,8 +870,6 @@ public interface Tag<T extends Keyed> extends Keyed {
Tag<EntityType> ENTITY_TYPES_CANDIDATE_FOR_IRON_GOLEM_GIFT = Bukkit.getTag(REGISTRY_ENTITY_TYPES, NamespacedKey.minecraft("candidate_for_iron_golem_gift"), EntityType.class);
Tag<EntityType> ENTITY_TYPES_CANNOT_BE_AGE_LOCKED = Bukkit.getTag(REGISTRY_ENTITY_TYPES, NamespacedKey.minecraft("cannot_be_age_locked"), EntityType.class);
Tag<EntityType> ENTITY_TYPES_CANNOT_BE_PUSHED_ONTO_BOATS = Bukkit.getTag(REGISTRY_ENTITY_TYPES, NamespacedKey.minecraft("cannot_be_pushed_onto_boats"), EntityType.class);
Tag<EntityType> ENTITY_TYPES_DEFLECTS_PROJECTILES = Bukkit.getTag(REGISTRY_ENTITY_TYPES, NamespacedKey.minecraft("deflects_projectiles"), EntityType.class);
@@ -1056,54 +940,18 @@ public interface Tag<T extends Keyed> extends Keyed {
Tag<GameEvent> GAME_EVENT_WARDEN_CAN_LISTEN = Bukkit.getTag(REGISTRY_GAME_EVENTS, NamespacedKey.minecraft("warden_can_listen"), GameEvent.class);
// End generate - Tag
//<editor-fold desc="deprecated tags" defaultstate="collapsed">
/**
* @deprecated replaced by {@link #WOOL_CARPETS}.
* @deprecated {@link #WOOL_CARPETS}.
*/
@Deprecated(since = "1.19", forRemoval = true)
@Deprecated(since = "1.19")
Tag<Material> CARPETS = WOOL_CARPETS;
/**
* @deprecated replaced by {@link #CANNOT_SUPPORT_SNOW_LAYER}
*/
@Deprecated(since = "26.1", forRemoval = true)
Tag<Material> SNOW_LAYER_CANNOT_SURVIVE_ON = CANNOT_SUPPORT_SNOW_LAYER;
/**
* @deprecated replaced by {@link #SUPPORT_OVERRIDE_SNOW_LAYER}
*/
@Deprecated(since = "26.1", forRemoval = true)
Tag<Material> SNOW_LAYER_CAN_SURVIVE_ON = SUPPORT_OVERRIDE_SNOW_LAYER;
/**
* @deprecated partially replaced by {@link #OVERRIDES_MUSHROOM_LIGHT_REQUIREMENT}
*/
@Deprecated(since = "26.1", forRemoval = true)
Tag<Material> MUSHROOM_GROW_BLOCK = OVERRIDES_MUSHROOM_LIGHT_REQUIREMENT;
/**
* @deprecated replaced by {@link #SUPPORTS_SMALL_DRIPLEAF}
*/
@Deprecated(since = "26.1", forRemoval = true)
Tag<Material> SMALL_DRIPLEAF_PLACEABLE = SUPPORTS_SMALL_DRIPLEAF;
/**
* @deprecated replaced by {@link #SUPPORTS_BIG_DRIPLEAF}
*/
@Deprecated(since = "26.1", forRemoval = true)
Tag<Material> BIG_DRIPLEAF_PLACEABLE = SUPPORTS_BIG_DRIPLEAF;
/**
* @deprecated replaced by {@link #SUPPORTS_BAMBOO}
*/
@Deprecated(since = "26.1", forRemoval = true)
Tag<Material> BAMBOO_PLANTABLE_ON = SUPPORTS_BAMBOO;
/**
* @deprecated replaced by {@link #SUPPORTS_DRY_VEGETATION}
*/
@Deprecated(since = "26.1", forRemoval = true)
Tag<Material> DRY_VEGETATION_MAY_PLACE_ON = SUPPORTS_DRY_VEGETATION;
/**
* Vanilla block tag representing all blocks which dead bushes may be placed on.
*
* @deprecated partially replaced by {@link #SUPPORTS_DRY_VEGETATION}
* @deprecated partially replaced by {@link #DRY_VEGETATION_MAY_PLACE_ON}
*/
@Deprecated(since = "1.21.5", forRemoval = true)
Tag<Material> DEAD_BUSH_MAY_PLACE_ON = SUPPORTS_DRY_VEGETATION;
Tag<Material> DEAD_BUSH_MAY_PLACE_ON = DRY_VEGETATION_MAY_PLACE_ON;
/**
* @deprecated replaced by {@link #TRIGGERS_AMBIENT_DESERT_DRY_VEGETATION_BLOCK_SOUNDS}
*/
@@ -1113,23 +961,23 @@ public interface Tag<T extends Keyed> extends Keyed {
* Vanilla block tag representing all blocks that are replaceable by
* dripstone.
*
* @deprecated replaced by {@link #DRIPSTONE_REPLACEABLE_BLOCKS}
* @deprecated use {@link #DRIPSTONE_REPLACEABLE_BLOCKS}
*/
@Deprecated(since = "1.21.4", forRemoval = true)
Tag<Material> DRIPSTONE_REPLACEABLE = DRIPSTONE_REPLACEABLE_BLOCKS;
/**
* Vanilla item tag representing all piglin food.
*
* @deprecated replaced by {@link #ITEMS_PIGLIN_FOOD}
* @deprecated use {@link #ITEMS_PIGLIN_FOOD}
*/
@Deprecated(since = "1.20.5", forRemoval = true)
@Deprecated(since = "1.20.5")
Tag<Material> PIGLIN_FOOD = ITEMS_PIGLIN_FOOD;
/**
* Vanilla item tag representing all fox food.
*
* @deprecated replaced by {@link #ITEMS_FOX_FOOD}
* @deprecated use {@link #ITEMS_FOX_FOOD}
*/
@Deprecated(since = "1.20.5", forRemoval = true)
@Deprecated(since = "1.20.5")
Tag<Material> FOX_FOOD = ITEMS_FOX_FOOD;
/**
* Vanilla item tag representing all furnace materials.
@@ -1141,7 +989,7 @@ public interface Tag<T extends Keyed> extends Keyed {
/**
* Vanilla item tag representing all items which modify note block sounds when placed on top.
*
* @deprecated replaced by {@link #ITEMS_NOTEBLOCK_TOP_INSTRUMENTS}
* @deprecated use {@link #ITEMS_NOTEBLOCK_TOP_INSTRUMENTS}
*/
@Deprecated(since = "1.21.4", forRemoval = true)
Tag<Material> ITEMS_NOTE_BLOCK_TOP_INSTRUMENTS = ITEMS_NOTEBLOCK_TOP_INSTRUMENTS;
@@ -1157,18 +1005,16 @@ public interface Tag<T extends Keyed> extends Keyed {
/**
* Vanilla item tag representing all items which tempt axolotls.
*
* @deprecated replaced by {@link #ITEMS_AXOLOTL_FOOD}
* @deprecated use {@link #ITEMS_AXOLOTL_FOOD}
*/
@Deprecated(since = "1.20.5", forRemoval = true)
@Deprecated(since = "1.20.5")
Tag<Material> AXOLOTL_TEMPT_ITEMS = ITEMS_AXOLOTL_FOOD;
/**
* Vanilla tag representing entities which deflect arrows.
*
* @deprecated replaced by {@link #ENTITY_TYPES_DEFLECTS_PROJECTILES}
* @deprecated use {@link #ENTITY_TYPES_DEFLECTS_PROJECTILES}
*/
@Deprecated(since = "1.20.5", forRemoval = true)
@Deprecated(since = "1.20.5")
Tag<EntityType> ENTITY_TYPES_DEFLECTS_ARROWS = ENTITY_TYPES_DEFLECTS_PROJECTILES;
//</editor-fold>
/**
* Returns whether or not this tag has an entry for the specified item.
@@ -59,7 +59,7 @@ public interface UnsafeValues {
int getDataVersion();
ItemStack modifyItemStack(ItemStack item, String components);
ItemStack modifyItemStack(ItemStack stack, String arguments);
void checkSupported(PluginDescriptionFile pdf) throws InvalidPluginException;
+10 -36
View File
@@ -1,8 +1,6 @@
package org.bukkit;
import io.papermc.paper.raytracing.PositionedRayTraceConfigurationBuilder;
import io.papermc.paper.world.Timeline;
import io.papermc.paper.world.WorldClock;
import java.io.File;
import java.nio.file.Path;
import java.util.ArrayList;
@@ -1811,7 +1809,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
*/
@Nullable
default RayTraceResult rayTraceEntities(@NotNull Location start, @NotNull Vector direction, double maxDistance, @Nullable Predicate<? super Entity> filter) {
return this.rayTraceEntities(start, direction, maxDistance, 0.0, filter);
return this.rayTraceEntities(start, direction, maxDistance, 0.0D, filter);
}
/**
@@ -2053,7 +2051,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
}
/**
* Gets the relative in-game time of this world, or {@code 0} if this world does not have a world clock.
* Gets the relative in-game time of this world.
* <p>
* The relative time is analogous to hours * 1000
*
@@ -2073,14 +2071,12 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
*
* @param time The new relative time to set the in-game time to (in
* hours*1000)
* @see Server#setTime(WorldClock, long) Sets the relative time of a specific clock
* @deprecated use {@link Server#setTime(WorldClock, long)} with {@link #getClock()} instead
* @see #setFullTime(long) Sets the absolute time of this world
*/
@Deprecated(since = "26.1")
public void setTime(long time);
/**
* Gets the full in-game time on this world, or {@code 0} if this world does not have a world clock.
* Gets the full in-game time on this world
*
* @return The current absolute time
* @see #getTime() Returns a relative time of this world
@@ -2094,31 +2090,10 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
* effects such as breaking redstone clocks and any scheduled events
*
* @param time The new absolute time to set this world to
* @see Server#setFullTime(WorldClock, long) Sets the absolute time of a specific clock
* @deprecated use {@link Server#setFullTime(WorldClock, long)} with {@link #getClock()} instead
* @throws IllegalArgumentException if this world does not have a world clock (e.g. the nether)
* @see #setTime(long) Sets the relative time of this world
*/
@Deprecated(since = "26.1")
public void setFullTime(long time);
/**
* Gets the clock of this world.
* <p>
* This may be a world-specific override of the dimension type's clock.
*
* @return the clock, or null if this world does not have one
*/
@Nullable
public WorldClock getClock();
/**
* Gets the timelines applied by this world's dimension type.
*
* @return the timelines
*/
@NotNull
public List<Timeline> getTimelines();
// Paper start
/**
@@ -3824,7 +3799,8 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
* @param <T> the GameRule's type
* @return the current value
*/
public @NotNull <T> T getGameRuleValue(@NotNull GameRule<T> rule);
@Nullable
public <T> T getGameRuleValue(@NotNull GameRule<T> rule);
/**
* Get the default value for a given {@link GameRule}. This value is not
@@ -3833,12 +3809,9 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
* @param rule the rule to return a default value for
* @param <T> the type of GameRule
* @return the default value
* @deprecated use {@link GameRule#getDefaultValue()} instead
*/
@Deprecated(since = "26.1.2")
default <T> @NotNull T getGameRuleDefault(@NotNull GameRule<T> rule) {
return rule.getDefaultValue();
}
@Nullable
public <T> T getGameRuleDefault(@NotNull GameRule<T> rule);
/**
* Set the given {@link GameRule}'s new value.
@@ -4131,6 +4104,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
public <T> void spawnParticle(@NotNull Particle particle, @Nullable List<Player> receivers, @Nullable Player source, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra, @Nullable T data, boolean force);
// Paper end
/**
* Spawns the particle (the number of times specified by count)
* at the target location. The position of each particle will be
@@ -36,7 +36,7 @@ public interface WorldBorder {
*
* @param newSize The new size of the border.
*
* @throws IllegalArgumentException if newSize is less than 1.0 or greater than {@link #getMaxSize()}
* @throws IllegalArgumentException if newSize is less than 1.0D or greater than {@link #getMaxSize()}
* @see #changeSize(double, long)
*/
void setSize(double newSize);
@@ -47,7 +47,7 @@ public interface WorldBorder {
* @param newSize The new side length of the border.
* @param ticks The time in ticks in which the border grows or shrinks from the previous size to that being set.
*
* @throws IllegalArgumentException if newSize is less than 1.0 or greater than {@link #getMaxSize()}
* @throws IllegalArgumentException if newSize is less than 1.0D or greater than {@link #getMaxSize()}
* @throws IllegalArgumentException if ticks is out of range
* @see #setSize(double)
*/
@@ -64,7 +64,7 @@ public interface WorldBorder {
*/
@Deprecated(since = "1.21.11", forRemoval = true)
default void setSize(double newSize, long seconds) {
this.changeSize(Math.clamp(newSize, 1.0, this.getMaxSize()), Tick.tick().fromDuration(Duration.ofSeconds(seconds)));
this.changeSize(Math.clamp(newSize, 1.0D, this.getMaxSize()), Tick.tick().fromDuration(Duration.ofSeconds(seconds)));
}
/**
@@ -74,7 +74,7 @@ public interface WorldBorder {
* @param unit The time unit.
* @param time The time in which the border grows or shrinks from the previous size to that being set.
*
* @throws IllegalArgumentException if newSize is less than 1.0 or greater than {@link #getMaxSize()}
* @throws IllegalArgumentException if newSize is less than 1.0D or greater than {@link #getMaxSize()}
* @throws IllegalArgumentException if time is out of range once converted in ticks
* @deprecated Use {@link #changeSize(double, long)} instead
*/
@@ -1,19 +1,11 @@
package org.bukkit;
import com.google.common.base.Preconditions;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey;
import io.papermc.paper.world.Timeline;
import io.papermc.paper.world.WorldClock;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Random;
import org.bukkit.command.CommandSender;
import org.bukkit.generator.BiomeProvider;
import org.bukkit.generator.ChunkGenerator;
import org.bukkit.plugin.Plugin;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@@ -32,22 +24,18 @@ public class WorldCreator {
private String generatorSettings = "";
private boolean hardcore = false;
private boolean bonusChest = false;
private TypedKey<WorldClock> clock = null;
private List<TypedKey<Timeline>> timelines = null;
/**
* Creates an empty WorldCreationOptions for the given world name.
*
* <p>Prefer {@link #ofKey(NamespacedKey)} for new or already-migrated worlds.</p>
* Creates an empty WorldCreationOptions for the given world name
*
* @param name Name of the world that will be created
*/
@ApiStatus.Obsolete
public WorldCreator(@NotNull String name) {
this(name, null);
// Paper start
this(name, getWorldKey(name));
}
private static NamespacedKey defaultWorldKey(String name) {
private static NamespacedKey getWorldKey(String name) {
final String mainLevelName = Bukkit.getUnsafe().getMainLevelName();
if (name.equals(mainLevelName)) {
return NamespacedKey.minecraft("overworld");
@@ -60,46 +48,29 @@ public class WorldCreator {
}
}
private static String nameFromKey(NamespacedKey key) {
if (key.getNamespace().equals("minecraft")) {
// This way, plugins can load legacy worlds by the 'minecraft:<name>' key.
return key.getKey();
}
return key.getNamespace() + "_" + key.getKey();
}
/**
* Creates an empty WorldCreator for the given world name or key.
* Creates an empty WorldCreator for the given world name and key
*
* @param levelName LevelName of the world that will be created
* @param worldKey NamespacedKey of the world that will be created
* @deprecated To load unconverted pre-26.1 worlds identified by their name (custom key was never persisted), use
* {@link #WorldCreator(String)}. For new worlds and already-converted worlds, prefer {@link #ofKey(NamespacedKey)}.
*/
@Deprecated(since = "26.1")
public WorldCreator(@Nullable String levelName, @Nullable NamespacedKey worldKey) {
if (levelName == null && worldKey == null) {
throw new IllegalArgumentException("World name and key cannot both be null");
public WorldCreator(@NotNull String levelName, @NotNull NamespacedKey worldKey) {
if (levelName == null || worldKey == null) {
throw new IllegalArgumentException("World name and key cannot be null");
}
if (levelName != null && worldKey != null) {
throw new IllegalArgumentException("World name and key cannot both be specified");
}
this.name = levelName == null ? nameFromKey(worldKey) : levelName;
this.name = levelName;
this.seed = (new Random()).nextLong();
this.key = worldKey == null ? defaultWorldKey(levelName) : worldKey;
this.key = worldKey;
}
/**
* Creates an empty WorldCreator for the given key.
*
* <p>Note: Prior to 26.1, custom world keys were never persisted. To load unconverted pre-26.1 worlds created
* with this method, use {@link #WorldCreator(String)} with {@link NamespacedKey#getKey()}, or use this method
* with {@link NamespacedKey#minecraft(String)} and {@link NamespacedKey#getKey()}.</p>
* LevelName will be the Key part of the NamespacedKey.
*
* @param worldKey NamespacedKey of the world that will be created
*/
public WorldCreator(@NotNull NamespacedKey worldKey) {
this(null, worldKey);
this(worldKey.getKey(), worldKey);
}
/**
@@ -117,24 +88,15 @@ public class WorldCreator {
*
* @param levelName LevelName of the world that will be created
* @param worldKey NamespacedKey of the world that will be created
* @deprecated Prior to 26.1, custom world keys were never persisted. To load unconverted pre-26.1 worlds created
* with this method, use {@link #WorldCreator(String)} with the name.
*/
@Deprecated(since = "26.1")
@NotNull
public static WorldCreator ofNameAndKey(@NotNull String levelName, @NotNull NamespacedKey worldKey) {
if (!defaultWorldKey(levelName).equals(worldKey)) {
throw new IllegalArgumentException("Cannot create world with mismatched name and key identities.");
}
return new WorldCreator(levelName, null);
return new WorldCreator(levelName, worldKey);
}
/**
* Creates an empty WorldCreator for the given key.
*
* <p>Note: Prior to 26.1, custom world keys were never persisted. To load unconverted pre-26.1 worlds created
* with this method, use {@link #WorldCreator(String)} with {@link NamespacedKey#getKey()}, or use this method
* with {@link NamespacedKey#minecraft(String)} and {@link NamespacedKey#getKey()}.</p>
* LevelName will be the Key part of the NamespacedKey.
*
* @param worldKey NamespacedKey of the world that will be created
*/
@@ -142,6 +104,7 @@ public class WorldCreator {
public static WorldCreator ofKey(@NotNull NamespacedKey worldKey) {
return new WorldCreator(worldKey);
}
// Paper end
/**
* Copies the options from the specified world
@@ -161,8 +124,6 @@ public class WorldCreator {
generateStructures = world.canGenerateStructures();
hardcore = world.isHardcore();
bonusChest = world.hasBonusChest();
clock = world.getClock() == null ? null : TypedKey.create(RegistryKey.WORLD_CLOCK, world.getClock().getKey());
timelines = world.getTimelines().stream().map(timeline -> TypedKey.create(RegistryKey.TIMELINE, timeline.getKey())).toList();
return this;
}
@@ -186,21 +147,15 @@ public class WorldCreator {
generatorSettings = creator.generatorSettings();
hardcore = creator.hardcore();
bonusChest = creator.bonusChest();
clock = creator.clock();
timelines = creator.timelines() == null ? null : new ArrayList<>(creator.timelines());
return this;
}
/**
* Gets the legacy Bukkit name of the world that is to be loaded or created.
* Gets the name of the world that is to be loaded or created.
*
* <p>This method is considered obsolete and is a candidate for future deprecation.
* Prefer using {@link #key()}.</p>
*
* @return legacy Bukkit world name
* @return World name
*/
@ApiStatus.Obsolete
@NotNull
public String name() {
return name;
@@ -526,56 +481,6 @@ public class WorldCreator {
return bonusChest;
}
/**
* Sets the clock that will be used by this world.
* <p>
* If unset, the clock from the selected environment's dimension type will be used.
* If set, this overrides the selected environment dimension type's clock.
*
* @param clock the clock, or null to use the environment default
* @return This object, for chaining
*/
@NotNull
public WorldCreator clock(@Nullable TypedKey<WorldClock> clock) {
this.clock = clock;
return this;
}
/**
* Gets the clock override that will be used by this world.
*
* @return the clock override, or null to use the environment default
*/
@Nullable
public TypedKey<WorldClock> clock() {
return this.clock;
}
/**
* Sets the timelines that will be used by this world's dimension type.
* <p>
* If unset, the timelines from the selected environment's dimension type will be used.
* Passing an empty collection will create or load the world with no timelines.
*
* @param timelines the timelines, or null to use the environment default
* @return This object, for chaining
*/
@NotNull
public WorldCreator timelines(@Nullable Collection<TypedKey<Timeline>> timelines) {
this.timelines = timelines == null ? null : new ArrayList<>(timelines);
return this;
}
/**
* Gets the timeline overrides that will be used by this world's dimension type.
*
* @return the timeline overrides, or null to use the environment default
*/
@Nullable
public List<TypedKey<Timeline>> timelines() {
return this.timelines == null ? null : List.copyOf(this.timelines);
}
/**
* Creates a world with the specified options.
* <p>
@@ -684,6 +589,7 @@ public class WorldCreator {
return result;
}
// Paper start - keep spawn loaded tristate
/**
* Returns the current intent to keep the world loaded, @see {@link WorldCreator#keepSpawnLoaded(net.kyori.adventure.util.TriState)}
*
@@ -709,4 +615,5 @@ public class WorldCreator {
public WorldCreator keepSpawnLoaded(@NotNull net.kyori.adventure.util.TriState keepSpawnLoaded) {
return this;
}
// Paper end - keep spawn loaded tristate
}
@@ -232,16 +232,18 @@ public interface Block extends Metadatable, Translatable, net.kyori.adventure.tr
}
// Paper end
// Paper start - add isValidTool
/**
* Checks if the itemstack is a valid tool to
* break the block with
*
* @param tool The tool
* @param itemStack The (tool) itemstack
* @return whether the block will drop items
* @deprecated partially replaced by {@link Block#isPreferredTool(ItemStack)}
*/
@Deprecated(since = "1.21", forRemoval = true) // Paper
boolean isValidTool(@NotNull ItemStack tool);
boolean isValidTool(@NotNull ItemStack itemStack);
// Paper end - add isValidTool
/**
* Gets the Location of the block
@@ -436,18 +438,11 @@ public interface Block extends Metadatable, Translatable, net.kyori.adventure.tr
int getBlockPower(@NotNull BlockFace face);
/**
* Returns the redstone power being provided to this block.
* <p>
* Equivalent to:
* {@snippet lang="java" :
* getBlockPower(BlockFace.SELF);
* }
* Returns the redstone power being provided to this block
*
* @return The power level.
*/
default int getBlockPower() {
return this.getBlockPower(BlockFace.SELF);
}
int getBlockPower();
/**
* Checks if this block is empty.
@@ -1024,8 +1024,6 @@ public interface BlockType extends Keyed, Translatable, net.kyori.adventure.tran
BlockType.Typed<BlockData> GOLD_ORE = getBlockType("gold_ore");
BlockType.Typed<BlockData> GOLDEN_DANDELION = getBlockType("golden_dandelion");
BlockType.Typed<BlockData> GRANITE = getBlockType("granite");
BlockType.Typed<Slab> GRANITE_SLAB = getBlockType("granite_slab");
@@ -1762,8 +1760,6 @@ public interface BlockType extends Keyed, Translatable, net.kyori.adventure.tran
BlockType.Typed<BlockData> POTTED_FLOWERING_AZALEA_BUSH = getBlockType("potted_flowering_azalea_bush");
BlockType.Typed<BlockData> POTTED_GOLDEN_DANDELION = getBlockType("potted_golden_dandelion");
BlockType.Typed<BlockData> POTTED_JUNGLE_SAPLING = getBlockType("potted_jungle_sapling");
BlockType.Typed<BlockData> POTTED_LILY_OF_THE_VALLEY = getBlockType("potted_lily_of_the_valley");
@@ -41,7 +41,8 @@ public interface CommandBlock extends TileState, io.papermc.paper.command.Comman
/**
* Sets the name of this CommandBlock. The name is used with commands
* that this CommandBlock executes.
* that this CommandBlock executes. Setting the name to null is the
* same as setting it to "@".
*
* @param name New name for this CommandBlock.
* @deprecated in favour of {@link #name(net.kyori.adventure.text.Component)}
@@ -60,7 +61,8 @@ public interface CommandBlock extends TileState, io.papermc.paper.command.Comman
/**
* Sets the name of this CommandBlock. The name is used with commands
* that this CommandBlock executes.
* that this CommandBlock executes. Setting the name to null is the
* same as setting it to a {@link net.kyori.adventure.text.TextComponent} containing {@code @}.
*
* @param name New name for this CommandBlock.
*/
@@ -76,14 +76,14 @@ public interface DragonBattle {
/**
* Try to initiate a respawn sequence to summon the dragon.
*
* @param crystals the {@link EnderCrystal EnderCrystals} to use in the
* @param enderCrystals the {@link EnderCrystal EnderCrystals} to use in the
* respawn, or a null or empty list to render the respawn sequence
* uncancellable. null entries or crystals that do not reside in the same
* world as this dragon battle will be ignored.
*
* @return true if the respawn was initiated, false otherwise.
*/
public boolean initiateRespawn(@Nullable Collection<EnderCrystal> crystals);
public boolean initiateRespawn(@Nullable Collection<EnderCrystal> enderCrystals);
/**
* Get this battle's current respawn phase.
@@ -5,83 +5,69 @@ package org.bukkit.entity;
*/
public interface Ageable extends Creature {
/**
* Gets the age of this creature.
* Gets the age of this mob.
*
* @return Age
*/
public int getAge();
/**
* Sets the age of this creature.
* Sets the age of this mob.
*
* @param age New age
*/
public void setAge(int age);
/**
* Lock the age of the creature, setting this will prevent the creature from
* maturing or getting ready for mating. Plugins can still increase the age
* manually, however.
* Lock the age of the animal, setting this will prevent the animal from
* maturing or getting ready for mating.
*
* @param lock new lock state
* @param lock new lock
* @deprecated see {@link Breedable#setAgeLock(boolean)}
*/
@Deprecated(since = "1.16.2")
public void setAgeLock(boolean lock);
/**
* Checks if the age of the creature is locked.
* Gets the current agelock.
*
* @return the current lock state
* @see #setAgeLock(boolean)
* @return the current agelock
* @deprecated see {@link Breedable#getAgeLock()}
*/
@Deprecated(since = "1.16.2")
public boolean getAgeLock();
/**
* Transforms this creature to its baby counter-part.
* <p>
* This will not have any effect if the creature is already in
* this state.
*
* @apiNote some of them cannot be represented as such, so it's
* wise to check if {@link #isAdult()} returns {@code false} after this method
* for general purpose use.
* @see #setAdult()
* @see #setAge(int)
* Sets the age of the mob to a baby
*/
public void setBaby();
/**
* Transforms this creature to its adult counter-part.
* <p>
* This will not have any effect if the creature is already in
* this state.
*
* @see #setBaby()
* @see #setAge(int)
* Sets the age of the mob to an adult
*/
public void setAdult();
/**
* Returns true if the creature is an adult.
* Returns true if the mob is an adult.
*
* @return if the creature is an adult
* @see #getAge()
* @return return true if the mob is an adult
*/
public boolean isAdult();
/**
* Return the ability to breed of the creature.
* Return the ability to breed of the animal.
*
* @return the ability to breed of the creature
* @return the ability to breed of the animal
* @deprecated see {@link Breedable#canBreed()}
*/
@Deprecated(since = "1.16.2")
public boolean canBreed();
/**
* Set breedability of the creature, if the creature is a baby and set to
* Set breedability of the animal, if the animal is a baby and set to
* breed it will instantly grow up.
*
* @param breed breedability of the creature
* @param breed breedability of the animal
* @deprecated see {@link Breedable#setBreed(boolean)}
*/
@Deprecated(since = "1.16.2")
@@ -5,6 +5,21 @@ package org.bukkit.entity;
*/
public interface Breedable extends Ageable {
/**
* Lock the age of the animal, setting this will prevent the animal from
* maturing or getting ready for mating.
*
* @param lock new lock
*/
public void setAgeLock(boolean lock);
/**
* Gets the current agelock.
*
* @return the current agelock
*/
public boolean getAgeLock();
/**
* Return the ability to breed of the animal.
*
@@ -33,21 +33,6 @@ public interface Cat extends Tameable, Sittable, io.papermc.paper.entity.CollarC
*/
public void setCatType(@NotNull Type type);
/**
* Get the sound variant of this cat.
*
* @return cat sound variant
*/
@NotNull
SoundVariant getSoundVariant();
/**
* Set the sound variant of this cat.
*
* @param variant cat sound variant
*/
void setSoundVariant(@NotNull SoundVariant variant);
/**
* Get the collar color of this cat
*
@@ -124,23 +109,6 @@ public interface Cat extends Tameable, Sittable, io.papermc.paper.entity.CollarC
}
}
/**
* Represents the sound variant of a cat.
*/
interface SoundVariant extends Keyed {
// Start generate - CatSoundVariant
SoundVariant CLASSIC = getSoundVariant("classic");
SoundVariant ROYAL = getSoundVariant("royal");
// End generate - CatSoundVariant
@NotNull
private static SoundVariant getSoundVariant(final @NotNull @KeyPattern.Value String key) {
return RegistryAccess.registryAccess().getRegistry(RegistryKey.CAT_SOUND_VARIANT).getOrThrow(Key.key(Key.MINECRAFT_NAMESPACE, key));
}
}
/**
* Sets if the cat is lying down.
* This is visual and does not affect the behaviour of the cat.
@@ -27,20 +27,6 @@ public interface Chicken extends Animals {
*/
void setVariant(Variant variant);
/**
* Get the sound variant of this chicken.
*
* @return chicken sound variant
*/
SoundVariant getSoundVariant();
/**
* Set the sound variant of this chicken.
*
* @param variant chicken sound variant
*/
void setSoundVariant(SoundVariant variant);
/**
* Gets if this chicken was spawned as a chicken jockey.
*
@@ -86,20 +72,4 @@ public interface Chicken extends Animals {
return RegistryAccess.registryAccess().getRegistry(RegistryKey.CHICKEN_VARIANT).getOrThrow(Key.key(Key.MINECRAFT_NAMESPACE, key));
}
}
/**
* Represents the sound variant of a chicken.
*/
interface SoundVariant extends Keyed {
// Start generate - ChickenSoundVariant
SoundVariant CLASSIC = getSoundVariant("classic");
SoundVariant PICKY = getSoundVariant("picky");
// End generate - ChickenSoundVariant
private static SoundVariant getSoundVariant(final @KeyPattern.Value String key) {
return RegistryAccess.registryAccess().getRegistry(RegistryKey.CHICKEN_SOUND_VARIANT).getOrThrow(Key.key(Key.MINECRAFT_NAMESPACE, key));
}
}
}
@@ -27,20 +27,6 @@ public interface Cow extends AbstractCow {
*/
void setVariant(Variant variant);
/**
* Get the sound variant of this cow.
*
* @return cow sound variant
*/
SoundVariant getSoundVariant();
/**
* Set the sound variant of this cow.
*
* @param variant cow sound variant
*/
void setSoundVariant(SoundVariant variant);
/**
* Represents the variant of a cow.
*/
@@ -58,20 +44,4 @@ public interface Cow extends AbstractCow {
return RegistryAccess.registryAccess().getRegistry(RegistryKey.COW_VARIANT).getOrThrow(Key.key(Key.MINECRAFT_NAMESPACE, key));
}
}
/**
* Represents the sound variant of a cow.
*/
interface SoundVariant extends Keyed {
// Start generate - CowSoundVariant
SoundVariant CLASSIC = getSoundVariant("classic");
SoundVariant MOODY = getSoundVariant("moody");
// End generate - CowSoundVariant
private static SoundVariant getSoundVariant(final @KeyPattern.Value String key) {
return RegistryAccess.registryAccess().getRegistry(RegistryKey.COW_SOUND_VARIANT).getOrThrow(Key.key(Key.MINECRAFT_NAMESPACE, key));
}
}
}
@@ -37,6 +37,8 @@ import org.bukkit.entity.minecart.PoweredMinecart;
import org.bukkit.entity.minecart.RideableMinecart;
import org.bukkit.entity.minecart.SpawnerMinecart;
import org.bukkit.entity.minecart.StorageMinecart;
import org.bukkit.inventory.ItemStack;
import org.bukkit.potion.PotionEffectType;
import org.jetbrains.annotations.Contract;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@@ -96,7 +98,7 @@ public enum EntityType implements Keyed, Translatable, net.kyori.adventure.trans
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", LargeFireball.class, 12),
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),
@@ -27,20 +27,6 @@ public interface Pig extends Steerable, Vehicle {
*/
void setVariant(Variant variant);
/**
* Get the sound variant of this pig.
*
* @return pig sound variant
*/
SoundVariant getSoundVariant();
/**
* Set the sound variant of this pig.
*
* @param variant pig sound variant
*/
void setSoundVariant(SoundVariant variant);
/**
* Represents the variant of a pig.
*/
@@ -58,22 +44,4 @@ public interface Pig extends Steerable, Vehicle {
return RegistryAccess.registryAccess().getRegistry(RegistryKey.PIG_VARIANT).getOrThrow(Key.key(Key.MINECRAFT_NAMESPACE, key));
}
}
/**
* Represents the sound variant of a pig.
*/
interface SoundVariant extends Keyed {
// Start generate - PigSoundVariant
SoundVariant BIG = getSoundVariant("big");
SoundVariant CLASSIC = getSoundVariant("classic");
SoundVariant MINI = getSoundVariant("mini");
// End generate - PigSoundVariant
private static SoundVariant getSoundVariant(final @KeyPattern.Value String key) {
return RegistryAccess.registryAccess().getRegistry(RegistryKey.PIG_SOUND_VARIANT).getOrThrow(Key.key(Key.MINECRAFT_NAMESPACE, key));
}
}
}
@@ -64,9 +64,9 @@ public interface PiglinAbstract extends Monster, Ageable {
/**
* Sets whether the piglin is a baby
*
* @param baby Whether the piglin is a baby
* @param flag Whether the piglin is a baby
* @deprecated see {@link Ageable#setBaby()} and {@link Ageable#setAdult()}
*/
@Deprecated(since = "1.16.2")
public void setBaby(boolean baby);
public void setBaby(boolean flag);
}
@@ -17,7 +17,6 @@ import java.util.UUID;
import java.util.concurrent.CompletableFuture;
import net.kyori.adventure.text.Component;
import net.kyori.adventure.text.object.PlayerHeadObjectContents;
import org.apache.commons.lang3.ArrayUtils;
import org.bukkit.BanEntry;
import org.bukkit.DyeColor;
import org.bukkit.Effect;
@@ -46,7 +45,6 @@ import org.bukkit.block.Sign;
import org.bukkit.block.TileState;
import org.bukkit.block.data.BlockData;
import org.bukkit.block.sign.Side;
import org.bukkit.command.CommandException;
import org.bukkit.conversations.Conversable;
import org.bukkit.event.block.BlockBreakEvent;
import org.bukkit.event.block.BlockDropItemEvent;
@@ -473,12 +471,10 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
/**
* Makes the player perform the given command
*
* @param command the command to perform. Example: <code>test abc 123</code>
* @return {@code true} if the command was successful, otherwise {@code false}
* @throws CommandException thrown when the executor for the given command fails with an unhandled exception
* @see Server#dispatchCommand(org.bukkit.command.CommandSender, String)
* @param command Command to perform
* @return true if the command was successful, otherwise false
*/
boolean performCommand(String command) throws CommandException;
public boolean performCommand(String command);
/**
* Returns true if the entity is supported by a block.
@@ -652,7 +648,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
*/
@Deprecated(since = "1.6.2")
default void playNote(Location loc, byte instrument, byte note) {
this.playNote(loc, ArrayUtils.get(Instrument.values(), instrument), new Note(note));
this.playNote(loc, Instrument.getByType(instrument), new Note(note));
}
/**
@@ -1798,14 +1794,15 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
*
* @param time The current player's perceived time or the player's time
* offset from the server time.
* @param tickTime if true, the player time keeps ticking up relative to its world time.
* @param relative When true the player time is kept relative to its world
* time.
*/
public void setPlayerTime(long time, boolean tickTime);
public void setPlayerTime(long time, boolean relative);
/**
* Returns the player's current timestamp.
*
* @return The player's time, or {@code 0} if the current world does not have a world clock.
* @return The player's time
*/
public long getPlayerTime();
@@ -6,32 +6,31 @@ package org.bukkit.entity;
public interface Tadpole extends Fish {
/**
* Gets the age of this tadpole.
* Gets the age of this mob.
*
* @return Age
*/
public int getAge();
/**
* Sets the age of this tadpole.
* Sets the age of this mob.
*
* @param age New age
*/
public void setAge(int age);
/**
* Lock the age of the tadpole, setting this will prevent the tadpole from
* maturing. Plugins can still increase the age manually, however.
* Lock the age of the animal, setting this will prevent the animal from
* maturing.
*
* @param lock new lock state
* @param lock new lock
*/
void setAgeLock(boolean lock);
/**
* Checks if the age of the tadpole is locked.
* Gets the current agelock.
*
* @return the current lock state
* @see #setAgeLock(boolean)
* @return the current agelock
*/
boolean getAgeLock();
}
@@ -88,6 +88,7 @@ public interface Villager extends AbstractVillager {
*/
public void setVillagerExperience(int experience);
// Paper start
/**
* Increases the level of this villager.
* The villager will also unlock new recipes unlike the raw
@@ -96,11 +97,13 @@ public interface Villager extends AbstractVillager {
* A villager with a level of 1 and no experience is liable to lose its
* profession.
* <p>
* A master villager has a level of 5 in its profession.
* A master villager has a level of 5 in its profession and
* will unlock 10 trades (2 per level).
*
* @param amount The amount of level
* @return Whether level got increased
* @throws IllegalArgumentException if the amount is not positive
* @return Whether trades are unlocked
* @throws IllegalArgumentException if current level plus the amount
* isn't between [1, 5] or the amount isn't positive
* @see #setVillagerLevel(int)
*/
boolean increaseLevel(int amount);
@@ -125,6 +128,7 @@ public interface Villager extends AbstractVillager {
* @param restocksToday new restock count
*/
public void setRestocksToday(int restocksToday);
// Paper end
/**
* Attempts to make this villager sleep at the given location.
@@ -17,9 +17,9 @@ public interface Zoglin extends Monster, Ageable {
/**
* Sets whether the zoglin is a baby
*
* @param baby Whether the zoglin is a baby
* @param flag Whether the zoglin is a baby
* @deprecated see {@link Ageable#setBaby()} and {@link Ageable#setAdult()}
*/
@Deprecated(since = "1.16.2")
public void setBaby(boolean baby);
public void setBaby(boolean flag);
}
@@ -20,11 +20,11 @@ public interface Zombie extends Monster, Ageable {
/**
* Sets whether the zombie is a baby
*
* @param baby Whether the zombie is a baby
* @param flag Whether the zombie is a baby
* @deprecated see {@link Ageable#setBaby()} and {@link Ageable#setAdult()}
*/
@Deprecated(since = "1.16.2")
public void setBaby(boolean baby);
public void setBaby(boolean flag);
/**
* Gets whether the zombie is a villager
@@ -173,7 +173,5 @@ public interface Zombie extends Monster, Ageable {
* @deprecated Since 1.21.2 all zombie types can break doors if instructed as MC-137053 was fixed.
*/
@Deprecated(since = "1.21.2", forRemoval = true)
default boolean supportsBreakingDoors() {
return true; // All zombies are now capable of breaking doors, see https://bugs.mojang.com/browse/MC-137053
}
boolean supportsBreakingDoors();
}
@@ -8,7 +8,7 @@ public interface CommandMinecart extends Minecart, io.papermc.paper.command.Comm
/**
* Gets the command that this CommandMinecart will run when activated.
* This will never return null. If the CommandMinecart does not have a
* This will never return null. If the CommandMinecart does not have a
* command, an empty String will be returned instead.
*
* @return Command that this CommandMinecart will run when powered.
@@ -27,8 +27,9 @@ public interface CommandMinecart extends Minecart, io.papermc.paper.command.Comm
public void setCommand(@Nullable String command);
/**
* Sets the name of this CommandMinecart. The name is used with commands
* that this CommandMinecart executes.
* Sets the name of this CommandMinecart. The name is used with commands
* that this CommandMinecart executes. Setting the name to null is the
* same as setting it to "@".
*
* @param name New name for this CommandMinecart.
* @deprecated in favour of {@link #customName(net.kyori.adventure.text.Component)}
@@ -18,18 +18,18 @@ import org.jetbrains.annotations.NotNull;
*/
public class BlockMultiPlaceEvent extends BlockPlaceEvent {
private final List<BlockState> replacedStates;
private final List<BlockState> states;
@ApiStatus.Internal
@Deprecated(forRemoval = true)
public BlockMultiPlaceEvent(@NotNull List<BlockState> replacedStates, @NotNull Block clicked, @NotNull ItemStack itemInHand, @NotNull Player thePlayer, boolean canBuild) {
this(replacedStates, clicked, itemInHand, thePlayer, canBuild, org.bukkit.inventory.EquipmentSlot.HAND);
public BlockMultiPlaceEvent(@NotNull List<BlockState> states, @NotNull Block clicked, @NotNull ItemStack itemInHand, @NotNull Player thePlayer, boolean canBuild) {
this(states, clicked, itemInHand, thePlayer, canBuild, org.bukkit.inventory.EquipmentSlot.HAND);
}
@ApiStatus.Internal
public BlockMultiPlaceEvent(@NotNull List<BlockState> replacedStates, @NotNull Block clicked, @NotNull ItemStack itemInHand, @NotNull Player thePlayer, boolean canBuild, @NotNull org.bukkit.inventory.EquipmentSlot hand) {
super(replacedStates.getFirst().getBlock(), replacedStates.getFirst(), clicked, itemInHand, thePlayer, canBuild, hand);
this.replacedStates = ImmutableList.copyOf(replacedStates);
public BlockMultiPlaceEvent(@NotNull List<BlockState> states, @NotNull Block clicked, @NotNull ItemStack itemInHand, @NotNull Player thePlayer, boolean canBuild, @NotNull org.bukkit.inventory.EquipmentSlot hand) {
super(states.get(0).getBlock(), states.get(0), clicked, itemInHand, thePlayer, canBuild, hand);
this.states = ImmutableList.copyOf(states);
}
/**
@@ -41,6 +41,6 @@ public class BlockMultiPlaceEvent extends BlockPlaceEvent {
*/
@NotNull
public List<BlockState> getReplacedBlockStates() {
return this.replacedStates;
return this.states;
}
}
@@ -22,7 +22,7 @@ public class BlockPlaceEvent extends BlockEvent implements Cancellable {
protected Block placedAgainst;
protected ItemStack itemInHand;
protected Player player;
protected BlockState replacedState;
protected BlockState replacedBlockState;
protected boolean canBuild;
protected EquipmentSlot hand;
@@ -30,17 +30,17 @@ public class BlockPlaceEvent extends BlockEvent implements Cancellable {
@ApiStatus.Internal
@Deprecated(since = "1.9", forRemoval = true)
public BlockPlaceEvent(@NotNull final Block placedBlock, @NotNull final BlockState replacedState, @NotNull final Block placedAgainst, @NotNull final ItemStack itemInHand, @NotNull final Player thePlayer, final boolean canBuild) {
this(placedBlock, replacedState, placedAgainst, itemInHand, thePlayer, canBuild, EquipmentSlot.HAND);
public BlockPlaceEvent(@NotNull final Block placedBlock, @NotNull final BlockState replacedBlockState, @NotNull final Block placedAgainst, @NotNull final ItemStack itemInHand, @NotNull final Player thePlayer, final boolean canBuild) {
this(placedBlock, replacedBlockState, placedAgainst, itemInHand, thePlayer, canBuild, EquipmentSlot.HAND);
}
@ApiStatus.Internal
public BlockPlaceEvent(@NotNull final Block placedBlock, @NotNull final BlockState replacedState, @NotNull final Block placedAgainst, @NotNull final ItemStack itemInHand, @NotNull final Player thePlayer, final boolean canBuild, @NotNull final EquipmentSlot hand) {
public BlockPlaceEvent(@NotNull final Block placedBlock, @NotNull final BlockState replacedBlockState, @NotNull final Block placedAgainst, @NotNull final ItemStack itemInHand, @NotNull final Player thePlayer, final boolean canBuild, @NotNull final EquipmentSlot hand) {
super(placedBlock);
this.placedAgainst = placedAgainst;
this.itemInHand = itemInHand;
this.player = thePlayer;
this.replacedState = replacedState;
this.replacedBlockState = replacedBlockState;
this.canBuild = canBuild;
this.hand = hand;
}
@@ -95,7 +95,7 @@ public class BlockPlaceEvent extends BlockEvent implements Cancellable {
*/
@NotNull
public BlockState getBlockReplacedState() {
return this.replacedState;
return this.replacedBlockState;
}
/**
@@ -16,17 +16,17 @@ public class EntityTransformEvent extends EntityEvent implements Cancellable {
private static final HandlerList HANDLER_LIST = new HandlerList();
private final List<Entity> transformedEntities;
private final List<Entity> convertedList;
private final Entity converted;
private final TransformReason transformReason;
private boolean cancelled;
@ApiStatus.Internal
public EntityTransformEvent(Entity original, List<Entity> transformedEntities, TransformReason transformReason) {
public EntityTransformEvent(Entity original, List<Entity> convertedList, TransformReason transformReason) {
super(original);
this.transformedEntities = Collections.unmodifiableList(transformedEntities);
this.converted = transformedEntities.getFirst();
this.convertedList = Collections.unmodifiableList(convertedList);
this.converted = convertedList.getFirst();
this.transformReason = transformReason;
}
@@ -36,7 +36,7 @@ public class EntityTransformEvent extends EntityEvent implements Cancellable {
* @return The transformed entities.
*/
public List<Entity> getTransformedEntities() {
return this.transformedEntities;
return this.convertedList;
}
/**
@@ -11,7 +11,7 @@ import org.jetbrains.annotations.NotNull;
/**
* Stores data for pigs being zapped
*/
public class PigZapEvent extends EntityZapEvent implements Cancellable { // todo redundant with parent?
public class PigZapEvent extends EntityZapEvent implements Cancellable {
private final PigZombie zombifiedPiglin;
private final LightningStrike bolt;
@@ -11,9 +11,17 @@ import org.jetbrains.annotations.NotNull;
/**
* Represents an event that is called when a player right clicks an entity that
* also contains the location where the entity was clicked.
* <br>
* Note that the client may sometimes spuriously send this packet in addition to {@link PlayerInteractEntityEvent}.
* Users are advised to listen to this (parent) class unless specifically required.
* <br>
* Note that interacting with Armor Stands fires this event only and not its parent and as such users are expressly required
* to listen to this event for that scenario.
*/
public class PlayerInteractAtEntityEvent extends PlayerInteractEntityEvent {
private static final HandlerList HANDLER_LIST = new HandlerList();
private final Vector position;
@ApiStatus.Internal
@@ -31,4 +39,15 @@ public class PlayerInteractAtEntityEvent extends PlayerInteractEntityEvent {
public Vector getClickedPosition() {
return this.position.clone();
}
@NotNull
@Override
public HandlerList getHandlers() {
return HANDLER_LIST;
}
@NotNull
public static HandlerList getHandlerList() {
return HANDLER_LIST;
}
}
@@ -10,11 +10,7 @@ import org.jetbrains.annotations.NotNull;
/**
* Represents an event that is called when a player right clicks an entity.
*
* @apiNote this event is no longer called without being a {@link PlayerInteractAtEntityEvent}, it's therefore
* recommended to listen to that event instead which hold more informations.
*/
@ApiStatus.Obsolete
public class PlayerInteractEntityEvent extends PlayerEvent implements Cancellable {
private static final HandlerList HANDLER_LIST = new HandlerList();
@@ -1,110 +0,0 @@
package org.bukkit.event.world;
import io.papermc.paper.world.WorldClock;
import org.bukkit.event.Cancellable;
import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.NotNull;
/**
* Called when the time skips for a world clock.
* <p>
* If the event is cancelled the time will not change.
*/
public class ClockTimeSkipEvent extends Event implements Cancellable {
private static final HandlerList HANDLER_LIST = new HandlerList();
private final WorldClock clock;
private final SkipReason skipReason;
private long skipAmount;
private boolean cancelled;
@ApiStatus.Internal
public ClockTimeSkipEvent(@NotNull WorldClock clock, @NotNull SkipReason skipReason, long skipAmount) {
this.clock = clock;
this.skipReason = skipReason;
this.skipAmount = skipAmount;
}
/**
* Gets the clock whose time is changing.
*
* @return the clock, or null if the change does not target a specific clock
*/
@NotNull
public WorldClock getClock() {
return this.clock;
}
/**
* Gets the reason why the time has skipped.
*
* @return a SkipReason value detailing why the time has skipped
*/
@NotNull
public SkipReason getSkipReason() {
return this.skipReason;
}
/**
* Gets the amount of time that was skipped.
*
* @return Amount of time skipped
*/
public long getSkipAmount() {
return this.skipAmount;
}
/**
* Sets the amount of time to skip.
*
* @param skipAmount Amount of time to skip
*/
public void setSkipAmount(long skipAmount) {
this.skipAmount = skipAmount;
}
@Override
public boolean isCancelled() {
return this.cancelled;
}
@Override
public void setCancelled(boolean cancel) {
this.cancelled = cancel;
}
@NotNull
@Override
public HandlerList getHandlers() {
return HANDLER_LIST;
}
@NotNull
public static HandlerList getHandlerList() {
return HANDLER_LIST;
}
/**
* An enum specifying the reason the time skipped.
*/
public enum SkipReason {
/**
* When time is changed using the vanilla /time command.
*/
COMMAND,
/**
* When time is changed by a plugin.
*/
CUSTOM,
/**
* When time is changed by all players sleeping in their beds and the
* night skips.
*/
NIGHT_SKIP
}
}
@@ -1,7 +1,7 @@
package org.bukkit.event.world;
import io.papermc.paper.world.WorldClock;
import org.bukkit.World;
import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.NotNull;
@@ -11,26 +11,58 @@ import org.jetbrains.annotations.NotNull;
* <p>
* If the event is cancelled the time will not change.
*/
public class TimeSkipEvent extends ClockTimeSkipEvent {
public class TimeSkipEvent extends WorldEvent implements Cancellable {
private static final HandlerList HANDLER_LIST = new HandlerList();
private final World world;
private final SkipReason skipReason;
private long skipAmount;
private boolean cancelled;
@ApiStatus.Internal
public TimeSkipEvent(@NotNull World world, @NotNull WorldClock clock, @NotNull SkipReason skipReason, long skipAmount) {
super(clock, skipReason, skipAmount);
this.world = world;
public TimeSkipEvent(@NotNull World world, @NotNull SkipReason skipReason, long skipAmount) {
super(world);
this.skipReason = skipReason;
this.skipAmount = skipAmount;
}
/**
* Returns the world that time is skipped in.
* Gets the reason why the time has skipped.
*
* @return world that time is skipped in
* @return a SkipReason value detailing why the time has skipped
*/
@NotNull
public World getWorld() {
return world;
public SkipReason getSkipReason() {
return this.skipReason;
}
/**
* Gets the amount of time that was skipped.
*
* @return Amount of time skipped
*/
public long getSkipAmount() {
return this.skipAmount;
}
/**
* Sets the amount of time to skip.
*
* @param skipAmount Amount of time to skip
*/
public void setSkipAmount(long skipAmount) {
this.skipAmount = skipAmount;
}
@Override
public boolean isCancelled() {
return this.cancelled;
}
@Override
public void setCancelled(boolean cancel) {
this.cancelled = cancel;
}
@NotNull
@@ -43,4 +75,24 @@ public class TimeSkipEvent extends ClockTimeSkipEvent {
public static HandlerList getHandlerList() {
return HANDLER_LIST;
}
/**
* An enum specifying the reason the time skipped.
*/
public enum SkipReason {
/**
* When time is changed using the vanilla /time command.
*/
COMMAND,
/**
* When time is changed by a plugin.
*/
CUSTOM,
/**
* When time is changed by all players sleeping in their beds and the
* night skips.
*/
NIGHT_SKIP
}
}
@@ -20,14 +20,14 @@ import org.jetbrains.annotations.Range;
* A chunk generator is responsible for the initial shaping of an entire
* chunk. For example, the nether chunk generator should shape netherrack and
* soulsand.
* <p>
*
* A chunk is generated in multiple steps, those steps are always in the same
* order. Between those steps however an unlimited time may pass. This means, a
* chunk may generate until the surface step and continue with the bedrock step
* after one or multiple server restarts or even after multiple Minecraft
* versions.
* <p>
* The order of generation is as follows:
*
* The order of generation is as follows
* <ol>
* <li>{@link #generateNoise(WorldInfo, Random, int, int, ChunkData)}</li>
* <li>{@link #generateSurface(WorldInfo, Random, int, int, ChunkData)}</li>
@@ -39,7 +39,7 @@ import org.jetbrains.annotations.Range;
* {@link #getBaseHeight(WorldInfo, Random, int, int, HeightMap)}
* <b>must</b> be completely thread safe and able to handle multiple concurrent
* callers.
* <p>
*
* Some aspects of world generation can be delegated to the Vanilla generator.
* The following methods can be overridden to enable this:
* <ul>
@@ -167,7 +167,7 @@ public abstract class ChunkGenerator {
* <p>
* Notes:
* <p>
* If <code>null</code> is returned, then Vanilla biomes are used.
* If <code>null</code> is returned, than Vanilla biomes are used.
* <p>
* This method only gets called once when the world is loaded. Returning
* another {@link BiomeProvider} later one is not respected.
@@ -375,7 +375,7 @@ public abstract class ChunkGenerator {
* The Vanilla noise is generated <b>before</b>
* {@link #generateNoise(WorldInfo, Random, int, int, ChunkData)} is called.
* <p>
* This method is not called (and has therefore no effect), if
* This is method is not called (and has therefore no effect), if
* {@link #shouldGenerateNoise(WorldInfo, Random, int, int)} is overridden.
*
* @return true if the server should generate Vanilla noise
@@ -412,7 +412,7 @@ public abstract class ChunkGenerator {
* {@link #generateSurface(WorldInfo, Random, int, int, ChunkData)} is
* called.
* <p>
* This method is not called (and has therefore no effect), if
* This is method is not called (and has therefore no effect), if
* {@link #shouldGenerateSurface(WorldInfo, Random, int, int)} is overridden.
*
* @return true if the server should generate Vanilla surface
@@ -464,7 +464,7 @@ public abstract class ChunkGenerator {
* The Vanilla caves are generated <b>before</b>
* {@link #generateCaves(WorldInfo, Random, int, int, ChunkData)} is called.
* <p>
* This method is not called (and has therefore no effect), if
* This is method is not called (and has therefore no effect), if
* {@link #shouldGenerateCaves(WorldInfo, Random, int, int)} is overridden.
*
* @return true if the server should generate Vanilla caves
@@ -501,7 +501,7 @@ public abstract class ChunkGenerator {
* The Vanilla decoration are generated <b>before</b> any
* {@link BlockPopulator} are called.
* <p>
* This method is not called (and has therefore no effect), if
* This is method is not called (and has therefore no effect), if
* {@link #shouldGenerateDecorations(WorldInfo, Random, int, int)} is overridden.
*
* @return true if the server should generate Vanilla decorations
@@ -536,7 +536,7 @@ public abstract class ChunkGenerator {
* Gets if the server should generate Vanilla mobs after this
* ChunkGenerator.
* <p>
* This method is not called (and has therefore no effect), if
* This is method is not called (and has therefore no effect), if
* {@link #shouldGenerateMobs(WorldInfo, Random, int, int)} is overridden.
*
* @return true if the server should generate Vanilla mobs
@@ -568,7 +568,7 @@ public abstract class ChunkGenerator {
* Gets if the server should generate Vanilla structures after this
* ChunkGenerator.
* <p>
* This method is not called (and has therefore no effect), if
* This is method is not called (and has therefore no effect), if
* {@link #shouldGenerateStructures(WorldInfo, Random, int, int)} is overridden.
*
* @return true if the server should generate Vanilla structures
@@ -1,26 +1,19 @@
package org.bukkit.generator;
import java.util.UUID;
import io.papermc.paper.world.flag.FeatureFlagSetHolder;
import org.bukkit.Keyed;
import org.bukkit.World;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.NotNull;
/**
* Holds various information of a World
*/
public interface WorldInfo extends FeatureFlagSetHolder, Keyed {
public interface WorldInfo extends io.papermc.paper.world.flag.FeatureFlagSetHolder { // Paper - feature flag API
/**
* Gets the legacy Bukkit name of this world.
* Gets the unique name of this world
*
* <p>This method is considered obsolete and is a candidate for future deprecation.
* Prefer using {@link #getKey()} as the world identity.</p>
*
* @return Bukkit name of this world
* @return Name of this world
*/
@ApiStatus.Obsolete
@NotNull
String getName();
@@ -162,7 +162,7 @@ public interface EntityEquipment {
*
* <p>
* This returns a copy if this equipment instance is from a non-player.
* For items from players, this returns a live mirror. You can check if this
* For stacks from players, this returns a live mirror (or null). You can check if this
* will return a mirror with
* <pre>{@code
* EntityEquipment equipment = entity.getEquipment();
@@ -175,7 +175,8 @@ public interface EntityEquipment {
*
* @return The helmet being worn
*/
@NotNull ItemStack getHelmet();
@org.bukkit.UndefinedNullability("not null for entities, nullable for players") // Paper
ItemStack getHelmet();
/**
* Sets the helmet worn by the entity
@@ -197,7 +198,7 @@ public interface EntityEquipment {
*
* <p>
* This returns a copy if this equipment instance is from a non-player.
* For items from players, this returns a live mirror. You can check if this
* For stacks from players, this returns a live mirror (or null). You can check if this
* will return a mirror with
* <pre>{@code
* EntityEquipment equipment = entity.getEquipment();
@@ -210,7 +211,8 @@ public interface EntityEquipment {
*
* @return The chest plate being worn
*/
@NotNull ItemStack getChestplate();
@org.bukkit.UndefinedNullability("not null for entities, nullable for players") // Paper
ItemStack getChestplate();
/**
* Sets the chest plate worn by the entity
@@ -232,7 +234,7 @@ public interface EntityEquipment {
*
* <p>
* This returns a copy if this equipment instance is from a non-player.
* For items from players, this returns a live mirror. You can check if this
* For stacks from players, this returns a live mirror (or null). You can check if this
* will return a mirror with
* <pre>{@code
* EntityEquipment equipment = entity.getEquipment();
@@ -245,7 +247,8 @@ public interface EntityEquipment {
*
* @return The leggings being worn
*/
@NotNull ItemStack getLeggings();
@org.bukkit.UndefinedNullability("not null for entities, nullable for players") // Paper
ItemStack getLeggings();
/**
* Sets the leggings worn by the entity
@@ -267,7 +270,7 @@ public interface EntityEquipment {
*
* <p>
* This returns a copy if this equipment instance is from a non-player.
* For items from players, this returns a live mirror. You can check if this
* For stacks from players, this returns a live mirror (or null). You can check if this
* will return a mirror with
* <pre>{@code
* EntityEquipment equipment = entity.getEquipment();
@@ -280,7 +283,8 @@ public interface EntityEquipment {
*
* @return The boots being worn
*/
@NotNull ItemStack getBoots();
@org.bukkit.UndefinedNullability("not null for entities, nullable for players") // Paper
ItemStack getBoots();
/**
* Sets the boots worn by the entity
@@ -1218,8 +1218,6 @@ public interface ItemType extends Keyed, Translatable, net.kyori.adventure.trans
ItemType.Typed<ArmorMeta> GOLDEN_CHESTPLATE = getItemType("golden_chestplate");
ItemType.Typed<ItemMeta> GOLDEN_DANDELION = getItemType("golden_dandelion");
ItemType.Typed<ArmorMeta> GOLDEN_HELMET = getItemType("golden_helmet");
ItemType.Typed<ItemMeta> GOLDEN_HOE = getItemType("golden_hoe");
@@ -3281,9 +3279,8 @@ public interface ItemType extends Keyed, Translatable, net.kyori.adventure.trans
/**
* Get the {@link CreativeCategory} to which this item type belongs.
*
* @return the creative category. null if it does not belong to a category
* @deprecated items can belong to multiple creative categories and this is no
* longer implemented, will always be {@link CreativeCategory#BUILDING_BLOCKS}
* @return the creative category. null if does not belong to a category
<!-- * @deprecated use #getCreativeCategories() -->
*/
@Deprecated(since = "1.20.6", forRemoval = true)
@Nullable CreativeCategory getCreativeCategory();
@@ -34,28 +34,32 @@ public interface PlayerInventory extends Inventory {
*
* @return The ItemStack in the helmet slot
*/
public @NotNull ItemStack getHelmet();
@Nullable
public ItemStack getHelmet();
/**
* Return the ItemStack from the chestplate slot
*
* @return The ItemStack in the chestplate slot
*/
public @NotNull ItemStack getChestplate();
@Nullable
public ItemStack getChestplate();
/**
* Return the ItemStack from the leg slot
*
* @return The ItemStack in the leg slot
*/
public @NotNull ItemStack getLeggings();
@Nullable
public ItemStack getLeggings();
/**
* Return the ItemStack from the boots slot
*
* @return The ItemStack in the boots slot
*/
public @NotNull ItemStack getBoots();
@Nullable
public ItemStack getBoots();
/**
* Stores the ItemStack at the given index of the inventory.
@@ -88,7 +88,7 @@ public class ShapedRecipe extends CraftingRecipe {
continue;
}
newIngredients.put(c, this.ingredients.get(c));
newIngredients.put(c, ingredients.get(c));
}
}
this.ingredients = newIngredients;
@@ -129,11 +129,7 @@ public class ShapedRecipe extends CraftingRecipe {
*/
@NotNull
public ShapedRecipe setIngredient(char key, @NotNull Material ingredient) {
Preconditions.checkArgument(key != ' ', "Space in recipe shape must represent no ingredient");
Preconditions.checkArgument(this.ingredients.containsKey(key), "Symbol does not appear in the shape:", key);
this.ingredients.put(key, new RecipeChoice.MaterialChoice(Collections.singletonList(ingredient)));
return this;
return setIngredient(key, ingredient, 0);
}
/**
@@ -153,7 +149,16 @@ public class ShapedRecipe extends CraftingRecipe {
@Deprecated(since = "1.6.2")
@NotNull
public ShapedRecipe setIngredient(char key, @NotNull Material ingredient, int raw) {
return setIngredient(key, ingredient);
Preconditions.checkArgument(key != ' ', "Space in recipe shape must represent no ingredient");
Preconditions.checkArgument(ingredients.containsKey(key), "Symbol does not appear in the shape:", key);
// -1 is the old wildcard, map to Short.MAX_VALUE as the new one
if (raw == -1) {
raw = Short.MAX_VALUE;
}
ingredients.put(key, new RecipeChoice.MaterialChoice(Collections.singletonList(ingredient)));
return this;
}
/**
@@ -171,17 +176,19 @@ public class ShapedRecipe extends CraftingRecipe {
@NotNull
public ShapedRecipe setIngredient(char key, @NotNull RecipeChoice ingredient) {
Preconditions.checkArgument(key != ' ', "Space in recipe shape must represent no ingredient");
Preconditions.checkArgument(this.ingredients.containsKey(key), "Symbol does not appear in the shape:", key);
Preconditions.checkArgument(ingredients.containsKey(key), "Symbol does not appear in the shape:", key);
this.ingredients.put(key, ingredient.validate(false).clone()); // Paper
ingredients.put(key, ingredient.validate(false).clone()); // Paper
return this;
}
// Paper start
@NotNull
public ShapedRecipe setIngredient(char key, @NotNull ItemStack item) {
Preconditions.checkArgument(!item.getType().isAir(), "Item cannot be air"); // Paper
return setIngredient(key, new RecipeChoice.ExactChoice(item.clone())); // Paper
}
// Paper end
/**
* Get a copy of the ingredients map.
@@ -192,8 +199,8 @@ public class ShapedRecipe extends CraftingRecipe {
@Deprecated // Paper
@NotNull
public Map<Character, ItemStack> getIngredientMap() {
HashMap<Character, ItemStack> result = new HashMap<>();
for (Map.Entry<Character, RecipeChoice> ingredient : this.ingredients.entrySet()) {
HashMap<Character, ItemStack> result = new HashMap<Character, ItemStack>();
for (Map.Entry<Character, RecipeChoice> ingredient : ingredients.entrySet()) {
if (ingredient.getValue() == null) {
result.put(ingredient.getKey(), null);
} else {
@@ -211,7 +218,7 @@ public class ShapedRecipe extends CraftingRecipe {
@NotNull
public Map<Character, RecipeChoice> getChoiceMap() {
Map<Character, RecipeChoice> result = new HashMap<>();
for (Map.Entry<Character, RecipeChoice> ingredient : this.ingredients.entrySet()) {
for (Map.Entry<Character, RecipeChoice> ingredient : ingredients.entrySet()) {
if (ingredient.getValue() == null) {
result.put(ingredient.getKey(), null);
} else {
@@ -228,6 +235,6 @@ public class ShapedRecipe extends CraftingRecipe {
* @throws NullPointerException when not set yet
*/
public @NotNull String @NotNull [] getShape() {
return this.rows.clone();
return rows.clone();
}
}
Loaded 100 of 1339 files, more files were not shown because too many files have changed in this diff. Show more