Compare commits

..
Author SHA1 Message Date
Jason Penilla e086eba479 Use preconditions 2025-10-07 12:55:38 -07:00
Jason Penilla f1a5d1fe3c rename sendSystemMessage 2025-10-07 12:54:18 -07:00
Jason Penilla 05f3801237 remove supplier API 2025-10-07 12:54:18 -07:00
Jason Penilla 55f359243b Adjust brig tests 2025-10-07 12:54:18 -07:00
Jason Penilla 033263f5b4 fix compile 2025-10-07 12:54:18 -07:00
Jason Penilla 35129eb522 Add helper methods for vanilla-style command feedback 2025-10-07 12:54:14 -07:00
1887 changed files with 41964 additions and 50670 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/
+38 -61
View File
@@ -21,13 +21,13 @@ 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
installation).
feature to allow building with only JRE 11 or later installed. (Gradle will
automatically provision JDK 21 for compilation if it cannot find an existing
install).
If you're on Windows, check
[the section on WSL](#patching-and-building-is-really-slow-what-can-i-do).
@@ -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,37 +184,14 @@ 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.
While we will fix minor formatting issues, you should stick to the guide below
when making and submitting changes.
### Branches and Minecraft Versions
Generally, PRs should be targeted at the `main` branch, where active development for
the latest Minecraft release happens.
If a new Minecraft release is imminent, it may be wise to wait until it's released
and merged to `main` to avoid having to rebase your PR, as the `main` branch will be
frozen during this time (you can ask in the Paper Discord if you're unsure).
For old Minecraft versions - we are unlikely to accept PRs targeting any versions not
marked as supported at https://fill-ui.papermc.io/projects/paper.
For snapshots and other pre-release versions - you should only target these branches
for changes specific to features or changes in those versions. For example, if Copper
Golem is going to be added in 1.21.9, you can PR to the relevant dev branch as it would
not make sense to merge that into `main`. Or, if you are fixing a bug that only exists in
a dev branch, you should target that branch. When submitting PRs to dev branches, please
coordinate with the dev team in Discord or open an issue before starting work to ensure
it's an area we want to accept changes for. The team prefers to handle initial updating
work through to the server running ourselves, so do not attempt to PR version updates
(i.e. 25w42a -> 25w43a, etc.) or while there are still unapplied source patches. Feature
patches are also not applied until at earliest the pre-release phase to avoid unnecessary
churn.
## Formatting
All modifications to Vanilla files should be marked. For historical reasons,
@@ -280,7 +257,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 +358,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
@@ -420,19 +417,13 @@ int maxPlayers = GlobalConfiguration.get().misc.maxNumOfPlayers;
Generally for global config values you will use the fully qualified class name,
`io.papermc.paper.configuration.GlobalConfiguration` since it's not imported in
most places.
---
If you are adding a new world config value, you must have access to an instance
of the `net.minecraft.world.level.Level` which you can then access the config by doing
```java
int maxPlayers = level.paperConfig().misc.maxNumOfPlayers;
```
#### Documentation
When adding or removing a config option, you should open a pull request in our [documentation repository](https://github.com/PaperMC/docs)
to keep it in sync and accurate. If you're unsure whether your original change will be accepted, then it's fine to wait with making the documentation
pull request until a maintainer has reviewed your changes. Once everything is done, the documentation pull request will be merged at the same time
that your original pull request is.
## Testing API changes
### Using the Paper Test Plugin
@@ -461,28 +452,14 @@ If you use Maven to build your plugin:
If you use Windows and don't usually build using WSL, you might not need to
do this.
## Tips and Tricks
### IntelliJ IDEA
- Under `Settings > Appearance & Behavior > System Settings`, disable
`Sync external changes: Periodically when the IDE is inactive (experimental)`.
When disabled, the IDE will not attempt to reindex files while patches are applying
unless you interact with the IDE during the process. This avoids severe slowdowns and freezes.
- Under `Settings > Appearance & Behavior > System Settings`, you may also want to
disable `Reopen projects on startup` to avoid freeze loops.
## Frequently Asked Questions
### My commit doesn't need a build, what do I do?
Quite simple: You add `[ci skip]` to the start of your pull request title.
Quite simple: You add `[ci skip]` to the start of your commit subject.
This case most often applies to changes to files like `README.md`, this very
file (`CONTRIBUTING.md`), the `LICENSE.md` file, and also small updates to Javadocs or other documentation.
Do *not* add [ci skip] to the start of your individual commit subjects, as your
pull request will not be mergeable until a new commit is added due to status check requirements.
file (`CONTRIBUTING.md`), the `LICENSE.md` file, and so forth.
### Patching and building is *really* slow, what can I do?
@@ -492,11 +469,11 @@ release, either update to Windows 10/11 or move to macOS/Linux/BSD.
In order to speed up patching process on Windows, it's recommended you get WSL 2.
This is available in Windows 10 v2004, build 19041 or higher. (You can check
your version by running `winver` in the run window (Windows key + R)). If you're
using an out-of-date version of Windows 10, update your system with the
using an out of date version of Windows 10, update your system with the
[Windows 10 Update Assistant](https://www.microsoft.com/en-us/software-download/windows10) or [Windows 11 Update Assistant](https://www.microsoft.com/en-us/software-download/windows11).
To set up WSL 2, follow the information here:
<https://learn.microsoft.com/en-us/windows/wsl/install>
<https://docs.microsoft.com/en-us/windows/wsl/install>
You will most likely want to use the Ubuntu apps. Once it's set up, install the
required tools with `sudo apt-get update && sudo apt-get install $TOOL_NAMES
@@ -505,5 +482,5 @@ required tools with `sudo apt-get update && sudo apt-get install $TOOL_NAMES
everything like usual.
> ❗ Do not use the `/mnt/` directory in WSL! Instead, mount the WSL directories
> in Windows as described here:
> <https://learn.microsoft.com/en-us/windows/wsl/filesystems#view-your-current-directory-in-windows-file-explorer>
> in Windows like described here:
> <https://docs.microsoft.com/en-us/windows/wsl/filesystems#view-your-current-directory-in-windows-file-explorer>
-2
View File
@@ -65,6 +65,4 @@ aerulion <aerulion@gmail.com>
Lukas Planz <lukas.planz@web.de>
granny <contact@granny.dev>
mja00 <me@mja00.dev>
roro1506HD <16260475+roro1506HD@users.noreply.github.com>
Toffikk <slodkitofik@gmail.com>
```
+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.10-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.10-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`.
+140 -159
View File
@@ -3,13 +3,13 @@
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
protected net.minecraft.world.entity.LivingEntity skipDropExperience
protected-f net.minecraft.server.MinecraftServer worldData
public net.minecraft.ChatFormatting code
public net.minecraft.Util onThreadException(Ljava/lang/Thread;Ljava/lang/Throwable;)V
public net.minecraft.advancements.Advancement decorateName(Lnet/minecraft/advancements/DisplayInfo;)Lnet/minecraft/network/chat/Component;
public net.minecraft.commands.CommandSourceStack source
public net.minecraft.commands.arguments.DimensionArgument ERROR_INVALID_VALUE
@@ -21,6 +21,8 @@ public net.minecraft.network.Connection address
public net.minecraft.network.Connection channel
public net.minecraft.network.chat.TextColor name
public net.minecraft.network.chat.contents.TranslatableContents filterAllowedArguments(Ljava/lang/Object;)Lcom/mojang/serialization/DataResult;
public net.minecraft.network.chat.numbers.FixedFormat value
public net.minecraft.network.chat.numbers.StyledFormat style
public net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacket <init>(Lnet/minecraft/core/BlockPos;Lnet/minecraft/world/level/block/entity/BlockEntityType;Lnet/minecraft/nbt/CompoundTag;)V
public net.minecraft.network.protocol.game.ClientboundBlockUpdatePacket blockState
public net.minecraft.network.protocol.game.ServerboundMovePlayerPacket hasPos
@@ -33,7 +35,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 +44,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,13 +99,11 @@ 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
public net.minecraft.server.network.ServerConfigurationPacketListenerImpl finishCurrentTask(Lnet/minecraft/server/network/ConfigurationTask$Type;)V
public net.minecraft.server.network.ServerGamePacketListenerImpl isChatMessageIllegal(Ljava/lang/String;)Z
public net.minecraft.server.network.ServerGamePacketListenerImpl restartClientLoadTimerAfterRespawn()V
public net.minecraft.server.network.ServerLoginPacketListenerImpl authenticatedProfile
public net.minecraft.server.network.ServerLoginPacketListenerImpl connection
public net.minecraft.server.network.ServerLoginPacketListenerImpl state
@@ -122,8 +120,6 @@ 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
public net.minecraft.util.datafix.fixes.ItemSpawnEggFix ID_TO_ENTITY
@@ -141,10 +137,7 @@ 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
@@ -216,6 +209,7 @@ public net.minecraft.world.entity.Entity unsetRemoved()V
public net.minecraft.world.entity.Entity wasTouchingWater
public net.minecraft.world.entity.ExperienceOrb count
public net.minecraft.world.entity.ExperienceOrb setValue(I)V
public net.minecraft.world.entity.GlowSquid setDarkTicks(I)V
public net.minecraft.world.entity.Interaction attack
public net.minecraft.world.entity.Interaction getHeight()F
public net.minecraft.world.entity.Interaction getResponse()Z
@@ -225,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
@@ -257,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
@@ -268,80 +260,70 @@ public net.minecraft.world.entity.ai.gossip.GossipContainer$EntityGossips
public net.minecraft.world.entity.ai.gossip.GossipContainer$EntityGossips <init>()V
public net.minecraft.world.entity.ai.navigation.PathNavigation pathFinder
public net.minecraft.world.entity.ambient.Bat targetPosition
public net.minecraft.world.entity.animal.AbstractSchoolingFish leader
public net.minecraft.world.entity.animal.AbstractSchoolingFish schoolSize
public net.minecraft.world.entity.animal.Animal inLove
public net.minecraft.world.entity.animal.Animal loveCause
public net.minecraft.world.entity.animal.Bee hivePos
public net.minecraft.world.entity.animal.Bee isRolling()Z
public net.minecraft.world.entity.animal.Bee numCropsGrownSincePollination
public net.minecraft.world.entity.animal.Bee setHasNectar(Z)V
public net.minecraft.world.entity.animal.Bee setHasStung(Z)V
public net.minecraft.world.entity.animal.Bee setRolling(Z)V
public net.minecraft.world.entity.animal.Bee stayOutOfHiveCountdown
public net.minecraft.world.entity.animal.Bee ticksWithoutNectarSinceExitingHive
public net.minecraft.world.entity.animal.Bee timeSinceSting
public net.minecraft.world.entity.animal.Cat isRelaxStateOne()Z
public net.minecraft.world.entity.animal.Cat setCollarColor(Lnet/minecraft/world/item/DyeColor;)V
public net.minecraft.world.entity.animal.Cat setRelaxStateOne(Z)V
public net.minecraft.world.entity.animal.Cat setVariant(Lnet/minecraft/core/Holder;)V
public net.minecraft.world.entity.animal.Dolphin treasurePos
public net.minecraft.world.entity.animal.Fox DATA_TRUSTED_ID_0
public net.minecraft.world.entity.animal.Fox DATA_TRUSTED_ID_1
public net.minecraft.world.entity.animal.Fox isDefending()Z
public net.minecraft.world.entity.animal.Fox setDefending(Z)V
public net.minecraft.world.entity.animal.Fox setFaceplanted(Z)V
public net.minecraft.world.entity.animal.Fox setSleeping(Z)V
public net.minecraft.world.entity.animal.Fox setVariant(Lnet/minecraft/world/entity/animal/Fox$Variant;)V
public net.minecraft.world.entity.animal.MushroomCow setVariant(Lnet/minecraft/world/entity/animal/MushroomCow$Variant;)V
public net.minecraft.world.entity.animal.MushroomCow stewEffects
public net.minecraft.world.entity.animal.Ocelot isTrusting()Z
public net.minecraft.world.entity.animal.Ocelot setTrusting(Z)V
public net.minecraft.world.entity.animal.Panda getEatCounter()I
public net.minecraft.world.entity.animal.Panda setEatCounter(I)V
public net.minecraft.world.entity.animal.Parrot setVariant(Lnet/minecraft/world/entity/animal/Parrot$Variant;)V
public net.minecraft.world.entity.animal.Pig setVariant(Lnet/minecraft/core/Holder;)V
public net.minecraft.world.entity.animal.Pig steering
public net.minecraft.world.entity.animal.Rabbit moreCarrotTicks
public net.minecraft.world.entity.animal.Rabbit registerGoals()V
public net.minecraft.world.entity.animal.Rabbit setVariant(Lnet/minecraft/world/entity/animal/Rabbit$Variant;)V
public net.minecraft.world.entity.animal.Salmon setVariant(Lnet/minecraft/world/entity/animal/Salmon$Variant;)V
public net.minecraft.world.entity.animal.TropicalFish getPackedVariant()I
public net.minecraft.world.entity.animal.TropicalFish setPackedVariant(I)V
public net.minecraft.world.entity.animal.Turtle goingHome
public net.minecraft.world.entity.animal.Turtle homePos
public net.minecraft.world.entity.animal.Turtle setHasEgg(Z)V
public net.minecraft.world.entity.animal.allay.Allay canDuplicate()Z
public net.minecraft.world.entity.animal.allay.Allay duplicateAllay()V
public net.minecraft.world.entity.animal.allay.Allay duplicationCooldown
public net.minecraft.world.entity.animal.allay.Allay jukeboxPos
public net.minecraft.world.entity.animal.allay.Allay resetDuplicationCooldown()V
public net.minecraft.world.entity.animal.axolotl.Axolotl setVariant(Lnet/minecraft/world/entity/animal/axolotl/Axolotl$Variant;)V
public net.minecraft.world.entity.animal.bee.Bee hivePos
public net.minecraft.world.entity.animal.bee.Bee isRolling()Z
public net.minecraft.world.entity.animal.bee.Bee numCropsGrownSincePollination
public net.minecraft.world.entity.animal.bee.Bee setHasNectar(Z)V
public net.minecraft.world.entity.animal.bee.Bee setHasStung(Z)V
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
public net.minecraft.world.entity.animal.equine.AbstractHorse createInventory()V
public net.minecraft.world.entity.animal.equine.AbstractHorse inventory
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
public net.minecraft.world.entity.animal.fish.AbstractSchoolingFish leader
public net.minecraft.world.entity.animal.fish.AbstractSchoolingFish schoolSize
public net.minecraft.world.entity.animal.fish.Salmon setVariant(Lnet/minecraft/world/entity/animal/fish/Salmon$Variant;)V
public net.minecraft.world.entity.animal.fish.TropicalFish getPackedVariant()I
public net.minecraft.world.entity.animal.fish.TropicalFish setPackedVariant(I)V
public net.minecraft.world.entity.animal.fox.Fox DATA_TRUSTED_ID_0
public net.minecraft.world.entity.animal.fox.Fox DATA_TRUSTED_ID_1
public net.minecraft.world.entity.animal.fox.Fox isDefending()Z
public net.minecraft.world.entity.animal.fox.Fox setDefending(Z)V
public net.minecraft.world.entity.animal.fox.Fox setFaceplanted(Z)V
public net.minecraft.world.entity.animal.fox.Fox setSleeping(Z)V
public net.minecraft.world.entity.animal.fox.Fox setVariant(Lnet/minecraft/world/entity/animal/fox/Fox$Variant;)V
public net.minecraft.world.entity.animal.frog.Frog setVariant(Lnet/minecraft/core/Holder;)V
public net.minecraft.world.entity.animal.frog.Tadpole age
public net.minecraft.world.entity.animal.goat.Goat DATA_HAS_LEFT_HORN
public net.minecraft.world.entity.animal.goat.Goat DATA_HAS_RIGHT_HORN
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
public net.minecraft.world.entity.animal.rabbit.Rabbit registerGoals()V
public net.minecraft.world.entity.animal.rabbit.Rabbit setVariant(Lnet/minecraft/world/entity/animal/rabbit/Rabbit$Variant;)V
public net.minecraft.world.entity.animal.horse.AbstractHorse createInventory()V
public net.minecraft.world.entity.animal.horse.AbstractHorse inventory
public net.minecraft.world.entity.animal.horse.AbstractHorse owner
public net.minecraft.world.entity.animal.horse.Horse setVariantAndMarkings(Lnet/minecraft/world/entity/animal/horse/Variant;Lnet/minecraft/world/entity/animal/horse/Markings;)V
public net.minecraft.world.entity.animal.horse.Llama setVariant(Lnet/minecraft/world/entity/animal/horse/Llama$Variant;)V
public net.minecraft.world.entity.animal.horse.SkeletonHorse trapTime
public net.minecraft.world.entity.animal.sniffer.Sniffer calculateDigPosition()Ljava/util/Optional;
public net.minecraft.world.entity.animal.sniffer.Sniffer canDig()Z
public net.minecraft.world.entity.animal.sniffer.Sniffer getExploredPositions()Ljava/util/stream/Stream;
public net.minecraft.world.entity.animal.sniffer.Sniffer getState()Lnet/minecraft/world/entity/animal/sniffer/Sniffer$State;
public net.minecraft.world.entity.animal.sniffer.Sniffer storeExploredPosition(Lnet/minecraft/core/BlockPos;)Lnet/minecraft/world/entity/animal/sniffer/Sniffer;
public net.minecraft.world.entity.animal.squid.GlowSquid setDarkTicks(I)V
public net.minecraft.world.entity.animal.turtle.Turtle goingHome
public net.minecraft.world.entity.animal.turtle.Turtle homePos
public net.minecraft.world.entity.animal.turtle.Turtle setHasEgg(Z)V
public net.minecraft.world.entity.animal.wolf.Wolf getSoundVariant()Lnet/minecraft/core/Holder;
public net.minecraft.world.entity.animal.wolf.Wolf getVariant()Lnet/minecraft/core/Holder;
public net.minecraft.world.entity.animal.wolf.Wolf isWet
@@ -369,7 +351,7 @@ public net.minecraft.world.entity.decoration.Mannequin setDescription(Lnet/minec
public net.minecraft.world.entity.decoration.Mannequin setHideDescription(Z)V
public net.minecraft.world.entity.decoration.Mannequin setImmovable(Z)V
public net.minecraft.world.entity.decoration.Mannequin setProfile(Lnet/minecraft/world/item/component/ResolvableProfile;)V
public net.minecraft.world.entity.decoration.painting.Painting setVariant(Lnet/minecraft/core/Holder;)V
public net.minecraft.world.entity.decoration.Painting setVariant(Lnet/minecraft/core/Holder;)V
public net.minecraft.world.entity.item.FallingBlockEntity <init>(Lnet/minecraft/world/level/Level;DDDLnet/minecraft/world/level/block/state/BlockState;)V
public net.minecraft.world.entity.item.FallingBlockEntity blockState
public net.minecraft.world.entity.item.FallingBlockEntity cancelDrop
@@ -383,7 +365,6 @@ public net.minecraft.world.entity.item.ItemEntity target
public net.minecraft.world.entity.item.ItemEntity thrower
public net.minecraft.world.entity.item.PrimedTnt explosionPower
public net.minecraft.world.entity.item.PrimedTnt owner
public net.minecraft.world.entity.monster.Creeper droppedSkulls
public net.minecraft.world.entity.monster.Creeper explodeCreeper()V
public net.minecraft.world.entity.monster.Creeper explosionRadius
public net.minecraft.world.entity.monster.Creeper maxSwell
@@ -391,11 +372,14 @@ public net.minecraft.world.entity.monster.Creeper swell
public net.minecraft.world.entity.monster.EnderMan teleport()Z
public net.minecraft.world.entity.monster.EnderMan teleportTowards(Lnet/minecraft/world/entity/Entity;)Z
public net.minecraft.world.entity.monster.Endermite life
public net.minecraft.world.entity.monster.Evoker getWololoTarget()Lnet/minecraft/world/entity/animal/sheep/Sheep;
public net.minecraft.world.entity.monster.Evoker setWololoTarget(Lnet/minecraft/world/entity/animal/sheep/Sheep;)V
public net.minecraft.world.entity.monster.Guardian randomStrollGoal
public net.minecraft.world.entity.monster.Guardian setActiveAttackTarget(I)V
public net.minecraft.world.entity.monster.Guardian$GuardianAttackGoal
public net.minecraft.world.entity.monster.Guardian$GuardianAttackGoal attackTime
public net.minecraft.world.entity.monster.Phantom anchorPoint
public net.minecraft.world.entity.monster.Pillager inventory
public net.minecraft.world.entity.monster.Ravager attackTick
public net.minecraft.world.entity.monster.Ravager roarTick
public net.minecraft.world.entity.monster.Ravager stunnedTick
@@ -403,46 +387,44 @@ public net.minecraft.world.entity.monster.Shulker DATA_COLOR_ID
public net.minecraft.world.entity.monster.Shulker getRawPeekAmount()I
public net.minecraft.world.entity.monster.Shulker setAttachFace(Lnet/minecraft/core/Direction;)V
public net.minecraft.world.entity.monster.Shulker setRawPeekAmount(I)V
public net.minecraft.world.entity.monster.Skeleton DATA_STRAY_CONVERSION_ID
public net.minecraft.world.entity.monster.Skeleton conversionTime
public net.minecraft.world.entity.monster.Skeleton inPowderSnowTime
public net.minecraft.world.entity.monster.SpellcasterIllager getCurrentSpell()Lnet/minecraft/world/entity/monster/SpellcasterIllager$IllagerSpell;
public net.minecraft.world.entity.monster.SpellcasterIllager$IllagerSpell
public net.minecraft.world.entity.monster.Strider steering
public net.minecraft.world.entity.monster.Vex hasLimitedLife
public net.minecraft.world.entity.monster.Vex limitedLifeTicks
public net.minecraft.world.entity.monster.Vex owner
public net.minecraft.world.entity.monster.Vindicator DOOR_BREAKING_PREDICATE
public net.minecraft.world.entity.monster.Vindicator isJohnny
public net.minecraft.world.entity.monster.Witch usingTime
public net.minecraft.world.entity.monster.Zombie DATA_DROWNED_CONVERSION_ID
public net.minecraft.world.entity.monster.Zombie DOOR_BREAKING_PREDICATE
public net.minecraft.world.entity.monster.Zombie conversionTime
public net.minecraft.world.entity.monster.Zombie isSunSensitive()Z
public net.minecraft.world.entity.monster.Zombie startUnderWaterConversion(I)V
public net.minecraft.world.entity.monster.ZombieVillager DATA_CONVERTING_ID
public net.minecraft.world.entity.monster.ZombieVillager conversionStarter
public net.minecraft.world.entity.monster.ZombieVillager startConverting(Ljava/util/UUID;I)V
public net.minecraft.world.entity.monster.ZombieVillager villagerConversionTime
public net.minecraft.world.entity.monster.hoglin.Hoglin cannotBeHunted
public net.minecraft.world.entity.monster.hoglin.Hoglin isImmuneToZombification()Z
public net.minecraft.world.entity.monster.hoglin.Hoglin timeInOverworld
public net.minecraft.world.entity.monster.illager.Evoker getWololoTarget()Lnet/minecraft/world/entity/animal/sheep/Sheep;
public net.minecraft.world.entity.monster.illager.Evoker setWololoTarget(Lnet/minecraft/world/entity/animal/sheep/Sheep;)V
public net.minecraft.world.entity.monster.illager.Pillager inventory
public net.minecraft.world.entity.monster.illager.SpellcasterIllager getCurrentSpell()Lnet/minecraft/world/entity/monster/illager/SpellcasterIllager$IllagerSpell;
public net.minecraft.world.entity.monster.illager.SpellcasterIllager$IllagerSpell
public net.minecraft.world.entity.monster.illager.Vindicator DOOR_BREAKING_PREDICATE
public net.minecraft.world.entity.monster.illager.Vindicator isJohnny
public net.minecraft.world.entity.monster.piglin.AbstractPiglin isImmuneToZombification()Z
public net.minecraft.world.entity.monster.piglin.AbstractPiglin timeInOverworld
public net.minecraft.world.entity.monster.piglin.Piglin cannotHunt
public net.minecraft.world.entity.monster.piglin.Piglin inventory
public net.minecraft.world.entity.monster.piglin.Piglin isChargingCrossbow()Z
public net.minecraft.world.entity.monster.skeleton.Skeleton DATA_STRAY_CONVERSION_ID
public net.minecraft.world.entity.monster.skeleton.Skeleton conversionTime
public net.minecraft.world.entity.monster.skeleton.Skeleton inPowderSnowTime
public net.minecraft.world.entity.monster.warden.WardenSpawnTracker cooldownTicks
public net.minecraft.world.entity.monster.warden.WardenSpawnTracker increaseWarningLevel()V
public net.minecraft.world.entity.monster.warden.WardenSpawnTracker ticksSinceLastWarning
public net.minecraft.world.entity.monster.zombie.Zombie DATA_DROWNED_CONVERSION_ID
public net.minecraft.world.entity.monster.zombie.Zombie DOOR_BREAKING_PREDICATE
public net.minecraft.world.entity.monster.zombie.Zombie conversionTime
public net.minecraft.world.entity.monster.zombie.Zombie isSunSensitive()Z
public net.minecraft.world.entity.monster.zombie.Zombie startUnderWaterConversion(I)V
public net.minecraft.world.entity.monster.zombie.ZombieVillager DATA_CONVERTING_ID
public net.minecraft.world.entity.monster.zombie.ZombieVillager conversionStarter
public net.minecraft.world.entity.monster.zombie.ZombieVillager startConverting(Ljava/util/UUID;I)V
public net.minecraft.world.entity.monster.zombie.ZombieVillager villagerConversionTime
public net.minecraft.world.entity.npc.villager.Villager numberOfRestocksToday
public net.minecraft.world.entity.npc.villager.Villager releaseAllPois()V
public net.minecraft.world.entity.npc.villager.Villager setUnhappy()V
public net.minecraft.world.entity.npc.villager.Villager updateDemand()V
public net.minecraft.world.entity.npc.wanderingtrader.WanderingTrader getWanderTarget()Lnet/minecraft/core/BlockPos;
public net.minecraft.world.entity.npc.Villager increaseMerchantCareer()V
public net.minecraft.world.entity.npc.Villager numberOfRestocksToday
public net.minecraft.world.entity.npc.Villager releaseAllPois()V
public net.minecraft.world.entity.npc.Villager setUnhappy()V
public net.minecraft.world.entity.npc.Villager updateDemand()V
public net.minecraft.world.entity.npc.WanderingTrader getWanderTarget()Lnet/minecraft/core/BlockPos;
public net.minecraft.world.entity.player.Abilities flyingSpeed
public net.minecraft.world.entity.player.Abilities walkingSpeed
public net.minecraft.world.entity.player.Inventory equipment
@@ -452,6 +434,20 @@ public net.minecraft.world.entity.player.Player getFireImmuneTicks()I
public net.minecraft.world.entity.player.Player hurtDir
public net.minecraft.world.entity.player.Player removeEntitiesOnShoulder()V
public net.minecraft.world.entity.player.Player sleepCounter
public net.minecraft.world.entity.projectile.AbstractArrow baseDamage
public net.minecraft.world.entity.projectile.AbstractArrow firedFromWeapon
public net.minecraft.world.entity.projectile.AbstractArrow getHitGroundSoundEvent()Lnet/minecraft/sounds/SoundEvent;
public net.minecraft.world.entity.projectile.AbstractArrow getPickupItem()Lnet/minecraft/world/item/ItemStack;
public net.minecraft.world.entity.projectile.AbstractArrow isInGround()Z
public net.minecraft.world.entity.projectile.AbstractArrow life
public net.minecraft.world.entity.projectile.AbstractArrow pickupItemStack
public net.minecraft.world.entity.projectile.AbstractArrow setPickupItemStack(Lnet/minecraft/world/item/ItemStack;)V
public net.minecraft.world.entity.projectile.AbstractArrow setPierceLevel(B)V
public net.minecraft.world.entity.projectile.AbstractHurtingProjectile assignDirectionalMovement(Lnet/minecraft/world/phys/Vec3;D)V
public net.minecraft.world.entity.projectile.Arrow NO_EFFECT_COLOR
public net.minecraft.world.entity.projectile.Arrow getPotionContents()Lnet/minecraft/world/item/alchemy/PotionContents;
public net.minecraft.world.entity.projectile.Arrow setPotionContents(Lnet/minecraft/world/item/alchemy/PotionContents;)V
public net.minecraft.world.entity.projectile.Arrow updateColor()V
public net.minecraft.world.entity.projectile.EvokerFangs warmupDelayTicks
public net.minecraft.world.entity.projectile.EyeOfEnder life
public net.minecraft.world.entity.projectile.EyeOfEnder surviveAfterDeath
@@ -474,6 +470,7 @@ public net.minecraft.world.entity.projectile.FishingHook setHookedEntity(Lnet/mi
public net.minecraft.world.entity.projectile.FishingHook timeUntilHooked
public net.minecraft.world.entity.projectile.FishingHook timeUntilLured
public net.minecraft.world.entity.projectile.FishingHook$FishHookState
public net.minecraft.world.entity.projectile.LargeFireball explosionPower
public net.minecraft.world.entity.projectile.Projectile hasBeenShot
public net.minecraft.world.entity.projectile.Projectile leftOwner
public net.minecraft.world.entity.projectile.Projectile owner
@@ -482,45 +479,31 @@ public net.minecraft.world.entity.projectile.ShulkerBullet flightSteps
public net.minecraft.world.entity.projectile.ShulkerBullet targetDeltaX
public net.minecraft.world.entity.projectile.ShulkerBullet targetDeltaY
public net.minecraft.world.entity.projectile.ShulkerBullet targetDeltaZ
public net.minecraft.world.entity.projectile.arrow.AbstractArrow baseDamage
public net.minecraft.world.entity.projectile.arrow.AbstractArrow firedFromWeapon
public net.minecraft.world.entity.projectile.arrow.AbstractArrow getHitGroundSoundEvent()Lnet/minecraft/sounds/SoundEvent;
public net.minecraft.world.entity.projectile.arrow.AbstractArrow getPickupItem()Lnet/minecraft/world/item/ItemStack;
public net.minecraft.world.entity.projectile.arrow.AbstractArrow isInGround()Z
public net.minecraft.world.entity.projectile.arrow.AbstractArrow life
public net.minecraft.world.entity.projectile.arrow.AbstractArrow pickupItemStack
public net.minecraft.world.entity.projectile.arrow.AbstractArrow setPickupItemStack(Lnet/minecraft/world/item/ItemStack;)V
public net.minecraft.world.entity.projectile.arrow.AbstractArrow setPierceLevel(B)V
public net.minecraft.world.entity.projectile.arrow.Arrow NO_EFFECT_COLOR
public net.minecraft.world.entity.projectile.arrow.Arrow getPotionContents()Lnet/minecraft/world/item/alchemy/PotionContents;
public net.minecraft.world.entity.projectile.arrow.Arrow setPotionContents(Lnet/minecraft/world/item/alchemy/PotionContents;)V
public net.minecraft.world.entity.projectile.arrow.Arrow updateColor()V
public net.minecraft.world.entity.projectile.arrow.SpectralArrow duration
public net.minecraft.world.entity.projectile.arrow.ThrownTrident dealtDamage
public net.minecraft.world.entity.projectile.hurtingprojectile.AbstractHurtingProjectile assignDirectionalMovement(Lnet/minecraft/world/phys/Vec3;D)V
public net.minecraft.world.entity.projectile.hurtingprojectile.LargeFireball explosionPower
public net.minecraft.world.entity.projectile.hurtingprojectile.windcharge.AbstractWindCharge explode(Lnet/minecraft/world/phys/Vec3;)V
public net.minecraft.world.entity.projectile.hurtingprojectile.windcharge.BreezeWindCharge explode(Lnet/minecraft/world/phys/Vec3;)V
public net.minecraft.world.entity.projectile.hurtingprojectile.windcharge.WindCharge explode(Lnet/minecraft/world/phys/Vec3;)V
public net.minecraft.world.entity.projectile.throwableitemprojectile.ThrowableItemProjectile getDefaultItem()Lnet/minecraft/world/item/Item;
public net.minecraft.world.entity.projectile.SpectralArrow duration
public net.minecraft.world.entity.projectile.ThrowableItemProjectile getDefaultItem()Lnet/minecraft/world/item/Item;
public net.minecraft.world.entity.projectile.ThrownTrident dealtDamage
public net.minecraft.world.entity.projectile.windcharge.AbstractWindCharge explode(Lnet/minecraft/world/phys/Vec3;)V
public net.minecraft.world.entity.projectile.windcharge.BreezeWindCharge explode(Lnet/minecraft/world/phys/Vec3;)V
public net.minecraft.world.entity.projectile.windcharge.WindCharge explode(Lnet/minecraft/world/phys/Vec3;)V
public net.minecraft.world.entity.raid.Raid heroesOfTheVillage
public net.minecraft.world.entity.raid.Raid numGroups
public net.minecraft.world.entity.raid.Raid raidEvent
public net.minecraft.world.entity.raid.Raid raidOmenLevel
public net.minecraft.world.entity.raid.Raid ticksActive
public net.minecraft.world.entity.raid.Raid totalHealth
public net.minecraft.world.entity.raid.Raider$HoldGroundAttackGoal
public net.minecraft.world.entity.raid.Raids raidMap
public net.minecraft.world.entity.vehicle.AbstractBoat getStatus()Lnet/minecraft/world/entity/vehicle/AbstractBoat$Status;
public net.minecraft.world.entity.vehicle.AbstractBoat status
public net.minecraft.world.entity.vehicle.AbstractMinecartContainer lootTable
public net.minecraft.world.entity.vehicle.AbstractMinecartContainer lootTableSeed
public net.minecraft.world.entity.vehicle.MinecartCommandBlock DATA_ID_COMMAND_NAME
public net.minecraft.world.entity.vehicle.MinecartFurnace fuel
public net.minecraft.world.entity.vehicle.MinecartTNT explode(Lnet/minecraft/world/damagesource/DamageSource;D)V
public net.minecraft.world.entity.vehicle.MinecartTNT explosionPowerBase
public net.minecraft.world.entity.vehicle.MinecartTNT explosionSpeedFactor
public net.minecraft.world.entity.vehicle.MinecartTNT fuse
public net.minecraft.world.entity.vehicle.VehicleEntity getDropItem()Lnet/minecraft/world/item/Item;
public net.minecraft.world.entity.vehicle.boat.AbstractBoat getStatus()Lnet/minecraft/world/entity/vehicle/boat/AbstractBoat$Status;
public net.minecraft.world.entity.vehicle.boat.AbstractBoat status
public net.minecraft.world.entity.vehicle.minecart.AbstractMinecartContainer lootTable
public net.minecraft.world.entity.vehicle.minecart.AbstractMinecartContainer lootTableSeed
public net.minecraft.world.entity.vehicle.minecart.MinecartCommandBlock DATA_ID_COMMAND_NAME
public net.minecraft.world.entity.vehicle.minecart.MinecartFurnace fuel
public net.minecraft.world.entity.vehicle.minecart.MinecartTNT explode(Lnet/minecraft/world/damagesource/DamageSource;D)V
public net.minecraft.world.entity.vehicle.minecart.MinecartTNT explosionPowerBase
public net.minecraft.world.entity.vehicle.minecart.MinecartTNT explosionSpeedFactor
public net.minecraft.world.entity.vehicle.minecart.MinecartTNT fuse
public net.minecraft.world.flag.FeatureFlag mask
public net.minecraft.world.flag.FeatureFlag universe
public net.minecraft.world.flag.FeatureFlagRegistry names
@@ -536,40 +519,38 @@ public net.minecraft.world.inventory.AbstractContainerMenu synchronizeSlotToRemo
public net.minecraft.world.inventory.AbstractContainerMenu triggerSlotListeners(ILnet/minecraft/world/item/ItemStack;Ljava/util/function/Supplier;)V
public net.minecraft.world.inventory.AbstractCraftingMenu craftSlots
public net.minecraft.world.inventory.AbstractCraftingMenu resultSlots
public net.minecraft.world.inventory.AbstractMountInventoryMenu SLOT_BODY_ARMOR
public net.minecraft.world.inventory.AbstractMountInventoryMenu SLOT_INVENTORY_START
public net.minecraft.world.inventory.AbstractMountInventoryMenu SLOT_SADDLE
public net.minecraft.world.inventory.AbstractMountInventoryMenu mount
public net.minecraft.world.inventory.AnvilMenu cost
public net.minecraft.world.inventory.AnvilMenu itemName
public net.minecraft.world.inventory.AnvilMenu repairItemCountCost
public net.minecraft.world.inventory.BrewingStandMenu brewingStandData
public net.minecraft.world.inventory.CraftingMenu access
public net.minecraft.world.inventory.DispenserMenu dispenser
public net.minecraft.world.inventory.HorseInventoryMenu SLOT_BODY_ARMOR
public net.minecraft.world.inventory.HorseInventoryMenu SLOT_HORSE_INVENTORY_START
public net.minecraft.world.inventory.HorseInventoryMenu SLOT_SADDLE
public net.minecraft.world.inventory.HorseInventoryMenu horse
public net.minecraft.world.inventory.MerchantContainer selectionHint
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
public net.minecraft.world.item.crafting.Ingredient values
public net.minecraft.world.item.crafting.RecipeManager recipes
public net.minecraft.world.item.crafting.RecipeMap byKey
public net.minecraft.world.item.crafting.RecipeMap byType
@@ -589,6 +570,9 @@ public net.minecraft.world.level.BaseSpawner spawnCount
public net.minecraft.world.level.BaseSpawner spawnDelay
public net.minecraft.world.level.BaseSpawner spawnPotentials
public net.minecraft.world.level.BaseSpawner spawnRange
public net.minecraft.world.level.GameRules GAME_RULE_TYPES
public net.minecraft.world.level.GameRules$Value deserialize(Ljava/lang/String;)V
public net.minecraft.world.level.GameRules$Value onChanged(Lnet/minecraft/server/MinecraftServer;)V
public net.minecraft.world.level.Level DEFAULT_EXPLOSION_BLOCK_PARTICLES
public net.minecraft.world.level.Level blockEntityTickers
public net.minecraft.world.level.Level getEntities()Lnet/minecraft/world/level/entity/LevelEntityGetter;
@@ -602,7 +586,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
@@ -718,23 +701,22 @@ 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
public net.minecraft.world.level.levelgen.NoiseBasedChunkGenerator settings
public net.minecraft.world.level.levelgen.SurfaceRules$Condition
public net.minecraft.world.level.levelgen.SurfaceRules$Context
@@ -747,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
@@ -756,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/ResourceLocation;)Ljava/util/Optional;
public net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplateManager loadFromResource(Lnet/minecraft/resources/ResourceLocation;)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
@@ -769,11 +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
public-f net.minecraft.server.MinecraftServer potionBrewing
@@ -783,11 +762,11 @@ public-f net.minecraft.server.dedicated.DedicatedServer serverLinks
public-f net.minecraft.server.dedicated.DedicatedServer settings
public-f net.minecraft.server.dedicated.DedicatedServerProperties pauseWhenEmptySeconds
public-f net.minecraft.world.entity.LivingEntity combatTracker
public-f net.minecraft.world.entity.LivingEntity invulnerableDuration
public-f net.minecraft.world.entity.Mob goalSelector
public-f net.minecraft.world.entity.Mob targetSelector
public-f net.minecraft.world.entity.ai.attributes.RangedAttribute maxValue
public-f net.minecraft.world.entity.player.Player gameProfile
public-f net.minecraft.world.entity.raid.Raid numGroups
public-f net.minecraft.world.inventory.AbstractContainerMenu dataSlots
public-f net.minecraft.world.inventory.AbstractContainerMenu lastSlots
public-f net.minecraft.world.inventory.AbstractContainerMenu remoteDataSlots
@@ -799,6 +778,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
+2 -2
View File
@@ -14,14 +14,14 @@ tiny 2 0 mojang spigot
# CraftBukkit changes type
c net/minecraft/server/level/ServerLevel net/minecraft/server/level/WorldServer
f Lnet/minecraft/world/level/storage/PrimaryLevelData; serverLevelData I
f Lnet/minecraft/world/level/storage/PrimaryLevelData; serverLevelData J
c net/minecraft/world/level/chunk/LevelChunk net/minecraft/world/level/chunk/Chunk
f Lnet/minecraft/server/level/ServerLevel; level q
# See mappings-patch.tiny
c net/minecraft/server/level/ChunkMap net/minecraft/server/level/PlayerChunkMap
f Lnet/minecraft/server/level/ChunkMap$ChunkDistanceManager; distanceManager D
f Lnet/minecraft/server/level/ChunkMap$ChunkDistanceManager; distanceManager G
# The method is made public by Spigot, which then causes accidental overrides
c net/minecraft/world/entity/Entity net/minecraft/world/entity/Entity
+10 -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-beta.21" apply false
id("io.papermc.paperweight.core") version "2.0.0-beta.19" apply false
}
subprojects {
@@ -11,9 +11,14 @@ subprojects {
extensions.configure<JavaPluginExtension> {
toolchain {
languageVersion = JavaLanguageVersion.of(25)
languageVersion = JavaLanguageVersion.of(21)
}
}
tasks.withType<AbstractArchiveTask>().configureEach {
isPreserveFileTimestamps = false
isReproducibleFileOrder = true
}
}
val paperMavenPublicUrl = "https://repo.papermc.io/repository/maven-public/"
@@ -21,7 +26,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 +51,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)
}
}
+2 -5
View File
@@ -1,9 +1,6 @@
group=io.papermc.paper
mcVersion=26.1.2
# 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=STABLE
version=1.21.10-R0.1-SNAPSHOT
mcVersion=1.21.10
# 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.1.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/.
+29 -48
View File
@@ -1,5 +1,3 @@
import paper.libs.com.google.gson.Gson
plugins {
`java-library`
`maven-publish`
@@ -12,10 +10,10 @@ java {
}
val annotationsVersion = "26.0.2"
val adventureVersion = "4.26.1"
val adventureVersion = "4.25.0"
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 +40,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 +80,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.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")
testImplementation("org.mockito:mockito-core:5.14.1")
testImplementation("org.ow2.asm:asm-tree:9.8")
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()
@@ -138,36 +136,20 @@ configure<PublishingExtension> {
}
}
abstract class GenerateApiVersioningFile : DefaultTask() {
@get:OutputFile
abstract val outputFile: RegularFileProperty
@get:Input
abstract val projectVersion: Property<String>
@get:Input
abstract val apiVersion: Property<String>
@TaskAction
fun generate() {
val file = outputFile.get().asFile
file.parentFile.mkdirs()
val map = mapOf(
"version" to projectVersion.get(),
"currentApiVersion" to apiVersion.get()
)
file.writeText(Gson().toJson(map))
val generateApiVersioningFile by tasks.registering {
inputs.property("version", project.version)
val pomProps = layout.buildDirectory.file("pom.properties")
outputs.file(pomProps)
val projectVersion = project.version
doLast {
pomProps.get().asFile.writeText("version=$projectVersion")
}
}
val generateApiVersioningFile = tasks.register<GenerateApiVersioningFile>("generateApiVersioningFile") {
outputFile.set(layout.buildDirectory.file("apiVersioning.json"))
projectVersion.set(project.version.toString())
apiVersion.set(rootProject.providers.gradleProperty("apiVersion"))
}
tasks.jar {
from(generateApiVersioningFile.flatMap { it.outputFile })
from(generateApiVersioningFile.map { it.outputs.files.singleFile }) {
into("META-INF/maven/${project.group}/${project.name}")
}
manifest {
attributes(
"Automatic-Module-Name" to "org.bukkit"
@@ -187,11 +169,11 @@ tasks.withType<Javadoc>().configureEach {
options.use()
options.isDocFilesSubDirs = true
options.links(
"https://guava.dev/releases/33.5.0-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://guava.dev/releases/33.3.1-jre/api/docs/",
//"https://javadoc.io/doc/org.yaml/snakeyaml/2.2/",
//"https://javadoc.io/doc/org.jetbrains/annotations/$annotationsVersion/",
//"https://javadoc.io/doc/org.joml/joml/1.10.8/",
//"https://www.javadoc.io/doc/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/",
@@ -200,12 +182,11 @@ tasks.withType<Javadoc>().configureEach {
"https://jd.advntr.dev/text-serializer-legacy/$adventureVersion/",
"https://jd.advntr.dev/text-serializer-plain/$adventureVersion/",
"https://jd.advntr.dev/text-logger-slf4j/$adventureVersion/",
"https://www.javadocs.dev/org.slf4j/slf4j-api/$slf4jVersion/",
//"https://javadoc.io/doc/org.slf4j/slf4j-api/$slf4jVersion/",
"https://logging.apache.org/log4j/2.x/javadoc/log4j-api/",
"https://www.javadocs.dev/org.apache.maven.resolver/maven-resolver-api/1.7.3",
//"https://javadoc.io/doc/org.apache.maven.resolver/maven-resolver-api/1.7.3",
)
options.tags("apiNote:a:API Note:")
options.tags("implNote:a:Implementation Note:")
inputs.files(apiAndDocs).ignoreEmptyDirectories().withPropertyName(apiAndDocs.name + "-configuration")
val apiAndDocsElements = apiAndDocs.elements
@@ -70,8 +70,6 @@ import org.jspecify.annotations.NullMarked;
@NullMarked
@GeneratedClass
public interface VanillaGoal<T extends Mob> extends Goal<T> {
GoalKey<AbstractHorse> HORSE_MOUNT_PANIC = create("horse_mount_panic", AbstractHorse.class);
GoalKey<AbstractHorse> HORSE_RANDOM_STAND = create("horse_random_stand", AbstractHorse.class);
GoalKey<AbstractHorse> HORSE_RUN_AROUND_LIKE_CRAZY = create("horse_run_around_like_crazy", AbstractHorse.class);
@@ -130,7 +128,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);
@@ -300,8 +298,6 @@ public interface VanillaGoal<T extends Mob> extends Goal<T> {
GoalKey<Monster> RANGED_CROSSBOW_ATTACK = create("ranged_crossbow_attack", Monster.class);
GoalKey<Monster> SPEAR_USE = create("spear_use", Monster.class);
GoalKey<Ocelot> OCELOT_AVOID_ENTITY = create("ocelot_avoid_entity", Ocelot.class);
GoalKey<Ocelot> OCELOT_TEMPT = create("ocelot_tempt", Ocelot.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);
}
}
@@ -284,13 +284,6 @@ public final class DamageTypeKeys {
*/
public static final TypedKey<DamageType> SONIC_BOOM = create(key("sonic_boom"));
/**
* {@code minecraft:spear}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DamageType> SPEAR = create(key("spear"));
/**
* {@code minecraft:spit}
*
@@ -25,20 +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}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> ATTACK_RANGE = create(key("attack_range"));
/**
* {@code minecraft:attribute_modifiers}
*
@@ -137,13 +123,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 +137,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 +165,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}
*
@@ -249,13 +214,6 @@ public final class DataComponentTypeKeys {
*/
public static final TypedKey<DataComponentType> DAMAGE_RESISTANT = create(key("damage_resistant"));
/**
* {@code minecraft:damage_type}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> DAMAGE_TYPE = create(key("damage_type"));
/**
* {@code minecraft:death_protection}
*
@@ -270,13 +228,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}
*
@@ -403,13 +354,6 @@ public final class DataComponentTypeKeys {
*/
public static final TypedKey<DataComponentType> JUKEBOX_PLAYABLE = create(key("jukebox_playable"));
/**
* {@code minecraft:kinetic_weapon}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> KINETIC_WEAPON = create(key("kinetic_weapon"));
/**
* {@code minecraft:llama/variant}
*
@@ -480,13 +424,6 @@ public final class DataComponentTypeKeys {
*/
public static final TypedKey<DataComponentType> MAX_STACK_SIZE = create(key("max_stack_size"));
/**
* {@code minecraft:minimum_attack_charge}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> MINIMUM_ATTACK_CHARGE = create(key("minimum_attack_charge"));
/**
* {@code minecraft:mooshroom/variant}
*
@@ -522,20 +459,6 @@ public final class DataComponentTypeKeys {
*/
public static final TypedKey<DataComponentType> PARROT_VARIANT = create(key("parrot/variant"));
/**
* {@code minecraft:piercing_weapon}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
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}
*
@@ -655,13 +578,6 @@ public final class DataComponentTypeKeys {
*/
public static final TypedKey<DataComponentType> SUSPICIOUS_STEW_EFFECTS = create(key("suspicious_stew_effects"));
/**
* {@code minecraft:swing_animation}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> SWING_ANIMATION = create(key("swing_animation"));
/**
* {@code minecraft:tool}
*
@@ -725,13 +641,6 @@ public final class DataComponentTypeKeys {
*/
public static final TypedKey<DataComponentType> USE_COOLDOWN = create(key("use_cooldown"));
/**
* {@code minecraft:use_effects}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> USE_EFFECTS = create(key("use_effects"));
/**
* {@code minecraft:use_remainder}
*
@@ -788,13 +697,6 @@ public final class DataComponentTypeKeys {
*/
public static final TypedKey<DataComponentType> WRITTEN_BOOK_CONTENT = create(key("written_book_content"));
/**
* {@code minecraft:zombie_nautilus/variant}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> ZOMBIE_NAUTILUS_VARIANT = create(key("zombie_nautilus/variant"));
private DataComponentTypeKeys() {
}
@@ -172,13 +172,6 @@ public final class EnchantmentKeys {
*/
public static final TypedKey<Enchantment> LUCK_OF_THE_SEA = create(key("luck_of_the_sea"));
/**
* {@code minecraft:lunge}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Enchantment> LUNGE = create(key("lunge"));
/**
* {@code minecraft:lure}
*
@@ -1,451 +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.GameRule;
import org.bukkit.MinecraftExperimental;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Vanilla keys for {@link RegistryKey#GAME_RULE}.
*
* @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 GameRuleKeys {
/**
* {@code minecraft:advance_time}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> ADVANCE_TIME = create(key("advance_time"));
/**
* {@code minecraft:advance_weather}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> ADVANCE_WEATHER = create(key("advance_weather"));
/**
* {@code minecraft:allow_entering_nether_using_portals}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> ALLOW_ENTERING_NETHER_USING_PORTALS = create(key("allow_entering_nether_using_portals"));
/**
* {@code minecraft:block_drops}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> BLOCK_DROPS = create(key("block_drops"));
/**
* {@code minecraft:block_explosion_drop_decay}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> BLOCK_EXPLOSION_DROP_DECAY = create(key("block_explosion_drop_decay"));
/**
* {@code minecraft:command_block_output}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> COMMAND_BLOCK_OUTPUT = create(key("command_block_output"));
/**
* {@code minecraft:command_blocks_work}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> COMMAND_BLOCKS_WORK = create(key("command_blocks_work"));
/**
* {@code minecraft:drowning_damage}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> DROWNING_DAMAGE = create(key("drowning_damage"));
/**
* {@code minecraft:elytra_movement_check}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> ELYTRA_MOVEMENT_CHECK = create(key("elytra_movement_check"));
/**
* {@code minecraft:ender_pearls_vanish_on_death}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> ENDER_PEARLS_VANISH_ON_DEATH = create(key("ender_pearls_vanish_on_death"));
/**
* {@code minecraft:entity_drops}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> ENTITY_DROPS = create(key("entity_drops"));
/**
* {@code minecraft:fall_damage}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> FALL_DAMAGE = create(key("fall_damage"));
/**
* {@code minecraft:fire_damage}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> FIRE_DAMAGE = create(key("fire_damage"));
/**
* {@code minecraft:fire_spread_radius_around_player}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> FIRE_SPREAD_RADIUS_AROUND_PLAYER = create(key("fire_spread_radius_around_player"));
/**
* {@code minecraft:forgive_dead_players}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> FORGIVE_DEAD_PLAYERS = create(key("forgive_dead_players"));
/**
* {@code minecraft:freeze_damage}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> FREEZE_DAMAGE = create(key("freeze_damage"));
/**
* {@code minecraft:global_sound_events}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> GLOBAL_SOUND_EVENTS = create(key("global_sound_events"));
/**
* {@code minecraft:immediate_respawn}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> IMMEDIATE_RESPAWN = create(key("immediate_respawn"));
/**
* {@code minecraft:keep_inventory}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> KEEP_INVENTORY = create(key("keep_inventory"));
/**
* {@code minecraft:lava_source_conversion}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> LAVA_SOURCE_CONVERSION = create(key("lava_source_conversion"));
/**
* {@code minecraft:limited_crafting}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> LIMITED_CRAFTING = create(key("limited_crafting"));
/**
* {@code minecraft:locator_bar}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> LOCATOR_BAR = create(key("locator_bar"));
/**
* {@code minecraft:log_admin_commands}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> LOG_ADMIN_COMMANDS = create(key("log_admin_commands"));
/**
* {@code minecraft:max_block_modifications}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> MAX_BLOCK_MODIFICATIONS = create(key("max_block_modifications"));
/**
* {@code minecraft:max_command_forks}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> MAX_COMMAND_FORKS = create(key("max_command_forks"));
/**
* {@code minecraft:max_command_sequence_length}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> MAX_COMMAND_SEQUENCE_LENGTH = create(key("max_command_sequence_length"));
/**
* {@code minecraft:max_entity_cramming}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> MAX_ENTITY_CRAMMING = create(key("max_entity_cramming"));
/**
* {@code minecraft:max_minecart_speed}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
@ApiStatus.Experimental
@MinecraftExperimental(MinecraftExperimental.Requires.MINECART_IMPROVEMENTS)
public static final TypedKey<GameRule<?>> MAX_MINECART_SPEED = create(key("max_minecart_speed"));
/**
* {@code minecraft:max_snow_accumulation_height}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> MAX_SNOW_ACCUMULATION_HEIGHT = create(key("max_snow_accumulation_height"));
/**
* {@code minecraft:mob_drops}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> MOB_DROPS = create(key("mob_drops"));
/**
* {@code minecraft:mob_explosion_drop_decay}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> MOB_EXPLOSION_DROP_DECAY = create(key("mob_explosion_drop_decay"));
/**
* {@code minecraft:mob_griefing}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> MOB_GRIEFING = create(key("mob_griefing"));
/**
* {@code minecraft:natural_health_regeneration}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> NATURAL_HEALTH_REGENERATION = create(key("natural_health_regeneration"));
/**
* {@code minecraft:player_movement_check}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> PLAYER_MOVEMENT_CHECK = create(key("player_movement_check"));
/**
* {@code minecraft:players_nether_portal_creative_delay}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> PLAYERS_NETHER_PORTAL_CREATIVE_DELAY = create(key("players_nether_portal_creative_delay"));
/**
* {@code minecraft:players_nether_portal_default_delay}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> PLAYERS_NETHER_PORTAL_DEFAULT_DELAY = create(key("players_nether_portal_default_delay"));
/**
* {@code minecraft:players_sleeping_percentage}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> PLAYERS_SLEEPING_PERCENTAGE = create(key("players_sleeping_percentage"));
/**
* {@code minecraft:projectiles_can_break_blocks}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> PROJECTILES_CAN_BREAK_BLOCKS = create(key("projectiles_can_break_blocks"));
/**
* {@code minecraft:pvp}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> PVP = create(key("pvp"));
/**
* {@code minecraft:raids}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> RAIDS = create(key("raids"));
/**
* {@code minecraft:random_tick_speed}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> RANDOM_TICK_SPEED = create(key("random_tick_speed"));
/**
* {@code minecraft:reduced_debug_info}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> REDUCED_DEBUG_INFO = create(key("reduced_debug_info"));
/**
* {@code minecraft:respawn_radius}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> RESPAWN_RADIUS = create(key("respawn_radius"));
/**
* {@code minecraft:send_command_feedback}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> SEND_COMMAND_FEEDBACK = create(key("send_command_feedback"));
/**
* {@code minecraft:show_advancement_messages}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> SHOW_ADVANCEMENT_MESSAGES = create(key("show_advancement_messages"));
/**
* {@code minecraft:show_death_messages}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> SHOW_DEATH_MESSAGES = create(key("show_death_messages"));
/**
* {@code minecraft:spawn_mobs}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> SPAWN_MOBS = create(key("spawn_mobs"));
/**
* {@code minecraft:spawn_monsters}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> SPAWN_MONSTERS = create(key("spawn_monsters"));
/**
* {@code minecraft:spawn_patrols}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> SPAWN_PATROLS = create(key("spawn_patrols"));
/**
* {@code minecraft:spawn_phantoms}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> SPAWN_PHANTOMS = create(key("spawn_phantoms"));
/**
* {@code minecraft:spawn_wandering_traders}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> SPAWN_WANDERING_TRADERS = create(key("spawn_wandering_traders"));
/**
* {@code minecraft:spawn_wardens}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> SPAWN_WARDENS = create(key("spawn_wardens"));
/**
* {@code minecraft:spawner_blocks_work}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> SPAWNER_BLOCKS_WORK = create(key("spawner_blocks_work"));
/**
* {@code minecraft:spectators_generate_chunks}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> SPECTATORS_GENERATE_CHUNKS = create(key("spectators_generate_chunks"));
/**
* {@code minecraft:spread_vines}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> SPREAD_VINES = create(key("spread_vines"));
/**
* {@code minecraft:tnt_explodes}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> TNT_EXPLODES = create(key("tnt_explodes"));
/**
* {@code minecraft:tnt_explosion_drop_decay}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> TNT_EXPLOSION_DROP_DECAY = create(key("tnt_explosion_drop_decay"));
/**
* {@code minecraft:universal_anger}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> UNIVERSAL_ANGER = create(key("universal_anger"));
/**
* {@code minecraft:water_source_conversion}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> WATER_SOURCE_CONVERSION = create(key("water_source_conversion"));
private GameRuleKeys() {
}
private static TypedKey<GameRule<?>> create(final Key key) {
return TypedKey.create(RegistryKey.GAME_RULE, key);
}
}
@@ -1383,13 +1383,6 @@ public final class ItemTypeKeys {
*/
public static final TypedKey<ItemType> CALIBRATED_SCULK_SENSOR = create(key("calibrated_sculk_sensor"));
/**
* {@code minecraft:camel_husk_spawn_egg}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> CAMEL_HUSK_SPAWN_EGG = create(key("camel_husk_spawn_egg"));
/**
* {@code minecraft:camel_spawn_egg}
*
@@ -2146,13 +2139,6 @@ public final class ItemTypeKeys {
*/
public static final TypedKey<ItemType> COPPER_LEGGINGS = create(key("copper_leggings"));
/**
* {@code minecraft:copper_nautilus_armor}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> COPPER_NAUTILUS_ARMOR = create(key("copper_nautilus_armor"));
/**
* {@code minecraft:copper_nugget}
*
@@ -2181,13 +2167,6 @@ public final class ItemTypeKeys {
*/
public static final TypedKey<ItemType> COPPER_SHOVEL = create(key("copper_shovel"));
/**
* {@code minecraft:copper_spear}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> COPPER_SPEAR = create(key("copper_spear"));
/**
* {@code minecraft:copper_sword}
*
@@ -3084,13 +3063,6 @@ public final class ItemTypeKeys {
*/
public static final TypedKey<ItemType> DIAMOND_LEGGINGS = create(key("diamond_leggings"));
/**
* {@code minecraft:diamond_nautilus_armor}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> DIAMOND_NAUTILUS_ARMOR = create(key("diamond_nautilus_armor"));
/**
* {@code minecraft:diamond_ore}
*
@@ -3112,13 +3084,6 @@ public final class ItemTypeKeys {
*/
public static final TypedKey<ItemType> DIAMOND_SHOVEL = create(key("diamond_shovel"));
/**
* {@code minecraft:diamond_spear}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> DIAMOND_SPEAR = create(key("diamond_spear"));
/**
* {@code minecraft:diamond_sword}
*
@@ -3959,13 +3924,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}
*
@@ -3994,13 +3952,6 @@ public final class ItemTypeKeys {
*/
public static final TypedKey<ItemType> GOLDEN_LEGGINGS = create(key("golden_leggings"));
/**
* {@code minecraft:golden_nautilus_armor}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> GOLDEN_NAUTILUS_ARMOR = create(key("golden_nautilus_armor"));
/**
* {@code minecraft:golden_pickaxe}
*
@@ -4015,13 +3966,6 @@ public final class ItemTypeKeys {
*/
public static final TypedKey<ItemType> GOLDEN_SHOVEL = create(key("golden_shovel"));
/**
* {@code minecraft:golden_spear}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> GOLDEN_SPEAR = create(key("golden_spear"));
/**
* {@code minecraft:golden_sword}
*
@@ -4624,13 +4568,6 @@ public final class ItemTypeKeys {
*/
public static final TypedKey<ItemType> IRON_LEGGINGS = create(key("iron_leggings"));
/**
* {@code minecraft:iron_nautilus_armor}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> IRON_NAUTILUS_ARMOR = create(key("iron_nautilus_armor"));
/**
* {@code minecraft:iron_nugget}
*
@@ -4659,13 +4596,6 @@ public final class ItemTypeKeys {
*/
public static final TypedKey<ItemType> IRON_SHOVEL = create(key("iron_shovel"));
/**
* {@code minecraft:iron_spear}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> IRON_SPEAR = create(key("iron_spear"));
/**
* {@code minecraft:iron_sword}
*
@@ -6010,13 +5940,6 @@ public final class ItemTypeKeys {
*/
public static final TypedKey<ItemType> NAUTILUS_SHELL = create(key("nautilus_shell"));
/**
* {@code minecraft:nautilus_spawn_egg}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> NAUTILUS_SPAWN_EGG = create(key("nautilus_spawn_egg"));
/**
* {@code minecraft:nether_brick}
*
@@ -6143,13 +6066,6 @@ public final class ItemTypeKeys {
*/
public static final TypedKey<ItemType> NETHERITE_HOE = create(key("netherite_hoe"));
/**
* {@code minecraft:netherite_horse_armor}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> NETHERITE_HORSE_ARMOR = create(key("netherite_horse_armor"));
/**
* {@code minecraft:netherite_ingot}
*
@@ -6164,13 +6080,6 @@ public final class ItemTypeKeys {
*/
public static final TypedKey<ItemType> NETHERITE_LEGGINGS = create(key("netherite_leggings"));
/**
* {@code minecraft:netherite_nautilus_armor}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> NETHERITE_NAUTILUS_ARMOR = create(key("netherite_nautilus_armor"));
/**
* {@code minecraft:netherite_pickaxe}
*
@@ -6192,13 +6101,6 @@ public final class ItemTypeKeys {
*/
public static final TypedKey<ItemType> NETHERITE_SHOVEL = create(key("netherite_shovel"));
/**
* {@code minecraft:netherite_spear}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> NETHERITE_SPEAR = create(key("netherite_spear"));
/**
* {@code minecraft:netherite_sword}
*
@@ -6808,13 +6710,6 @@ public final class ItemTypeKeys {
*/
public static final TypedKey<ItemType> PAPER = create(key("paper"));
/**
* {@code minecraft:parched_spawn_egg}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> PARCHED_SPAWN_EGG = create(key("parched_spawn_egg"));
/**
* {@code minecraft:parrot_spawn_egg}
*
@@ -8838,13 +8733,6 @@ public final class ItemTypeKeys {
*/
public static final TypedKey<ItemType> STONE_SLAB = create(key("stone_slab"));
/**
* {@code minecraft:stone_spear}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> STONE_SPEAR = create(key("stone_spear"));
/**
* {@code minecraft:stone_stairs}
*
@@ -10385,13 +10273,6 @@ public final class ItemTypeKeys {
*/
public static final TypedKey<ItemType> WOODEN_SHOVEL = create(key("wooden_shovel"));
/**
* {@code minecraft:wooden_spear}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> WOODEN_SPEAR = create(key("wooden_spear"));
/**
* {@code minecraft:wooden_sword}
*
@@ -10539,13 +10420,6 @@ public final class ItemTypeKeys {
*/
public static final TypedKey<ItemType> ZOMBIE_HORSE_SPAWN_EGG = create(key("zombie_horse_spawn_egg"));
/**
* {@code minecraft:zombie_nautilus_spawn_egg}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> ZOMBIE_NAUTILUS_SPAWN_EGG = create(key("zombie_nautilus_spawn_egg"));
/**
* {@code minecraft:zombie_spawn_egg}
*
@@ -46,13 +46,6 @@ public final class MobEffectKeys {
*/
public static final TypedKey<PotionEffectType> BLINDNESS = create(key("blindness"));
/**
* {@code minecraft:breath_of_the_nautilus}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotionEffectType> BREATH_OF_THE_NAUTILUS = create(key("breath_of_the_nautilus"));
/**
* {@code minecraft:conduit_power}
*
@@ -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);
}
}
@@ -1,181 +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.entity.poi.PoiType;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key;
import org.jspecify.annotations.NullMarked;
/**
* Vanilla keys for {@link RegistryKey#POINT_OF_INTEREST_TYPE}.
*
* @apiNote The fields provided here are a direct representation of
* what is available from the vanilla game source. They may be
* changed (including removals) on any Minecraft version
* bump, so cross-version compatibility is not provided on the
* same level as it is on most of the other API.
*/
@SuppressWarnings({
"unused",
"SpellCheckingInspection"
})
@NullMarked
@GeneratedClass
public final class PoiTypeKeys {
/**
* {@code minecraft:armorer}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PoiType> ARMORER = create(key("armorer"));
/**
* {@code minecraft:bee_nest}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PoiType> BEE_NEST = create(key("bee_nest"));
/**
* {@code minecraft:beehive}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PoiType> BEEHIVE = create(key("beehive"));
/**
* {@code minecraft:butcher}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PoiType> BUTCHER = create(key("butcher"));
/**
* {@code minecraft:cartographer}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PoiType> CARTOGRAPHER = create(key("cartographer"));
/**
* {@code minecraft:cleric}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PoiType> CLERIC = create(key("cleric"));
/**
* {@code minecraft:farmer}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PoiType> FARMER = create(key("farmer"));
/**
* {@code minecraft:fisherman}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PoiType> FISHERMAN = create(key("fisherman"));
/**
* {@code minecraft:fletcher}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PoiType> FLETCHER = create(key("fletcher"));
/**
* {@code minecraft:home}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PoiType> HOME = create(key("home"));
/**
* {@code minecraft:leatherworker}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PoiType> LEATHERWORKER = create(key("leatherworker"));
/**
* {@code minecraft:librarian}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PoiType> LIBRARIAN = create(key("librarian"));
/**
* {@code minecraft:lightning_rod}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PoiType> LIGHTNING_ROD = create(key("lightning_rod"));
/**
* {@code minecraft:lodestone}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PoiType> LODESTONE = create(key("lodestone"));
/**
* {@code minecraft:mason}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PoiType> MASON = create(key("mason"));
/**
* {@code minecraft:meeting}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PoiType> MEETING = create(key("meeting"));
/**
* {@code minecraft:nether_portal}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PoiType> NETHER_PORTAL = create(key("nether_portal"));
/**
* {@code minecraft:shepherd}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PoiType> SHEPHERD = create(key("shepherd"));
/**
* {@code minecraft:test_instance}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PoiType> TEST_INSTANCE = create(key("test_instance"));
/**
* {@code minecraft:toolsmith}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PoiType> TOOLSMITH = create(key("toolsmith"));
/**
* {@code minecraft:weaponsmith}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PoiType> WEAPONSMITH = create(key("weaponsmith"));
private PoiTypeKeys() {
}
private static TypedKey<PoiType> create(final Key key) {
return TypedKey.create(RegistryKey.POINT_OF_INTEREST_TYPE, key);
}
}
File diff suppressed because it is too large. Load diff
@@ -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.ZombieNautilus;
import org.jspecify.annotations.NullMarked;
/**
* Vanilla keys for {@link RegistryKey#ZOMBIE_NAUTILUS_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 ZombieNautilusVariantKeys {
/**
* {@code minecraft:temperate}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ZombieNautilus.Variant> TEMPERATE = create(key("temperate"));
/**
* {@code minecraft:warm}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ZombieNautilus.Variant> WARM = create(key("warm"));
private ZombieNautilusVariantKeys() {
}
/**
* Creates a typed key for {@link ZombieNautilus.Variant} in the registry {@code minecraft:zombie_nautilus_variant}.
*
* @param key the value's key in the registry
* @return a new typed key
*/
public static TypedKey<ZombieNautilus.Variant> create(final Key key) {
return TypedKey.create(RegistryKey.ZOMBIE_NAUTILUS_VARIANT, key);
}
}
@@ -39,6 +39,13 @@ public final class BiomeTagKeys {
*/
public static final TagKey<Biome> ALLOWS_TROPICAL_FISH_SPAWNS_AT_ANY_HEIGHT = create(key("allows_tropical_fish_spawns_at_any_height"));
/**
* {@code #minecraft:has_closer_water_fog}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Biome> HAS_CLOSER_WATER_FOG = create(key("has_closer_water_fog"));
/**
* {@code #minecraft:has_structure/ancient_city}
*
@@ -277,6 +284,13 @@ public final class BiomeTagKeys {
*/
public static final TagKey<Biome> HAS_STRUCTURE_WOODLAND_MANSION = create(key("has_structure/woodland_mansion"));
/**
* {@code #minecraft:increased_fire_burnout}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Biome> INCREASED_FIRE_BURNOUT = create(key("increased_fire_burnout"));
/**
* {@code #minecraft:is_badlands}
*
@@ -389,6 +403,13 @@ public final class BiomeTagKeys {
*/
public static final TagKey<Biome> MORE_FREQUENT_DROWNED_SPAWNS = create(key("more_frequent_drowned_spawns"));
/**
* {@code #minecraft:plays_underwater_music}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Biome> PLAYS_UNDERWATER_MUSIC = create(key("plays_underwater_music"));
/**
* {@code #minecraft:polar_bears_spawn_on_alternate_blocks}
*
@@ -417,6 +438,13 @@ public final class BiomeTagKeys {
*/
public static final TagKey<Biome> REQUIRED_OCEAN_MONUMENT_SURROUNDING = create(key("required_ocean_monument_surrounding"));
/**
* {@code #minecraft:snow_golem_melts}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Biome> SNOW_GOLEM_MELTS = create(key("snow_golem_melts"));
/**
* {@code #minecraft:spawns_cold_variant_farm_animals}
*
@@ -431,13 +459,6 @@ public final class BiomeTagKeys {
*/
public static final TagKey<Biome> SPAWNS_COLD_VARIANT_FROGS = create(key("spawns_cold_variant_frogs"));
/**
* {@code #minecraft:spawns_coral_variant_zombie_nautilus}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Biome> SPAWNS_CORAL_VARIANT_ZOMBIE_NAUTILUS = create(key("spawns_coral_variant_zombie_nautilus"));
/**
* {@code #minecraft:spawns_gold_rabbits}
*
@@ -487,6 +508,13 @@ public final class BiomeTagKeys {
*/
public static final TagKey<Biome> WATER_ON_MAP_OUTLINES = create(key("water_on_map_outlines"));
/**
* {@code #minecraft:without_patrol_spawns}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Biome> WITHOUT_PATROL_SPAWNS = create(key("without_patrol_spawns"));
/**
* {@code #minecraft:without_wandering_trader_spawns}
*
@@ -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}
@@ -242,13 +242,6 @@ public final class BlockTypeTagKeys {
*/
public static final TagKey<BlockType> CAMPFIRES = create(key("campfires"));
/**
* {@code #minecraft:can_glide_through}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> CAN_GLIDE_THROUGH = create(key("can_glide_through"));
/**
* {@code #minecraft:candle_cakes}
*
@@ -263,34 +256,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 +473,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 +494,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 +564,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 +606,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 +627,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 +634,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 +865,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 +873,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 +928,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 +998,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 +1089,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 +1138,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 +1222,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}
*
@@ -81,13 +81,6 @@ public final class EntityTypeTagKeys {
*/
public static final TagKey<EntityType> BOAT = create(key("boat"));
/**
* {@code #minecraft:burn_in_daylight}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<EntityType> BURN_IN_DAYLIGHT = create(key("burn_in_daylight"));
/**
* {@code #minecraft:can_breathe_under_water}
*
@@ -109,13 +102,6 @@ public final class EntityTypeTagKeys {
*/
public static final TagKey<EntityType> CAN_EQUIP_SADDLE = create(key("can_equip_saddle"));
/**
* {@code #minecraft:can_float_while_ridden}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<EntityType> CAN_FLOAT_WHILE_RIDDEN = create(key("can_float_while_ridden"));
/**
* {@code #minecraft:can_turn_in_boats}
*
@@ -130,13 +116,6 @@ public final class EntityTypeTagKeys {
*/
public static final TagKey<EntityType> CAN_WEAR_HORSE_ARMOR = create(key("can_wear_horse_armor"));
/**
* {@code #minecraft:can_wear_nautilus_armor}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<EntityType> CAN_WEAR_NAUTILUS_ARMOR = create(key("can_wear_nautilus_armor"));
/**
* {@code #minecraft:candidate_for_iron_golem_gift}
*
@@ -144,13 +123,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}
*
@@ -256,13 +228,6 @@ public final class EntityTypeTagKeys {
*/
public static final TagKey<EntityType> INVERTED_HEALING_AND_HARM = create(key("inverted_healing_and_harm"));
/**
* {@code #minecraft:nautilus_hostiles}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<EntityType> NAUTILUS_HOSTILES = create(key("nautilus_hostiles"));
/**
* {@code #minecraft:no_anger_from_wind_charge}
*
@@ -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}
*
@@ -172,13 +172,6 @@ public final class ItemTypeTagKeys {
*/
public static final TagKey<ItemType> CAMEL_FOOD = create(key("camel_food"));
/**
* {@code #minecraft:camel_husk_food}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<ItemType> CAMEL_HUSK_FOOD = create(key("camel_husk_food"));
/**
* {@code #minecraft:candles}
*
@@ -186,13 +179,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 +186,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 +390,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}
@@ -508,13 +487,6 @@ public final class ItemTypeTagKeys {
*/
public static final TagKey<ItemType> ENCHANTABLE_LEG_ARMOR = create(key("enchantable/leg_armor"));
/**
* {@code #minecraft:enchantable/lunge}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<ItemType> ENCHANTABLE_LUNGE = create(key("enchantable/lunge"));
/**
* {@code #minecraft:enchantable/mace}
*
@@ -522,13 +494,6 @@ public final class ItemTypeTagKeys {
*/
public static final TagKey<ItemType> ENCHANTABLE_MACE = create(key("enchantable/mace"));
/**
* {@code #minecraft:enchantable/melee_weapon}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<ItemType> ENCHANTABLE_MELEE_WEAPON = create(key("enchantable/melee_weapon"));
/**
* {@code #minecraft:enchantable/mining}
*
@@ -551,11 +516,11 @@ public final class ItemTypeTagKeys {
public static final TagKey<ItemType> ENCHANTABLE_SHARP_WEAPON = create(key("enchantable/sharp_weapon"));
/**
* {@code #minecraft:enchantable/sweeping}
* {@code #minecraft:enchantable/sword}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<ItemType> ENCHANTABLE_SWEEPING = create(key("enchantable/sweeping"));
public static final TagKey<ItemType> ENCHANTABLE_SWORD = create(key("enchantable/sword"));
/**
* {@code #minecraft:enchantable/trident}
@@ -669,13 +634,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 +795,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,48 +816,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}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<ItemType> NAUTILUS_BUCKET_FOOD = create(key("nautilus_bucket_food"));
/**
* {@code #minecraft:nautilus_food}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<ItemType> NAUTILUS_FOOD = create(key("nautilus_food"));
/**
* {@code #minecraft:nautilus_taming_items}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<ItemType> NAUTILUS_TAMING_ITEMS = create(key("nautilus_taming_items"));
/**
* {@code #minecraft:netherite_tool_materials}
*
@@ -1229,13 +1131,6 @@ public final class ItemTypeTagKeys {
*/
public static final TagKey<ItemType> SOUL_FIRE_BASE_BLOCKS = create(key("soul_fire_base_blocks"));
/**
* {@code #minecraft:spears}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<ItemType> SPEARS = create(key("spears"));
/**
* {@code #minecraft:spruce_logs}
*
@@ -1376,13 +1271,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}
*
@@ -1467,13 +1355,6 @@ public final class ItemTypeTagKeys {
*/
public static final TagKey<ItemType> WOOL_CARPETS = create(key("wool_carpets"));
/**
* {@code #minecraft:zombie_horse_food}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<ItemType> ZOMBIE_HORSE_FOOD = create(key("zombie_horse_food"));
private ItemTypeTagKeys() {
}
@@ -1,61 +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.entity.poi.PoiType;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.tag.TagKey;
import net.kyori.adventure.key.Key;
import org.jspecify.annotations.NullMarked;
/**
* Vanilla tag keys for {@link RegistryKey#POINT_OF_INTEREST_TYPE}.
*
* @apiNote The fields provided here are a direct representation of
* what is available from the vanilla game source. They may be
* changed (including removals) on any Minecraft version
* bump, so cross-version compatibility is not provided on the
* same level as it is on most of the other API.
*/
@SuppressWarnings({
"unused",
"SpellCheckingInspection"
})
@NullMarked
@GeneratedClass
public final class PoiTypeTagKeys {
/**
* {@code #minecraft:acquirable_job_site}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<PoiType> ACQUIRABLE_JOB_SITE = create(key("acquirable_job_site"));
/**
* {@code #minecraft:bee_home}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<PoiType> BEE_HOME = create(key("bee_home"));
/**
* {@code #minecraft:village}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<PoiType> VILLAGE = create(key("village"));
private PoiTypeTagKeys() {
}
/**
* Creates a tag key for {@link PoiType} in the registry {@code minecraft:point_of_interest_type}.
*
* @param key the tag key's key
* @return a new tag key
*/
public static TagKey<PoiType> create(final Key key) {
return TagKey.create(RegistryKey.POINT_OF_INTEREST_TYPE, key);
}
}
@@ -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);
}
}
@@ -134,7 +134,7 @@ public class TimingHistory {
}
}
return pair(
worldMap.get(world.key().asString()),
worldMap.get(world.getName()),
toArrayMapper(regions.values(),new Function<RegionData, Object>() {
@NotNull
@Override
@@ -125,11 +125,10 @@ public class MaterialTags {
/**
* Covers all dyes.
*
* @deprecated in favour of {@link Tag#ITEMS_DYES}
*/
@Deprecated(since = "26.1")
public static final MaterialSetTag DYES = replacedBy(Tag.ITEMS_DYES);
public static final MaterialSetTag DYES = new MaterialSetTag(keyFor("dyes"))
.endsWith("_DYE")
.ensureSize("DYES", 16).lock();
/**
* Covers all variants of gates.
@@ -203,7 +202,7 @@ public class MaterialTags {
*/
public static final MaterialSetTag HORSE_ARMORS = new MaterialSetTag(keyFor("horse_armors"))
.endsWith("_HORSE_ARMOR")
.ensureSize("HORSE_ARMORS", 6).lock();
.ensureSize("HORSE_ARMORS", 5).lock();
/**
* Covers the variants of infested blocks.
@@ -341,7 +340,7 @@ public class MaterialTags {
*/
public static final MaterialSetTag SPAWN_EGGS = new MaterialSetTag(keyFor("spawn_eggs"))
.endsWith("_SPAWN_EGG")
.ensureSize("SPAWN_EGGS", 87).lock();
.ensureSize("SPAWN_EGGS", 83).lock();
/**
* Covers all colors of stained glass.
@@ -678,7 +677,6 @@ public class MaterialTags {
.not(Material.COPPER_HORSE_ARMOR, Material.COPPER_GOLEM_SPAWN_EGG)
.not(Material.COPPER_HELMET, Material.COPPER_CHESTPLATE, Material.COPPER_LEGGINGS, Material.COPPER_BOOTS)
.not(Material.COPPER_AXE, Material.COPPER_HOE, Material.COPPER_PICKAXE, Material.COPPER_SHOVEL, Material.COPPER_SWORD)
.not(Material.COPPER_NAUTILUS_ARMOR, Material.COPPER_SPEAR)
.ensureSize("UNAFFECTED_COPPER_BLOCKS", 30).lock();
/**
@@ -740,49 +738,49 @@ public class MaterialTags {
* Covers all Wooden Tools.
*/
public static final MaterialSetTag WOODEN_TOOLS = new MaterialSetTag(keyFor("wooden_tools"))
.add(Material.WOODEN_AXE, Material.WOODEN_HOE, Material.WOODEN_PICKAXE, Material.WOODEN_SHOVEL, Material.WOODEN_SWORD, Material.WOODEN_SPEAR)
.lock();
.add(Material.WOODEN_AXE, Material.WOODEN_HOE, Material.WOODEN_PICKAXE, Material.WOODEN_SHOVEL, Material.WOODEN_SWORD)
.ensureSize("WOODEN_TOOLS", 5).lock();
/**
* Covers all Stone Tools.
*/
public static final MaterialSetTag STONE_TOOLS = new MaterialSetTag(keyFor("stone_tools"))
.add(Material.STONE_AXE, Material.STONE_HOE, Material.STONE_PICKAXE, Material.STONE_SHOVEL, Material.STONE_SWORD, Material.STONE_SPEAR)
.lock();
.add(Material.STONE_AXE, Material.STONE_HOE, Material.STONE_PICKAXE, Material.STONE_SHOVEL, Material.STONE_SWORD)
.ensureSize("STONE_TOOLS", 5).lock();
/**
* Covers all copper Tools.
*/
public static final MaterialSetTag COPPER_TOOLS = new MaterialSetTag(keyFor("copper_tools"))
.add(Material.COPPER_AXE, Material.COPPER_HOE, Material.COPPER_PICKAXE, Material.COPPER_SHOVEL, Material.COPPER_SWORD, Material.COPPER_SPEAR)
.lock();
.add(Material.COPPER_AXE, Material.COPPER_HOE, Material.COPPER_PICKAXE, Material.COPPER_SHOVEL, Material.COPPER_SWORD)
.ensureSize("COPPER_TOOLS", 5).lock();
/**
* Covers all Iron Tools.
*/
public static final MaterialSetTag IRON_TOOLS = new MaterialSetTag(keyFor("iron_tools"))
.add(Material.IRON_AXE, Material.IRON_HOE, Material.IRON_PICKAXE, Material.IRON_SHOVEL, Material.IRON_SWORD, Material.IRON_SPEAR)
.lock();
.add(Material.IRON_AXE, Material.IRON_HOE, Material.IRON_PICKAXE, Material.IRON_SHOVEL, Material.IRON_SWORD)
.ensureSize("IRON_TOOLS", 5).lock();
/**
* Covers all Gold Tools.
*/
public static final MaterialSetTag GOLDEN_TOOLS = new MaterialSetTag(keyFor("golden_tools"))
.add(Material.GOLDEN_AXE, Material.GOLDEN_HOE, Material.GOLDEN_PICKAXE, Material.GOLDEN_SHOVEL, Material.GOLDEN_SWORD, Material.GOLDEN_SPEAR)
.lock();
.add(Material.GOLDEN_AXE, Material.GOLDEN_HOE, Material.GOLDEN_PICKAXE, Material.GOLDEN_SHOVEL, Material.GOLDEN_SWORD)
.ensureSize("GOLDEN_TOOLS", 5).lock();
/**
* Covers all Diamond Tools.
*/
public static final MaterialSetTag DIAMOND_TOOLS = new MaterialSetTag(keyFor("diamond_tools"))
.add(Material.DIAMOND_AXE, Material.DIAMOND_HOE, Material.DIAMOND_PICKAXE, Material.DIAMOND_SHOVEL, Material.DIAMOND_SWORD, Material.DIAMOND_SPEAR)
.lock();
.add(Material.DIAMOND_AXE, Material.DIAMOND_HOE, Material.DIAMOND_PICKAXE, Material.DIAMOND_SHOVEL, Material.DIAMOND_SWORD)
.ensureSize("DIAMOND_TOOLS", 5).lock();
/**
* Covers all Netherite Tools.
*/
public static final MaterialSetTag NETHERITE_TOOLS = new MaterialSetTag(keyFor("netherite_tools"))
.add(Material.NETHERITE_AXE, Material.NETHERITE_HOE, Material.NETHERITE_PICKAXE, Material.NETHERITE_SHOVEL, Material.NETHERITE_SWORD, Material.NETHERITE_SPEAR)
.lock();
.add(Material.NETHERITE_AXE, Material.NETHERITE_HOE, Material.NETHERITE_PICKAXE, Material.NETHERITE_SHOVEL, Material.NETHERITE_SWORD)
.ensureSize("NETHERITE_TOOLS", 5).lock();
}
@@ -75,7 +75,7 @@ public final class NamespacedTag implements com.destroystokyo.paper.Namespaced {
Preconditions.checkArgument(key != null, "Key cannot be null");
this.namespace = plugin.getName().toLowerCase(Locale.ROOT);
this.key = key.toLowerCase(Locale.ROOT);
this.key = key.toLowerCase().toLowerCase(Locale.ROOT);
// Check validity after normalization
Preconditions.checkArgument(VALID_NAMESPACE.matcher(this.namespace).matches(), "Invalid namespace. Must be [a-z0-9._-]: %s", this.namespace);
@@ -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());
@@ -421,7 +422,7 @@ public class ParticleBuilder implements Cloneable {
/**
* Sets the particle Color.
* Only valid for particles with a data type of {@link Color}, {@link Particle.DustOptions} or {@link Particle.Spell}.
* Only valid for particles with a data type of {@link Color} or {@link Particle.DustOptions}.
*
* @param color the new particle color
* @return a reference to this object.
@@ -434,37 +435,33 @@ public class ParticleBuilder implements Cloneable {
}
/**
* Sets the particle Color and size or power.
* Only valid for particles with a data type of {@link Particle.DustOptions} or {@link Particle.Spell}.
* Sets the particle Color and size.
* Only valid for particles with a data type of {@link Particle.DustOptions}.
*
* @param color the new particle color
* @param value the size or power of the particle
* @param size the size of the particle
* @return a reference to this object.
*/
public ParticleBuilder color(final @Nullable Color color, final float value) {
if (this.particle.getDataType() != Particle.DustOptions.class && this.particle.getDataType() != Particle.Spell.class && color != null) {
throw new IllegalStateException("The combination of Color and float value cannot be set on this particle type.");
public ParticleBuilder color(final @Nullable Color color, final float size) {
if (this.particle.getDataType() != Particle.DustOptions.class && color != null) {
throw new IllegalStateException("The combination of Color and size cannot be set on this particle type.");
}
// We don't officially support reusing these objects, but here we go
if (color == null) {
if (this.data instanceof Particle.DustOptions || this.data instanceof Particle.Spell) {
if (this.data instanceof Particle.DustOptions) {
return this.data(null);
} else {
return this;
}
}
if (this.particle.getDataType() == Particle.DustOptions.class) {
return this.data(new Particle.DustOptions(color, value));
} else {
return this.data(new Particle.Spell(color, value));
}
return this.data(new Particle.DustOptions(color, size));
}
/**
* Sets the particle Color.
* Only valid for particles with a data type of {@link Color}, {@link Particle.DustOptions} or {@link Particle.Spell}.
* Only valid for particles with a data type of {@link Color} or {@link Particle.DustOptions}.
*
* @param r red color component
* @param g green color component
@@ -477,7 +474,7 @@ public class ParticleBuilder implements Cloneable {
/**
* Sets the particle Color.
* Only valid for particles with a data type of {@link Color}, {@link Particle.DustOptions} or {@link Particle.Spell}.
* Only valid for particles with a data type of {@link Color} or {@link Particle.DustOptions}.
* <p>
* This method detects if the provided color integer is in RGB or ARGB format.
* If the alpha channel is zero, it treats the color as RGB. Otherwise, it treats it as ARGB.
@@ -496,7 +493,7 @@ public class ParticleBuilder implements Cloneable {
/**
* Sets the particle Color.
* Only valid for particles with a data type of {@link Color}, {@link Particle.DustOptions} or {@link Particle.Spell}.
* Only valid for particles with a data type of {@link Color} or {@link Particle.DustOptions}.
*
* @param a alpha color component
* @param r red color component
@@ -3,7 +3,6 @@ package com.destroystokyo.paper.entity;
import java.util.List;
import org.bukkit.Location;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Entity;
import org.bukkit.entity.Mob;
import org.jspecify.annotations.NullMarked;
import org.jspecify.annotations.Nullable;
@@ -46,7 +45,7 @@ public interface Pathfinder {
@Nullable PathResult findPath(Location loc);
/**
* Calculates a destination for the Entity to navigate to reach the target entity,
* Calculates a destination for the Entity to navigate to to reach the target entity,
* but does not set it as the current target.
* Useful for calculating what would happen before setting it.
* <p>
@@ -58,25 +57,7 @@ public interface Pathfinder {
* @param target the Entity to navigate to
* @return The closest Location the Entity can get to for this navigation, or null if no path could be calculated
*/
@Nullable
default PathResult findPath(LivingEntity target) {
return this.findPath((Entity) target);
}
/**
* Calculates a destination for the Entity to navigate to reach the target entity,
* but does not set it as the current target.
* Useful for calculating what would happen before setting it.
* <p>
* The behavior of this PathResult is subject to the games pathfinding rules, and may
* result in the pathfinding automatically updating to follow the target Entity.
* <p>
* However, this behavior is not guaranteed, and is subject to the game's behavior.
*
* @param target the Entity to navigate to
* @return The closest Location the Entity can get to for this navigation, or null if no path could be calculated
*/
@Nullable PathResult findPath(Entity target);
@Nullable PathResult findPath(LivingEntity target);
/**
* Calculates a destination for the Entity to navigate to, and sets it with default speed
@@ -103,7 +84,7 @@ public interface Pathfinder {
}
/**
* Calculates a destination for the Entity to navigate to reach the target entity,
* Calculates a destination for the Entity to navigate to to reach the target entity,
* and sets it with default speed.
* <p>
* The behavior of this PathResult is subject to the games pathfinding rules, and may
@@ -119,7 +100,7 @@ public interface Pathfinder {
}
/**
* Calculates a destination for the Entity to navigate to reach the target entity,
* Calculates a destination for the Entity to navigate to to reach the target entity,
* and sets it with specified speed.
* <p>
* The behavior of this PathResult is subject to the games pathfinding rules, and may
@@ -132,39 +113,6 @@ public interface Pathfinder {
* @return If the pathfinding was successfully started
*/
default boolean moveTo(LivingEntity target, double speed) {
return this.moveTo((Entity) target, speed);
}
/**
* Calculates a destination for the Entity to navigate to reach the target entity,
* and sets it with default speed.
* <p>
* The behavior of this PathResult is subject to the games pathfinding rules, and may
* result in the pathfinding automatically updating to follow the target Entity.
* <p>
* However, this behavior is not guaranteed, and is subject to the game's behavior.
*
* @param target the Entity to navigate to
* @return If the pathfinding was successfully started
*/
default boolean moveTo(Entity target) {
return this.moveTo(target, 1);
}
/**
* Calculates a destination for the Entity to navigate to reach the target entity,
* and sets it with specified speed.
* <p>
* The behavior of this PathResult is subject to the games pathfinding rules, and may
* result in the pathfinding automatically updating to follow the target Entity.
* <p>
* However, this behavior is not guaranteed, and is subject to the game's behavior.
*
* @param target the Entity to navigate to
* @param speed Speed multiplier to navigate at, where 1 is 'normal'
* @return If the pathfinding was successfully started
*/
default boolean moveTo(Entity target, double speed) {
PathResult path = this.findPath(target);
return path != null && this.moveTo(path, speed);
}
@@ -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);
}
@@ -9,16 +9,9 @@ import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Called when processing a player's attack on an entity when the player's attack strength cooldown is reset.
*
* @deprecated In modern Minecraft, this does not properly represent spear attacks and additionally does not
* cover the wide range of ways that the cooldown may be reset.
* <p>
* Additionally, the cancellation of event is misleading as the client will reset the cooldown manually.
* So there is no way for the server to control this.
* Called when processing a player's attack on an entity when the player's attack strength cooldown is reset
*/
@NullMarked
@Deprecated(since = "26.1", forRemoval = true)
public class PlayerAttackEntityCooldownResetEvent extends PlayerEvent implements Cancellable {
private static final HandlerList HANDLER_LIST = new HandlerList();
@@ -240,8 +240,6 @@ public class AsyncTabCompleteEvent extends Event implements Cancellable {
/**
* A rich tab completion, consisting of a string suggestion, and a nullable {@link Component} tooltip.
* <p>
* <b>Warning:</b> In a future update, this class will no longer implement {@link Examinable}.
*/
public interface Completion extends Examinable {
@@ -260,7 +258,6 @@ public class AsyncTabCompleteEvent extends Event implements Cancellable {
@Nullable Component tooltip();
@Override
@Deprecated(forRemoval = true, since = "1.21.11")
default Stream<? extends ExaminableProperty> examinableProperties() {
return Stream.of(ExaminableProperty.of("suggestion", this.suggestion()), ExaminableProperty.of("tooltip", this.tooltip()));
}
@@ -257,16 +257,16 @@ public interface PlayerProfile extends org.bukkit.profile.PlayerProfile, PlayerH
@Override
default void applySkinToPlayerHeadContents(final PlayerHeadObjectContents.Builder builder) {
if (this.getProperties().isEmpty()) {
if (this.getProperties().isEmpty() && (this.getName() != null) != (this.getId() != null)) {
if (this.getId() != null) {
builder.id(this.getId());
} else if (this.getName() != null) {
} else {
builder.name(this.getName());
}
} else {
builder.id(this.getId())
.name(this.getName())
.profileProperties(this.getProperties().stream().map(prop -> property(prop.getName(), prop.getValue(), prop.getSignature())).toList());
return;
}
builder.id(this.getId())
.name(this.getName())
.profileProperties(this.getProperties().stream().map(prop -> property(prop.getName(), prop.getValue(), prop.getSignature())).toList());
}
}
@@ -3,25 +3,21 @@ package io.papermc.paper;
import com.destroystokyo.paper.SkinParts;
import io.papermc.paper.command.brigadier.CommandSourceStack;
import io.papermc.paper.datacomponent.item.ResolvableProfile;
import io.papermc.paper.entity.poi.PoiType;
import io.papermc.paper.world.damagesource.CombatEntry;
import io.papermc.paper.world.damagesource.FallLocationType;
import java.util.Set;
import java.util.function.Function;
import java.util.function.Predicate;
import net.kyori.adventure.text.Component;
import net.kyori.adventure.util.Services;
import org.bukkit.GameRule;
import org.bukkit.block.Biome;
import org.bukkit.damage.DamageEffect;
import org.bukkit.damage.DamageSource;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Pose;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.Contract;
import org.jspecify.annotations.NullMarked;
import org.jspecify.annotations.Nullable;
import java.util.function.Predicate;
/**
* Static bridge to the server internals.
* <p>
@@ -53,14 +49,6 @@ public interface InternalAPIBridge {
*/
DamageEffect getDamageEffect(String key);
/**
* Creates an occupancy instance for the passed enum entry name.
*
* @param enumNameEntry the enum entry
* @return the occupancy
*/
PoiType.Occupancy createOccupancy(String enumNameEntry);
/**
* Constructs the legacy custom biome instance for the biome enum.
*
@@ -109,8 +97,5 @@ public interface InternalAPIBridge {
SkinParts.Mutable allSkinParts();
Component defaultMannequinDescription();
<MODERN, LEGACY> GameRule<LEGACY> legacyGameRuleBridge(GameRule<MODERN> rule, Function<LEGACY, MODERN> fromLegacyToModern, Function<MODERN, LEGACY> toLegacyFromModern, Class<LEGACY> legacyClass);
Set<Pose> validMannequinPoses();
}
@@ -1,56 +0,0 @@
package io.papermc.paper.block.bed;
import net.kyori.adventure.text.Component;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.Nullable;
/**
* An action type that represents the action that will happen after
* {@link org.bukkit.event.player.PlayerBedEnterEvent} and that is
* happening during {@link io.papermc.paper.event.player.PlayerBedFailEnterEvent}
*/
@ApiStatus.NonExtendable
@ApiStatus.Experimental
public interface BedEnterAction {
/**
* Gets if the player is allowed to sleep in the bed.
* This can be {@link BedRuleResult#ALLOWED} at the same time as {@link #canSetSpawn()}
* <p>
* It is advised to check for {@link BedEnterProblem}s first, as if it returns anything but {@code null}
* the bed interaction is prevented
*
* @return whether the player is allowed to sleep
*/
BedRuleResult canSleep();
/**
* Gets if the player is allowed to save its spawn point in the bed.
* This can be {@link BedRuleResult#ALLOWED} at the same time as {@link #canSleep()}
* <p>
* It is advised to check for {@link BedEnterProblem}s first, as if it returns anything but {@code null}
* the bed interaction is prevented
*
* @return whether the player is allowed to save its spawn point
*/
BedRuleResult canSetSpawn();
/**
* A problem is an issue that prevents the player from sleeping and from saving its spawn point.
* No problem being found doesn't mean the player successfully slept or set its spawn point,
* see {@link #canSleep()} and {@link #canSetSpawn()} for individual successes
*
* @return any of {@link BedEnterProblem}s if one is found, otherwise {@code null}
*/
@Nullable
BedEnterProblem problem();
/**
* Returns the default error message to be shown as an actionbar message to the player
*
* @return the error message
*/
@Nullable
Component errorMessage();
}
@@ -1,27 +0,0 @@
package io.papermc.paper.block.bed;
import java.util.Optional;
import java.util.ServiceLoader;
import org.jetbrains.annotations.ApiStatus;
@ApiStatus.Internal
interface BedEnterActionBridge {
static BedEnterActionBridge instance() {
final class Holder {
static final Optional<BedEnterActionBridge> INSTANCE = ServiceLoader.load(BedEnterActionBridge.class, BedEnterActionBridge.class.getClassLoader()).findFirst();
}
return Holder.INSTANCE.orElseThrow();
}
BedEnterProblem createTooFarAwayProblem();
BedEnterProblem createObstructedProblem();
BedEnterProblem createNotSafeProblem();
BedEnterProblem createExplosionProblem();
BedEnterProblem createOtherProblem();
}
@@ -1,63 +0,0 @@
package io.papermc.paper.block.bed;
import net.kyori.adventure.text.Component;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.Nullable;
/**
* Represents a problem that prevents a player from continuing
* the sleeping process, preventing it from sleeping and from setting
* its spawn point
*/
@ApiStatus.NonExtendable
@ApiStatus.Experimental
public interface BedEnterProblem {
/**
* Happens when the bed is too far away from the player.
* Makes no explosion and has an error message
*
* @see #errorMessage()
*/
BedEnterProblem TOO_FAR_AWAY = BedEnterActionBridge.instance().createTooFarAwayProblem();
/**
* Happens when the bed has blocks one block above it.
* Makes no explosion and has an error message
*
* @see #errorMessage()
*/
BedEnterProblem OBSTRUCTED = BedEnterActionBridge.instance().createObstructedProblem();
/**
* Happens when there are monsters in a 16x10x16 box centered on the bed's head
* and the player is not in creative mode. Makes no explosion and has an error message
*
* @see #errorMessage()
*/
BedEnterProblem NOT_SAFE = BedEnterActionBridge.instance().createNotSafeProblem();
/**
* Happens when the bed is set to explode. This is defined in the environment attributes of the world.
* This doesn't have a fixed error message, see {@link BedEnterAction#errorMessage()}
*/
BedEnterProblem EXPLOSION = BedEnterActionBridge.instance().createExplosionProblem();
/**
* Happens when a player tries to sleep when an invalid state, for example when a player tries
* to sleep but is already sleeping or is dead.
* This doesn't have an error message at all, the interaction is simply discarded
*/
BedEnterProblem OTHER = BedEnterActionBridge.instance().createOtherProblem();
/**
* Returns the error message associated with this problem, if any.
* This component is sent to the client as an actionbar message
* when this problem occur
*
* @return the error message
*/
@Nullable
Component errorMessage();
}
@@ -1,37 +0,0 @@
package io.papermc.paper.block.bed;
import org.jetbrains.annotations.ApiStatus;
/**
* Represents the result of a bed rule during {@link org.bukkit.event.player.PlayerBedEnterEvent}
* and {@link io.papermc.paper.event.player.PlayerBedFailEnterEvent}. Bed rules are responsible
* for allowing players to sleep and to set their spawn point
*/
@ApiStatus.Experimental
public sealed interface BedRuleResult permits BedRuleResultImpl {
/**
* Used when the bed rule is allowed
*/
BedRuleResult ALLOWED = new BedRuleResultImpl(true);
/**
* Used when the bed rule is denied due to there
* being too much light. This is the case during
* daytime without thunderstorms
*/
BedRuleResult TOO_MUCH_LIGHT = new BedRuleResultImpl(false);
/**
* Used when the bed rule is set to always be denied
*/
BedRuleResult NEVER = new BedRuleResultImpl(false);
/**
* Returns {@code true} if this result is a success
*
* @return whether this result is a success
*/
boolean success();
}
@@ -1,9 +0,0 @@
package io.papermc.paper.block.bed;
import org.jetbrains.annotations.ApiStatus;
@ApiStatus.Internal
record BedRuleResultImpl(
boolean success
) implements BedRuleResult {
}
@@ -1,4 +0,0 @@
@NullMarked
package io.papermc.paper.block.bed;
import org.jspecify.annotations.NullMarked;
@@ -2,9 +2,12 @@ package io.papermc.paper.command.brigadier;
import com.mojang.brigadier.RedirectModifier;
import com.mojang.brigadier.tree.CommandNode;
import net.kyori.adventure.text.ComponentLike;
import org.bukkit.GameRule;
import org.bukkit.Location;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Entity;
import org.bukkit.entity.Player;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.Nullable;
@@ -67,4 +70,34 @@ public interface CommandSourceStack {
* @see com.mojang.brigadier.builder.ArgumentBuilder#fork(CommandNode, RedirectModifier)
*/
CommandSourceStack withExecutor(Entity executor);
/**
* Sends a system message to the {@link #getExecutor()} if it is a {@link Player},
* otherwise sends a system message to the {@link #getSender()}.
*
* @param message the message to send
*/
void sendToTarget(ComponentLike message);
/**
* Sends a system message to the {@link #getSender()}, admins, and console indicating successful command execution
* according to vanilla semantics.
*
* <p>This currently includes checking for environments with suppressed output,
* {@link GameRule#SEND_COMMAND_FEEDBACK}, and {@link GameRule#LOG_ADMIN_COMMANDS}.</p>
*
* @param message the message to send
* @param allowInformingAdmins whether admins and console may be informed of this success
*/
void sendSuccess(ComponentLike message, boolean allowInformingAdmins);
/**
* Sends a system message indicating a failed command execution to the {@link #getSender()}.
* Does not apply red styling to the message as vanilla does to allow for custom failure message styling.
*
* <p>Respects vanilla semantics for accepting failure output and suppressed output environments.</p>
*
* @param message the message to send
*/
void sendFailure(ComponentLike message);
}
@@ -16,11 +16,6 @@ public interface PlayerConnection {
*/
void disconnect(Component component);
/**
* {@return whether this connection is currently open and active}
*/
boolean isConnected();
/**
* Gets if this connection originated from a transferred connection.
* <p>
@@ -1,6 +1,5 @@
package io.papermc.paper.datacomponent;
import io.papermc.paper.datacomponent.item.AttackRange;
import io.papermc.paper.datacomponent.item.BannerPatternLayers;
import io.papermc.paper.datacomponent.item.BlockItemDataProperties;
import io.papermc.paper.datacomponent.item.BlocksAttacks;
@@ -22,41 +21,36 @@ import io.papermc.paper.datacomponent.item.ItemContainerContents;
import io.papermc.paper.datacomponent.item.ItemEnchantments;
import io.papermc.paper.datacomponent.item.ItemLore;
import io.papermc.paper.datacomponent.item.JukeboxPlayable;
import io.papermc.paper.datacomponent.item.KineticWeapon;
import io.papermc.paper.datacomponent.item.LodestoneTracker;
import io.papermc.paper.datacomponent.item.MapDecorations;
import io.papermc.paper.datacomponent.item.MapId;
import io.papermc.paper.datacomponent.item.MapItemColor;
import io.papermc.paper.datacomponent.item.OminousBottleAmplifier;
import io.papermc.paper.datacomponent.item.PiercingWeapon;
import io.papermc.paper.datacomponent.item.PotDecorations;
import io.papermc.paper.datacomponent.item.PotionContents;
import io.papermc.paper.datacomponent.item.Repairable;
import io.papermc.paper.datacomponent.item.ResolvableProfile;
import io.papermc.paper.datacomponent.item.SeededContainerLoot;
import io.papermc.paper.datacomponent.item.SuspiciousStewEffects;
import io.papermc.paper.datacomponent.item.SwingAnimation;
import io.papermc.paper.datacomponent.item.Tool;
import io.papermc.paper.datacomponent.item.TooltipDisplay;
import io.papermc.paper.datacomponent.item.UseCooldown;
import io.papermc.paper.datacomponent.item.UseEffects;
import io.papermc.paper.datacomponent.item.UseRemainder;
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 java.util.List;
import io.papermc.paper.registry.tag.TagKey;
import net.kyori.adventure.key.Key;
import net.kyori.adventure.key.KeyPattern;
import net.kyori.adventure.text.Component;
import org.bukkit.Art;
import org.bukkit.DyeColor;
import org.bukkit.FireworkEffect;
import org.bukkit.MusicInstrument;
import org.bukkit.NamespacedKey;
import org.bukkit.Registry;
import org.bukkit.block.banner.PatternType;
import org.bukkit.damage.DamageType;
import org.bukkit.entity.Axolotl;
import org.bukkit.entity.Cat;
import org.bukkit.entity.Chicken;
@@ -73,7 +67,6 @@ import org.bukkit.entity.Salmon;
import org.bukkit.entity.TropicalFish;
import org.bukkit.entity.Villager;
import org.bukkit.entity.Wolf;
import org.bukkit.entity.ZombieNautilus;
import org.bukkit.inventory.ItemRarity;
import org.bukkit.inventory.meta.trim.TrimMaterial;
import org.checkerframework.checker.index.qual.NonNegative;
@@ -82,6 +75,8 @@ import org.checkerframework.common.value.qual.IntRange;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
import static java.util.Objects.requireNonNull;
/**
* All the different types of data that {@link org.bukkit.inventory.ItemStack ItemStacks}
* and {@link org.bukkit.inventory.ItemType ItemTypes} can have.
@@ -116,16 +111,12 @@ public final class DataComponentTypes {
* If set, the item will not lose any durability when used.
*/
public static final DataComponentType.NonValued UNBREAKABLE = unvalued("unbreakable");
public static final DataComponentType.Valued<UseEffects> USE_EFFECTS = valued("use_effects");
/**
* Custom name override for an item (as set by renaming with an Anvil).
*
* @see #ITEM_NAME
*/
public static final DataComponentType.Valued<Component> CUSTOM_NAME = valued("custom_name");
public static final DataComponentType.Valued<Float> MINIMUM_ATTACK_CHARGE = valued("minimum_attack_charge");
public static final DataComponentType.Valued<DamageType> DAMAGE_TYPE = valued("damage_type");
/**
* When present, replaces default item name with contained chat component.
* <p>
@@ -219,10 +210,6 @@ public final class DataComponentTypes {
public static final DataComponentType.Valued<Key> TOOLTIP_STYLE = valued("tooltip_style");
public static final DataComponentType.Valued<DeathProtection> DEATH_PROTECTION = valued("death_protection");
public static final DataComponentType.Valued<BlocksAttacks> BLOCKS_ATTACKS = valued("blocks_attacks");
public static final DataComponentType.Valued<PiercingWeapon> PIERCING_WEAPON = valued("piercing_weapon");
public static final DataComponentType.Valued<KineticWeapon> KINETIC_WEAPON = valued("kinetic_weapon");
public static final DataComponentType.Valued<AttackRange> ATTACK_RANGE = valued("attack_range");
public static final DataComponentType.Valued<SwingAnimation> SWING_ANIMATION = valued("swing_animation");
/**
* Stores list of enchantments and their levels for an Enchanted Book.
* Unlike {@link #ENCHANTMENTS}, the effects provided by enchantments
@@ -237,9 +224,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 +291,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,38 +363,35 @@ 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");
public static final DataComponentType.Valued<Llama.Color> LLAMA_VARIANT = valued("llama/variant");
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");
private static DataComponentType.NonValued unvalued(final @KeyPattern.Value String key) {
final DataComponentType dataComponentType = Registry.DATA_COMPONENT_TYPE.getOrThrow(Key.key(Key.MINECRAFT_NAMESPACE, key));
private static DataComponentType.NonValued unvalued(final String name) {
final DataComponentType dataComponentType = requireNonNull(Registry.DATA_COMPONENT_TYPE.get(NamespacedKey.minecraft(name)), name + " unvalued data component type couldn't be found, this is a bug.");
if (dataComponentType instanceof DataComponentType.NonValued) {
return (DataComponentType.NonValued) dataComponentType;
}
throw new IllegalStateException(key + " is not a valid unvalued type, it is a " + dataComponentType.getClass().getTypeName());
throw new IllegalStateException(name + " is not a valid unvalued type, it is a " + dataComponentType.getClass().getTypeName());
}
@SuppressWarnings("unchecked")
private static <T> DataComponentType.Valued<T> valued(final @KeyPattern.Value String key) {
final DataComponentType dataComponentType = Registry.DATA_COMPONENT_TYPE.getOrThrow(Key.key(Key.MINECRAFT_NAMESPACE, key));
private static <T> DataComponentType.Valued<T> valued(final String name) {
DataComponentType dataComponentType = requireNonNull(Registry.DATA_COMPONENT_TYPE.get(NamespacedKey.minecraft(name)), name + " valued data component type couldn't be found, this is a bug.");
if (dataComponentType instanceof DataComponentType.Valued) {
return (DataComponentType.Valued<T>) dataComponentType;
}
throw new IllegalStateException(key + " is not a valid valued type, it is a " + dataComponentType.getClass().getTypeName());
throw new IllegalStateException(name + " is not a valid valued type, it is a " + dataComponentType.getClass().getTypeName());
}
private DataComponentTypes() {
@@ -1,67 +0,0 @@
package io.papermc.paper.datacomponent.item;
import io.papermc.paper.datacomponent.DataComponentBuilder;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.Contract;
import org.jetbrains.annotations.Range;
import org.jspecify.annotations.NullMarked;
@NullMarked
@ApiStatus.Experimental
@ApiStatus.NonExtendable
public interface AttackRange {
/**
* Returns a new builder for creating an Attack Range.
*
* @return a builder instance
*/
@Contract(value = "-> new", pure = true)
static Builder attackRange() {
return ItemComponentTypesBridge.bridge().attackRange();
}
@Contract(pure = true)
@Range(from = 0, to = 64) float minReach();
@Contract(pure = true)
@Range(from = 0, to = 64) float maxReach();
@Contract(pure = true)
@Range(from = 0, to = 64) float minCreativeReach();
@Contract(pure = true)
@Range(from = 0, to = 64) float maxCreativeReach();
@Contract(pure = true)
@Range(from = 0, to = 1) float hitboxMargin();
@Contract(pure = true)
@Range(from = 0, to = 2) float mobFactor();
/**
* Builder for {@link AttackRange}.
*/
@ApiStatus.Experimental
@ApiStatus.NonExtendable
interface Builder extends DataComponentBuilder<AttackRange> {
@Contract(value = "_ -> this", mutates = "this")
Builder minReach(@Range(from = 0, to = 64) float minReach);
@Contract(value = "_ -> this", mutates = "this")
Builder maxReach(@Range(from = 0, to = 64) float maxReach);
@Contract(value = "_ -> this", mutates = "this")
Builder minCreativeReach(@Range(from = 0, to = 64) float minCreativeReach);
@Contract(value = "_ -> this", mutates = "this")
Builder maxCreativeReach(@Range(from = 0, to = 64) float maxCreativeReach);
@Contract(value = "_ -> this", mutates = "this")
Builder hitboxMargin(@Range(from = 0, to = 1) float hitboxMargin);
@Contract(value = "_ -> this", mutates = "this")
Builder mobFactor(@Range(from = 0, to = 2) float mobFactor);
}
}
@@ -3,11 +3,10 @@ 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;
import org.checkerframework.checker.index.qual.NonNegative;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.Contract;
import org.jspecify.annotations.NullMarked;
@@ -33,8 +32,7 @@ public interface BlocksAttacks {
*
* @return the delay in seconds
*/
@Contract(pure = true)
@NonNegative float blockDelaySeconds();
float blockDelaySeconds();
/**
* Gets the multiplier applied to the cooldown time for the item when attacked by a disabling attack (the multiplier for {@link Weapon#disableBlockingForSeconds()}).
@@ -43,15 +41,13 @@ public interface BlocksAttacks {
*
* @return the multiplier for the cooldown time
*/
@Contract(pure = true)
@NonNegative float disableCooldownScale();
float disableCooldownScale();
/**
* Gets a list of {@link DamageReduction} of how much damage should be blocked in a given attack.
*
* @return a list of damage reductions
*/
@Contract(pure = true)
List<DamageReduction> damageReductions();
/**
@@ -59,7 +55,6 @@ public interface BlocksAttacks {
*
* @return the damage function
*/
@Contract(pure = true)
ItemDamageFunction itemDamage();
/**
@@ -67,15 +62,13 @@ 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.
*
* @return a key of the sound
*/
@Contract(pure = true)
@Nullable Key blockSound();
/**
@@ -83,7 +76,6 @@ public interface BlocksAttacks {
*
* @return a key of the sound
*/
@Contract(pure = true)
@Nullable Key disableSound();
/**
@@ -94,10 +86,10 @@ public interface BlocksAttacks {
interface Builder extends DataComponentBuilder<BlocksAttacks> {
@Contract(value = "_ -> this", mutates = "this")
Builder blockDelaySeconds(@NonNegative float delay);
Builder blockDelaySeconds(float delay);
@Contract(value = "_ -> this", mutates = "this")
Builder disableCooldownScale(@NonNegative float scale);
Builder disableCooldownScale(float scale);
@Contract(value = "_ -> this", mutates = "this")
Builder addDamageReduction(DamageReduction reduction);
@@ -109,7 +101,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();
}
@@ -15,7 +15,7 @@ import org.jspecify.annotations.NullMarked;
@ApiStatus.NonExtendable
public interface DyedItemColor {
@Contract(value = "_ -> new", pure = true)
@Contract(value = "_, _ -> new", pure = true)
static DyedItemColor dyedItemColor(final Color color) {
return dyedItemColor().color(color).build();
}
@@ -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);
@@ -117,16 +117,4 @@ interface ItemComponentTypesBridge {
TooltipDisplay.Builder tooltipDisplay();
Weapon.Builder weapon();
KineticWeapon.Builder kineticWeapon();
UseEffects.Builder useEffects();
PiercingWeapon.Builder piercingWeapon();
AttackRange.Builder attackRange();
SwingAnimation.Builder swingAnimation();
KineticWeapon.Condition kineticWeaponCondition(int maxDurationTicks, float minSpeed, float minRelativeSpeed);
}
@@ -19,7 +19,7 @@ import org.jspecify.annotations.NullMarked;
@ApiStatus.NonExtendable
public interface ItemEnchantments {
@Contract(value = "_ -> new", pure = true)
@Contract(value = "_, _ -> new", pure = true)
static ItemEnchantments itemEnchantments(final Map<Enchantment, @IntRange(from = 1, to = 255) Integer> enchantments) {
return itemEnchantments().addAll(enchantments).build();
}
@@ -1,106 +0,0 @@
package io.papermc.paper.datacomponent.item;
import io.papermc.paper.datacomponent.DataComponentBuilder;
import net.kyori.adventure.key.Key;
import org.checkerframework.checker.index.qual.NonNegative;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.Contract;
import org.jetbrains.annotations.Range;
import org.jspecify.annotations.NullMarked;
import org.jspecify.annotations.Nullable;
@NullMarked
@ApiStatus.Experimental
@ApiStatus.NonExtendable
public interface KineticWeapon {
/**
* Returns a new builder for creating a Kinetic Weapon.
*
* @return a builder instance
*/
@Contract(value = "-> new", pure = true)
static Builder kineticWeapon() {
return ItemComponentTypesBridge.bridge().kineticWeapon();
}
/**
* Creates a {@link Condition} object.
*/
@Contract(value = "_, _, _ -> new", pure = true)
static Condition condition(final @NonNegative int maxDurationTicks, final float minSpeed, final float minRelativeSpeed) {
return ItemComponentTypesBridge.bridge().kineticWeaponCondition(maxDurationTicks, minSpeed, minRelativeSpeed);
}
@Contract(pure = true)
@NonNegative int contactCooldownTicks();
@Contract(pure = true)
@NonNegative int delayTicks();
@Contract(pure = true)
@Nullable Condition dismountConditions();
@Contract(pure = true)
@Nullable Condition knockbackConditions();
@Contract(pure = true)
@Nullable Condition damageConditions();
float forwardMovement();
float damageMultiplier();
@Contract(pure = true)
@Nullable Key sound();
@Contract(pure = true)
@Nullable Key hitSound();
interface Condition {
@Contract(pure = true)
@NonNegative int maxDurationTicks();
@Contract(pure = true)
float minSpeed();
@Contract(pure = true)
float minRelativeSpeed();
}
/**
* Builder for {@link KineticWeapon}.
*/
@ApiStatus.Experimental
@ApiStatus.NonExtendable
interface Builder extends DataComponentBuilder<KineticWeapon> {
@Contract(value = "_ -> this", mutates = "this")
Builder contactCooldownTicks(@NonNegative int ticks);
@Contract(value = "_ -> this", mutates = "this")
Builder delayTicks(@NonNegative int ticks);
@Contract(value = "_ -> this", mutates = "this")
Builder dismountConditions(@Nullable Condition condition);
@Contract(value = "_ -> this", mutates = "this")
Builder knockbackConditions(@Nullable Condition condition);
@Contract(value = "_ -> this", mutates = "this")
Builder damageConditions(@Nullable Condition condition);
@Contract(value = "_ -> this", mutates = "this")
Builder forwardMovement(float forwardMovement);
@Contract(value = "_ -> this", mutates = "this")
Builder damageMultiplier(float damageMultiplier);
@Contract(value = "_ -> this", mutates = "this")
Builder sound(@Nullable Key sound);
@Contract(value = "_ -> this", mutates = "this")
Builder hitSound(@Nullable Key sound);
}
}
@@ -1,52 +0,0 @@
package io.papermc.paper.datacomponent.item;
import io.papermc.paper.datacomponent.DataComponentBuilder;
import net.kyori.adventure.key.Key;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.Contract;
import org.jetbrains.annotations.Range;
import org.jspecify.annotations.NullMarked;
import org.jspecify.annotations.Nullable;
@NullMarked
@ApiStatus.Experimental
@ApiStatus.NonExtendable
public interface PiercingWeapon {
/**
* Returns a new builder for creating a Piercing Weapon.
*
* @return a builder instance
*/
static Builder piercingWeapon() {
return ItemComponentTypesBridge.bridge().piercingWeapon();
}
boolean dealsKnockback();
boolean dismounts();
@Nullable Key sound();
@Nullable Key hitSound();
/**
* Builder for {@link PiercingWeapon}.
*/
@ApiStatus.Experimental
@ApiStatus.NonExtendable
interface Builder extends DataComponentBuilder<PiercingWeapon> {
@Contract(value = "_ -> this", mutates = "this")
Builder dealsKnockback(boolean dealsKnockback);
@Contract(value = "_ -> this", mutates = "this")
Builder dismounts(boolean dismounts);
@Contract(value = "_ -> this", mutates = "this")
Builder sound(@Nullable Key sound);
@Contract(value = "_ -> this", mutates = "this")
Builder hitSound(@Nullable Key sound);
}
}
@@ -1,60 +0,0 @@
package io.papermc.paper.datacomponent.item;
import io.papermc.paper.datacomponent.DataComponentBuilder;
import org.checkerframework.checker.index.qual.Positive;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.Contract;
import org.jspecify.annotations.NullMarked;
@NullMarked
@ApiStatus.Experimental
@ApiStatus.NonExtendable
public interface SwingAnimation {
@Contract(value = "-> new", pure = true)
static Builder swingAnimation() {
return ItemComponentTypesBridge.bridge().swingAnimation();
}
@Contract(pure = true)
Animation type();
@Contract(pure = true)
@Positive int duration();
enum Animation {
// Start generate - SwingAnimationType
NONE,
WHACK,
STAB;
// End generate - SwingAnimationType
}
/**
* Builder for {@link SwingAnimation}.
*/
@ApiStatus.Experimental
@ApiStatus.NonExtendable
interface Builder extends DataComponentBuilder<SwingAnimation> {
/**
* Sets the swing animation type.
*
* @param type animation type
* @return the builder for chaining
* @see #type()
*/
@Contract(value = "_ -> this", mutates = "this")
Builder type(Animation type);
/**
* Sets the swing animation duration in ticks.
*
* @param duration duration (>= 0)
* @return the builder for chaining
* @see #duration()
*/
@Contract(value = "_ -> this", mutates = "this")
Builder duration(@Positive int duration);
}
}
@@ -2,11 +2,12 @@ package io.papermc.paper.datacomponent.item;
import io.papermc.paper.datacomponent.DataComponentBuilder;
import io.papermc.paper.datacomponent.DataComponentType;
import java.util.Set;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.Contract;
import org.jspecify.annotations.NullMarked;
import java.util.Set;
@NullMarked
@ApiStatus.Experimental
@ApiStatus.NonExtendable
@@ -2,7 +2,6 @@ package io.papermc.paper.datacomponent.item;
import io.papermc.paper.datacomponent.DataComponentBuilder;
import net.kyori.adventure.key.Key;
import org.checkerframework.checker.index.qual.Positive;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.Contract;
import org.jspecify.annotations.NullMarked;
@@ -24,7 +23,7 @@ public interface UseCooldown {
* @return builder
*/
@Contract(value = "_ -> new", pure = true)
static UseCooldown.Builder useCooldown(final @Positive float seconds) {
static UseCooldown.Builder useCooldown(final float seconds) {
return ItemComponentTypesBridge.bridge().useCooldown(seconds);
}
@@ -34,7 +33,7 @@ public interface UseCooldown {
* @return cooldown seconds
*/
@Contract(pure = true)
@Positive float seconds();
float seconds();
/**
* The unique resource location to identify this cooldown group.
@@ -1,68 +0,0 @@
package io.papermc.paper.datacomponent.item;
import io.papermc.paper.datacomponent.DataComponentBuilder;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.Contract;
import org.jspecify.annotations.NullMarked;
@NullMarked
@ApiStatus.Experimental
@ApiStatus.NonExtendable
public interface UseEffects {
/**
* Returns a new builder for creating a UseEffects component.
*
* @return a builder instance.
*/
static Builder useEffects() {
return ItemComponentTypesBridge.bridge().useEffects();
}
@Contract(pure = true)
boolean canSprint();
@Contract(pure = true)
boolean interactVibrations();
@Contract(pure = true)
float speedMultiplier();
/**
* Builder for {@link UseEffects}.
*/
@ApiStatus.Experimental
@ApiStatus.NonExtendable
interface Builder extends DataComponentBuilder<UseEffects> {
/**
* Sets whether the player can sprint while using the item.
*
* @param canSprint true to allow sprinting
* @return the builder for chaining
* @see #canSprint()
*/
@Contract(value = "_ -> this", mutates = "this")
Builder canSprint(boolean canSprint);
/**
* Sets whether using the item generates interaction vibrations.
*
* @param interactVibrations true to generate vibrations
* @return the builder for chaining
* @see #interactVibrations()
*/
@Contract(value = "_ -> this", mutates = "this")
Builder interactVibrations(boolean interactVibrations);
/**
* Sets the speed multiplier while using the item.
*
* @param speedMultiplier multiplier (1.0 >= value >= 0.0)
* @return the builder for chaining
* @see #speedMultiplier()
*/
@Contract(value = "_ -> this", mutates = "this")
Builder speedMultiplier(float speedMultiplier);
}
}
@@ -1,7 +1,6 @@
package io.papermc.paper.datacomponent.item;
import io.papermc.paper.datacomponent.DataComponentBuilder;
import org.checkerframework.checker.index.qual.NonNegative;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
@@ -20,16 +19,12 @@ public interface Weapon {
}
/**
* Amount of durability to remove each time the weapon is used to attack.
*
* @return durability
* The damage that the weapon deals per attack.
*/
@NonNegative int itemDamagePerAttack();
int itemDamagePerAttack();
/**
* The number of seconds that blocking is disabled.
*
* @return seconds
*/
float disableBlockingForSeconds();
@@ -41,13 +36,12 @@ public interface Weapon {
interface Builder extends DataComponentBuilder<Weapon> {
/**
* Controls the amount of durability to remove each time the weapon is used to attack.
* Sets the damage per attack.
*
* @param damage durability to remove
* @return the builder for chaining
* @see #itemDamagePerAttack()
* @param damage the damage value.
* @return the builder for chaining.
*/
Builder itemDamagePerAttack(@NonNegative int damage);
Builder itemDamagePerAttack(int damage);
/**
* Sets the disable blocking duration (in seconds).
@@ -27,7 +27,8 @@ public interface ItemDamageFunction {
*
* @return the threshold
*/
@NonNegative float threshold();
@NonNegative
float threshold();
/**
* Get the constant amount of damage applied to the item, if threshold is passed.
@@ -59,7 +60,7 @@ public interface ItemDamageFunction {
interface Builder extends DataComponentBuilder<ItemDamageFunction> {
@Contract(value = "_ -> this", mutates = "this")
ItemDamageFunction.Builder threshold(final @NonNegative float threshold);
ItemDamageFunction.Builder threshold(@NonNegative final float threshold);
@Contract(value = "_ -> this", mutates = "this")
ItemDamageFunction.Builder base(final float base);
@@ -13,12 +13,11 @@ public enum ItemUseAnimation {
DRINK,
BLOCK,
BOW,
TRIDENT,
SPEAR,
CROSSBOW,
SPYGLASS,
TOOT_HORN,
BRUSH,
BUNDLE,
SPEAR;
BUNDLE;
// End generate - ItemUseAnimation
}
@@ -1,25 +1,25 @@
package io.papermc.paper.entity;
import org.bukkit.Location;
import org.bukkit.entity.Entity;
import org.bukkit.entity.Player;
import org.bukkit.event.player.PlayerTeleportEvent;
/**
* Represents a flag that can be set on teleportation that may
* slightly modify the behavior.
*
* @see EntityState
* @see Relative
*/
public sealed interface TeleportFlag permits TeleportFlag.EntityState, TeleportFlag.Relative {
/**
* Relative flags enable an entity to not lose their velocity in the flag-specific axis/context when teleporting.
* Note: These flags only work on {@link org.bukkit.entity.Player} entities.
* <p>
* Relative flags enable a player to not lose their velocity in the flag-specific axis/context when teleporting.
*
* @apiNote The relative flags exposed in the API do *not* mirror all flags known to vanilla, as relative flags concerning
* the position are non-applicable given teleports always expect an absolute location.
* @see Player#teleport(Location, PlayerTeleportEvent.TeleportCause, TeleportFlag...)
* @see Entity#teleport(Location, PlayerTeleportEvent.TeleportCause, TeleportFlag...)
* @see org.bukkit.entity.Player#teleport(Location, PlayerTeleportEvent.TeleportCause, TeleportFlag...)
*/
enum Relative implements TeleportFlag {
/**
@@ -40,7 +40,6 @@ public sealed interface TeleportFlag permits TeleportFlag.EntityState, TeleportF
VELOCITY_ROTATION;
/**
* Configures the player to not lose velocity in their x axis during the teleport.
*
* @deprecated Since 1.21.3, vanilla split up the relative teleport flags into velocity and position related
* ones. As the API does not deal with position relative flags, this name is no longer applicable.
* Use {@link #VELOCITY_X} instead.
@@ -49,7 +48,6 @@ public sealed interface TeleportFlag permits TeleportFlag.EntityState, TeleportF
public static final Relative X = VELOCITY_X;
/**
* Configures the player to not lose velocity in their y axis during the teleport.
*
* @deprecated Since 1.21.3, vanilla split up the relative teleport flags into velocity and position related
* ones. As the API does not deal with position relative flags, this name is no longer applicable.
* Use {@link #VELOCITY_Y} instead.
@@ -58,7 +56,6 @@ public sealed interface TeleportFlag permits TeleportFlag.EntityState, TeleportF
public static final Relative Y = VELOCITY_Y;
/**
* Configures the player to not lose velocity in their z axis during the teleport.
*
* @deprecated Since 1.21.3, vanilla split up the relative teleport flags into velocity and position related
* ones. As the API does not deal with position relative flags, this name is no longer applicable.
* Use {@link #VELOCITY_Z} instead.
@@ -86,11 +83,7 @@ public sealed interface TeleportFlag permits TeleportFlag.EntityState, TeleportF
/**
* Represents flags that effect the entity's state on
* teleportation.
*
* @deprecated As of 1.21.10, the default behavior for teleportation is now aligned with vanilla
* behavior. This means all of these flags are functionally done by default.
*/
@Deprecated(since = "1.21.10", forRemoval = true)
enum EntityState implements TeleportFlag {
/**
* If all passengers should not be required to be removed prior to teleportation.
@@ -98,11 +91,7 @@ public sealed interface TeleportFlag permits TeleportFlag.EntityState, TeleportF
* Note:
* Teleporting to a different world with this flag present while the entity has entities riding it
* will cause this teleportation to return false and not occur.
*
* @deprecated This is now default behavior in teleportation. If you want to dismount all passengers,
* remove them with {@link Entity#removePassenger(Entity)}.
*/
@Deprecated(since = "1.21.10", forRemoval = true)
RETAIN_PASSENGERS,
/**
* If the entity should not be dismounted if they are riding another entity.
@@ -110,21 +99,14 @@ public sealed interface TeleportFlag permits TeleportFlag.EntityState, TeleportF
* Note:
* Teleporting to a different world with this flag present while this entity is riding another entity will
* cause this teleportation to return false and not occur.
*
* @deprecated This behavior was highly technical and is not replicatable due to client limitations,
* and has not functioned for many updates.
*/
@Deprecated(since = "1.21.10", forRemoval = true)
RETAIN_VEHICLE,
/**
* Indicates that a player should not have their current open inventory closed when teleporting.
* <p>
* Note:
* This option will be ignored when teleported to a different world.
*
* @deprecated No longer done on teleportation, use {@link Player#closeInventory()} to do this yourself.
*/
@Deprecated(since = "1.21.10", forRemoval = true)
RETAIN_OPEN_INVENTORY;
}
@@ -1,30 +0,0 @@
package io.papermc.paper.entity.poi;
import java.util.function.Predicate;
import org.bukkit.Location;
import org.bukkit.World;
import org.jspecify.annotations.NullMarked;
/**
* Holds the result of searching for a point of interest.
*
* @see World#locateAllPoiInRange(Location, Predicate, int)
* @see World#locateAllPoiInRange(Location, Predicate, int, PoiType.Occupancy)
*/
@NullMarked
public interface PoiSearchResult {
/**
* Returns the {@link PoiType}.
*
* @return the {@link PoiType}
*/
PoiType poiType();
/**
* Return the location of the {@link PoiType}.
*
* @return the location the {@link PoiType} was found at
*/
Location location();
}
@@ -1,66 +0,0 @@
package io.papermc.paper.entity.poi;
import io.papermc.paper.InternalAPIBridge;
import org.bukkit.Keyed;
import org.bukkit.block.data.BlockData;
import org.jspecify.annotations.NullMarked;
/**
* Represents a point of interest (POI).
* <p>
* Many PoiTypes act as a marker vs storing occupants examples of this are most
* explicitly {@link PoiTypes#NETHER_PORTAL}. This state can be checked using the method
* {@link #hasOccupants()} which will return {@code true} if the PoiType can have occupants.
*
* @see PoiTypes
*/
@NullMarked
public interface PoiType extends Keyed {
/**
* Determines whether the provided BlockState is relevant to this
* point of interest.
*
* @param data the BlockData to check
* @return {@code true} if the BlockState is relevant, otherwise {@code false}
*/
boolean is(BlockData data);
/**
* Determines whether this PoiType can actually hold occupants.
*
* @return {@code true} if this PoiType can hold occupants
*/
boolean hasOccupants();
/**
* Determines the type of occupancy the point of interest has.
* <p>
* A PoiType occupancy is defined by how much "space" a point of interest
* has.
* <p>
* With context to a Villager workstation if a villager is currently using
* a workstation as a source of its profession the occupancy would be
* {@link Occupancy#IS_OCCUPIED}, however, if no villager was attached to
* a workstation its occupancy would be {@link Occupancy#HAS_SPACE}.
*/
interface Occupancy {
/**
* The poi has space.
*/
Occupancy HAS_SPACE = occupancy("HAS_SPACE");
/**
* The poi is occupied.
*/
Occupancy IS_OCCUPIED = occupancy("IS_OCCUPIED");
/**
* The poi is either occupied or has space.
*/
Occupancy ANY = occupancy("ANY");
private static Occupancy occupancy(final String enumEntryName) {
return InternalAPIBridge.get().createOccupancy(enumEntryName);
}
}
}
@@ -1,64 +0,0 @@
package io.papermc.paper.entity.poi;
import net.kyori.adventure.key.Key;
import net.kyori.adventure.key.KeyPattern;
import org.bukkit.Registry;
import org.jspecify.annotations.NullMarked;
/**
* All the built-in point of interest types.
*/
@NullMarked
public final class PoiTypes {
// Start generate - PoiTypes
public static final PoiType ARMORER = get("armorer");
public static final PoiType BEE_NEST = get("bee_nest");
public static final PoiType BEEHIVE = get("beehive");
public static final PoiType BUTCHER = get("butcher");
public static final PoiType CARTOGRAPHER = get("cartographer");
public static final PoiType CLERIC = get("cleric");
public static final PoiType FARMER = get("farmer");
public static final PoiType FISHERMAN = get("fisherman");
public static final PoiType FLETCHER = get("fletcher");
public static final PoiType HOME = get("home");
public static final PoiType LEATHERWORKER = get("leatherworker");
public static final PoiType LIBRARIAN = get("librarian");
public static final PoiType LIGHTNING_ROD = get("lightning_rod");
public static final PoiType LODESTONE = get("lodestone");
public static final PoiType MASON = get("mason");
public static final PoiType MEETING = get("meeting");
public static final PoiType NETHER_PORTAL = get("nether_portal");
public static final PoiType SHEPHERD = get("shepherd");
public static final PoiType TEST_INSTANCE = get("test_instance");
public static final PoiType TOOLSMITH = get("toolsmith");
public static final PoiType WEAPONSMITH = get("weaponsmith");
// End generate - PoiTypes
private static PoiType get(@KeyPattern.Value final String key) {
return Registry.POINT_OF_INTEREST_TYPE.getOrThrow(Key.key(Key.MINECRAFT_NAMESPACE, key));
}
private PoiTypes() {
}
}
@@ -1,8 +1,6 @@
package io.papermc.paper.event.connection;
import io.papermc.paper.connection.PlayerConfigurationConnection;
import io.papermc.paper.connection.PlayerConnection;
import io.papermc.paper.connection.PlayerLoginConnection;
import net.kyori.adventure.text.Component;
import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;
@@ -12,13 +10,8 @@ import org.jspecify.annotations.Nullable;
/**
* Validates whether a player connection is able to log in.
* <p>
* Called when a player is attempting to log in for the first time,
* or is finishing up being configured.
*
* @implNote Since 1.21.7, during these phases, the {@link #getConnection() connection}
* is either {@link PlayerLoginConnection} or {@link PlayerConfigurationConnection},
* allowing access to phase-specific API.
* <br>However, these underlying connection types are not guaranteed to be stable across versions.
* Called when is attempting to log in for the first time, or is finishing up
* being configured.
*/
public class PlayerConnectionValidateLoginEvent extends Event {
@@ -36,13 +29,9 @@ public class PlayerConnectionValidateLoginEvent extends Event {
/**
* Gets the connection of the player in this event.
* @apiNote Disconnecting the player through this connection
* or using any methods that may send packets is not supported.
*
* @implNote Since 1.21.7, this connection is either
* {@link PlayerLoginConnection} or {@link PlayerConfigurationConnection}
* depending on which phase it is fired in, allowing access to phase-specific API.
* <br>However, these underlying connection types are not guaranteed to be stable across versions.
* Note, the type of this connection is not guaranteed to be stable across versions.
* Additionally, disconnecting the player through this connection / using any methods that may send packets
* is not supported.
*
* @return connection
*/
@@ -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;
}
}
@@ -1,53 +0,0 @@
package io.papermc.paper.event.inventory;
import org.bukkit.entity.Player;
import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;
import org.bukkit.inventory.ItemStack;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Called when a player picks up a crafted item from the result slot of a crafting grid.
*/
@NullMarked
public class ItemCraftedEvent extends Event {
private static final HandlerList HANDLER_LIST = new HandlerList();
private final Player player;
private final ItemStack craftedItem;
@ApiStatus.Internal
public ItemCraftedEvent(final Player player, final ItemStack craftedItem) {
this.player = player;
this.craftedItem = craftedItem;
}
/**
* Gets the player who triggered the event by picking up the crafted item.
*
* @return the player
*/
public Player getPlayer() {
return this.player;
}
/**
* Gets the item that was crafted and picked up by the player.
*
* @return the crafted item
*/
public ItemStack getCraftedItem() {
return this.craftedItem.clone();
}
@Override
public HandlerList getHandlers() {
return HANDLER_LIST;
}
public static HandlerList getHandlerList() {
return HANDLER_LIST;
}
}
@@ -1,6 +1,5 @@
package io.papermc.paper.event.player;
import com.google.common.base.Preconditions;
import io.papermc.paper.connection.PlayerConfigurationConnection;
import org.bukkit.Location;
import org.bukkit.Server;
@@ -53,7 +52,7 @@ public class AsyncPlayerSpawnLocationEvent extends Event {
* @return the spawn location
*/
public Location getSpawnLocation() {
return this.spawnLocation.clone();
return this.spawnLocation;
}
/**
@@ -62,8 +61,6 @@ public class AsyncPlayerSpawnLocationEvent extends Event {
* @param location the spawn location
*/
public void setSpawnLocation(final Location location) {
Preconditions.checkArgument(location != null, "Location cannot be null");
Preconditions.checkArgument(location.getWorld() != null, "World cannot be null");
this.spawnLocation = location.clone();
}
@@ -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,6 +1,5 @@
package io.papermc.paper.event.player;
import io.papermc.paper.block.bed.BedEnterAction;
import net.kyori.adventure.text.Component;
import org.bukkit.block.Block;
import org.bukkit.entity.Player;
@@ -18,41 +17,24 @@ public class PlayerBedFailEnterEvent extends PlayerEvent implements Cancellable
private final FailReason failReason;
private final Block bed;
private final BedEnterAction enterAction;
private boolean willExplode;
private @Nullable Component message;
private boolean cancelled;
@ApiStatus.Internal
public PlayerBedFailEnterEvent(final Player player, final FailReason failReason, final Block bed, final boolean willExplode, final @Nullable Component message, BedEnterAction enterAction) {
public PlayerBedFailEnterEvent(final Player player, final FailReason failReason, final Block bed, final boolean willExplode, final @Nullable Component message) {
super(player);
this.failReason = failReason;
this.bed = bed;
this.enterAction = enterAction;
this.willExplode = willExplode;
this.message = message;
}
/**
* @deprecated This enum has been replaced with a system that better
* represents how beds work. See {@link #enterAction}
*/
@ApiStatus.Obsolete(since = "1.21.11")
public FailReason getFailReason() {
return this.failReason;
}
/**
* This describes the default outcome of this event.
*
* @return the action representing the default outcome of this event
*/
@ApiStatus.Experimental
public BedEnterAction enterAction() {
return this.enterAction;
}
public Block getBed() {
return this.bed;
}
@@ -98,16 +80,10 @@ public class PlayerBedFailEnterEvent extends PlayerEvent implements Cancellable
return HANDLER_LIST;
}
/**
* @deprecated Enums no longer represents reliably how beds work and fail. This has been
* replaced with {@link BedEnterAction} that better fits the new beds
*/
@ApiStatus.Obsolete(since = "1.21.11")
public enum FailReason {
/**
* The world doesn't allow sleeping (ex. Nether or The End). Entering
* the bed is prevented but the bed doesn't explode. When the bed
* explodes, {@link #EXPLOSION} is used instead.
* the bed is prevented and the bed explodes.
*/
NOT_POSSIBLE_HERE,
/**
@@ -134,10 +110,6 @@ public class PlayerBedFailEnterEvent extends PlayerEvent implements Cancellable
/**
* Entering the bed is prevented due to there being monsters nearby.
*/
NOT_SAFE,
/**
* Entering the bed is prevented and the bed explodes.
*/
EXPLOSION
NOT_SAFE
}
}
@@ -5,7 +5,6 @@ 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.Merchant;
import org.bukkit.inventory.MerchantRecipe;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
@@ -18,7 +17,6 @@ public class PlayerPurchaseEvent extends PlayerEvent implements Cancellable {
private static final HandlerList HANDLER_LIST = new HandlerList();
private final Merchant merchant;
private boolean rewardExp;
private boolean increaseTradeUses;
private MerchantRecipe trade;
@@ -26,23 +24,13 @@ public class PlayerPurchaseEvent extends PlayerEvent implements Cancellable {
private boolean cancelled;
@ApiStatus.Internal
public PlayerPurchaseEvent(final Player player, final Merchant merchant, final MerchantRecipe trade, final boolean rewardExp, final boolean increaseTradeUses) {
public PlayerPurchaseEvent(final Player player, final MerchantRecipe trade, final boolean rewardExp, final boolean increaseTradeUses) {
super(player);
this.merchant = merchant;
this.trade = trade;
this.rewardExp = rewardExp;
this.increaseTradeUses = increaseTradeUses;
}
/**
* Gets the merchant that the player is trading with
*
* @return the merchant
*/
public Merchant getMerchant() {
return merchant;
}
/**
* Gets the associated trade with this event
*
@@ -59,13 +59,10 @@ public class PlayerServerFullCheckEvent extends Event {
}
/**
* Denies the player access to join this server.
*
* @param kickMessage The message to send to the player on kick if not able to join.
*/
public void deny(final Component kickMessage) {
this.kickMessage = kickMessage;
this.allow = false;
}
/**
@@ -1,75 +0,0 @@
package io.papermc.paper.event.player;
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;
/**
* Triggered when a {@link Player} swaps an item with an equipment slot.
*/
@NullMarked
public class PlayerSwapWithEquipmentSlotEvent extends PlayerEvent implements Cancellable {
private static final HandlerList HANDLERS = new HandlerList();
private final ItemStack itemInHand;
private final EquipmentSlot slot;
private final ItemStack itemToSwap;
private boolean cancelled;
@ApiStatus.Internal
public PlayerSwapWithEquipmentSlotEvent(
final Player player,
final ItemStack itemInHand,
final EquipmentSlot slot,
final ItemStack itemToSwap
) {
super(player);
this.itemInHand = itemInHand;
this.slot = slot;
this.itemToSwap = itemToSwap;
}
/**
* {@return the item in one of the hand slots}
*/
public ItemStack getItemInHand() {
return this.itemInHand.clone();
}
/**
* {@return the slot to swap into}
*/
public EquipmentSlot getSlot() {
return this.slot;
}
/**
* {@return the item to swap}
*/
public ItemStack getItemToSwap() {
return this.itemToSwap.clone();
}
@Override
public boolean isCancelled() {
return this.cancelled;
}
@Override
public void setCancelled(final boolean cancelled) {
this.cancelled = cancelled;
}
@Override
public HandlerList getHandlers() {
return HANDLERS;
}
public static HandlerList getHandlerList() {
return HANDLERS;
}
}
@@ -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;
}
}
@@ -12,25 +12,21 @@ import org.jspecify.annotations.NullMarked;
@NullMarked
public class PlayerTradeEvent extends PlayerPurchaseEvent {
private final AbstractVillager villager;
@ApiStatus.Internal
public PlayerTradeEvent(final Player player, final AbstractVillager villager, final MerchantRecipe trade, final boolean rewardExp, final boolean increaseTradeUses) {
super(player, villager, trade, rewardExp, increaseTradeUses);
}
@Override
public AbstractVillager getMerchant() {
return (AbstractVillager) super.getMerchant();
super(player, trade, rewardExp, increaseTradeUses);
this.villager = villager;
}
/**
* Gets the Villager or Wandering trader associated with this event
*
* @return the villager or wandering trader
* @see #getMerchant()
*/
@ApiStatus.Obsolete
public AbstractVillager getVillager() {
return getMerchant();
return this.villager;
}
}
@@ -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 {
@@ -20,7 +19,7 @@ public class WorldGameRuleChangeEvent extends WorldEvent implements Cancellable
private static final HandlerList HANDLER_LIST = new HandlerList();
private final @Nullable CommandSender commandSender;
protected final GameRule<?> gameRule;
private final GameRule<?> gameRule;
private String value;
private boolean cancelled;
@@ -1,15 +1,10 @@
package io.papermc.paper.event.world.border;
import com.google.common.base.Preconditions;
import io.papermc.paper.util.Tick;
import java.time.Duration;
import org.bukkit.World;
import org.bukkit.WorldBorder;
import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList;
import org.checkerframework.checker.index.qual.NonNegative;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.Range;
import org.jspecify.annotations.NullMarked;
/**
@@ -68,41 +63,16 @@ 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());
}
/**
* Gets the time in ticks for the change. Will be 0 if instant.
*
* @return the time in ticks for the change
*/
public @Range(from = 0, to = Integer.MAX_VALUE) long getDurationTicks() {
return this.duration;
}
/**
* Sets the time in ticks for the change. Will change {@link #getType()} to return
* {@link Type#STARTED_MOVE}.
*
* @param duration the time in ticks for the change
*/
public void setDurationTicks(final @Range(from = 0, to = Integer.MAX_VALUE) long duration) {
Preconditions.checkArgument(duration >= 0 && duration <= Integer.MAX_VALUE, "duration must be between 0-%s", Integer.MAX_VALUE);
this.duration = duration;
if (this.type == Type.INSTANT_MOVE) {
this.type = Type.STARTED_MOVE;
}
this.newSize = Math.min(this.worldBorder.getMaxSize(), Math.max(1.0D, newSize));
}
/**
* Gets the time in milliseconds for the change. Will be 0 if instant.
*
* @return the time in milliseconds for the change
* @deprecated in favor of {@link #getDurationTicks()}
*/
@Deprecated(forRemoval = true, since = "1.21.11")
public @NonNegative long getDuration() {
return Tick.of(this.getDurationTicks()).toMillis();
public long getDuration() {
return this.duration;
}
/**
@@ -110,11 +80,13 @@ public class WorldBorderBoundsChangeEvent extends WorldBorderEvent implements Ca
* {@link Type#STARTED_MOVE}.
*
* @param duration the time in milliseconds for the change
* @deprecated in favor of {@link #setDurationTicks(long)}
*/
@Deprecated(forRemoval = true, since = "1.21.11")
public void setDuration(final @NonNegative long duration) {
this.setDurationTicks(Tick.tick().fromDuration(Duration.ofMillis(duration)));
public void setDuration(final long duration) {
// PAIL: TODO: Magic Values
this.duration = Math.min(9223372036854775L, Math.max(0L, duration));
if (duration >= 0 && this.type == Type.INSTANT_MOVE) {
this.type = Type.STARTED_MOVE;
}
}
@Override
@@ -1,8 +1,6 @@
package io.papermc.paper.item;
public enum MapPostProcessing {
// Start generate - MapPostProcessing
LOCK,
SCALE;
// End generate - MapPostProcessing
SCALE
}
@@ -157,9 +157,4 @@ public interface PersistentDataContainerView {
* @throws java.io.IOException if we fail to write this container to a byte array
*/
byte[] serializeToBytes() throws java.io.IOException;
/**
* {@return the size of the data container}
*/
int getSize();
}
@@ -1,20 +0,0 @@
package io.papermc.paper.raytracing;
/**
* Determines the collision behavior when blocks get hit during ray tracing.
*/
public enum BlockCollisionMode {
/**
* Use the collision shape.
*/
COLLIDER,
/**
* Use the outline shape.
*/
OUTLINE,
/**
* Use the visual shape.
*/
VISUAL
}
@@ -46,6 +46,9 @@ public interface PositionedRayTraceConfigurationBuilder {
/**
* Sets the FluidCollisionMode when looking for block collisions.
* <p>
* If collisions with passable blocks are ignored, fluid collisions are
* ignored as well regardless of the fluid collision mode.
*
* @param fluidCollisionMode the new FluidCollisionMode
* @return a reference to this object
@@ -53,18 +56,16 @@ public interface PositionedRayTraceConfigurationBuilder {
@Contract(value = "_ -> this", mutates = "this")
PositionedRayTraceConfigurationBuilder fluidCollisionMode(FluidCollisionMode fluidCollisionMode);
/**
* Sets the BlockCollisionMode when looking for block collisions.
*
* @param blockCollisionMode the new BlockCollisionMode
* @return a reference to this object
*/
@Contract(value = "_ -> this", mutates = "this")
PositionedRayTraceConfigurationBuilder blockCollisionMode(BlockCollisionMode blockCollisionMode);
/**
* Sets whether the raytrace should ignore passable blocks when looking for
* block collisions.
* <p>
* If collisions with passable blocks are ignored, fluid collisions are
* ignored as well regardless of the fluid collision mode.
* <p>
* Portal blocks are only considered passable if the ray starts within them.
* Apart from that collisions with portal blocks will be considered even if
* collisions with passable blocks are otherwise ignored.
*
* @param ignorePassableBlocks if the raytrace should ignore passable blocks
* @return a reference to this object
@@ -2,7 +2,6 @@ package io.papermc.paper.registry;
import io.papermc.paper.datacomponent.DataComponentType;
import io.papermc.paper.dialog.Dialog;
import io.papermc.paper.entity.poi.PoiType;
import io.papermc.paper.registry.tag.TagKey;
import net.kyori.adventure.key.Key;
import net.kyori.adventure.key.KeyPattern;
@@ -10,7 +9,6 @@ import net.kyori.adventure.key.Keyed;
import org.bukkit.Art;
import org.bukkit.Fluid;
import org.bukkit.GameEvent;
import org.bukkit.GameRule;
import org.bukkit.JukeboxSong;
import org.bukkit.MusicInstrument;
import org.bukkit.Particle;
@@ -29,7 +27,6 @@ import org.bukkit.entity.Frog;
import org.bukkit.entity.Pig;
import org.bukkit.entity.Villager;
import org.bukkit.entity.Wolf;
import org.bukkit.entity.ZombieNautilus;
import org.bukkit.entity.memory.MemoryKey;
import org.bukkit.generator.structure.Structure;
import org.bukkit.generator.structure.StructureType;
@@ -93,11 +90,6 @@ public sealed interface RegistryKey<T> extends Keyed permits RegistryKeyImpl {
* @see io.papermc.paper.registry.keys.VillagerProfessionKeys
*/
RegistryKey<Villager.Profession> VILLAGER_PROFESSION = create("villager_profession");
/**
* Built-in registry for poi types.
* @see io.papermc.paper.registry.keys.PoiTypeKeys
*/
RegistryKey<PoiType> POINT_OF_INTEREST_TYPE = create("point_of_interest_type");
/**
* Built-in registry for villager types.
* @see io.papermc.paper.registry.keys.VillagerTypeKeys
@@ -133,11 +125,8 @@ public sealed interface RegistryKey<T> extends Keyed permits RegistryKeyImpl {
* @see io.papermc.paper.registry.keys.DataComponentTypeKeys
*/
RegistryKey<DataComponentType> DATA_COMPONENT_TYPE = create("data_component_type");
/**
* Built-in registry for game rules.
* @see io.papermc.paper.registry.keys.GameRuleKeys
*/
RegistryKey<GameRule<?>> GAME_RULE = create("game_rule");
/* ********************** *
* Data-driven Registries *
@@ -207,11 +196,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
@@ -222,36 +206,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
*/
RegistryKey<ZombieNautilus.Variant> ZOMBIE_NAUTILUS_VARIANT = create("zombie_nautilus_variant");
/**
* Data-driven registry for dialogs.
* @see io.papermc.paper.registry.keys.DialogKeys
@@ -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.
*
@@ -12,7 +12,6 @@ import net.kyori.adventure.text.Component;
import org.bukkit.enchantments.Enchantment;
import org.bukkit.inventory.EquipmentSlotGroup;
import org.bukkit.inventory.ItemType;
import org.checkerframework.checker.index.qual.NonNegative;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.Contract;
import org.jetbrains.annotations.Range;
@@ -100,7 +99,7 @@ public interface EnchantmentRegistryEntry {
*
* @return the anvil cost of this enchantment
*/
@NonNegative int anvilCost();
@Range(from = 0, to = Integer.MAX_VALUE) int anvilCost();
/**
* Provides a list of slot groups this enchantment may be active in.
@@ -158,7 +157,7 @@ public interface EnchantmentRegistryEntry {
* a tag obtained via {@link RegistryComposeEvent#getOrCreateTag(TagKey)} with
* tag keys found in {@link io.papermc.paper.registry.keys.tags.ItemTypeTagKeys} such as
* {@link io.papermc.paper.registry.keys.tags.ItemTypeTagKeys#ENCHANTABLE_ARMOR} and
* {@link io.papermc.paper.registry.keys.tags.ItemTypeTagKeys#ENCHANTABLE_MELEE_WEAPON}.
* {@link io.papermc.paper.registry.keys.tags.ItemTypeTagKeys#ENCHANTABLE_SWORD}.
*
* @param supportedItems the registry key set representing the supported items.
* @return this builder instance.
@@ -175,7 +174,7 @@ public interface EnchantmentRegistryEntry {
* {@link RegistryComposeEvent#getOrCreateTag(TagKey)} with
* tag keys found in {@link io.papermc.paper.registry.keys.tags.ItemTypeTagKeys} such as
* {@link io.papermc.paper.registry.keys.tags.ItemTypeTagKeys#ENCHANTABLE_ARMOR} and
* {@link io.papermc.paper.registry.keys.tags.ItemTypeTagKeys#ENCHANTABLE_MELEE_WEAPON}.
* {@link io.papermc.paper.registry.keys.tags.ItemTypeTagKeys#ENCHANTABLE_SWORD}.
* <p>
* Defaults to {@code null} which means all {@link #supportedItems()} are considered primary items.
* Additionally, the tag {@link io.papermc.paper.registry.keys.tags.EnchantmentTagKeys#IN_ENCHANTING_TABLE} defines
@@ -246,7 +245,7 @@ public interface EnchantmentRegistryEntry {
* @see Enchantment#getAnvilCost()
*/
@Contract(value = "_ -> this", mutates = "this")
Builder anvilCost(@NonNegative int anvilCost);
Builder anvilCost(@Range(from = 0, to = Integer.MAX_VALUE) int anvilCost);
/**
* Configures the list of slot groups this enchantment may be active in.
@@ -2,9 +2,9 @@ package io.papermc.paper.registry.data;
import io.papermc.paper.registry.RegistryBuilder;
import org.bukkit.GameEvent;
import org.checkerframework.checker.index.qual.NonNegative;
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 GameEvent} type.
@@ -19,7 +19,7 @@ public interface GameEventRegistryEntry {
* @return the range of blocks, represented as an int.
* @see GameEvent#getRange()
*/
@NonNegative int range();
@Range(from = 0, to = Integer.MAX_VALUE) int range();
/**
* A mutable builder for the {@link GameEventRegistryEntry} plugins may change in applicable registry events.
@@ -42,6 +42,6 @@ public interface GameEventRegistryEntry {
* @see GameEvent#getRange()
*/
@Contract(value = "_ -> this", mutates = "this")
Builder range(@NonNegative int range);
Builder range(@Range(from = 0, to = Integer.MAX_VALUE) int range);
}
}
@@ -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.
*
@@ -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,78 +0,0 @@
package io.papermc.paper.registry.data;
import io.papermc.paper.registry.RegistryBuilder;
import io.papermc.paper.registry.data.client.ClientTextureAsset;
import org.bukkit.entity.ZombieNautilus;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.Contract;
/**
* A data-centric version-specific registry entry for the {@link org.bukkit.entity.ZombieNautilus.Variant} type.
*/
@ApiStatus.Experimental
@ApiStatus.NonExtendable
public interface ZombieNautilusVariantRegistryEntry {
/**
* The model of the variant to render the configured texture on.
*/
enum Model {
/**
* The normal model.
*/
NORMAL,
/**
* The warm model.
*/
WARM,
}
/**
* Provides the client texture asset of the variant, which represents the texture to use.
*
* @return the client texture asset.
*/
ClientTextureAsset clientTextureAsset();
/**
* Provides the model of the variant.
*
* @return the model.
*/
Model model();
/**
* A mutable builder for the {@link ZombieNautilusVariantRegistryEntry} plugins may change in applicable registry events.
* <p>
* The following values are required for each builder:
* <ul>
* <li>{@link #clientTextureAsset(ClientTextureAsset)}</li>
* <li>{@link #model(Model)}</li>
* </ul>
*/
@ApiStatus.Experimental
@ApiStatus.NonExtendable
interface Builder extends ZombieNautilusVariantRegistryEntry, RegistryBuilder<ZombieNautilus.Variant> {
/**
* Sets the client texture asset of the variant, which is the location of the texture to use.
*
* @param clientTextureAsset the client texture asset.
* @return this builder instance.
* @see ZombieNautilusVariantRegistryEntry#clientTextureAsset()
*/
@Contract(value = "_ -> this", mutates = "this")
Builder clientTextureAsset(ClientTextureAsset clientTextureAsset);
/**
* Sets the model to use for this variant.
*
* @param model the model.
* @return this builder instance.
* @see ZombieNautilusVariantRegistryEntry#model()
*/
@Contract(value = "_ -> this", mutates = "this")
Builder model(Model model);
}
}
Loaded 100 of 1887 files, more files were not shown because too many files have changed in this diff. Show more