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
1202 changed files with 11679 additions and 16307 deletions

No files matched your search

+6 -41
View File
@@ -25,9 +25,9 @@ you will most likely use this for WSL), `homebrew` (macOS / Linux), and more:
- [Adoptium](https://adoptium.net/) has builds for most operating systems.
- 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 17 or later installed. (Gradle will
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
installation).
install).
If you're on Windows, check
[the section on WSL](#patching-and-building-is-really-slow-what-can-i-do).
@@ -192,30 +192,6 @@ 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,
@@ -476,17 +452,6 @@ 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?
@@ -504,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
@@ -517,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>
```
+2 -2
View File
@@ -40,7 +40,7 @@ How To (Plugin Developers)
<dependency>
<groupId>io.papermc.paper</groupId>
<artifactId>paper-api</artifactId>
<version>1.21.11-R0.1-SNAPSHOT</version>
<version>1.21.10-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
```
@@ -53,7 +53,7 @@ repositories {
}
dependencies {
compileOnly("io.papermc.paper:paper-api:1.21.11-R0.1-SNAPSHOT")
compileOnly("io.papermc.paper:paper-api:1.21.10-R0.1-SNAPSHOT")
}
java {
+119 -118
View File
@@ -9,6 +9,7 @@ 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
@@ -20,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
@@ -101,7 +104,6 @@ public net.minecraft.server.network.ServerConfigurationPacketListenerImpl client
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
@@ -118,7 +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.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
@@ -137,7 +138,6 @@ public net.minecraft.world.damagesource.DamageSource <init>(Lnet/minecraft/core/
public net.minecraft.world.effect.MobEffect attributeModifiers
public net.minecraft.world.effect.MobEffect$AttributeTemplate
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.AreaEffectCloud durationOnUse
public net.minecraft.world.entity.AreaEffectCloud owner
public net.minecraft.world.entity.AreaEffectCloud potionContents
@@ -209,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
@@ -259,72 +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.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 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 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 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
@@ -352,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
@@ -366,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
@@ -374,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
@@ -386,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
@@ -435,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
@@ -457,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
@@ -465,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
@@ -519,16 +519,16 @@ 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
@@ -570,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;
@@ -714,7 +717,6 @@ public net.minecraft.world.level.dimension.end.EndDragonFight spawnExitPortal(Z)
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
@@ -735,8 +737,8 @@ 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 loadFromGenerated(Lnet/minecraft/resources/Identifier;)Ljava/util/Optional;
public net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplateManager loadFromResource(Lnet/minecraft/resources/Identifier;)Ljava/util/Optional;
public net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplateManager 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.material.MapColor MATERIAL_COLORS
@@ -751,7 +753,6 @@ 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.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
@@ -761,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
+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
+2 -5
View File
@@ -1,9 +1,6 @@
group=io.papermc.paper
version=1.21.11-R0.1-SNAPSHOT
mcVersion=1.21.11
# This is the current API version for use in (paper-)plugin.yml files
# During snapshot cycles this should be the anticipated version of the release target
apiVersion=1.21.11
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.2.0-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.1.0-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
+16 -34
View File
@@ -1,5 +1,3 @@
import paper.libs.com.google.gson.Gson
plugins {
`java-library`
`maven-publish`
@@ -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"
@@ -188,10 +170,10 @@ tasks.withType<Javadoc>().configureEach {
options.isDocFilesSubDirs = true
options.links(
"https://guava.dev/releases/33.3.1-jre/api/docs/",
"https://www.javadocs.dev/org.yaml/snakeyaml/2.2/",
"https://www.javadocs.dev/org.jetbrains/annotations/$annotationsVersion/",
"https://www.javadocs.dev/org.joml/joml/1.10.8/",
"https://www.javadocs.dev/com.google.code.gson/gson/2.11.0",
//"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,9 +182,9 @@ 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:")
@@ -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);
@@ -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);
@@ -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,13 +25,6 @@ import org.jspecify.annotations.NullMarked;
@NullMarked
@GeneratedClass
public final class DataComponentTypeKeys {
/**
* {@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}
*
@@ -221,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}
*
@@ -368,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}
*
@@ -445,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}
*
@@ -487,13 +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/variant}
*
@@ -613,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}
*
@@ -683,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}
*
@@ -746,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}
*
@@ -3987,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}
*
@@ -4008,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}
*
@@ -4617,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}
*
@@ -4652,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}
*
@@ -6003,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}
*
@@ -6136,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}
*
@@ -6157,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}
*
@@ -6185,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}
*
@@ -6801,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}
*
@@ -8831,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}
*
@@ -10378,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}
*
@@ -10532,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}
*
@@ -6031,62 +6031,6 @@ public final class SoundEventKeys {
*/
public static final TypedKey<Sound> ENTITY_AXOLOTL_SWIM = create(key("entity.axolotl.swim"));
/**
* {@code minecraft:entity.baby_nautilus.ambient}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_BABY_NAUTILUS_AMBIENT = create(key("entity.baby_nautilus.ambient"));
/**
* {@code minecraft:entity.baby_nautilus.ambient_land}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_BABY_NAUTILUS_AMBIENT_LAND = create(key("entity.baby_nautilus.ambient_land"));
/**
* {@code minecraft:entity.baby_nautilus.death}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_BABY_NAUTILUS_DEATH = create(key("entity.baby_nautilus.death"));
/**
* {@code minecraft:entity.baby_nautilus.death_land}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_BABY_NAUTILUS_DEATH_LAND = create(key("entity.baby_nautilus.death_land"));
/**
* {@code minecraft:entity.baby_nautilus.eat}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_BABY_NAUTILUS_EAT = create(key("entity.baby_nautilus.eat"));
/**
* {@code minecraft:entity.baby_nautilus.hurt}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_BABY_NAUTILUS_HURT = create(key("entity.baby_nautilus.hurt"));
/**
* {@code minecraft:entity.baby_nautilus.hurt_land}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_BABY_NAUTILUS_HURT_LAND = create(key("entity.baby_nautilus.hurt_land"));
/**
* {@code minecraft:entity.baby_nautilus.swim}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_BABY_NAUTILUS_SWIM = create(key("entity.baby_nautilus.swim"));
/**
* {@code minecraft:entity.bat.ambient}
*
@@ -6416,83 +6360,6 @@ public final class SoundEventKeys {
*/
public static final TypedKey<Sound> ENTITY_CAMEL_STEP_SAND = create(key("entity.camel.step_sand"));
/**
* {@code minecraft:entity.camel_husk.ambient}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_CAMEL_HUSK_AMBIENT = create(key("entity.camel_husk.ambient"));
/**
* {@code minecraft:entity.camel_husk.dash}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_CAMEL_HUSK_DASH = create(key("entity.camel_husk.dash"));
/**
* {@code minecraft:entity.camel_husk.dash_ready}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_CAMEL_HUSK_DASH_READY = create(key("entity.camel_husk.dash_ready"));
/**
* {@code minecraft:entity.camel_husk.death}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_CAMEL_HUSK_DEATH = create(key("entity.camel_husk.death"));
/**
* {@code minecraft:entity.camel_husk.eat}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_CAMEL_HUSK_EAT = create(key("entity.camel_husk.eat"));
/**
* {@code minecraft:entity.camel_husk.hurt}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_CAMEL_HUSK_HURT = create(key("entity.camel_husk.hurt"));
/**
* {@code minecraft:entity.camel_husk.saddle}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_CAMEL_HUSK_SADDLE = create(key("entity.camel_husk.saddle"));
/**
* {@code minecraft:entity.camel_husk.sit}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_CAMEL_HUSK_SIT = create(key("entity.camel_husk.sit"));
/**
* {@code minecraft:entity.camel_husk.stand}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_CAMEL_HUSK_STAND = create(key("entity.camel_husk.stand"));
/**
* {@code minecraft:entity.camel_husk.step}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_CAMEL_HUSK_STEP = create(key("entity.camel_husk.step"));
/**
* {@code minecraft:entity.camel_husk.step_sand}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_CAMEL_HUSK_STEP_SAND = create(key("entity.camel_husk.step_sand"));
/**
* {@code minecraft:entity.cat.ambient}
*
@@ -8614,97 +8481,6 @@ public final class SoundEventKeys {
*/
public static final TypedKey<Sound> ENTITY_MULE_JUMP = create(key("entity.mule.jump"));
/**
* {@code minecraft:entity.nautilus.ambient}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_NAUTILUS_AMBIENT = create(key("entity.nautilus.ambient"));
/**
* {@code minecraft:entity.nautilus.ambient_land}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_NAUTILUS_AMBIENT_LAND = create(key("entity.nautilus.ambient_land"));
/**
* {@code minecraft:entity.nautilus.dash}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_NAUTILUS_DASH = create(key("entity.nautilus.dash"));
/**
* {@code minecraft:entity.nautilus.dash_land}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_NAUTILUS_DASH_LAND = create(key("entity.nautilus.dash_land"));
/**
* {@code minecraft:entity.nautilus.dash_ready}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_NAUTILUS_DASH_READY = create(key("entity.nautilus.dash_ready"));
/**
* {@code minecraft:entity.nautilus.dash_ready_land}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_NAUTILUS_DASH_READY_LAND = create(key("entity.nautilus.dash_ready_land"));
/**
* {@code minecraft:entity.nautilus.death}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_NAUTILUS_DEATH = create(key("entity.nautilus.death"));
/**
* {@code minecraft:entity.nautilus.death_land}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_NAUTILUS_DEATH_LAND = create(key("entity.nautilus.death_land"));
/**
* {@code minecraft:entity.nautilus.eat}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_NAUTILUS_EAT = create(key("entity.nautilus.eat"));
/**
* {@code minecraft:entity.nautilus.hurt}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_NAUTILUS_HURT = create(key("entity.nautilus.hurt"));
/**
* {@code minecraft:entity.nautilus.hurt_land}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_NAUTILUS_HURT_LAND = create(key("entity.nautilus.hurt_land"));
/**
* {@code minecraft:entity.nautilus.riding}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_NAUTILUS_RIDING = create(key("entity.nautilus.riding"));
/**
* {@code minecraft:entity.nautilus.swim}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_NAUTILUS_SWIM = create(key("entity.nautilus.swim"));
/**
* {@code minecraft:entity.ocelot.ambient}
*
@@ -8817,34 +8593,6 @@ public final class SoundEventKeys {
*/
public static final TypedKey<Sound> ENTITY_PANDA_WORRIED_AMBIENT = create(key("entity.panda.worried_ambient"));
/**
* {@code minecraft:entity.parched.ambient}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_PARCHED_AMBIENT = create(key("entity.parched.ambient"));
/**
* {@code minecraft:entity.parched.death}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_PARCHED_DEATH = create(key("entity.parched.death"));
/**
* {@code minecraft:entity.parched.hurt}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_PARCHED_HURT = create(key("entity.parched.hurt"));
/**
* {@code minecraft:entity.parched.step}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_PARCHED_STEP = create(key("entity.parched.step"));
/**
* {@code minecraft:entity.parrot.ambient}
*
@@ -8901,13 +8649,6 @@ public final class SoundEventKeys {
*/
public static final TypedKey<Sound> ENTITY_PARROT_IMITATE_BREEZE = create(key("entity.parrot.imitate.breeze"));
/**
* {@code minecraft:entity.parrot.imitate.camel_husk}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_PARROT_IMITATE_CAMEL_HUSK = create(key("entity.parrot.imitate.camel_husk"));
/**
* {@code minecraft:entity.parrot.imitate.creaking}
*
@@ -8999,13 +8740,6 @@ public final class SoundEventKeys {
*/
public static final TypedKey<Sound> ENTITY_PARROT_IMITATE_MAGMA_CUBE = create(key("entity.parrot.imitate.magma_cube"));
/**
* {@code minecraft:entity.parrot.imitate.parched}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_PARROT_IMITATE_PARCHED = create(key("entity.parrot.imitate.parched"));
/**
* {@code minecraft:entity.parrot.imitate.phantom}
*
@@ -9139,20 +8873,6 @@ public final class SoundEventKeys {
*/
public static final TypedKey<Sound> ENTITY_PARROT_IMITATE_ZOMBIE = create(key("entity.parrot.imitate.zombie"));
/**
* {@code minecraft:entity.parrot.imitate.zombie_horse}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_PARROT_IMITATE_ZOMBIE_HORSE = create(key("entity.parrot.imitate.zombie_horse"));
/**
* {@code minecraft:entity.parrot.imitate.zombie_nautilus}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_PARROT_IMITATE_ZOMBIE_NAUTILUS = create(key("entity.parrot.imitate.zombie_nautilus"));
/**
* {@code minecraft:entity.parrot.imitate.zombie_villager}
*
@@ -11421,13 +11141,6 @@ public final class SoundEventKeys {
*/
public static final TypedKey<Sound> ENTITY_ZOMBIE_HORSE_AMBIENT = create(key("entity.zombie_horse.ambient"));
/**
* {@code minecraft:entity.zombie_horse.angry}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_ZOMBIE_HORSE_ANGRY = create(key("entity.zombie_horse.angry"));
/**
* {@code minecraft:entity.zombie_horse.death}
*
@@ -11435,13 +11148,6 @@ public final class SoundEventKeys {
*/
public static final TypedKey<Sound> ENTITY_ZOMBIE_HORSE_DEATH = create(key("entity.zombie_horse.death"));
/**
* {@code minecraft:entity.zombie_horse.eat}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_ZOMBIE_HORSE_EAT = create(key("entity.zombie_horse.eat"));
/**
* {@code minecraft:entity.zombie_horse.hurt}
*
@@ -11449,90 +11155,6 @@ public final class SoundEventKeys {
*/
public static final TypedKey<Sound> ENTITY_ZOMBIE_HORSE_HURT = create(key("entity.zombie_horse.hurt"));
/**
* {@code minecraft:entity.zombie_nautilus.ambient}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_ZOMBIE_NAUTILUS_AMBIENT = create(key("entity.zombie_nautilus.ambient"));
/**
* {@code minecraft:entity.zombie_nautilus.ambient_land}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_ZOMBIE_NAUTILUS_AMBIENT_LAND = create(key("entity.zombie_nautilus.ambient_land"));
/**
* {@code minecraft:entity.zombie_nautilus.dash}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_ZOMBIE_NAUTILUS_DASH = create(key("entity.zombie_nautilus.dash"));
/**
* {@code minecraft:entity.zombie_nautilus.dash_land}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_ZOMBIE_NAUTILUS_DASH_LAND = create(key("entity.zombie_nautilus.dash_land"));
/**
* {@code minecraft:entity.zombie_nautilus.dash_ready}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_ZOMBIE_NAUTILUS_DASH_READY = create(key("entity.zombie_nautilus.dash_ready"));
/**
* {@code minecraft:entity.zombie_nautilus.dash_ready_land}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_ZOMBIE_NAUTILUS_DASH_READY_LAND = create(key("entity.zombie_nautilus.dash_ready_land"));
/**
* {@code minecraft:entity.zombie_nautilus.death}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_ZOMBIE_NAUTILUS_DEATH = create(key("entity.zombie_nautilus.death"));
/**
* {@code minecraft:entity.zombie_nautilus.death_land}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_ZOMBIE_NAUTILUS_DEATH_LAND = create(key("entity.zombie_nautilus.death_land"));
/**
* {@code minecraft:entity.zombie_nautilus.eat}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_ZOMBIE_NAUTILUS_EAT = create(key("entity.zombie_nautilus.eat"));
/**
* {@code minecraft:entity.zombie_nautilus.hurt}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_ZOMBIE_NAUTILUS_HURT = create(key("entity.zombie_nautilus.hurt"));
/**
* {@code minecraft:entity.zombie_nautilus.hurt_land}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_ZOMBIE_NAUTILUS_HURT_LAND = create(key("entity.zombie_nautilus.hurt_land"));
/**
* {@code minecraft:entity.zombie_nautilus.swim}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_ZOMBIE_NAUTILUS_SWIM = create(key("entity.zombie_nautilus.swim"));
/**
* {@code minecraft:entity.zombie_villager.ambient}
*
@@ -11694,13 +11316,6 @@ public final class SoundEventKeys {
*/
public static final TypedKey<Sound> ITEM_ARMOR_EQUIP_LEATHER = create(key("item.armor.equip_leather"));
/**
* {@code minecraft:item.armor.equip_nautilus}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ITEM_ARMOR_EQUIP_NAUTILUS = create(key("item.armor.equip_nautilus"));
/**
* {@code minecraft:item.armor.equip_netherite}
*
@@ -11722,13 +11337,6 @@ public final class SoundEventKeys {
*/
public static final TypedKey<Sound> ITEM_ARMOR_EQUIP_WOLF = create(key("item.armor.equip_wolf"));
/**
* {@code minecraft:item.armor.unequip_nautilus}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ITEM_ARMOR_UNEQUIP_NAUTILUS = create(key("item.armor.unequip_nautilus"));
/**
* {@code minecraft:item.armor.unequip_wolf}
*
@@ -12198,20 +11806,6 @@ public final class SoundEventKeys {
*/
public static final TypedKey<Sound> ITEM_MACE_SMASH_GROUND_HEAVY = create(key("item.mace.smash_ground_heavy"));
/**
* {@code minecraft:item.nautilus_saddle_equip}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ITEM_NAUTILUS_SADDLE_EQUIP = create(key("item.nautilus_saddle_equip"));
/**
* {@code minecraft:item.nautilus_saddle_underwater_equip}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ITEM_NAUTILUS_SADDLE_UNDERWATER_EQUIP = create(key("item.nautilus_saddle_underwater_equip"));
/**
* {@code minecraft:item.nether_wart.plant}
*
@@ -12261,69 +11855,6 @@ public final class SoundEventKeys {
*/
public static final TypedKey<Sound> ITEM_SHOVEL_FLATTEN = create(key("item.shovel.flatten"));
/**
* {@code minecraft:item.spear.attack}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ITEM_SPEAR_ATTACK = create(key("item.spear.attack"));
/**
* {@code minecraft:item.spear.hit}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ITEM_SPEAR_HIT = create(key("item.spear.hit"));
/**
* {@code minecraft:item.spear.lunge_1}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ITEM_SPEAR_LUNGE_1 = create(key("item.spear.lunge_1"));
/**
* {@code minecraft:item.spear.lunge_2}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ITEM_SPEAR_LUNGE_2 = create(key("item.spear.lunge_2"));
/**
* {@code minecraft:item.spear.lunge_3}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ITEM_SPEAR_LUNGE_3 = create(key("item.spear.lunge_3"));
/**
* {@code minecraft:item.spear.use}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ITEM_SPEAR_USE = create(key("item.spear.use"));
/**
* {@code minecraft:item.spear_wood.attack}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ITEM_SPEAR_WOOD_ATTACK = create(key("item.spear_wood.attack"));
/**
* {@code minecraft:item.spear_wood.hit}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ITEM_SPEAR_WOOD_HIT = create(key("item.spear_wood.hit"));
/**
* {@code minecraft:item.spear_wood.use}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ITEM_SPEAR_WOOD_USE = create(key("item.spear_wood.use"));
/**
* {@code minecraft:item.spyglass.stop_using}
*
@@ -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}
*
@@ -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}
*
@@ -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}
*
@@ -249,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}
*
@@ -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}
*
@@ -494,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}
*
@@ -508,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}
*
@@ -537,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}
@@ -837,27 +816,6 @@ public final class ItemTypeTagKeys {
*/
public static final TagKey<ItemType> MEAT = create(key("meat"));
/**
* {@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}
*
@@ -1173,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}
*
@@ -1404,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() {
}
@@ -202,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.
@@ -340,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.
@@ -677,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();
/**
@@ -739,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();
}
@@ -422,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.
@@ -435,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
@@ -478,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.
@@ -497,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
@@ -5,22 +5,19 @@ import io.papermc.paper.command.brigadier.CommandSourceStack;
import io.papermc.paper.datacomponent.item.ResolvableProfile;
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>
@@ -100,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,31 +21,27 @@ 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.tag.TagKey;
import java.util.List;
import io.papermc.paper.registry.tag.TagKey;
import net.kyori.adventure.key.Key;
import net.kyori.adventure.text.Component;
import org.bukkit.Art;
@@ -56,7 +51,6 @@ 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;
@@ -118,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>
@@ -221,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
@@ -386,7 +371,6 @@ public final class DataComponentTypes {
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<DyeColor> CAT_COLLAR = valued("cat/collar");
public static final DataComponentType.Valued<DyeColor> SHEEP_COLOR = valued("sheep/color");
@@ -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);
}
}
@@ -7,7 +7,6 @@ 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,7 +62,6 @@ public interface BlocksAttacks {
*
* @return a damage type tag key, or null if there is no such tag key
*/
@Contract(pure = true)
@Nullable TagKey<DamageType> bypassedBy();
/**
@@ -75,7 +69,6 @@ public interface BlocksAttacks {
*
* @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);
@@ -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();
}
@@ -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
@@ -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);
}
}
@@ -19,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.
*/
int itemDamagePerAttack();
/**
* The number of seconds that blocking is disabled.
*
* @return seconds
*/
float disableBlockingForSeconds();
@@ -40,11 +36,10 @@ 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(int damage);
@@ -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,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
*
@@ -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;
}
}
@@ -19,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.0D, 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
@@ -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
@@ -9,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;
@@ -28,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;
@@ -127,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 *
@@ -221,11 +216,6 @@ public sealed interface RegistryKey<T> extends Keyed permits RegistryKeyImpl {
* @see io.papermc.paper.registry.keys.PigVariantKeys
*/
RegistryKey<Pig.Variant> PIG_VARIANT = create("pig_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
@@ -157,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.
@@ -174,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
@@ -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);
}
}
@@ -15,7 +15,6 @@ import io.papermc.paper.registry.data.JukeboxSongRegistryEntry;
import io.papermc.paper.registry.data.PaintingVariantRegistryEntry;
import io.papermc.paper.registry.data.PigVariantRegistryEntry;
import io.papermc.paper.registry.data.WolfVariantRegistryEntry;
import io.papermc.paper.registry.data.ZombieNautilusVariantRegistryEntry;
import io.papermc.paper.registry.data.dialog.DialogRegistryEntry;
import org.bukkit.Art;
import org.bukkit.GameEvent;
@@ -30,7 +29,6 @@ import org.bukkit.entity.Cow;
import org.bukkit.entity.Frog;
import org.bukkit.entity.Pig;
import org.bukkit.entity.Wolf;
import org.bukkit.entity.ZombieNautilus;
import static io.papermc.paper.registry.event.RegistryEventProviderImpl.create;
@@ -54,7 +52,6 @@ public final class RegistryEvents {
public static final RegistryEventProvider<Chicken.Variant, ChickenVariantRegistryEntry.Builder> CHICKEN_VARIANT = create(RegistryKey.CHICKEN_VARIANT);
public static final RegistryEventProvider<Cow.Variant, CowVariantRegistryEntry.Builder> COW_VARIANT = create(RegistryKey.COW_VARIANT);
public static final RegistryEventProvider<Pig.Variant, PigVariantRegistryEntry.Builder> PIG_VARIANT = create(RegistryKey.PIG_VARIANT);
public static final RegistryEventProvider<ZombieNautilus.Variant, ZombieNautilusVariantRegistryEntry.Builder> ZOMBIE_NAUTILUS_VARIANT = create(RegistryKey.ZOMBIE_NAUTILUS_VARIANT);
public static final RegistryEventProvider<Dialog, DialogRegistryEntry.Builder> DIALOG = create(RegistryKey.DIALOG);
// End generate - RegistryEvents
+13 -4
View File
@@ -1,6 +1,5 @@
package org.bukkit;
import com.google.common.base.Enums;
import com.google.common.collect.Maps;
import java.util.Map;
import org.bukkit.block.BlockFace;
@@ -443,6 +442,7 @@ public enum Effect {
SOUND_WITH_CHARGE_SHOT(1051, Type.SOUND),
;
private static final org.apache.logging.log4j.Logger LOGGER = org.apache.logging.log4j.LogManager.getLogger();
// Paper end
private final int id;
@@ -512,13 +512,22 @@ public enum Effect {
static {
for (Effect effect : values()) {
if (Enums.getField(effect).isAnnotationPresent(Deprecated.class)) {
continue;
}
if (!isDeprecated(effect)) // Paper
BY_ID.put(effect.id, effect);
}
}
// Paper start
private static boolean isDeprecated(Effect effect) {
try {
return Effect.class.getDeclaredField(effect.name()).isAnnotationPresent(Deprecated.class);
} catch (NoSuchFieldException e) {
LOGGER.error("Error getting effect enum field {}", effect.name(), e);
return false;
}
}
// Paper end
/**
* Represents the type of an effect.
* @deprecated not representative of what Effect does
@@ -60,10 +60,6 @@ public enum EntityEffect {
* delay, only the speed at which the entity in the spawner spins.
*/
RESET_SPAWNER_MINECART_DELAY(1, SpawnerMinecart.class),
/**
* When a kinetic weapon hits an entity.
*/
HIT(2, LivingEntity.class),
/**
* When mobs get hurt.
*
@@ -11,7 +11,7 @@ public enum ExplosionResult {
/**
* Represents an explosion where no change took place.
*
* This is the case when {@link org.bukkit.GameRules#MOB_GRIEFING} is
* This is the case when {@link org.bukkit.GameRule#MOB_GRIEFING} is
* disabled.
*/
KEEP,
@@ -19,8 +19,8 @@ public enum ExplosionResult {
* Represents an explosion where all destroyed blocks drop their items.
*
* This is the case when
* {@link org.bukkit.GameRules#TNT_EXPLOSION_DROP_DECAY} or
* {@link org.bukkit.GameRules#BLOCK_EXPLOSION_DROP_DECAY} is disabled.
* {@link org.bukkit.GameRule#TNT_EXPLOSION_DROP_DECAY} or
* {@link org.bukkit.GameRule#BLOCK_EXPLOSION_DROP_DECAY} is disabled.
*/
DESTROY,
/**
+175 -290
View File
@@ -1,10 +1,9 @@
package org.bukkit;
import com.google.common.base.Preconditions;
import io.papermc.paper.InternalAPIBridge;
import io.papermc.paper.world.flag.FeatureDependant;
import java.util.function.UnaryOperator;
import org.jetbrains.annotations.ApiStatus;
import java.util.HashMap;
import java.util.Map;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@@ -16,469 +15,343 @@ import org.jetbrains.annotations.Nullable;
* Wiki</a>
*
* @param <T> type of rule (Boolean or Integer)
* @see GameRules
*/
@ApiStatus.NonExtendable
public abstract class GameRule<T> implements net.kyori.adventure.translation.Translatable, FeatureDependant, Keyed {
public final class GameRule<T> implements net.kyori.adventure.translation.Translatable, FeatureDependant {
private static Map<String, GameRule<?>> gameRules = new HashMap<>();
// Boolean rules
/**
* Toggles the announcing of advancements.
*
* @deprecated renamed to {@link GameRules#SHOW_ADVANCEMENT_MESSAGES}
*/
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Boolean> ANNOUNCE_ADVANCEMENTS = GameRules.SHOW_ADVANCEMENT_MESSAGES;
public static final GameRule<Boolean> ANNOUNCE_ADVANCEMENTS = new GameRule<>("announceAdvancements", Boolean.class);
/**
* Whether command blocks should notify admins when they perform commands.
*
* @deprecated renamed to {@link GameRules#COMMAND_BLOCK_OUTPUT}
*/
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Boolean> COMMAND_BLOCK_OUTPUT = GameRules.COMMAND_BLOCK_OUTPUT;
public static final GameRule<Boolean> COMMAND_BLOCK_OUTPUT = new GameRule<>("commandBlockOutput", Boolean.class);
/**
* Whether the server should skip checking player speed.
*
* @deprecated renamed to {@link GameRules#PLAYER_MOVEMENT_CHECK} (inverted)
*/
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Boolean> DISABLE_PLAYER_MOVEMENT_CHECK = InternalAPIBridge.get().legacyGameRuleBridge(GameRules.PLAYER_MOVEMENT_CHECK, inverseBool(), inverseBool(), Boolean.class);
public static final GameRule<Boolean> DISABLE_PLAYER_MOVEMENT_CHECK = new GameRule<>("disablePlayerMovementCheck", Boolean.class);
/**
* Whether the server should skip checking player speed when the player is
* wearing elytra.
*
* @deprecated renamed to {@link GameRules#ELYTRA_MOVEMENT_CHECK} (inverted)
*/
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Boolean> DISABLE_ELYTRA_MOVEMENT_CHECK = InternalAPIBridge.get().legacyGameRuleBridge(GameRules.ELYTRA_MOVEMENT_CHECK, inverseBool(), inverseBool(), Boolean.class);
public static final GameRule<Boolean> DISABLE_ELYTRA_MOVEMENT_CHECK = new GameRule<>("disableElytraMovementCheck", Boolean.class);
/**
* Whether time progresses from the current moment.
*
* @deprecated renamed to {@link GameRules#ADVANCE_TIME}
*/
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Boolean> DO_DAYLIGHT_CYCLE = GameRules.ADVANCE_TIME;
public static final GameRule<Boolean> DO_DAYLIGHT_CYCLE = new GameRule<>("doDaylightCycle", Boolean.class);
/**
* Whether entities that are not mobs should have drops.
*
* @deprecated renamed to {@link GameRules#ENTITY_DROPS}
*/
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Boolean> DO_ENTITY_DROPS = GameRules.ENTITY_DROPS;
public static final GameRule<Boolean> DO_ENTITY_DROPS = new GameRule<>("doEntityDrops", Boolean.class);
/**
* Whether fire should spread and naturally extinguish.
*
* @deprecated use {@link GameRules#FIRE_SPREAD_RADIUS_AROUND_PLAYER}
*/
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Boolean> DO_FIRE_TICK = InternalAPIBridge.get().legacyGameRuleBridge(GameRules.FIRE_SPREAD_RADIUS_AROUND_PLAYER, (value) -> value ? 128 : 0, (value) -> value != 0, Boolean.class);
public static final GameRule<Boolean> DO_FIRE_TICK = new GameRule<>("doFireTick", Boolean.class);
/**
* Whether players should only be able to craft recipes they've unlocked
* first.
*
* @deprecated renamed to {@link GameRules#LIMITED_CRAFTING}
*/
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Boolean> DO_LIMITED_CRAFTING = GameRules.LIMITED_CRAFTING;
/**
* Whether projectiles can break blocks.
*
* @deprecated renamed to {@link GameRules#PROJECTILES_CAN_BREAK_BLOCKS}
*/
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Boolean> PROJECTILES_CAN_BREAK_BLOCKS = GameRules.PROJECTILES_CAN_BREAK_BLOCKS;
public static final GameRule<Boolean> DO_LIMITED_CRAFTING = new GameRule<>("doLimitedCrafting", Boolean.class);
/**
* Whether mobs should drop items.
*
* @deprecated renamed to {@link GameRules#MOB_DROPS}
*/
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Boolean> DO_MOB_LOOT = GameRules.MOB_DROPS;
public static final GameRule<Boolean> DO_MOB_LOOT = new GameRule<>("doMobLoot", Boolean.class);
/**
* Whether projectiles can break blocks.
*/
public static final GameRule<Boolean> PROJECTILES_CAN_BREAK_BLOCKS = new GameRule<>("projectilesCanBreakBlocks", Boolean.class);
/**
* Whether mobs should naturally spawn.
*
* @deprecated renamed to {@link GameRules#SPAWN_MOBS}
*/
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Boolean> DO_MOB_SPAWNING = GameRules.SPAWN_MOBS;
public static final GameRule<Boolean> DO_MOB_SPAWNING = new GameRule<>("doMobSpawning", Boolean.class);
/**
* Whether blocks should have drops.
*
* @deprecated renamed to {@link GameRules#BLOCK_DROPS}
*/
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Boolean> DO_TILE_DROPS = GameRules.BLOCK_DROPS;
public static final GameRule<Boolean> DO_TILE_DROPS = new GameRule<>("doTileDrops", Boolean.class);
/**
* Whether the weather will change from the current moment.
*
* @deprecated renamed to {@link GameRules#ADVANCE_WEATHER}
*/
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Boolean> DO_WEATHER_CYCLE = GameRules.ADVANCE_WEATHER;
public static final GameRule<Boolean> DO_WEATHER_CYCLE = new GameRule<>("doWeatherCycle", Boolean.class);
/**
* Whether the player should keep items in their inventory after death.
*
* @deprecated renamed to {@link GameRules#KEEP_INVENTORY}
*/
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Boolean> KEEP_INVENTORY = GameRules.KEEP_INVENTORY;
public static final GameRule<Boolean> KEEP_INVENTORY = new GameRule<>("keepInventory", Boolean.class);
/**
* Whether to log admin commands to server log.
*
* @deprecated renamed to {@link GameRules#LOG_ADMIN_COMMANDS}
*/
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Boolean> LOG_ADMIN_COMMANDS = GameRules.LOG_ADMIN_COMMANDS;
public static final GameRule<Boolean> LOG_ADMIN_COMMANDS = new GameRule<>("logAdminCommands", Boolean.class);
/**
* Whether mobs can pick up items or change blocks.
*
* @deprecated renamed to {@link GameRules#MOB_GRIEFING}
*/
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Boolean> MOB_GRIEFING = GameRules.MOB_GRIEFING;
public static final GameRule<Boolean> MOB_GRIEFING = new GameRule<>("mobGriefing", Boolean.class);
/**
* Whether players can regenerate health naturally through their hunger bar.
*
* @deprecated renamed to {@link GameRules#NATURAL_HEALTH_REGENERATION}
*/
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Boolean> NATURAL_REGENERATION = GameRules.NATURAL_HEALTH_REGENERATION;
public static final GameRule<Boolean> NATURAL_REGENERATION = new GameRule<>("naturalRegeneration", Boolean.class);
/**
* Whether the debug screen shows all or reduced information.
*
* @deprecated renamed to {@link GameRules#REDUCED_DEBUG_INFO}
*/
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Boolean> REDUCED_DEBUG_INFO = GameRules.REDUCED_DEBUG_INFO;
public static final GameRule<Boolean> REDUCED_DEBUG_INFO = new GameRule<>("reducedDebugInfo", Boolean.class);
/**
* Whether the feedback from commands executed by a player should show up in
* chat. Also affects the default behavior of whether command blocks store
* their output text.
*
* @deprecated renamed to {@link GameRules#SEND_COMMAND_FEEDBACK}
*/
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Boolean> SEND_COMMAND_FEEDBACK = GameRules.SEND_COMMAND_FEEDBACK;
public static final GameRule<Boolean> SEND_COMMAND_FEEDBACK = new GameRule<>("sendCommandFeedback", Boolean.class);
/**
* Whether a message appears in chat when a player dies.
*
* @deprecated renamed to {@link GameRules#SHOW_DEATH_MESSAGES}
*/
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Boolean> SHOW_DEATH_MESSAGES = GameRules.SHOW_DEATH_MESSAGES;
public static final GameRule<Boolean> SHOW_DEATH_MESSAGES = new GameRule<>("showDeathMessages", Boolean.class);
/**
* Whether players in spectator mode can generate chunks.
*
* @deprecated renamed to {@link GameRules#SPECTATORS_GENERATE_CHUNKS}
*/
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Boolean> SPECTATORS_GENERATE_CHUNKS = GameRules.SPECTATORS_GENERATE_CHUNKS;
public static final GameRule<Boolean> SPECTATORS_GENERATE_CHUNKS = new GameRule<>("spectatorsGenerateChunks", Boolean.class);
/**
* Whether pillager raids are enabled or not.
*
* @deprecated renamed to {@link GameRules#RAIDS} (inverted)
*/
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Boolean> DISABLE_RAIDS = InternalAPIBridge.get().legacyGameRuleBridge(GameRules.RAIDS, inverseBool(), inverseBool(), Boolean.class);
public static final GameRule<Boolean> DISABLE_RAIDS = new GameRule<>("disableRaids", Boolean.class);
/**
* Whether phantoms will appear without sleeping or not.
*
* @deprecated renamed to {@link GameRules#SPAWN_PHANTOMS}
*/
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Boolean> DO_INSOMNIA = GameRules.SPAWN_PHANTOMS;
public static final GameRule<Boolean> DO_INSOMNIA = new GameRule<>("doInsomnia", Boolean.class);
/**
* Whether clients will respawn immediately after death or not.
*
* @deprecated renamed to {@link GameRules#IMMEDIATE_RESPAWN}
*/
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Boolean> DO_IMMEDIATE_RESPAWN = GameRules.IMMEDIATE_RESPAWN;
public static final GameRule<Boolean> DO_IMMEDIATE_RESPAWN = new GameRule<>("doImmediateRespawn", Boolean.class);
/**
* Whether drowning damage is enabled or not.
*
* @deprecated renamed to {@link GameRules#DROWNING_DAMAGE}
*/
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Boolean> DROWNING_DAMAGE = GameRules.DROWNING_DAMAGE;
public static final GameRule<Boolean> DROWNING_DAMAGE = new GameRule<>("drowningDamage", Boolean.class);
/**
* Whether fall damage is enabled or not.
*
* @deprecated renamed to {@link GameRules#FALL_DAMAGE}
*/
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Boolean> FALL_DAMAGE = GameRules.FALL_DAMAGE;
public static final GameRule<Boolean> FALL_DAMAGE = new GameRule<>("fallDamage", Boolean.class);
/**
* Whether fire damage is enabled or not.
*
* @deprecated renamed to {@link GameRules#FIRE_DAMAGE}
*/
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Boolean> FIRE_DAMAGE = GameRules.FIRE_DAMAGE;
public static final GameRule<Boolean> FIRE_DAMAGE = new GameRule<>("fireDamage", Boolean.class);
/**
* Whether freeze damage is enabled or not.
*
* @deprecated renamed to {@link GameRules#FREEZE_DAMAGE}
*/
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Boolean> FREEZE_DAMAGE = GameRules.FREEZE_DAMAGE;
public static final GameRule<Boolean> FREEZE_DAMAGE = new GameRule<>("freezeDamage", Boolean.class);
/**
* Whether patrols should naturally spawn.
*
* @deprecated renamed to {@link GameRules#SPAWN_PATROLS}
*/
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Boolean> DO_PATROL_SPAWNING = GameRules.SPAWN_PATROLS;
public static final GameRule<Boolean> DO_PATROL_SPAWNING = new GameRule<>("doPatrolSpawning", Boolean.class);
/**
* Whether traders should naturally spawn.
*
* @deprecated renamed to {@link GameRules#SPAWN_WANDERING_TRADERS}
*/
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Boolean> DO_TRADER_SPAWNING = GameRules.SPAWN_WANDERING_TRADERS;
public static final GameRule<Boolean> DO_TRADER_SPAWNING = new GameRule<>("doTraderSpawning", Boolean.class);
/**
* Whether wardens should naturally spawn.
*
* @deprecated renamed to {@link GameRules#SPAWN_WARDENS}
*/
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Boolean> DO_WARDEN_SPAWNING = GameRules.SPAWN_WARDENS;
public static final GameRule<Boolean> DO_WARDEN_SPAWNING = new GameRule<>("doWardenSpawning", Boolean.class);
/**
* Whether mobs should cease being angry at a player once they die.
*
* @deprecated renamed to {@link GameRules#FORGIVE_DEAD_PLAYERS}
*/
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Boolean> FORGIVE_DEAD_PLAYERS = GameRules.FORGIVE_DEAD_PLAYERS;
public static final GameRule<Boolean> FORGIVE_DEAD_PLAYERS = new GameRule<>("forgiveDeadPlayers", Boolean.class);
/**
* Whether mobs will target all player entities once angered.
*
* @deprecated renamed to {@link GameRules#UNIVERSAL_ANGER}
*/
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Boolean> UNIVERSAL_ANGER = GameRules.UNIVERSAL_ANGER;
public static final GameRule<Boolean> UNIVERSAL_ANGER = new GameRule<>("universalAnger", Boolean.class);
/**
* Whether block explosions will destroy dropped items.
*
* @deprecated renamed to {@link GameRules#BLOCK_EXPLOSION_DROP_DECAY}
*/
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Boolean> BLOCK_EXPLOSION_DROP_DECAY = GameRules.BLOCK_EXPLOSION_DROP_DECAY;
public static final GameRule<Boolean> BLOCK_EXPLOSION_DROP_DECAY = new GameRule<>("blockExplosionDropDecay", Boolean.class);
/**
* * Whether mob explosions will destroy dropped items.
*
* @deprecated renamed to {@link GameRules#MOB_EXPLOSION_DROP_DECAY}
*/
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Boolean> MOB_EXPLOSION_DROP_DECAY = GameRules.MOB_EXPLOSION_DROP_DECAY;
public static final GameRule<Boolean> MOB_EXPLOSION_DROP_DECAY = new GameRule<>("mobExplosionDropDecay", Boolean.class);
/**
* Whether tnt explosions will destroy dropped items.
*
* @deprecated renamed to {@link GameRules#TNT_EXPLOSION_DROP_DECAY}
*/
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Boolean> TNT_EXPLOSION_DROP_DECAY = GameRules.TNT_EXPLOSION_DROP_DECAY;
public static final GameRule<Boolean> TNT_EXPLOSION_DROP_DECAY = new GameRule<>("tntExplosionDropDecay", Boolean.class);
/**
* Whether water blocks can convert into water source blocks.
*
* @deprecated renamed to {@link GameRules#WATER_SOURCE_CONVERSION}
*/
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Boolean> WATER_SOURCE_CONVERSION = GameRules.WATER_SOURCE_CONVERSION;
public static final GameRule<Boolean> WATER_SOURCE_CONVERSION = new GameRule<>("waterSourceConversion", Boolean.class);
/**
* Whether lava blocks can convert into lava source blocks.
*
* @deprecated renamed to {@link GameRules#LAVA_SOURCE_CONVERSION}
*/
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Boolean> LAVA_SOURCE_CONVERSION = GameRules.LAVA_SOURCE_CONVERSION;
public static final GameRule<Boolean> LAVA_SOURCE_CONVERSION = new GameRule<>("lavaSourceConversion", Boolean.class);
/**
* Whether global level events such as ender dragon, wither, and completed
* end portal effects will propagate across the entire server.
*
* @deprecated renamed to {@link GameRules#GLOBAL_SOUND_EVENTS}
*/
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Boolean> GLOBAL_SOUND_EVENTS = GameRules.GLOBAL_SOUND_EVENTS;
public static final GameRule<Boolean> GLOBAL_SOUND_EVENTS = new GameRule<>("globalSoundEvents", Boolean.class);
/**
* Whether vines will spread.
*
* @deprecated renamed to {@link GameRules#SPREAD_VINES}
*/
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Boolean> DO_VINES_SPREAD = GameRules.SPREAD_VINES;
public static final GameRule<Boolean> DO_VINES_SPREAD = new GameRule<>("doVinesSpread", Boolean.class);
/**
* Whether ender pearls will vanish on player death.
*
* @deprecated renamed to {@link GameRules#ENDER_PEARLS_VANISH_ON_DEATH}
*/
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Boolean> ENDER_PEARLS_VANISH_ON_DEATH = GameRules.ENDER_PEARLS_VANISH_ON_DEATH;
public static final GameRule<Boolean> ENDER_PEARLS_VANISH_ON_DEATH = new GameRule<>("enderPearlsVanishOnDeath", Boolean.class);
/**
* Whether fire will still propagate far away from players (8 chunks).
*
* @deprecated use {@link GameRules#FIRE_SPREAD_RADIUS_AROUND_PLAYER}
*/
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Boolean> ALLOW_FIRE_TICKS_AWAY_FROM_PLAYER = InternalAPIBridge.get().legacyGameRuleBridge(GameRules.FIRE_SPREAD_RADIUS_AROUND_PLAYER, (value) -> value ? -1 : 128, (value) -> value == -1, Boolean.class);
public static final GameRule<Boolean> ALLOW_FIRE_TICKS_AWAY_FROM_PLAYER = new GameRule<>("allowFireTicksAwayFromPlayer", Boolean.class);
/**
* Whether primed tnt explodes.
*
* @deprecated renamed to {@link GameRules#TNT_EXPLODES}
*/
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Boolean> TNT_EXPLODES = GameRules.TNT_EXPLODES;
/**
* Configures if the world uses the locator bar.
*
* @deprecated renamed to {@link GameRules#LOCATOR_BAR}
*/
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Boolean> LOCATOR_BAR = GameRules.LOCATOR_BAR;
/**
* Whether player versus player combat is allowed.
*
* @deprecated renamed to {@link GameRules#PVP}
*/
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Boolean> PVP = GameRules.PVP;
/**
* Whether monsters should naturally spawn.
*
* @deprecated renamed to {@link GameRules#SPAWN_MONSTERS}
*/
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Boolean> SPAWN_MONSTERS = GameRules.SPAWN_MONSTERS;
/**
* Whether players can enter the Nether using portals.
*
* @deprecated renamed to {@link GameRules#ALLOW_ENTERING_NETHER_USING_PORTALS}
*/
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Boolean> ALLOW_ENTERING_NETHER_USING_PORTALS = GameRules.ALLOW_ENTERING_NETHER_USING_PORTALS;
/**
* Whether command blocks are enabled.
*
* @deprecated renamed to {@link GameRules#COMMAND_BLOCKS_WORK}
*/
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Boolean> COMMAND_BLOCKS_ENABLED = GameRules.COMMAND_BLOCKS_WORK;
/**
* Whether spawner blocks are enabled.
*
* @deprecated renamed to {@link GameRules#SPAWNER_BLOCKS_WORK}
*/
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Boolean> SPAWNER_BLOCKS_ENABLED = GameRules.SPAWNER_BLOCKS_WORK;
public static final GameRule<Boolean> TNT_EXPLODES = new GameRule<>("tntExplodes", Boolean.class);
// Numerical rules
/**
* How often a random block tick occurs (such as plant growth, leaf decay,
* etc.) per chunk section per game tick. 0 will disable random ticks,
* higher numbers will increase random ticks.
*
* @deprecated renamed to {@link GameRules#RANDOM_TICK_SPEED}
*/
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Integer> RANDOM_TICK_SPEED = GameRules.RANDOM_TICK_SPEED;
public static final GameRule<Integer> RANDOM_TICK_SPEED = new GameRule<>("randomTickSpeed", Integer.class);
/**
* The number of blocks outward from the world spawn coordinates that a
* player will spawn in when first joining a server or when dying without a
* spawnpoint.
*
* @deprecated renamed to {@link GameRules#RESPAWN_RADIUS}
*/
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Integer> SPAWN_RADIUS = GameRules.RESPAWN_RADIUS;
public static final GameRule<Integer> SPAWN_RADIUS = new GameRule<>("spawnRadius", Integer.class);
/**
* The maximum number of other pushable entities a mob or player can push,
* before taking suffocation damage.
* <br>
* Setting to 0 disables this rule.
*
* @deprecated renamed to {@link GameRules#MAX_ENTITY_CRAMMING}
*/
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Integer> MAX_ENTITY_CRAMMING = GameRules.MAX_ENTITY_CRAMMING;
public static final GameRule<Integer> MAX_ENTITY_CRAMMING = new GameRule<>("maxEntityCramming", Integer.class);
/**
* Determines the number at which the chain of command blocks act as a
* "chain."
* <br>
* This is the maximum amount of command blocks that can be activated in a
* single tick from a single chain.
*
* @deprecated renamed to {@link GameRules#MAX_COMMAND_SEQUENCE_LENGTH}
*/
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Integer> MAX_COMMAND_CHAIN_LENGTH = GameRules.MAX_COMMAND_SEQUENCE_LENGTH;
public static final GameRule<Integer> MAX_COMMAND_CHAIN_LENGTH = new GameRule<>("maxCommandChainLength", Integer.class);
/**
* Determines the number of different commands/functions which execute
* commands can fork into.
*
* @deprecated renamed to {@link GameRules#MAX_COMMAND_FORKS}
*/
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Integer> MAX_COMMAND_FORK_COUNT = GameRules.MAX_COMMAND_FORKS;
public static final GameRule<Integer> MAX_COMMAND_FORK_COUNT = new GameRule<>("maxCommandForkCount", Integer.class);
/**
* Determines the maximum number of blocks which a command can modify.
*
* @deprecated renamed to {@link GameRules#MAX_BLOCK_MODIFICATIONS}
*/
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Integer> COMMAND_MODIFICATION_BLOCK_LIMIT = GameRules.MAX_BLOCK_MODIFICATIONS;
public static final GameRule<Integer> COMMAND_MODIFICATION_BLOCK_LIMIT = new GameRule<>("commandModificationBlockLimit", Integer.class);
/**
* The percentage of online players which must be sleeping for the night to
* advance.
*
* @deprecated renamed to {@link GameRules#PLAYERS_SLEEPING_PERCENTAGE}
*/
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Integer> PLAYERS_SLEEPING_PERCENTAGE = GameRules.PLAYERS_SLEEPING_PERCENTAGE;
/**
* @deprecated renamed to {@link GameRules#MAX_SNOW_ACCUMULATION_HEIGHT}
*/
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Integer> SNOW_ACCUMULATION_HEIGHT = GameRules.MAX_SNOW_ACCUMULATION_HEIGHT;
public static final GameRule<Integer> PLAYERS_SLEEPING_PERCENTAGE = new GameRule<>("playersSleepingPercentage", Integer.class);
public static final GameRule<Integer> SNOW_ACCUMULATION_HEIGHT = new GameRule<>("snowAccumulationHeight", Integer.class);
/**
* The amount of time a player must stand in a nether portal before the
* portal activates.
*
* @deprecated renamed to {@link GameRules#PLAYERS_NETHER_PORTAL_DEFAULT_DELAY}
*/
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Integer> PLAYERS_NETHER_PORTAL_DEFAULT_DELAY = GameRules.PLAYERS_NETHER_PORTAL_DEFAULT_DELAY;
public static final GameRule<Integer> PLAYERS_NETHER_PORTAL_DEFAULT_DELAY = new GameRule<>("playersNetherPortalDefaultDelay", Integer.class);
/**
* The amount of time a player in creative mode must stand in a nether
* portal before the portal activates.
*
* @deprecated renamed to {@link GameRules#PLAYERS_NETHER_PORTAL_CREATIVE_DELAY}
*/
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Integer> PLAYERS_NETHER_PORTAL_CREATIVE_DELAY = GameRules.PLAYERS_NETHER_PORTAL_CREATIVE_DELAY;
public static final GameRule<Integer> PLAYERS_NETHER_PORTAL_CREATIVE_DELAY = new GameRule<>("playersNetherPortalCreativeDelay", Integer.class);
/**
* The maximum speed of minecarts (when the new movement algorithm is
* enabled).
*
* @deprecated renamed to {@link GameRules#MAX_MINECART_SPEED}
*/
@MinecraftExperimental(MinecraftExperimental.Requires.MINECART_IMPROVEMENTS)
@ApiStatus.Experimental
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Integer> MINECART_MAX_SPEED = GameRules.MAX_MINECART_SPEED;
@MinecraftExperimental(MinecraftExperimental.Requires.MINECART_IMPROVEMENTS) // Paper - add missing annotation
@org.jetbrains.annotations.ApiStatus.Experimental // Paper - add missing annotation
public static final GameRule<Integer> MINECART_MAX_SPEED = new GameRule<>("minecartMaxSpeed", Integer.class);
private static UnaryOperator<Boolean> inverseBool() {
return operand -> !operand;
/**
* Configures if the world uses the locator bar.
*/
public static final GameRule<Boolean> LOCATOR_BAR = new GameRule<>("locatorBar", Boolean.class);
/**
* Whether player versus player combat is allowed.
*/
public static final GameRule<Boolean> PVP = new GameRule<>("pvp", Boolean.class);
/**
* Whether monsters should naturally spawn.
*/
public static final GameRule<Boolean> SPAWN_MONSTERS = new GameRule<>("spawnMonsters", Boolean.class);
/**
* Whether players can enter the Nether using portals.
*/
public static final GameRule<Boolean> ALLOW_ENTERING_NETHER_USING_PORTALS = new GameRule<>("allowEnteringNetherUsingPortals", Boolean.class);
/**
* Whether command blocks are enabled.
*/
public static final GameRule<Boolean> COMMAND_BLOCKS_ENABLED = new GameRule<>("commandBlocksEnabled", Boolean.class);
/**
* Whether spawner blocks are enabled.
*/
public static final GameRule<Boolean> SPAWNER_BLOCKS_ENABLED = new GameRule<>("spawnerBlocksEnabled", Boolean.class);
// All GameRules instantiated above this for organizational purposes
private final String name;
private final Class<T> type;
private GameRule(@NotNull String name, @NotNull Class<T> clazz) {
Preconditions.checkNotNull(name, "GameRule name cannot be null");
Preconditions.checkNotNull(clazz, "GameRule type cannot be null");
Preconditions.checkArgument(clazz == Boolean.class || clazz == Integer.class, "Must be of type Boolean or Integer. Found %s ", clazz.getName());
this.name = name;
this.type = clazz;
gameRules.put(name, this);
}
/**
* Get the name of this GameRule.
*
* @return the name of this GameRule
* @deprecated Game rule is now a registry, use {@link #getKey()} instead
*/
@NotNull
@Deprecated(since = "1.21.11", forRemoval = true)
public abstract String getName();
public String getName() {
return name;
}
/**
* Get the type of this rule.
@@ -486,7 +359,26 @@ public abstract class GameRule<T> implements net.kyori.adventure.translation.Tra
* @return the rule type; Integer or Boolean
*/
@NotNull
public abstract Class<T> getType();
public Class<T> getType() {
return type;
}
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof GameRule)) {
return false;
}
GameRule<?> other = (GameRule<?>) obj;
return this.getName().equals(other.getName()) && this.getType() == other.getType();
}
@Override
public String toString() {
return "GameRule{" + "key=" + name + ", type=" + type + '}';
}
/**
* Get a {@link GameRule} by its name.
@@ -494,33 +386,26 @@ public abstract class GameRule<T> implements net.kyori.adventure.translation.Tra
* @param rule the name of the GameRule
* @return the {@link GameRule} or null if no GameRule matches the given
* name
* @deprecated Game rule is now a registry, fetch element from it
*/
@Nullable
@Deprecated(since = "1.21.11", forRemoval = true)
public static <T> GameRule<T> getByName(@NotNull String rule) {
Preconditions.checkArgument(rule != null, "Rule cannot be null");
NamespacedKey key = NamespacedKey.fromString(rule);
if (key == null) {
return null;
}
return (GameRule<T>) Registry.GAME_RULE.get(key);
public static GameRule<?> getByName(@NotNull String rule) {
Preconditions.checkNotNull(rule, "Rule cannot be null");
return gameRules.get(rule);
}
/**
* Get an immutable collection of {@link GameRule}s.
*
* @return an immutable collection containing all registered GameRules.
* @deprecated Game rule is now a registry, fetch elements from it
*/
@NotNull
@Deprecated(since = "1.21.11", forRemoval = true)
public static GameRule<?>[] values() {
return Registry.GAME_RULE.stream().toArray(GameRule[]::new);
return gameRules.values().toArray(new GameRule<?>[gameRules.size()]);
}
@Override
public abstract @NotNull String translationKey();
public @NotNull String translationKey() {
return "gamerule." + this.name;
}
}
@@ -1,141 +0,0 @@
package org.bukkit;
import net.kyori.adventure.key.KeyPattern;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* All the vanilla gamerules
*/
@NullMarked
public final class GameRules {
// Start generate - GameRules
public static final GameRule<Boolean> ADVANCE_TIME = getRule("advance_time");
public static final GameRule<Boolean> ADVANCE_WEATHER = getRule("advance_weather");
public static final GameRule<Boolean> ALLOW_ENTERING_NETHER_USING_PORTALS = getRule("allow_entering_nether_using_portals");
public static final GameRule<Boolean> BLOCK_DROPS = getRule("block_drops");
public static final GameRule<Boolean> BLOCK_EXPLOSION_DROP_DECAY = getRule("block_explosion_drop_decay");
public static final GameRule<Boolean> COMMAND_BLOCK_OUTPUT = getRule("command_block_output");
public static final GameRule<Boolean> COMMAND_BLOCKS_WORK = getRule("command_blocks_work");
public static final GameRule<Boolean> DROWNING_DAMAGE = getRule("drowning_damage");
public static final GameRule<Boolean> ELYTRA_MOVEMENT_CHECK = getRule("elytra_movement_check");
public static final GameRule<Boolean> ENDER_PEARLS_VANISH_ON_DEATH = getRule("ender_pearls_vanish_on_death");
public static final GameRule<Boolean> ENTITY_DROPS = getRule("entity_drops");
public static final GameRule<Boolean> FALL_DAMAGE = getRule("fall_damage");
public static final GameRule<Boolean> FIRE_DAMAGE = getRule("fire_damage");
public static final GameRule<Integer> FIRE_SPREAD_RADIUS_AROUND_PLAYER = getRule("fire_spread_radius_around_player");
public static final GameRule<Boolean> FORGIVE_DEAD_PLAYERS = getRule("forgive_dead_players");
public static final GameRule<Boolean> FREEZE_DAMAGE = getRule("freeze_damage");
public static final GameRule<Boolean> GLOBAL_SOUND_EVENTS = getRule("global_sound_events");
public static final GameRule<Boolean> IMMEDIATE_RESPAWN = getRule("immediate_respawn");
public static final GameRule<Boolean> KEEP_INVENTORY = getRule("keep_inventory");
public static final GameRule<Boolean> LAVA_SOURCE_CONVERSION = getRule("lava_source_conversion");
public static final GameRule<Boolean> LIMITED_CRAFTING = getRule("limited_crafting");
public static final GameRule<Boolean> LOCATOR_BAR = getRule("locator_bar");
public static final GameRule<Boolean> LOG_ADMIN_COMMANDS = getRule("log_admin_commands");
public static final GameRule<Integer> MAX_BLOCK_MODIFICATIONS = getRule("max_block_modifications");
public static final GameRule<Integer> MAX_COMMAND_FORKS = getRule("max_command_forks");
public static final GameRule<Integer> MAX_COMMAND_SEQUENCE_LENGTH = getRule("max_command_sequence_length");
public static final GameRule<Integer> MAX_ENTITY_CRAMMING = getRule("max_entity_cramming");
@MinecraftExperimental(MinecraftExperimental.Requires.MINECART_IMPROVEMENTS)
@ApiStatus.Experimental
public static final GameRule<Integer> MAX_MINECART_SPEED = getRule("max_minecart_speed");
public static final GameRule<Integer> MAX_SNOW_ACCUMULATION_HEIGHT = getRule("max_snow_accumulation_height");
public static final GameRule<Boolean> MOB_DROPS = getRule("mob_drops");
public static final GameRule<Boolean> MOB_EXPLOSION_DROP_DECAY = getRule("mob_explosion_drop_decay");
public static final GameRule<Boolean> MOB_GRIEFING = getRule("mob_griefing");
public static final GameRule<Boolean> NATURAL_HEALTH_REGENERATION = getRule("natural_health_regeneration");
public static final GameRule<Boolean> PLAYER_MOVEMENT_CHECK = getRule("player_movement_check");
public static final GameRule<Integer> PLAYERS_NETHER_PORTAL_CREATIVE_DELAY = getRule("players_nether_portal_creative_delay");
public static final GameRule<Integer> PLAYERS_NETHER_PORTAL_DEFAULT_DELAY = getRule("players_nether_portal_default_delay");
public static final GameRule<Integer> PLAYERS_SLEEPING_PERCENTAGE = getRule("players_sleeping_percentage");
public static final GameRule<Boolean> PROJECTILES_CAN_BREAK_BLOCKS = getRule("projectiles_can_break_blocks");
public static final GameRule<Boolean> PVP = getRule("pvp");
public static final GameRule<Boolean> RAIDS = getRule("raids");
public static final GameRule<Integer> RANDOM_TICK_SPEED = getRule("random_tick_speed");
public static final GameRule<Boolean> REDUCED_DEBUG_INFO = getRule("reduced_debug_info");
public static final GameRule<Integer> RESPAWN_RADIUS = getRule("respawn_radius");
public static final GameRule<Boolean> SEND_COMMAND_FEEDBACK = getRule("send_command_feedback");
public static final GameRule<Boolean> SHOW_ADVANCEMENT_MESSAGES = getRule("show_advancement_messages");
public static final GameRule<Boolean> SHOW_DEATH_MESSAGES = getRule("show_death_messages");
public static final GameRule<Boolean> SPAWN_MOBS = getRule("spawn_mobs");
public static final GameRule<Boolean> SPAWN_MONSTERS = getRule("spawn_monsters");
public static final GameRule<Boolean> SPAWN_PATROLS = getRule("spawn_patrols");
public static final GameRule<Boolean> SPAWN_PHANTOMS = getRule("spawn_phantoms");
public static final GameRule<Boolean> SPAWN_WANDERING_TRADERS = getRule("spawn_wandering_traders");
public static final GameRule<Boolean> SPAWN_WARDENS = getRule("spawn_wardens");
public static final GameRule<Boolean> SPAWNER_BLOCKS_WORK = getRule("spawner_blocks_work");
public static final GameRule<Boolean> SPECTATORS_GENERATE_CHUNKS = getRule("spectators_generate_chunks");
public static final GameRule<Boolean> SPREAD_VINES = getRule("spread_vines");
public static final GameRule<Boolean> TNT_EXPLODES = getRule("tnt_explodes");
public static final GameRule<Boolean> TNT_EXPLOSION_DROP_DECAY = getRule("tnt_explosion_drop_decay");
public static final GameRule<Boolean> UNIVERSAL_ANGER = getRule("universal_anger");
public static final GameRule<Boolean> WATER_SOURCE_CONVERSION = getRule("water_source_conversion");
// End generate - GameRules
private static <T> GameRule<T> getRule(@KeyPattern.Value String key) {
return (GameRule<T>) Registry.GAME_RULE.getOrThrow(NamespacedKey.minecraft(key));
}
private GameRules() {
}
}
@@ -2,7 +2,6 @@ package org.bukkit;
import io.papermc.paper.registry.RegistryAccess;
import io.papermc.paper.registry.RegistryKey;
import net.kyori.adventure.text.Component;
import org.jspecify.annotations.NullMarked;
/**
@@ -66,32 +65,4 @@ public interface JukeboxSong extends Keyed, Translatable {
@Override
@Deprecated(forRemoval = true)
String getTranslationKey();
/**
* Gets the sound for this song.
*
* @return the sound
*/
Sound getSound();
/**
* Gets the description for this song.
*
* @return the description
*/
Component getDescription();
/**
* Gets the length in seconds for this song.
*
* @return the length in seconds
*/
float getLengthInSeconds();
/**
* Gets the comparator output for this song.
*
* @return the comparator output
*/
int getComparatorOutput();
}
File diff suppressed because it is too large. Load diff
+26 -33
View File
@@ -3,16 +3,13 @@ package org.bukkit;
import java.util.List;
import java.util.Set;
import java.util.UUID;
import org.bukkit.boss.BossBar;
import org.bukkit.entity.Raider;
import org.bukkit.persistence.PersistentDataHolder;
import org.jspecify.annotations.NullMarked;
import org.jetbrains.annotations.NotNull;
/**
* Represents a raid event.
*/
@NullMarked
public interface Raid extends PersistentDataHolder {
public interface Raid extends org.bukkit.persistence.PersistentDataHolder { // Paper
/**
* Get whether this raid started.
@@ -51,6 +48,7 @@ public interface Raid extends PersistentDataHolder {
*
* @return location
*/
@NotNull
Location getLocation();
/**
@@ -61,6 +59,7 @@ public interface Raid extends PersistentDataHolder {
*
* @return Raids status
*/
@NotNull
RaidStatus getStatus();
/**
@@ -87,16 +86,6 @@ public interface Raid extends PersistentDataHolder {
*/
int getTotalWaves();
/**
* Sets the number of waves in this raid.
*
* @param totalWaves number of waves
* @throws IllegalArgumentException if totalWaves is negative or zero
* @throws IllegalArgumentException if totalWaves is larger than 7, which is the most waves a vanilla raid can have.
* @throws IllegalArgumentException if the totalWaves is less than {@link #getSpawnedGroups()}
*/
void setTotalWaves(int totalWaves);
/**
* Gets the sum of all raider's health.
*
@@ -109,6 +98,7 @@ public interface Raid extends PersistentDataHolder {
*
* @return a set of unique ids
*/
@NotNull
Set<UUID> getHeroes();
/**
@@ -116,29 +106,13 @@ public interface Raid extends PersistentDataHolder {
*
* @return a list of current raiders
*/
@NotNull
List<Raider> getRaiders();
/**
* Gets the id of this raid.
*
* @return the raid id
* @deprecated Raid identifiers are magic internal values and may or may not be present.
* -1 is returned for raids without an assigned id.
*/
@Deprecated(forRemoval = true, since = "1.21.5")
int getId();
/**
* Get the boss bar to be displayed for this raid.
*
* @return the boss bar
*/
BossBar getBossBar();
/**
* Represents the status of a {@link Raid}.
*/
enum RaidStatus {
public enum RaidStatus {
/**
* The raid is in progress.
@@ -157,4 +131,23 @@ public interface Raid extends PersistentDataHolder {
*/
STOPPED;
}
// Paper start
/**
* Gets the id of this raid.
*
* @return the raid id
* @deprecated Raid identifiers are magic internal values and may or may not be present.
* -1 is returned for raids without an assigned id.
*/
@Deprecated(forRemoval = true, since = "1.21.5")
int getId();
/**
* Get the boss bar to be displayed for this raid.
*
* @return the boss bar
*/
org.bukkit.boss.@NotNull BossBar getBossBar();
// Paper end
}
@@ -348,13 +348,7 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
*
* @see DataComponentType
*/
Registry<DataComponentType> DATA_COMPONENT_TYPE = registryFor(RegistryKey.DATA_COMPONENT_TYPE);
/**
* Game rules.
*
* @see GameRule
*/
Registry<GameRule<?>> GAME_RULE = registryFor(RegistryKey.GAME_RULE);
Registry<DataComponentType> DATA_COMPONENT_TYPE = registryFor(RegistryKey.DATA_COMPONENT_TYPE); // Paper
//<editor-fold desc="renames" defaultstate="collapsed">
/**
@@ -563,6 +557,7 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
* @deprecated this method's behavior is broken and not useful. If you want to get an object
* based on its vanilla name, or a key, wrap it in a {@link NamespacedKey} object and use {@link #get(NamespacedKey)}
*/
// Paper
@Deprecated(forRemoval = true)
default @Nullable T match(final String input) {
Preconditions.checkArgument(input != null, "input must not be null");
@@ -243,7 +243,7 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
* Separate from the portal game rule.
*
* @return whether this server allows the Nether or not
* @see GameRules#ALLOW_ENTERING_NETHER_USING_PORTALS
* @see GameRule#ALLOW_ENTERING_NETHER_USING_PORTALS
*/
public boolean getAllowNether();
@@ -835,8 +835,7 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
* Create a new virtual {@link WorldBorder}.
* <p>
* Note that world borders created by the server will not respect any world
* scaling effects (i.e. coordinates are not divided by 8 in the nether)
* and will not deal damage to players outside their bounds.
* scaling effects (i.e. coordinates are not divided by 8 in the nether).
*
* @return the created world border instance
*
@@ -1739,22 +1739,6 @@ public interface Sound extends OldEnum<Sound>, Keyed, net.kyori.adventure.sound.
Sound ENTITY_AXOLOTL_SWIM = getSound("entity.axolotl.swim");
Sound ENTITY_BABY_NAUTILUS_AMBIENT = getSound("entity.baby_nautilus.ambient");
Sound ENTITY_BABY_NAUTILUS_AMBIENT_LAND = getSound("entity.baby_nautilus.ambient_land");
Sound ENTITY_BABY_NAUTILUS_DEATH = getSound("entity.baby_nautilus.death");
Sound ENTITY_BABY_NAUTILUS_DEATH_LAND = getSound("entity.baby_nautilus.death_land");
Sound ENTITY_BABY_NAUTILUS_EAT = getSound("entity.baby_nautilus.eat");
Sound ENTITY_BABY_NAUTILUS_HURT = getSound("entity.baby_nautilus.hurt");
Sound ENTITY_BABY_NAUTILUS_HURT_LAND = getSound("entity.baby_nautilus.hurt_land");
Sound ENTITY_BABY_NAUTILUS_SWIM = getSound("entity.baby_nautilus.swim");
Sound ENTITY_BAT_AMBIENT = getSound("entity.bat.ambient");
Sound ENTITY_BAT_DEATH = getSound("entity.bat.death");
@@ -1849,28 +1833,6 @@ public interface Sound extends OldEnum<Sound>, Keyed, net.kyori.adventure.sound.
Sound ENTITY_CAMEL_STEP_SAND = getSound("entity.camel.step_sand");
Sound ENTITY_CAMEL_HUSK_AMBIENT = getSound("entity.camel_husk.ambient");
Sound ENTITY_CAMEL_HUSK_DASH = getSound("entity.camel_husk.dash");
Sound ENTITY_CAMEL_HUSK_DASH_READY = getSound("entity.camel_husk.dash_ready");
Sound ENTITY_CAMEL_HUSK_DEATH = getSound("entity.camel_husk.death");
Sound ENTITY_CAMEL_HUSK_EAT = getSound("entity.camel_husk.eat");
Sound ENTITY_CAMEL_HUSK_HURT = getSound("entity.camel_husk.hurt");
Sound ENTITY_CAMEL_HUSK_SADDLE = getSound("entity.camel_husk.saddle");
Sound ENTITY_CAMEL_HUSK_SIT = getSound("entity.camel_husk.sit");
Sound ENTITY_CAMEL_HUSK_STAND = getSound("entity.camel_husk.stand");
Sound ENTITY_CAMEL_HUSK_STEP = getSound("entity.camel_husk.step");
Sound ENTITY_CAMEL_HUSK_STEP_SAND = getSound("entity.camel_husk.step_sand");
Sound ENTITY_CAT_AMBIENT = getSound("entity.cat.ambient");
Sound ENTITY_CAT_BEG_FOR_FOOD = getSound("entity.cat.beg_for_food");
@@ -2477,32 +2439,6 @@ public interface Sound extends OldEnum<Sound>, Keyed, net.kyori.adventure.sound.
Sound ENTITY_MULE_JUMP = getSound("entity.mule.jump");
Sound ENTITY_NAUTILUS_AMBIENT = getSound("entity.nautilus.ambient");
Sound ENTITY_NAUTILUS_AMBIENT_LAND = getSound("entity.nautilus.ambient_land");
Sound ENTITY_NAUTILUS_DASH = getSound("entity.nautilus.dash");
Sound ENTITY_NAUTILUS_DASH_LAND = getSound("entity.nautilus.dash_land");
Sound ENTITY_NAUTILUS_DASH_READY = getSound("entity.nautilus.dash_ready");
Sound ENTITY_NAUTILUS_DASH_READY_LAND = getSound("entity.nautilus.dash_ready_land");
Sound ENTITY_NAUTILUS_DEATH = getSound("entity.nautilus.death");
Sound ENTITY_NAUTILUS_DEATH_LAND = getSound("entity.nautilus.death_land");
Sound ENTITY_NAUTILUS_EAT = getSound("entity.nautilus.eat");
Sound ENTITY_NAUTILUS_HURT = getSound("entity.nautilus.hurt");
Sound ENTITY_NAUTILUS_HURT_LAND = getSound("entity.nautilus.hurt_land");
Sound ENTITY_NAUTILUS_RIDING = getSound("entity.nautilus.riding");
Sound ENTITY_NAUTILUS_SWIM = getSound("entity.nautilus.swim");
Sound ENTITY_OCELOT_AMBIENT = getSound("entity.ocelot.ambient");
Sound ENTITY_OCELOT_DEATH = getSound("entity.ocelot.death");
@@ -2535,14 +2471,6 @@ public interface Sound extends OldEnum<Sound>, Keyed, net.kyori.adventure.sound.
Sound ENTITY_PANDA_WORRIED_AMBIENT = getSound("entity.panda.worried_ambient");
Sound ENTITY_PARCHED_AMBIENT = getSound("entity.parched.ambient");
Sound ENTITY_PARCHED_DEATH = getSound("entity.parched.death");
Sound ENTITY_PARCHED_HURT = getSound("entity.parched.hurt");
Sound ENTITY_PARCHED_STEP = getSound("entity.parched.step");
Sound ENTITY_PARROT_AMBIENT = getSound("entity.parrot.ambient");
Sound ENTITY_PARROT_DEATH = getSound("entity.parrot.death");
@@ -2559,8 +2487,6 @@ public interface Sound extends OldEnum<Sound>, Keyed, net.kyori.adventure.sound.
Sound ENTITY_PARROT_IMITATE_BREEZE = getSound("entity.parrot.imitate.breeze");
Sound ENTITY_PARROT_IMITATE_CAMEL_HUSK = getSound("entity.parrot.imitate.camel_husk");
Sound ENTITY_PARROT_IMITATE_CREAKING = getSound("entity.parrot.imitate.creaking");
Sound ENTITY_PARROT_IMITATE_CREEPER = getSound("entity.parrot.imitate.creeper");
@@ -2587,8 +2513,6 @@ public interface Sound extends OldEnum<Sound>, Keyed, net.kyori.adventure.sound.
Sound ENTITY_PARROT_IMITATE_MAGMA_CUBE = getSound("entity.parrot.imitate.magma_cube");
Sound ENTITY_PARROT_IMITATE_PARCHED = getSound("entity.parrot.imitate.parched");
Sound ENTITY_PARROT_IMITATE_PHANTOM = getSound("entity.parrot.imitate.phantom");
Sound ENTITY_PARROT_IMITATE_PIGLIN = getSound("entity.parrot.imitate.piglin");
@@ -2627,10 +2551,6 @@ public interface Sound extends OldEnum<Sound>, Keyed, net.kyori.adventure.sound.
Sound ENTITY_PARROT_IMITATE_ZOMBIE = getSound("entity.parrot.imitate.zombie");
Sound ENTITY_PARROT_IMITATE_ZOMBIE_HORSE = getSound("entity.parrot.imitate.zombie_horse");
Sound ENTITY_PARROT_IMITATE_ZOMBIE_NAUTILUS = getSound("entity.parrot.imitate.zombie_nautilus");
Sound ENTITY_PARROT_IMITATE_ZOMBIE_VILLAGER = getSound("entity.parrot.imitate.zombie_villager");
Sound ENTITY_PARROT_STEP = getSound("entity.parrot.step");
@@ -3279,38 +3199,10 @@ public interface Sound extends OldEnum<Sound>, Keyed, net.kyori.adventure.sound.
Sound ENTITY_ZOMBIE_HORSE_AMBIENT = getSound("entity.zombie_horse.ambient");
Sound ENTITY_ZOMBIE_HORSE_ANGRY = getSound("entity.zombie_horse.angry");
Sound ENTITY_ZOMBIE_HORSE_DEATH = getSound("entity.zombie_horse.death");
Sound ENTITY_ZOMBIE_HORSE_EAT = getSound("entity.zombie_horse.eat");
Sound ENTITY_ZOMBIE_HORSE_HURT = getSound("entity.zombie_horse.hurt");
Sound ENTITY_ZOMBIE_NAUTILUS_AMBIENT = getSound("entity.zombie_nautilus.ambient");
Sound ENTITY_ZOMBIE_NAUTILUS_AMBIENT_LAND = getSound("entity.zombie_nautilus.ambient_land");
Sound ENTITY_ZOMBIE_NAUTILUS_DASH = getSound("entity.zombie_nautilus.dash");
Sound ENTITY_ZOMBIE_NAUTILUS_DASH_LAND = getSound("entity.zombie_nautilus.dash_land");
Sound ENTITY_ZOMBIE_NAUTILUS_DASH_READY = getSound("entity.zombie_nautilus.dash_ready");
Sound ENTITY_ZOMBIE_NAUTILUS_DASH_READY_LAND = getSound("entity.zombie_nautilus.dash_ready_land");
Sound ENTITY_ZOMBIE_NAUTILUS_DEATH = getSound("entity.zombie_nautilus.death");
Sound ENTITY_ZOMBIE_NAUTILUS_DEATH_LAND = getSound("entity.zombie_nautilus.death_land");
Sound ENTITY_ZOMBIE_NAUTILUS_EAT = getSound("entity.zombie_nautilus.eat");
Sound ENTITY_ZOMBIE_NAUTILUS_HURT = getSound("entity.zombie_nautilus.hurt");
Sound ENTITY_ZOMBIE_NAUTILUS_HURT_LAND = getSound("entity.zombie_nautilus.hurt_land");
Sound ENTITY_ZOMBIE_NAUTILUS_SWIM = getSound("entity.zombie_nautilus.swim");
Sound ENTITY_ZOMBIE_VILLAGER_AMBIENT = getSound("entity.zombie_villager.ambient");
Sound ENTITY_ZOMBIE_VILLAGER_CONVERTED = getSound("entity.zombie_villager.converted");
@@ -3357,16 +3249,12 @@ public interface Sound extends OldEnum<Sound>, Keyed, net.kyori.adventure.sound.
Sound ITEM_ARMOR_EQUIP_LEATHER = getSound("item.armor.equip_leather");
Sound ITEM_ARMOR_EQUIP_NAUTILUS = getSound("item.armor.equip_nautilus");
Sound ITEM_ARMOR_EQUIP_NETHERITE = getSound("item.armor.equip_netherite");
Sound ITEM_ARMOR_EQUIP_TURTLE = getSound("item.armor.equip_turtle");
Sound ITEM_ARMOR_EQUIP_WOLF = getSound("item.armor.equip_wolf");
Sound ITEM_ARMOR_UNEQUIP_NAUTILUS = getSound("item.armor.unequip_nautilus");
Sound ITEM_ARMOR_UNEQUIP_WOLF = getSound("item.armor.unequip_wolf");
Sound ITEM_AXE_SCRAPE = getSound("item.axe.scrape");
@@ -3501,10 +3389,6 @@ public interface Sound extends OldEnum<Sound>, Keyed, net.kyori.adventure.sound.
Sound ITEM_MACE_SMASH_GROUND_HEAVY = getSound("item.mace.smash_ground_heavy");
Sound ITEM_NAUTILUS_SADDLE_EQUIP = getSound("item.nautilus_saddle_equip");
Sound ITEM_NAUTILUS_SADDLE_UNDERWATER_EQUIP = getSound("item.nautilus_saddle_underwater_equip");
Sound ITEM_NETHER_WART_PLANT = getSound("item.nether_wart.plant");
Sound ITEM_OMINOUS_BOTTLE_DISPOSE = getSound("item.ominous_bottle.dispose");
@@ -3519,24 +3403,6 @@ public interface Sound extends OldEnum<Sound>, Keyed, net.kyori.adventure.sound.
Sound ITEM_SHOVEL_FLATTEN = getSound("item.shovel.flatten");
Sound ITEM_SPEAR_ATTACK = getSound("item.spear.attack");
Sound ITEM_SPEAR_HIT = getSound("item.spear.hit");
Sound ITEM_SPEAR_LUNGE_1 = getSound("item.spear.lunge_1");
Sound ITEM_SPEAR_LUNGE_2 = getSound("item.spear.lunge_2");
Sound ITEM_SPEAR_LUNGE_3 = getSound("item.spear.lunge_3");
Sound ITEM_SPEAR_USE = getSound("item.spear.use");
Sound ITEM_SPEAR_WOOD_ATTACK = getSound("item.spear_wood.attack");
Sound ITEM_SPEAR_WOOD_HIT = getSound("item.spear_wood.hit");
Sound ITEM_SPEAR_WOOD_USE = getSound("item.spear_wood.use");
Sound ITEM_SPYGLASS_STOP_USING = getSound("item.spyglass.stop_using");
Sound ITEM_SPYGLASS_USE = getSound("item.spyglass.use");
@@ -55,7 +55,6 @@ public enum Statistic implements Keyed {
LEAVE_GAME,
MINECART_ONE_CM,
MOB_KILLS,
NAUTILUS_ONE_CM,
OPEN_BARREL,
CHEST_OPENED,
ENDERCHEST_OPENED,
+1 -27
View File
@@ -84,8 +84,6 @@ public interface Tag<T extends Keyed> extends Keyed {
Tag<Material> CAMPFIRES = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("campfires"), Material.class);
Tag<Material> CAN_GLIDE_THROUGH = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("can_glide_through"), Material.class);
Tag<Material> CANDLE_CAKES = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("candle_cakes"), Material.class);
Tag<Material> CANDLES = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("candles"), Material.class);
@@ -474,8 +472,6 @@ public interface Tag<T extends Keyed> extends Keyed {
Tag<Material> ITEMS_CAMEL_FOOD = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("camel_food"), Material.class);
Tag<Material> ITEMS_CAMEL_HUSK_FOOD = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("camel_husk_food"), Material.class);
Tag<Material> ITEMS_CANDLES = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("candles"), Material.class);
Tag<Material> ITEMS_CAT_FOOD = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("cat_food"), Material.class);
@@ -566,19 +562,15 @@ public interface Tag<T extends Keyed> extends Keyed {
Tag<Material> ITEMS_ENCHANTABLE_LEG_ARMOR = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("enchantable/leg_armor"), Material.class);
Tag<Material> ITEMS_ENCHANTABLE_LUNGE = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("enchantable/lunge"), Material.class);
Tag<Material> ITEMS_ENCHANTABLE_MACE = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("enchantable/mace"), Material.class);
Tag<Material> ITEMS_ENCHANTABLE_MELEE_WEAPON = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("enchantable/melee_weapon"), Material.class);
Tag<Material> ITEMS_ENCHANTABLE_MINING = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("enchantable/mining"), Material.class);
Tag<Material> ITEMS_ENCHANTABLE_MINING_LOOT = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("enchantable/mining_loot"), Material.class);
Tag<Material> ITEMS_ENCHANTABLE_SHARP_WEAPON = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("enchantable/sharp_weapon"), Material.class);
Tag<Material> ITEMS_ENCHANTABLE_SWEEPING = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("enchantable/sweeping"), Material.class);
Tag<Material> ITEMS_ENCHANTABLE_SWORD = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("enchantable/sword"), Material.class);
Tag<Material> ITEMS_ENCHANTABLE_TRIDENT = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("enchantable/trident"), Material.class);
@@ -664,12 +656,6 @@ public interface Tag<T extends Keyed> extends Keyed {
Tag<Material> ITEMS_MEAT = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("meat"), Material.class);
Tag<Material> ITEMS_NAUTILUS_BUCKET_FOOD = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("nautilus_bucket_food"), Material.class);
Tag<Material> ITEMS_NAUTILUS_FOOD = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("nautilus_food"), Material.class);
Tag<Material> ITEMS_NAUTILUS_TAMING_ITEMS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("nautilus_taming_items"), Material.class);
Tag<Material> ITEMS_NETHERITE_TOOL_MATERIALS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("netherite_tool_materials"), Material.class);
Tag<Material> ITEMS_NON_FLAMMABLE_WOOD = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("non_flammable_wood"), Material.class);
@@ -760,8 +746,6 @@ public interface Tag<T extends Keyed> extends Keyed {
Tag<Material> ITEMS_SOUL_FIRE_BASE_BLOCKS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("soul_fire_base_blocks"), Material.class);
Tag<Material> ITEMS_SPEARS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("spears"), Material.class);
Tag<Material> ITEMS_SPRUCE_LOGS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("spruce_logs"), Material.class);
Tag<Material> ITEMS_STAIRS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("stairs"), Material.class);
@@ -826,8 +810,6 @@ public interface Tag<T extends Keyed> extends Keyed {
Tag<Material> ITEMS_WOOL_CARPETS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("wool_carpets"), Material.class);
Tag<Material> ITEMS_ZOMBIE_HORSE_FOOD = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("zombie_horse_food"), Material.class);
String REGISTRY_FLUIDS = "fluids";
Tag<Fluid> FLUIDS_LAVA = Bukkit.getTag(REGISTRY_FLUIDS, NamespacedKey.minecraft("lava"), Fluid.class);
@@ -852,22 +834,16 @@ public interface Tag<T extends Keyed> extends Keyed {
Tag<EntityType> ENTITY_TYPES_BOAT = Bukkit.getTag(REGISTRY_ENTITY_TYPES, NamespacedKey.minecraft("boat"), EntityType.class);
Tag<EntityType> ENTITY_TYPES_BURN_IN_DAYLIGHT = Bukkit.getTag(REGISTRY_ENTITY_TYPES, NamespacedKey.minecraft("burn_in_daylight"), EntityType.class);
Tag<EntityType> ENTITY_TYPES_CAN_BREATHE_UNDER_WATER = Bukkit.getTag(REGISTRY_ENTITY_TYPES, NamespacedKey.minecraft("can_breathe_under_water"), EntityType.class);
Tag<EntityType> ENTITY_TYPES_CAN_EQUIP_HARNESS = Bukkit.getTag(REGISTRY_ENTITY_TYPES, NamespacedKey.minecraft("can_equip_harness"), EntityType.class);
Tag<EntityType> ENTITY_TYPES_CAN_EQUIP_SADDLE = Bukkit.getTag(REGISTRY_ENTITY_TYPES, NamespacedKey.minecraft("can_equip_saddle"), EntityType.class);
Tag<EntityType> ENTITY_TYPES_CAN_FLOAT_WHILE_RIDDEN = Bukkit.getTag(REGISTRY_ENTITY_TYPES, NamespacedKey.minecraft("can_float_while_ridden"), EntityType.class);
Tag<EntityType> ENTITY_TYPES_CAN_TURN_IN_BOATS = Bukkit.getTag(REGISTRY_ENTITY_TYPES, NamespacedKey.minecraft("can_turn_in_boats"), EntityType.class);
Tag<EntityType> ENTITY_TYPES_CAN_WEAR_HORSE_ARMOR = Bukkit.getTag(REGISTRY_ENTITY_TYPES, NamespacedKey.minecraft("can_wear_horse_armor"), EntityType.class);
Tag<EntityType> ENTITY_TYPES_CAN_WEAR_NAUTILUS_ARMOR = Bukkit.getTag(REGISTRY_ENTITY_TYPES, NamespacedKey.minecraft("can_wear_nautilus_armor"), EntityType.class);
Tag<EntityType> ENTITY_TYPES_CANDIDATE_FOR_IRON_GOLEM_GIFT = Bukkit.getTag(REGISTRY_ENTITY_TYPES, NamespacedKey.minecraft("candidate_for_iron_golem_gift"), EntityType.class);
Tag<EntityType> ENTITY_TYPES_CANNOT_BE_PUSHED_ONTO_BOATS = Bukkit.getTag(REGISTRY_ENTITY_TYPES, NamespacedKey.minecraft("cannot_be_pushed_onto_boats"), EntityType.class);
@@ -900,8 +876,6 @@ public interface Tag<T extends Keyed> extends Keyed {
Tag<EntityType> ENTITY_TYPES_INVERTED_HEALING_AND_HARM = Bukkit.getTag(REGISTRY_ENTITY_TYPES, NamespacedKey.minecraft("inverted_healing_and_harm"), EntityType.class);
Tag<EntityType> ENTITY_TYPES_NAUTILUS_HOSTILES = Bukkit.getTag(REGISTRY_ENTITY_TYPES, NamespacedKey.minecraft("nautilus_hostiles"), EntityType.class);
Tag<EntityType> ENTITY_TYPES_NO_ANGER_FROM_WIND_CHARGE = Bukkit.getTag(REGISTRY_ENTITY_TYPES, NamespacedKey.minecraft("no_anger_from_wind_charge"), EntityType.class);
Tag<EntityType> ENTITY_TYPES_NON_CONTROLLING_RIDER = Bukkit.getTag(REGISTRY_ENTITY_TYPES, NamespacedKey.minecraft("non_controlling_rider"), EntityType.class);
@@ -3,7 +3,6 @@ package org.bukkit;
import com.google.common.collect.Multimap;
import io.papermc.paper.entity.EntitySerializationFlag;
import io.papermc.paper.registry.RegistryKey;
import net.kyori.adventure.text.event.HoverEvent;
import org.bukkit.advancement.Advancement;
import org.bukkit.attribute.Attribute;
import org.bukkit.attribute.AttributeModifier;
@@ -385,12 +384,4 @@ public interface UnsafeValues {
@NotNull Map<String, Object> serializeStack(ItemStack itemStack);
@NotNull ItemStack deserializeStack(@NotNull Map<String, Object> args);
/**
* Deserializes a {@link HoverEvent.ShowItem} hover event value into an {@code ItemStack}.
*
* @param itemHover the hover to deserialize
* @return the deserialized {@code ItemStack}
*/
@NotNull ItemStack deserializeItemHover(HoverEvent.@NotNull ShowItem itemHover);
}
+47 -24
View File
@@ -43,7 +43,6 @@ import org.bukkit.util.BoundingBox;
import org.bukkit.util.RayTraceResult;
import org.bukkit.util.StructureSearchResult;
import org.bukkit.util.Vector;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.Contract;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@@ -1901,6 +1900,13 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
* Performs a ray trace that checks for block collisions using the blocks'
* precise collision shapes.
* <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.
* <p>
* This may cause loading of chunks! Some implementations may impose
* artificial restrictions on the maximum distance.
*
@@ -1917,10 +1923,18 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
return this.rayTraceBlocks(start, direction, maxDistance, fluidCollisionMode, ignorePassableBlocks, null);
}
// Paper start
/**
* Performs a ray trace that checks for block collisions using the blocks'
* precise collision shapes.
* <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.
* <p>
* This may cause loading of chunks! Some implementations may impose
* artificial restrictions on the maximum distance.
*
@@ -1935,6 +1949,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
* @return the ray trace hit result, or <code>null</code> if there is no hit
*/
@Nullable RayTraceResult rayTraceBlocks(io.papermc.paper.math.@NotNull Position start, @NotNull Vector direction, double maxDistance, @NotNull FluidCollisionMode fluidCollisionMode, boolean ignorePassableBlocks, @Nullable Predicate<? super Block> canCollide);
// Paper end
/**
* Performs a ray trace that checks for both block and entity collisions.
@@ -1943,6 +1958,13 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
* <code>raySize</code> parameter is only taken into account for entity
* collision checks.
* <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.
* <p>
* This may cause loading of chunks! Some implementations may impose
* artificial restrictions on the maximum distance.
*
@@ -1964,6 +1986,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
return this.rayTrace(start, direction, maxDistance, fluidCollisionMode, ignorePassableBlocks, raySize, filter, null);
}
// Paper start
/**
* Performs a ray trace that checks for both block and entity collisions.
* <p>
@@ -1971,6 +1994,13 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
* <code>raySize</code> parameter is only taken into account for entity
* collision checks.
* <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.
* <p>
* This may cause loading of chunks! Some implementations may impose
* artificial restrictions on the maximum distance.
*
@@ -1990,6 +2020,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
* entity, or <code>null</code> if there is no hit
*/
@Nullable RayTraceResult rayTrace(io.papermc.paper.math.@NotNull Position start, @NotNull Vector direction, double maxDistance, @NotNull FluidCollisionMode fluidCollisionMode, boolean ignorePassableBlocks, double raySize, @Nullable Predicate<? super Entity> filter, @Nullable Predicate<? super Block> canCollide);
// Paper end
/**
* Performs a ray trace that checks for collisions with the specified
@@ -2257,7 +2288,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
* <p>
* Note that if a non-null {@code source} Entity is provided and {@code
* breakBlocks} is {@code true}, the value of {@code breakBlocks} will be
* ignored if {@link GameRules#MOB_GRIEFING} is {@code false} in the world
* ignored if {@link GameRule#MOB_GRIEFING} is {@code false} in the world
* in which the explosion occurs. In other words, the mob griefing gamerule
* will take priority over {@code breakBlocks} if explosions are not allowed.
*
@@ -2414,7 +2445,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
* <p>
* Note that if a non-null {@code source} Entity is provided and {@code
* breakBlocks} is {@code true}, the value of {@code breakBlocks} will be
* ignored if {@link GameRules#MOB_GRIEFING} is {@code false} in the world
* ignored if {@link GameRule#MOB_GRIEFING} is {@code false} in the world
* in which the explosion occurs. In other words, the mob griefing gamerule
* will take priority over {@code breakBlocks} if explosions are not allowed.
*
@@ -2431,7 +2462,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
* Gets the current PVP setting for this world.
*
* @return True if PVP is enabled
* @deprecated use {@link GameRules#PVP} instead
* @deprecated use {@link GameRule#PVP} instead
*/
@Deprecated(since = "1.21.9")
public boolean getPVP();
@@ -2440,7 +2471,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
* Sets the PVP setting for this world.
*
* @param pvp True/False whether PVP should be Enabled.
* @deprecated use {@link GameRules#PVP} instead
* @deprecated use {@link GameRule#PVP} instead
*/
@Deprecated(since = "1.21.9")
public void setPVP(boolean pvp);
@@ -2644,14 +2675,11 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
/**
* Sets the spawn flags for this.
* <p>Note that setting {@code false} for either only affects
* natural spawning. It doesn't affect spawn eggs, summon command, mobs
* spawned from structure generation, spawners, etc.</p>
*
* @param allowMonsters - if true, monsters are allowed to spawn in this
* world via natural spawning mechanisms.
* world.
* @param allowAnimals - if true, animals are allowed to spawn in this
* world via natural spawning mechanisms.
* world.
*/
public void setSpawnFlags(boolean allowMonsters, boolean allowAnimals);
@@ -2765,26 +2793,23 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
/**
* Gets if this world is natural.
* <p>
* When false, the moon is not visible and eyeblossoms do not open/close
*
* When false, compasses spin randomly, and using a bed to set the respawn
* point or sleep, is disabled. When true, nether portals can spawn
* zombified piglins.
*
* @return true if world is natural
* @deprecated replaced by the gameplay/eyeblossom_open and gameplay/creaking_active environment attributes
*/
@Deprecated(since = "1.21.11")
public boolean isNatural();
/**
* Gets if beds work in this world.
* <p>
* A non-working bed can blow up when trying to sleep, but that may
* not always be the case.
*
* A non-working bed will blow up when trying to sleep. {@link #isNatural()}
* defines if a bed can be used to set spawn point.
*
* @return true if beds work in this world
* @deprecated Due to 1.21.11 beds changes, a boolean no longer
* represents if they work. There is no replacement API yet
*/
@ApiStatus.Obsolete(since = "1.21.11")
public boolean isBedWorks();
/**
@@ -2834,9 +2859,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
* </ul>
*
* @return true if this world has the above mechanics
* @deprecated as of 1.21.11, ultra warm is replaced by the WATER_EVAPORATES, FAST_LAVA, and DEFAULT_DRIPSTONE_PARTICLE environment attributes.
*/
@Deprecated(since = "1.21.11")
public boolean isUltraWarm();
/**
@@ -3763,7 +3786,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
* @return String value of rule
* @deprecated use {@link #getGameRuleValue(GameRule)} instead
*/
@Deprecated(since = "1.21.11", forRemoval = true)
@Deprecated(since = "1.13")
@Contract("null -> null; !null -> !null")
@Nullable
public String getGameRuleValue(@Nullable String rule);
@@ -3781,7 +3804,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
* @return True if rule was set
* @deprecated use {@link #setGameRule(GameRule, Object)} instead.
*/
@Deprecated(since = "1.13", forRemoval = true)
@Deprecated(since = "1.13")
public boolean setGameRuleValue(@NotNull String rule, @NotNull String value);
/**
@@ -1,13 +1,8 @@
package org.bukkit;
import com.google.common.base.Preconditions;
import io.papermc.paper.util.Tick;
import java.time.Duration;
import java.util.concurrent.TimeUnit;
import org.checkerframework.checker.index.qual.NonNegative;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.annotations.Range;
public interface WorldBorder {
@@ -17,19 +12,20 @@ public interface WorldBorder {
* @return the associated world, or null if this world border is not associated
* with any specific world, such as those created via {@link Server#createWorldBorder()}
*/
@Nullable World getWorld();
@Nullable
public World getWorld();
/**
* Resets the border to default values.
*/
void reset();
public void reset();
/**
* Gets the current side length of the border.
*
* @return The current side length of the border.
*/
double getSize();
public double getSize();
/**
* Sets the border to a square region with the specified side length in blocks.
@@ -37,21 +33,8 @@ public interface WorldBorder {
* @param newSize The new size of the border.
*
* @throws IllegalArgumentException if newSize is less than 1.0D or greater than {@link #getMaxSize()}
* @see #changeSize(double, long)
*/
void setSize(double newSize);
/**
* Sets the border to a square region with the specified side length in blocks.
*
* @param newSize The new side length of the border.
* @param ticks The time in ticks in which the border grows or shrinks from the previous size to that being set.
*
* @throws IllegalArgumentException if newSize is less than 1.0D or greater than {@link #getMaxSize()}
* @throws IllegalArgumentException if ticks is out of range
* @see #setSize(double)
*/
void changeSize(double newSize, @Range(from = 0, to = Integer.MAX_VALUE) long ticks);
public void setSize(double newSize);
/**
* Sets the border to a square region with the specified side length in blocks.
@@ -59,13 +42,9 @@ public interface WorldBorder {
* @param newSize The new side length of the border.
* @param seconds The time in seconds in which the border grows or shrinks from the previous size to that being set.
*
* @throws IllegalArgumentException if seconds is out of range once converted in ticks
* @deprecated Use {@link #changeSize(double, long)} instead
* @throws IllegalArgumentException if newSize is less than 1.0D or greater than {@link #getMaxSize()}
*/
@Deprecated(since = "1.21.11", forRemoval = true)
default void setSize(double newSize, long seconds) {
this.changeSize(Math.clamp(newSize, 1.0D, this.getMaxSize()), Tick.tick().fromDuration(Duration.ofSeconds(seconds)));
}
public void setSize(double newSize, long seconds);
/**
* Sets the border to a square region with the specified side length in blocks.
@@ -74,22 +53,17 @@ public interface WorldBorder {
* @param unit The time unit.
* @param time The time in which the border grows or shrinks from the previous size to that being set.
*
* @throws IllegalArgumentException if newSize is less than 1.0D or greater than {@link #getMaxSize()}
* @throws IllegalArgumentException if time is out of range once converted in ticks
* @deprecated Use {@link #changeSize(double, long)} instead
* @throws IllegalArgumentException if unit is <code>null</code> or newSize is less than 1.0D or greater than {@link #getMaxSize()}
*/
@Deprecated(since = "1.21.11", forRemoval = true)
default void setSize(double newSize, @NotNull TimeUnit unit, @NonNegative long time) {
Preconditions.checkArgument(unit != null, "TimeUnit cannot be null.");
this.changeSize(newSize, Tick.tick().fromDuration(Duration.of(time, unit.toChronoUnit())));
}
public void setSize(double newSize, @NotNull TimeUnit unit, long time);
/**
* Gets the current border center.
*
* @return The current border center.
*/
@NotNull Location getCenter();
@NotNull
public Location getCenter();
/**
* Sets the new border center.
@@ -99,7 +73,7 @@ public interface WorldBorder {
*
* @throws IllegalArgumentException if the absolute value of x or z is higher than {@link #getMaxCenterCoordinate()}
*/
void setCenter(double x, double z);
public void setCenter(double x, double z);
/**
* Sets the new border center.
@@ -108,87 +82,63 @@ public interface WorldBorder {
*
* @throws IllegalArgumentException if location is <code>null</code> or the absolute value of {@link Location#getX()} or {@link Location#getZ()} is higher than {@link #getMaxCenterCoordinate()}
*/
void setCenter(@NotNull Location location);
public void setCenter(@NotNull Location location);
/**
* Gets the current border damage buffer.
*
* @return The current border damage buffer.
*/
double getDamageBuffer();
public double getDamageBuffer();
/**
* Sets the amount of blocks a player may safely be outside the border before taking damage.
*
* @param blocks The amount of blocks. (The default is 5 blocks.)
*/
void setDamageBuffer(double blocks);
public void setDamageBuffer(double blocks);
/**
* Gets the current border damage amount.
*
* @return The current border damage amount.
*/
double getDamageAmount();
public double getDamageAmount();
/**
* Sets the amount of damage a player takes when outside the border plus the border buffer.
*
* @param damage The amount of damage. (The default is 0.2 damage per second per block.)
*/
void setDamageAmount(double damage);
public void setDamageAmount(double damage);
/**
* Gets the current border warning time in seconds.
*
* @return The current border warning time in seconds.
* @deprecated Use {@link #getWarningTimeTicks()} instead
*/
@Deprecated(since = "1.21.11", forRemoval = true)
default @NonNegative int getWarningTime() {
return (int) Tick.of(this.getWarningTimeTicks()).toSeconds();
}
public int getWarningTime();
/**
* Sets the warning time that causes the screen to be tinted red when a contracting border will reach the player within the specified time.
*
* @param seconds The amount of time in seconds.
* @deprecated Use {@link #setWarningTimeTicks(int)} instead
* @param seconds The amount of time in seconds. (The default is 15 seconds.)
*/
@Deprecated(since = "1.21.11", forRemoval = true)
default void setWarningTime(@NonNegative int seconds) {
Preconditions.checkArgument(seconds >= 0, "seconds cannot be lower than 0");
this.setWarningTimeTicks(Tick.tick().fromDuration(Duration.ofSeconds(seconds)));
}
/**
* Gets the current border warning time in ticks.
*
* @return The current border warning time in ticks.
*/
@NonNegative int getWarningTimeTicks();
/**
* Sets the warning time that causes the screen to be tinted red when a contracting border will reach the player within the specified time.
*
* @param ticks The number of ticks.
*/
void setWarningTimeTicks(@NonNegative int ticks);
public void setWarningTime(int seconds);
/**
* Gets the current border warning distance.
*
* @return The current border warning distance.
*/
int getWarningDistance();
public int getWarningDistance();
/**
* Sets the warning distance that causes the screen to be tinted red when the player is within the specified number of blocks from the border.
*
* @param distance The distance in blocks. (The default is 5 blocks.)
*/
void setWarningDistance(int distance);
public void setWarningDistance(int distance);
/**
* Check if the specified location is inside this border.
@@ -196,14 +146,14 @@ public interface WorldBorder {
* @param location the location to check
* @return if this location is inside the border or not
*/
boolean isInside(@NotNull Location location);
public boolean isInside(@NotNull Location location);
/**
* Gets the maximum possible size of a WorldBorder.
*
* @return The maximum size the WorldBorder
*/
double getMaxSize();
public double getMaxSize();
/**
* Gets the absolute value of the maximum x/z center coordinate of a
@@ -211,5 +161,5 @@ public interface WorldBorder {
*
* @return The absolute maximum center coordinate of the WorldBorder
*/
double getMaxCenterCoordinate();
public double getMaxCenterCoordinate();
}
@@ -483,7 +483,9 @@ public interface Block extends Metadatable, Translatable, net.kyori.adventure.tr
*/
boolean isBurnable();
/**
* Checks if this block can be immediately replaced by another block, such as placing a new block in air or tall grass.
* Check if this block is replaceable
* <p>
* Determined by Minecraft, representing a block that is not AIR that you can still place a new block at, such as flowers.
* @return true if block is replaceable
*/
boolean isReplaceable();
@@ -28,7 +28,7 @@ public interface Crafter extends Container, com.destroystokyo.paper.loottable.Lo
* have items placed in it.
*
* @param slot slot index
* @return whether the slot is disabled
* @return disabled status
*/
boolean isSlotDisabled(int slot);
@@ -37,7 +37,7 @@ public interface Crafter extends Container, com.destroystokyo.paper.loottable.Lo
* have items placed in it.
*
* @param slot slot index
* @param disabled whether the slot should be disabled
* @param disabled disabled status
*/
void setSlotDisabled(int slot, boolean disabled);
@@ -64,14 +64,6 @@ public interface DecoratedPot extends io.papermc.paper.block.TileStateInventoryH
@NotNull
public DecoratedPotInventory getSnapshotInventory();
/**
* Run the specified animation on the decorated pot.
*
* @param style the animation style
* @throws IllegalStateException if this block state is not placed
*/
public void startWobble(@NotNull WobbleStyle style);
/**
* A side on a decorated pot. Sides are relative to the facing state of a
* {@link org.bukkit.block.data.type.DecoratedPot}.
@@ -82,12 +74,4 @@ public interface DecoratedPot extends io.papermc.paper.block.TileStateInventoryH
RIGHT,
FRONT
}
/**
* Style a DecoratedPot can wobble in.
*/
public static enum WobbleStyle {
POSITIVE,
NEGATIVE
}
}
@@ -317,10 +317,4 @@ public interface BlockData extends Cloneable {
*/
boolean isRandomlyTicked();
// Paper end - Tick API
/**
* Checks if this block can be immediately replaced by another block, such as placing a new block in air or tall grass.
* @return true if block is replaceable
*/
boolean isReplaceable();
}
@@ -7,7 +7,7 @@ import java.util.Collections;
import java.util.List;
import java.util.Set;
import org.bukkit.Bukkit;
import org.bukkit.GameRules;
import org.bukkit.GameRule;
import org.bukkit.Location;
import org.bukkit.Server;
import org.bukkit.entity.Player;
@@ -477,14 +477,14 @@ public abstract class Command {
if (source instanceof BlockCommandSender) {
BlockCommandSender blockCommandSender = (BlockCommandSender) source;
if (!blockCommandSender.getBlock().getWorld().getGameRuleValue(GameRules.COMMAND_BLOCK_OUTPUT)) {
if (!blockCommandSender.getBlock().getWorld().getGameRuleValue(GameRule.COMMAND_BLOCK_OUTPUT)) {
Bukkit.getConsoleSender().sendMessage(result);
return;
}
} else if (source instanceof CommandMinecart) {
CommandMinecart commandMinecart = (CommandMinecart) source;
if (!commandMinecart.getWorld().getGameRuleValue(GameRules.COMMAND_BLOCK_OUTPUT)) {
if (!commandMinecart.getWorld().getGameRuleValue(GameRule.COMMAND_BLOCK_OUTPUT)) {
Bukkit.getConsoleSender().sendMessage(result);
return;
}
@@ -93,8 +93,6 @@ public interface DamageType extends Keyed, Translatable {
DamageType SONIC_BOOM = getDamageType("sonic_boom");
DamageType SPEAR = getDamageType("spear");
DamageType SPIT = getDamageType("spit");
DamageType STALAGMITE = getDamageType("stalagmite");
@@ -229,11 +229,6 @@ public abstract class Enchantment implements Keyed, Translatable, net.kyori.adve
*/
public static final Enchantment SWIFT_SNEAK = getEnchantment("swift_sneak");
/**
* Causes a jab attack from a spear to propel the user into the air
*/
public static final Enchantment LUNGE = getEnchantment("lunge");
@NotNull
private static Enchantment getEnchantment(@NotNull String key) {
return RegistryAccess.registryAccess().getRegistry(RegistryKey.ENCHANTMENT).getOrThrow(NamespacedKey.minecraft(key));
@@ -82,12 +82,12 @@ public enum EnchantmentTarget {
},
/**
* Allows the Enchantment to be placed on weapons (swords, spears)
* Allows the Enchantment to be placed on weapons (swords)
*/
WEAPON {
@Override
public boolean includes(@NotNull Material item) {
return Tag.ITEMS_ENCHANTABLE_MELEE_WEAPON.isTagged(item);
return Tag.ITEMS_ENCHANTABLE_SWORD.isTagged(item);
}
},
@@ -1,12 +0,0 @@
package org.bukkit.entity;
import org.bukkit.inventory.ArmoredSaddledMountInventory;
import org.bukkit.inventory.InventoryHolder;
import org.jspecify.annotations.NullMarked;
@NullMarked
public interface AbstractNautilus extends Tameable, InventoryHolder, Vehicle {
@Override
ArmoredSaddledMountInventory getInventory();
}
@@ -24,12 +24,7 @@ public interface AbstractVillager extends Breedable, NPC, InventoryHolder, Merch
// Paper start
/**
* Reset this villager's trade offers.
* <br>
* For {@link org.bukkit.entity.Villager Villagers}, only two trades are
* created, rather than the number of trades expected for the villager's
* level. You should use {@link org.bukkit.entity.Villager#addTrades(int)}
* to add the remaining trades.
* Reset this villager's trade offers
*/
public void resetOffers();
// Paper end
@@ -1,8 +0,0 @@
package org.bukkit.entity;
/**
* Represents a Camel Husk.
*/
public interface CamelHusk extends Camel {
}
@@ -138,11 +138,6 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
// Paper start - Teleport API
/**
* Teleports this entity to the given location.
* <p>
* Note: This uses default in game behavior for teleportation, especially in regard to handling
* passengers and vehicles across dimensions. It should be noted at this moment, teleporting a {@link Player}
* with passengers across dimensions is not supported and will cause this to return false. This behavior may
* change in future versions.
*
* @param location New location to teleport this entity to
* @param teleportFlags Flags to be used in this teleportation
@@ -154,11 +149,6 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
/**
* Teleports this entity to the given location.
* <p>
* Note: This uses default in game behavior for teleportation, especially in regard to handling
* passengers and vehicles across dimensions. It should be noted at this moment, teleporting a {@link Player}
* with passengers across dimensions is not supported and will cause this to return false. This behavior may
* change in future versions.
*
* @param location New location to teleport this entity to
* @param cause The cause of this teleportation
@@ -189,12 +179,8 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
// Paper end - Teleport API
/**
* Teleports this entity to the given location.
* <p>
* Note: This uses default in game behavior for teleportation, especially in regard to handling
* passengers and vehicles across dimensions. It should be noted at this moment, teleporting a {@link Player}
* with passengers across dimensions is not supported and will cause this to return false. This behavior may
* change in future versions.
* Teleports this entity to the given location. If this entity is riding a
* vehicle, it will be dismounted prior to teleportation.
*
* @param location New location to teleport this entity to
* @return <code>true</code> if the teleport was successful
@@ -202,12 +188,8 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
public boolean teleport(@NotNull Location location);
/**
* Teleports this entity to the given location.
* <p>
* Note: This uses default in game behavior for teleportation, especially in regard to handling
* passengers and vehicles across dimensions. It should be noted at this moment, teleporting a {@link Player}
* with passengers across dimensions is not supported and will cause this to return false. This behavior may
* change in future versions.
* Teleports this entity to the given location. If this entity is riding a
* vehicle, it will be dismounted prior to teleportation.
*
* @param location New location to teleport this entity to
* @param cause The cause of this teleportation
@@ -216,12 +198,8 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
public boolean teleport(@NotNull Location location, @NotNull TeleportCause cause);
/**
* Teleports this entity to the target Entity.
* <p>
* Note: This uses default in game behavior for teleportation, especially in regard to handling
* passengers and vehicles across dimensions. It should be noted at this moment, teleporting a {@link Player}
* with passengers across dimensions is not supported and will cause this to return false. This behavior may
* change in future versions.
* Teleports this entity to the target Entity. If this entity is riding a
* vehicle, it will be dismounted prior to teleportation.
*
* @param destination Entity to teleport this entity to
* @return <code>true</code> if the teleport was successful
@@ -229,12 +207,8 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
public boolean teleport(@NotNull Entity destination);
/**
* Teleports this entity to the target Entity.
* <p>
* Note: This uses default in game behavior for teleportation, especially in regard to handling
* passengers and vehicles across dimensions. It should be noted at this moment, teleporting a {@link Player}
* with passengers across dimensions is not supported and will cause this to return false. This behavior may
* change in future versions.
* Teleports this entity to the target Entity. If this entity is riding a
* vehicle, it will be dismounted prior to teleportation.
*
* @param destination Entity to teleport this entity to
* @param cause The cause of this teleportation
@@ -245,12 +219,6 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
// Paper start
/**
* Loads/Generates(in 1.13+) the Chunk asynchronously, and then teleports the entity when the chunk is ready.
* <p>
* Note: This uses default in game behavior for teleportation, especially in regard to handling
* passengers and vehicles across dimensions. It should be noted at this moment, teleporting a {@link Player}
* with passengers across dimensions is not supported and will cause the future to return false. This behavior may
* change in future versions.
*
* @param loc Location to teleport to
* @return A future that will be completed with the result of the teleport
*/
@@ -260,12 +228,6 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
/**
* Loads/Generates(in 1.13+) the Chunk asynchronously, and then teleports the entity when the chunk is ready.
* <p>
* Note: This uses default in game behavior for teleportation, especially in regard to handling
* passengers and vehicles across dimensions. It should be noted at this moment, teleporting a {@link Player}
* with passengers across dimensions is not supported and will cause the future to return false. This behavior may
* change in future versions.
*
* @param loc Location to teleport to
* @param cause Reason for teleport
* @return A future that will be completed with the result of the teleport
@@ -279,32 +241,9 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
/**
* Loads/Generates(in 1.13+) the Chunk asynchronously, and then teleports the entity when the chunk is ready.
* <p>
* Note: This uses default in game behavior for teleportation, especially in regard to handling
* passengers and vehicles across dimensions. It should be noted at this moment, teleporting a {@link Player}
* with passengers across dimensions is not supported and will cause the future to return false. This behavior may
* change in future versions.
*
* @param loc Location to teleport to
* @param teleportFlags Flags to be used in this teleportation
* @return A future that will be completed with the result of the teleport
*/
default java.util.concurrent.@NotNull CompletableFuture<Boolean> teleportAsync(@NotNull Location loc, @NotNull io.papermc.paper.entity.TeleportFlag @NotNull... teleportFlags) {
return this.teleportAsync(loc, TeleportCause.PLUGIN, teleportFlags);
}
/**
* Loads/Generates(in 1.13+) the Chunk asynchronously, and then teleports the entity when the chunk is ready.
* <p>
* Note: This uses default in game behavior for teleportation, especially in regard to handling
* passengers and vehicles across dimensions. It should be noted at this moment, teleporting a {@link Player}
* with passengers across dimensions is not supported and will cause the future to return false. This behavior may
* change in future versions.
*
* @param loc Location to teleport to
* @param cause Reason for teleport
* @param teleportFlags Flags to be used in this teleportation
*
* @return A future that will be completed with the result of the teleport
*/
java.util.concurrent.@NotNull CompletableFuture<Boolean> teleportAsync(@NotNull Location loc, @NotNull TeleportCause cause, @NotNull io.papermc.paper.entity.TeleportFlag @NotNull... teleportFlags);
@@ -66,7 +66,6 @@ public enum EntityType implements Keyed, Translatable, net.kyori.adventure.trans
BREEZE("breeze", Breeze.class, -1),
BREEZE_WIND_CHARGE("breeze_wind_charge", BreezeWindCharge.class, -1),
CAMEL("camel", Camel.class, -1),
CAMEL_HUSK("camel_husk", CamelHusk.class, -1),
CAT("cat", Cat.class, -1),
CAVE_SPIDER("cave_spider", CaveSpider.class, 59),
CHERRY_BOAT("cherry_boat", CherryBoat.class, -1),
@@ -136,7 +135,6 @@ public enum EntityType implements Keyed, Translatable, net.kyori.adventure.trans
MINECART("minecart", RideableMinecart.class, 42),
MOOSHROOM("mooshroom", MushroomCow.class, 96),
MULE("mule", Mule.class, 32),
NAUTILUS("nautilus", Nautilus.class, -1),
OAK_BOAT("oak_boat", OakBoat.class, -1),
OAK_CHEST_BOAT("oak_chest_boat", OakChestBoat.class, -1),
OCELOT("ocelot", Ocelot.class, 98),
@@ -145,7 +143,6 @@ public enum EntityType implements Keyed, Translatable, net.kyori.adventure.trans
PALE_OAK_BOAT("pale_oak_boat", PaleOakBoat.class, -1),
PALE_OAK_CHEST_BOAT("pale_oak_chest_boat", PaleOakChestBoat.class, -1),
PANDA("panda", Panda.class, -1),
PARCHED("parched", Parched.class, -1),
PARROT("parrot", Parrot.class, 105),
PHANTOM("phantom", Phantom.class, -1),
PIG("pig", Pig.class, 90),
@@ -200,7 +197,6 @@ public enum EntityType implements Keyed, Translatable, net.kyori.adventure.trans
ZOGLIN("zoglin", Zoglin.class, -1),
ZOMBIE("zombie", Zombie.class, 54),
ZOMBIE_HORSE("zombie_horse", ZombieHorse.class, 29),
ZOMBIE_NAUTILUS("zombie_nautilus", ZombieNautilus.class, -1),
ZOMBIE_VILLAGER("zombie_villager", ZombieVillager.class, 27),
ZOMBIFIED_PIGLIN("zombified_piglin", PigZombie.class, 57),
// End generate - EntityType
@@ -5,13 +5,9 @@ import java.util.List;
import java.util.Set;
import java.util.UUID;
import io.papermc.paper.world.damagesource.CombatTracker;
import io.papermc.paper.world.damagesource.FallLocationType;
import net.kyori.adventure.key.Key;
import org.bukkit.Color;
import org.bukkit.FluidCollisionMode;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.NamespacedKey;
import org.bukkit.Sound;
import org.bukkit.World;
import org.bukkit.attribute.Attributable;
@@ -1498,44 +1494,4 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
*/
@ApiStatus.Experimental
@NotNull CombatTracker getCombatTracker();
/**
* Sets the visual style of the waypoint icon using the specified {@link Key}.
* <p>
* Minecraft has the keys "minecraft:bowtie" and "minecraft:default" built in.
*
* @param key the key representing the style, or {@code null} to use the default style
* @see <a href="https://minecraft.wiki/w/Waypoint_style">https://minecraft.wiki/w/Waypoint_style</a>
*/
void setWaypointStyle(@Nullable Key key);
/**
* Sets the color of the waypoint icon.
*
* @param color the new color to apply to the waypoint icon, or {@code null} to use the default color.
* While the color may contain alpha values, the client does not receive them.
* @see <a href="https://minecraft.wiki/w/Locator_Bar#Usage">https://minecraft.wiki/w/Locator_Bar#Usage</a>
*/
void setWaypointColor(@Nullable Color color);
/**
* Gets the current visual style of the waypoint icon.
*
* @return the {@link Key} representing the icon's style
* @see #setWaypointStyle(Key)
* @see <a href="https://minecraft.wiki/w/Waypoint_style">https://minecraft.wiki/w/Waypoint_style</a>
*/
@NotNull
Key getWaypointStyle();
/**
* Gets the current color of the waypoint icon, if any.
*
* @return the icon's color, or {@code null} if the default color is used.
* While the color may contain alpha values, the client does not receive them.
* @see #setWaypointColor(Color)
* @see <a href="https://minecraft.wiki/w/Locator_Bar#Usage">https://minecraft.wiki/w/Locator_Bar#Usage</a>
*/
@Nullable
Color getWaypointColor();
}
@@ -3,7 +3,6 @@ package org.bukkit.entity;
import com.destroystokyo.paper.SkinParts;
import io.papermc.paper.InternalAPIBridge;
import io.papermc.paper.datacomponent.item.ResolvableProfile;
import java.util.Set;
import net.kyori.adventure.text.Component;
import org.bukkit.inventory.EntityEquipment;
import org.bukkit.inventory.MainHand;
@@ -13,15 +12,6 @@ import org.jspecify.annotations.Nullable;
@NullMarked
public interface Mannequin extends LivingEntity {
/**
* Returns the valid poses for a mannequin.
*
* @return the valid poses
*/
static Set<Pose> validPoses() {
return InternalAPIBridge.get().validMannequinPoses();
}
/**
* Returns the default mannequin profile.
*
@@ -1,6 +1,6 @@
package org.bukkit.entity;
import org.bukkit.GameRules;
import org.bukkit.GameRule;
import org.bukkit.Material;
import org.bukkit.block.data.BlockData;
import org.bukkit.material.MaterialData;
@@ -37,7 +37,7 @@ public interface Minecart extends Vehicle, io.papermc.paper.entity.Frictional {
/**
* Sets the maximum speed of a minecart. Must be nonnegative. Default is
* 0.4D or {@link GameRules#MAX_MINECART_SPEED}.
* 0.4D or {@link GameRule#MINECART_MAX_SPEED}.
*
* @param speed The max speed
*/
@@ -1,7 +0,0 @@
package org.bukkit.entity;
import org.jspecify.annotations.NullMarked;
@NullMarked
public interface Nautilus extends AbstractNautilus {
}
@@ -1,8 +0,0 @@
package org.bukkit.entity;
/**
* Represents a parched Skeleton.
*/
public interface Parched extends AbstractSkeleton {
}
@@ -3490,12 +3490,11 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
public void updateCommands();
/**
* Open an ItemStack with {@link io.papermc.paper.datacomponent.DataComponentTypes#WRITTEN_BOOK_CONTENT} for a Player
* Open a {@link Material#WRITTEN_BOOK} for a Player
*
* @param book the item with written book content to open for this player
* @throws IllegalArgumentException if the ItemStack is null, empty or doesn't have a {@link io.papermc.paper.datacomponent.DataComponentTypes#WRITTEN_BOOK_CONTENT}
* @param book The book to open for this player
*/
void openBook(ItemStack book);
public void openBook(ItemStack book);
/**
* Open a Sign for editing by the Player.
@@ -74,10 +74,6 @@ public interface Skeleton extends AbstractSkeleton {
/**
* Bogged skeleton.
*/
BOGGED,
/**
* Parched skeleton.
*/
PARCHED;
BOGGED;
}
}
@@ -1,41 +0,0 @@
package org.bukkit.entity;
import io.papermc.paper.registry.RegistryAccess;
import io.papermc.paper.registry.RegistryKey;
import org.bukkit.Keyed;
import org.bukkit.NamespacedKey;
import org.jspecify.annotations.NullMarked;
@NullMarked
public interface ZombieNautilus extends AbstractNautilus {
/**
* Gets the variant of this zombie nautilus.
*
* @return the variant
*/
Variant getVariant();
/**
* Sets the variant of this zombie nautilus.
*
* @param variant the variant
*/
void setVariant(Variant variant);
/**
* Represents the variant of a Zombie Nautilus.
*/
interface Variant extends Keyed {
// Start generate - ZombieNautilusVariant
Variant TEMPERATE = getVariant("temperate");
Variant WARM = getVariant("warm");
// End generate - ZombieNautilusVariant
private static Variant getVariant(String key) {
return RegistryAccess.registryAccess().getRegistry(RegistryKey.ZOMBIE_NAUTILUS_VARIANT).getOrThrow(NamespacedKey.minecraft(key));
}
}
}
@@ -57,12 +57,8 @@ public final class MemoryKey<T> implements Keyed {
public static final MemoryKey<Boolean> ATTACK_COOLING_DOWN = new MemoryKey<>(NamespacedKey.minecraft("attack_cooling_down"), Boolean.class);
public static final MemoryKey<Integer> ATTACK_TARGET_COOLDOWN = new MemoryKey<>(NamespacedKey.minecraft("attack_target_cooldown"), Integer.class);
public static final MemoryKey<Long> CANT_REACH_WALK_TARGET_SINCE = new MemoryKey<>(NamespacedKey.minecraft("cant_reach_walk_target_since"), Long.class);
public static final MemoryKey<Integer> CHARGE_COOLDOWN_TICKS = new MemoryKey<>(NamespacedKey.minecraft("charge_cooldown_ticks"), Integer.class);
public static final MemoryKey<Boolean> DANCING = new MemoryKey<>(NamespacedKey.minecraft("dancing"), Boolean.class);
public static final MemoryKey<Boolean> DANGER_DETECTED_RECENTLY = new MemoryKey<>(NamespacedKey.minecraft("danger_detected_recently"), Boolean.class);
@@ -121,10 +117,6 @@ public final class MemoryKey<T> implements Keyed {
public static final MemoryKey<Boolean> SNIFFER_HAPPY = new MemoryKey<>(NamespacedKey.minecraft("sniffer_happy"), Boolean.class);
public static final MemoryKey<Integer> SPEAR_ENGAGE_TIME = new MemoryKey<>(NamespacedKey.minecraft("spear_engage_time"), Integer.class);
public static final MemoryKey<Integer> SPEAR_FLEEING_TIME = new MemoryKey<>(NamespacedKey.minecraft("spear_fleeing_time"), Integer.class);
public static final MemoryKey<Integer> TEMPTATION_COOLDOWN_TICKS = new MemoryKey<>(NamespacedKey.minecraft("temptation_cooldown_ticks"), Integer.class);
public static final MemoryKey<Integer> TIME_TRYING_TO_REACH_ADMIRE_ITEM = new MemoryKey<>(NamespacedKey.minecraft("time_trying_to_reach_admire_item"), Integer.class);
@@ -16,7 +16,7 @@ import org.jetbrains.annotations.NotNull;
* an air block. {@link #getExplodedBlockState()} should be used to get
* information about the block state that exploded.
* <p>
* The event isn't called if the {@link org.bukkit.GameRules#MOB_GRIEFING}
* The event isn't called if the {@link org.bukkit.GameRule#MOB_GRIEFING}
* is disabled as no block interaction will occur.
*/
public class BlockExplodeEvent extends BlockEvent implements Cancellable {
@@ -12,7 +12,7 @@ import java.util.Collections;
import java.util.List;
/**
* Event fired when a dispenser shears a nearby entity.
* Event fired when a dispenser shears a nearby sheep.
*/
public class BlockShearEntityEvent extends BlockEvent implements Cancellable {
@@ -43,9 +43,9 @@ public class BlockShearEntityEvent extends BlockEvent implements Cancellable {
}
/**
* Gets the item used to shear this entity.
* Gets the item used to shear this sheep.
*
* @return the item used to shear this entity.
* @return the item used to shear this sheep.
*/
@NotNull
public ItemStack getTool() {
@@ -226,12 +226,6 @@ public class CreatureSpawnEvent extends EntitySpawnEvent {
* {@link org.bukkit.potion.PotionType#OOZING}, {@link org.bukkit.potion.PotionType#INFESTED}
*/
POTION_EFFECT,
/**
* When a Copper Golem Statue turns back into a Copper Golem
*
* @apiNote Canceling a {@link CreatureSpawnEvent} with this reason does not prevent the statue block from being removed, use {@link EntityChangeBlockEvent} to account for all side effects
*/
REANIMATE,
/**
* When a creature is spawned by being rehydrated
*/
Loaded 100 of 1202 files, more files were not shown because too many files have changed in this diff. Show more