Compare commits

..
Author SHA1 Message Date
Nassim Jahnke 1e8f878304 Mark publish fill as incompatible with config cache 2026-09-27 20:51:15 +02:00
Nassim Jahnke 28007ff9ca revert build.yaml for now 2026-09-27 20:42:36 +02:00
Nassim Jahnke 8075884fb2 Manually pre-define initial build number 2026-09-27 20:38:10 +02:00
Nassim Jahnke 2e1d2f2f11 Fetch git history for release workflow 2026-09-27 18:20:40 +02:00
Nassim Jahnke 0173bf2600 Small fixes
todo: maybe use different runner for PR
2026-09-27 17:54:52 +02:00
Riley Park 908605f2ce work 2026-09-26 21:27:12 -07:00
Riley Park e37089f835 work 2026-09-26 14:57:34 -07:00
Riley Park 14c0f269b5 chore: build on github actions 2026-09-25 17:12:21 -07:00
Jason Penilla a15fed9c16 Update Gradle to 9.8 and paperweight to beta.24 2026-09-24 20:24:50 -07:00
Wouter Gritter beac08f83f Don't pre-cancel AsyncPlayerSendSuggestionsEvent on empty suggestions (#14294) 2026-09-24 08:17:28 +02:00
Pedro f8a210f1d7 Fix exception when Cushion is in fluids (#14296) 2026-09-24 08:15:51 +02:00
HPnetwork d5cc7d4af8 Fix yaw wraparound in movement event checks (#14262) 2026-09-23 20:15:01 +02:00
Owen1212055 217fb92a10 Check target container in transport behavior 2026-09-23 20:11:17 +02:00
Creeam 327052edf4 Fix pathfinder comparator being inverted (#14292) 2026-09-23 18:23:31 +02:00
Nassim Jahnke e1f150a5eb Add back missing suggestions event call 2026-09-23 17:14:46 +02:00
Pedroandmastermc05 dd9d1031f0 Add Post Effect API (#14267)
Co-authored-by: mastermc05 <63639746+mastermc05@users.noreply.github.com>
2026-09-22 16:18:05 -03:00
Spottedleaf dfbf6f4183 Rebase fixups 2026-09-22 09:19:43 -07:00
Spottedleaf e863872fab Avoid copying LevelChunkSection data when unloading chunks
See https://github.com/Tuinity/Moonrise/commit/9516c499fd5e78eb5682180e7ba6b073c5a0c989
2026-09-22 08:57:10 -07:00
Spottedleaf 298732599a Remove unloaded chunk holders from broadcast set
See https://github.com/Tuinity/Moonrise/commit/d57318284619023ed5d1568cd286dd91ffe3eeae
2026-09-22 08:57:09 -07:00
Spottedleaf be3fe45d6e Do not copy NBT data in RegionFile I/O when not needed
See https://github.com/Tuinity/Moonrise/commit/e8def77d12fa2ef7b549acc5e1c37021c2781533
2026-09-22 08:57:09 -07:00
Spottedleaf f759838b85 Reduce allocations from PalettedContainer#pack
See https://github.com/Tuinity/Moonrise/commit/f22e132c84aae06cdf1bd5fea0aad65eb4c306cf
2026-09-22 08:57:09 -07:00
PedroandPantera 18f05bb815 Fix weather clear desync on player respawn (#14291)
Co-authored-by: Pantera <89838384+pantera07@users.noreply.github.com>
2026-09-22 15:22:43 +02:00
Nassim Jahnke 0c803ba1fa Fix missing is_tempted memory removal 2026-09-21 19:04:29 +02:00
Nassim Jahnke 6db70e070a Length checks 2026-09-21 18:56:19 +02:00
Doc a22040d53c Fix Player#applyMending for custom items using max_damage (#14276) 2026-09-21 10:51:53 -03:00
Nassim Jahnke c13e3c9f0a oops 2026-09-21 09:43:15 +02:00
Nassim Jahnke baa0d82f7c Call EntityPlaceEvent for cushions 2026-09-21 09:42:02 +02:00
Nassim Jahnke 93c9b2ab1f Fix inlined block state conversion 2026-09-20 21:02:19 +02:00
Wouter GritterandNassim Jahnke e6e9780e32 Initialize lagCompensationTick correctly (#14285)
Co-authored-by: Nassim Jahnke <nassim@njahnke.dev>
2026-09-20 20:49:46 +02:00
Doc a255185980 Call EntityCollideWithEntityEvent for Sulfur Cube pushed by Player (#14157) 2026-09-19 23:42:40 -03:00
Lulu13022002 98e0678512 tweaks deprecated warnings behavior on event 2026-09-19 21:44:35 +02:00
Strokkur24 9838b40808 Add SulfurCube#swallow (#14062) 2026-09-19 15:05:29 -03:00
Nassim Jahnke 8d93604641 Update remaining feature patches 2026-09-19 18:07:48 +02:00
Nassim Jahnke 1d60280c72 Per player mob spawning and more optimization patches 2026-09-19 17:48:55 +02:00
Nassim Jahnke 48e89d7f1b Anti xray 2026-09-19 16:48:36 +02:00
Nassim Jahnke 4e0ccd0f62 Updatea DataConverter 2026-09-19 16:17:56 +02:00
Lulu13022002 b4c7d1686d deprecate PotionEffectTypeCategory and PlayerAnimationEvent
also note PlayerArmSwingEvent is only called for the main hand now
2026-09-18 22:25:51 +02:00
Lulu13022002 0fd1cf72ff update material tags, fix some methods on item type 2026-09-18 18:10:56 +02:00
zzzzzyc 3caa2d22ba Remove obsolete MC-4 workaround (#14273) 2026-09-18 11:23:54 -03:00
Doc 1e37b938d9 [ci skip] Deprecate PotionBrewer method in Bukkit/Server class 2026-09-17 22:18:22 -03:00
Jason Penilla 71696fd5c3 Move saveAllChunks override fix into Moonrise patch 2026-09-17 13:21:59 -07:00
Jason Penilla cc95f009b7 Port recent Moonrise fixes 2026-09-17 11:36:18 -07:00
Jason Penilla ec0138a55d Remove debug-like logging 2026-09-17 11:11:57 -07:00
Jason Penilla 61151ca0bf Move upstreamed Moonrise fix 2026-09-17 10:56:55 -07:00
Jason Penilla f904ab5eaa Update 0016-Delay-open-close-callbacks-for-chests.patch
0017-Allow-Saving-of-Oversized-Chunks.patch
       0018-Optimize-GoalSelector-Goal.Flag-Set-operations.patch
       0019-Only-write-chunk-data-to-disk-if-it-serializes-witho.patch
       0020-Entity-load-save-limit-per-chunk.patch
       0021-Flush-regionfiles-on-save-configuration-option.patch
2026-09-17 10:31:56 -07:00
Jason Penilla 8f14eca95f Update 0014-Improve-keepalive-ping-system.patch
0015-Optimise-EntityScheduler-ticking.patch
2026-09-17 10:13:26 -07:00
Jason Penilla 3ae366b5d1 Update 0001-Add-explicit-flush-support-to-Log4j-AsyncAppender.patch 2026-09-17 10:10:57 -07:00
Jason Penilla 1a3ca55caf Update 0012-Incremental-chunk-and-player-saving.patch 2026-09-17 10:09:20 -07:00
Jason Penilla c65d58b100 Update 0011-Add-Alternate-Current-redstone-implementation.patch 2026-09-17 09:41:38 -07:00
Jason Penilla 89e2530882 Update 0010-Eigencraft-redstone-implementation.patch 2026-09-17 09:38:56 -07:00
Jason Penilla 593b1c4186 Update 0004-Optimize-Voxel-Shape-Merging.patch
0005-optimize-dirt-and-snow-spreading.patch
       0006-Use-Velocity-compression-and-cipher-natives.patch
       0007-Handle-Oversized-block-entities-in-chunks.patch
       0008-Optimize-Bit-Operations-by-inlining.patch
       0009-Remove-streams-from-hot-code.patch
2026-09-17 09:35:34 -07:00
Jason Penilla f50b737129 Update 0003-Optimize-Connection-and-add-advanced-packet-support.patch 2026-09-17 09:29:58 -07:00
Jason Penilla 0527579bbc Update 0002-Entity-Activation-Range-2.0.patch 2026-09-17 09:22:04 -07:00
Jason Penilla c5c8f6cbbf Port Moonrise mc/26.3 branch 2026-09-16 12:25:46 -07:00
HPnetwork 4dee7c425b Fix spectator portal interactions (#14264) 2026-09-16 19:36:06 +02:00
ZeroAura-exeandLulu13022002 27553f52f7 Fix panda/bee nearby target reason (#14253)
Co-authored-by: Lulu13022002 <41980282+Lulu13022002@users.noreply.github.com>
2026-09-16 10:05:09 -03:00
Lulu13022002 ace932ed4e add missing poplar tree type
Closes https://github.com/PaperMC/Paper/issues/14258
2026-09-15 20:42:35 +02:00
Lulu13022002 0f0cb00e6d improve sign text component 2026-09-15 18:44:29 +02:00
Nassim Jahnke db9f349679 26.3 2026-09-15 14:58:52 +02:00
2307f8f477 Initial 26.3 dev
Co-authored-by: Bjarne Koll <git@lynxplay.dev>
Co-authored-by: Doc <git@mrdoc.dev>
Co-authored-by: david <mail@nonswag.dev>
Co-authored-by: Shane Freeder <theboyetronic@gmail.com>
Co-authored-by: Nassim Jahnke <nassim@njahnke.dev>
Co-authored-by: Owen1212055 <23108066+Owen1212055@users.noreply.github.com>
Co-authored-by: Lulu13022002 <41980282+Lulu13022002@users.noreply.github.com>
Co-authored-by: Pedro <3602279+Doc94@users.noreply.github.com>
Co-authored-by: Žiga Slatnar Štagar <99482159+Privatech38@users.noreply.github.com>
2026-09-15 14:45:50 +02:00
Mickey42302 e5fe71723e [ci skip] Undeprecate Bukkit.setSpawnRadius (#14235) 2026-09-11 18:23:51 +02:00
Charles Richards 50018799f2 Assign BlockProjectileSource before dispenser projectiles spawn (#14201) 2026-09-09 19:31:52 +02:00
Amine Kacimi a3b2cb162a Fix zombie fly when trampling after cancelling EntityInteractEvent (#14225) 2026-09-09 19:12:36 +02:00
1938 changed files with 36903 additions and 49188 deletions

No files matched your search

+5 -1
View File
@@ -14,6 +14,7 @@
<property name="messageKey" value="annotation\.same\.line"/>
<property name="arguments" value="^(?!(${type_use_annotations}))"/>
</module>
<module name="SuppressWarningsFilter"/>
<!--Javadoc Comments-->
<module name="JavadocPackage"/>
@@ -23,6 +24,7 @@
<module name="FileTabCharacter"/>
<module name="TreeWalker">
<module name="SuppressWarningsHolder"/>
<module name="SuppressionXpathFilter">
<property name="file" value="${config_loc}/xpath-suppressions.xml"/>
<property name="optional" value="false"/>
@@ -55,7 +57,9 @@
<module name="AvoidNoArgumentSuperConstructorCall"/>
<module name="ConstructorsDeclarationGrouping"/>
<module name="CovariantEquals"/>
<module name="DeclarationOrder"/>
<module name="DeclarationOrder">
<property name="ignoreConstructors" value="true"/>
</module>
<module name="DefaultComesLast"/>
<module name="EmptyStatement"/>
<module name="EqualsHashCode"/>
+1 -1
View File
@@ -18,7 +18,7 @@ indent_style = tab
[*.bat]
end_of_line = crlf
[*.yml]
[{*.yaml,*.yml}]
indent_size = 2
[{*.patch,*.md}]
@@ -107,7 +107,7 @@ jobs:
if: always()
uses: actions/upload-artifact@v7
with:
name: Test Results
name: test-results
path: |
**/build/test-results/test/TEST-*.xml
@@ -137,12 +137,12 @@ jobs:
publishing-task: ":paper-api:publishAllPublicationsTo_githubPackages_PRsRepository publishDevBundlePublicationTo_githubPackages_PRsRepository -PpublishDevBundle"
event_file:
name: "Event File"
# Only run on PRs if the source branch is on someone else's repo
if: ${{ github.event_name != 'pull_request' || github.repository != github.event.pull_request.head.repo.full_name }}
needs: build
if: ${{ !cancelled() && needs.build.result != 'skipped' }}
runs-on: ubuntu-latest
steps:
- name: Upload
uses: actions/upload-artifact@v7
with:
name: Event File
name: event-data
path: ${{ github.event_path }}
+6 -2
View File
@@ -2,7 +2,11 @@ name: Close invalid PRs
on:
pull_request_target:
types: [ opened ]
types:
- opened
permissions:
pull-requests: write
jobs:
run:
@@ -12,7 +16,7 @@ jobs:
github.head_ref == 'main' ||
github.event.pull_request.head.repo.owner.type != 'User'
)
runs-on: ubuntu-latest
runs-on: namespace-profile-linux-small
steps:
- uses: superbrothers/close-pull-request@v3
id: "main_branch"
+1 -1
View File
@@ -9,6 +9,6 @@ permissions: {}
jobs:
signal:
runs-on: ubuntu-latest
runs-on: namespace-profile-linux-small
steps:
- run: echo "A PR review was submitted"
+2 -2
View File
@@ -22,7 +22,7 @@ jobs:
concurrency:
group: pr-review-status-${{ github.event.workflow_run.head_sha }}
cancel-in-progress: false
runs-on: ubuntu-latest
runs-on: namespace-profile-linux-small
steps:
- name: "authenticate"
id: "authenticate"
@@ -48,7 +48,7 @@ jobs:
concurrency:
group: pr-review-status-promote
cancel-in-progress: false
runs-on: ubuntu-latest
runs-on: namespace-profile-linux-small
steps:
- name: "authenticate"
id: "authenticate"
+1 -1
View File
@@ -14,7 +14,7 @@ jobs:
concurrency:
group: update-bugs-project-${{ github.event.issue.number }}
cancel-in-progress: true
runs-on: ubuntu-latest
runs-on: namespace-profile-linux-small
steps:
- name: "authenticate"
id: "authenticate"
+1 -1
View File
@@ -15,7 +15,7 @@ permissions:
jobs:
publish:
runs-on: ubuntu-latest
runs-on: namespace-profile-linux-small
steps:
- name: Generate an Application repository access token
id: gen_repo_token
+43
View File
@@ -0,0 +1,43 @@
name: Release 26.3
on:
push:
branches:
- main
permissions:
contents: read
concurrency:
group: release-26.3
cancel-in-progress: false
jobs:
release:
runs-on: namespace-profile-linux-default
timeout-minutes: 30
#env:
# BUILD_NUMBER: ${{ github.run_number }}
steps:
- name: "git / checkout"
uses: namespacelabs/nscloud-checkout-action@66f2dc6f6c42a8ac6c4e53473c4840006822831e # v9.0.1
with:
fetch-depth: 0
- uses: papermc/ci/setup-gradle@main
- name: "build number"
run: echo "BUILD_NUMBER=$((129 + GITHUB_RUN_NUMBER))" >> "$GITHUB_ENV"
- uses: papermc/ci/build-paper@main
- if: ${{ !cancelled() }}
uses: papermc/ci/upload-test-results@main
- uses: papermc/ci/publish-paper@main
with:
fill_api_url: ${{ secrets.FILL_API_URL }}
fill_api_key: ${{ secrets.FILL_API_KEY }}
maven_username: ${{ secrets.ARTIFACTORY_USERNAME }}
maven_password: ${{ secrets.ARTIFACTORY_PASSWORD }}
maven_tasks: :paper-api:publish publishDevBundlePublicationToPaperReleasesRepository
+24
View File
@@ -0,0 +1,24 @@
name: Test Results
on:
workflow_run:
workflows: [ "Build Paper" ]
types:
- completed
permissions:
actions: read
checks: write
jobs:
test-results:
name: Test Results
if: github.event.workflow_run.conclusion != 'skipped'
runs-on: namespace-profile-linux-small
steps:
- uses: papermc/ci/publish-test-results@main
with:
event: ${{ github.event.workflow_run.event }}
commit: ${{ github.event.workflow_run.head_sha }}
github_token: ${{ secrets.GITHUB_TOKEN }}
run_id: ${{ github.event.workflow_run.id }}
-34
View File
@@ -1,34 +0,0 @@
name: Test Results
on:
workflow_run:
workflows: [ "Build Paper" ]
types:
- completed
permissions: { }
jobs:
test-results:
name: Test Results
runs-on: ubuntu-latest
if: github.event.workflow_run.conclusion != 'skipped'
permissions:
checks: write
# for downloading test result artifacts
actions: read
steps:
- name: Download and Extract Artifacts
uses: dawidd6/action-download-artifact@v21
with:
run_id: ${{ github.event.workflow_run.id }}
path: test_artifacts
name: "Test Results|Event File"
name_is_regexp: true
- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
with:
commit: ${{ github.event.workflow_run.head_sha }}
event_file: test_artifacts/Event File/event.json
event_name: ${{ github.event.workflow_run.event }}
files: "test_artifacts/**/*.xml"
comment_mode: off
+3 -3
View File
@@ -1,4 +1,4 @@
Paper [![Version](https://img.shields.io/maven-metadata/v?metadataUrl=https%3A%2F%2Fartifactory.papermc.io%2Fartifactory%2Funiverse%2Fio%2Fpapermc%2Fpaper%2Fpaper-api%2Fmaven-metadata.xml&strategy=highestVersion&filter=26.2.*&label=version&color=%23344ceb
Paper [![Version](https://img.shields.io/maven-metadata/v?metadataUrl=https%3A%2F%2Fartifactory.papermc.io%2Fartifactory%2Funiverse%2Fio%2Fpapermc%2Fpaper%2Fpaper-api%2Fmaven-metadata.xml&strategy=highestVersion&filter=26.3.*&label=version&color=%23344ceb
)](https://papermc.io/downloads/paper)
[![Paper Build Status](https://img.shields.io/github/actions/workflow/status/PaperMC/Paper/build.yml?branch=main)](https://github.com/PaperMC/Paper/actions)
[![Discord](https://img.shields.io/discord/289587909051416579.svg?label=&logo=discord&logoColor=ffffff&color=7389D8&labelColor=6A7EC2)](https://discord.gg/papermc)
@@ -39,7 +39,7 @@ repositories {
}
dependencies {
compileOnly("io.papermc.paper:paper-api:26.2.build.+")
compileOnly("io.papermc.paper:paper-api:26.3.build.+")
}
java {
@@ -59,7 +59,7 @@ java {
<dependency>
<groupId>io.papermc.paper</groupId>
<artifactId>paper-api</artifactId>
<version>[26.2.build,)</version>
<version>[26.3.build,)</version>
<scope>provided</scope>
</dependency>
```
+24 -25
View File
@@ -15,6 +15,8 @@ public net.minecraft.commands.CommandSourceStack source
public net.minecraft.commands.arguments.DimensionArgument ERROR_INVALID_VALUE
public net.minecraft.commands.arguments.blocks.BlockInput tag
public net.minecraft.core.MappedRegistry validateWrite(Lnet/minecraft/resources/ResourceKey;)V
public net.minecraft.core.component.DataComponentPatch map
public net.minecraft.core.component.Removed
public net.minecraft.nbt.ListTag <init>(Ljava/util/List;)V
public net.minecraft.nbt.ListTag identifyRawElementType()B
public net.minecraft.network.Connection address
@@ -27,7 +29,6 @@ public net.minecraft.resources.RegistryOps$HolderLookupAdapter
public net.minecraft.server.Main forceUpgrade(Lnet/minecraft/world/level/storage/LevelStorageSource$LevelStorageAccess;Lcom/mojang/datafixers/DataFixer;ZLjava/util/function/BooleanSupplier;Lnet/minecraft/core/RegistryAccess;Z)V
public net.minecraft.server.MinecraftServer LOGGER
public net.minecraft.server.RegistryLayer STATIC_ACCESS
public net.minecraft.server.ServerAdvancementManager advancements
public net.minecraft.server.Services USERID_CACHE_FILE
public net.minecraft.server.dedicated.DedicatedServerProperties$WorldDimensionData
public net.minecraft.server.dedicated.DedicatedServerProperties$WorldDimensionData <init>(Lcom/google/gson/JsonObject;Ljava/lang/String;)V
@@ -76,6 +77,7 @@ public net.minecraft.server.level.ServerPlayer wardenSpawnTracker
public net.minecraft.server.level.ServerPlayer$RespawnPosAngle
public net.minecraft.server.level.ServerPlayer$RespawnPosAngle <init>(Lnet/minecraft/world/phys/Vec3;FF)V
public net.minecraft.server.level.ServerPlayerGameMode hasDelayedDestroy
public net.minecraft.server.network.ServerCommandSuggestionsProvider limitSuggestionCount(Lcom/mojang/brigadier/suggestion/Suggestions;)Lcom/mojang/brigadier/suggestion/Suggestions;
public net.minecraft.server.network.ServerConfigurationPacketListenerImpl clientInformation
public net.minecraft.server.network.ServerConfigurationPacketListenerImpl currentTask
public net.minecraft.server.network.ServerConfigurationPacketListenerImpl finishCurrentTask(Lnet/minecraft/server/network/ConfigurationTask$Type;)V
@@ -120,6 +122,9 @@ public net.minecraft.world.entity.AgeableMob setAgeLocked(Z)V
public net.minecraft.world.entity.AreaEffectCloud owner
public net.minecraft.world.entity.AreaEffectCloud reapplicationDelay
public net.minecraft.world.entity.Avatar DATA_PLAYER_MODE_CUSTOMISATION
public net.minecraft.world.entity.ConversionTracker afflictionTime
public net.minecraft.world.entity.ConversionTracker conversionTime
public net.minecraft.world.entity.ConversionTracker setConverting(Z)V
public net.minecraft.world.entity.Display DATA_POS_ROT_INTERPOLATION_DURATION_ID
public net.minecraft.world.entity.Display createTransformation(Lnet/minecraft/network/syncher/SynchedEntityData;)Lcom/mojang/math/Transformation;
public net.minecraft.world.entity.Display getBillboardConstraints()Lnet/minecraft/world/entity/Display$BillboardConstraints;
@@ -335,8 +340,8 @@ 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
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.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.Guardian randomStrollGoal
public net.minecraft.world.entity.monster.Guardian setActiveAttackTarget(I)V
@@ -370,15 +375,13 @@ public net.minecraft.world.entity.monster.piglin.AbstractPiglin isImmuneToZombif
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 isChargingCrossbow()Z
public net.minecraft.world.entity.monster.skeleton.Skeleton conversionTime
public net.minecraft.world.entity.monster.skeleton.Skeleton inPowderSnowTime
public net.minecraft.world.entity.monster.skeleton.Skeleton freezingTracker
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 DOOR_BREAKING_PREDICATE
public net.minecraft.world.entity.monster.zombie.Zombie conversionTime
public net.minecraft.world.entity.monster.zombie.Zombie drowningTracker
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 villagerConversionTime
@@ -488,7 +491,6 @@ public net.minecraft.world.item.component.ResolvableProfile$Partial MAP_CODEC
public net.minecraft.world.item.component.ResolvableProfile$Static <init>(Lcom/mojang/datafixers/util/Either;Lnet/minecraft/world/entity/player/PlayerSkin$Patch;)V
public net.minecraft.world.item.context.UseOnContext <init>(Lnet/minecraft/world/level/Level;Lnet/minecraft/world/entity/player/Player;Lnet/minecraft/world/InteractionHand;Lnet/minecraft/world/item/ItemStack;Lnet/minecraft/world/phys/BlockHitResult;)V
public net.minecraft.world.item.crafting.Ingredient values
public net.minecraft.world.item.crafting.RecipeManager recipes
public net.minecraft.world.item.crafting.RecipeMap byKey
public net.minecraft.world.item.crafting.RecipeMap byType
public net.minecraft.world.item.trading.MerchantOffer demand
@@ -523,14 +525,15 @@ public net.minecraft.world.level.block.ComposterBlock$InputContainer
public net.minecraft.world.level.block.ComposterBlock$OutputContainer
public net.minecraft.world.level.block.DispenserBlock dispenseFrom(Lnet/minecraft/server/level/ServerLevel;Lnet/minecraft/world/level/block/state/BlockState;Lnet/minecraft/core/BlockPos;)V
public net.minecraft.world.level.block.FireBlock igniteOdds
public net.minecraft.world.level.block.RedStoneWireBlock canSurvive(Lnet/minecraft/world/level/block/state/BlockState;Lnet/minecraft/world/level/LevelReader;Lnet/minecraft/core/BlockPos;)Z
public net.minecraft.world.level.block.RedStoneWireBlock shouldSignal
public net.minecraft.world.level.block.RedstoneWireBlock canSurvive(Lnet/minecraft/world/level/block/state/BlockState;Lnet/minecraft/world/level/LevelReader;Lnet/minecraft/core/BlockPos;)Z
public net.minecraft.world.level.block.RedstoneWireBlock shouldSignal
public net.minecraft.world.level.block.SelectableSlotContainer getSection(FI)I
public net.minecraft.world.level.block.TurtleEggBlock decreaseEggs(Lnet/minecraft/world/level/Level;Lnet/minecraft/core/BlockPos;Lnet/minecraft/world/level/block/state/BlockState;)V
public net.minecraft.world.level.block.entity.AbstractFurnaceBlockEntity cookingTimer
public net.minecraft.world.level.block.entity.AbstractFurnaceBlockEntity cookingTotalTime
public net.minecraft.world.level.block.entity.AbstractFurnaceBlockEntity getTotalCookTime(Lnet/minecraft/server/level/ServerLevel;Lnet/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity;)I
public net.minecraft.world.level.block.entity.AbstractFurnaceBlockEntity litTimeRemaining
public net.minecraft.world.level.block.entity.AbstractFurnaceBlockEntity quickCheck
public net.minecraft.world.level.block.entity.AbstractFurnaceBlockEntity recipesUsed
public net.minecraft.world.level.block.entity.BannerBlockEntity name
public net.minecraft.world.level.block.entity.BarrelBlockEntity openersCounter
@@ -547,6 +550,7 @@ public net.minecraft.world.level.block.entity.BlockEntity saveId(Lnet/minecraft/
public net.minecraft.world.level.block.entity.BlockEntityType validBlocks
public net.minecraft.world.level.block.entity.BrewingStandBlockEntity brewTime
public net.minecraft.world.level.block.entity.BrewingStandBlockEntity fuel
public net.minecraft.world.level.block.entity.BrewingStandBlockEntity totalBrewTime
public net.minecraft.world.level.block.entity.BrushableBlockEntity item
public net.minecraft.world.level.block.entity.BrushableBlockEntity lootTable
public net.minecraft.world.level.block.entity.BrushableBlockEntity lootTableSeed
@@ -621,21 +625,13 @@ public net.minecraft.world.level.dimension.end.EnderDragonFight spawnNewGateway(
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.SurfaceRules$Condition
public net.minecraft.world.level.levelgen.SurfaceRules$Context
public net.minecraft.world.level.levelgen.SurfaceRules$Context blockX
public net.minecraft.world.level.levelgen.SurfaceRules$Context blockY
public net.minecraft.world.level.levelgen.SurfaceRules$Context blockZ
public net.minecraft.world.level.levelgen.SurfaceRules$Context context
public net.minecraft.world.level.levelgen.SurfaceRules$Context randomState
public net.minecraft.world.level.levelgen.SurfaceRules$LazyCondition
public net.minecraft.world.level.levelgen.SurfaceRules$LazyYCondition
public net.minecraft.world.level.levelgen.material.MaterialRuleContext context
public net.minecraft.world.level.levelgen.structure.StructurePiece SHAPE_CHECK_BLOCKS
public net.minecraft.world.level.levelgen.structure.placement.StructurePlacement exclusionZone
public net.minecraft.world.level.levelgen.structure.placement.StructurePlacement frequency
public net.minecraft.world.level.levelgen.structure.placement.StructurePlacement frequencyReductionMethod
public net.minecraft.world.level.levelgen.structure.placement.StructurePlacement locateOffset
public net.minecraft.world.level.levelgen.structure.placement.StructurePlacement salt
public net.minecraft.world.level.levelgen.structure.placement.AbstractSpreadingStructurePlacement exclusionZone
public net.minecraft.world.level.levelgen.structure.placement.AbstractSpreadingStructurePlacement frequency
public net.minecraft.world.level.levelgen.structure.placement.AbstractSpreadingStructurePlacement frequencyReductionMethod
public net.minecraft.world.level.levelgen.structure.placement.AbstractSpreadingStructurePlacement locateOffset
public net.minecraft.world.level.levelgen.structure.placement.AbstractSpreadingStructurePlacement salt
public net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate entityInfoList
public net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate palettes
public net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplateManager resourceManagerSource
@@ -651,11 +647,13 @@ public net.minecraft.world.level.saveddata.maps.MapItemSavedData decorations
public net.minecraft.world.level.storage.PrimaryLevelData settings
public net.minecraft.world.level.storage.SavedDataStorage cache
public net.minecraft.world.level.storage.TagValueInput input
public net.minecraft.world.level.storage.loot.providers.number.ints.ResolvableInt$Reference getProvider(Lnet/minecraft/world/level/storage/loot/LootContext;)Ljava/util/Optional;
public net.minecraft.world.scores.criteria.ObjectiveCriteria CRITERIA_CACHE
public-f net.minecraft.server.MinecraftServer potionBrewing
public-f net.minecraft.server.MinecraftServer storageSource
public-f net.minecraft.server.ServerAdvancementManager advancements
public-f net.minecraft.server.dedicated.DedicatedServer serverLinks
public-f net.minecraft.server.dedicated.DedicatedServer settings
public-f net.minecraft.world.entity.Entity doTeamsAllowDamage(Lnet/minecraft/world/entity/Entity;)Z
public-f net.minecraft.world.entity.LivingEntity combatTracker
public-f net.minecraft.world.entity.Mob targetSelector
public-f net.minecraft.world.entity.ai.attributes.RangedAttribute maxValue
@@ -666,6 +664,7 @@ public-f net.minecraft.world.inventory.AbstractContainerMenu lastSlots
public-f net.minecraft.world.inventory.AbstractContainerMenu remoteDataSlots
public-f net.minecraft.world.inventory.AbstractContainerMenu remoteSlots
public-f net.minecraft.world.inventory.AbstractContainerMenu slots
public-f net.minecraft.world.item.crafting.RecipeManager recipes
public-f net.minecraft.world.item.trading.MerchantOffer baseCostA
public-f net.minecraft.world.item.trading.MerchantOffer costB
public-f net.minecraft.world.item.trading.MerchantOffer maxUses
+1 -1
View File
@@ -4,7 +4,7 @@ import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import org.gradle.api.tasks.testing.logging.TestLogEvent
plugins {
id("io.papermc.paperweight.core") version "2.0.0-beta.21" apply false
id("io.papermc.paperweight.core") version "2.0.0-beta.24" apply false
}
subprojects {
+3 -3
View File
@@ -1,9 +1,9 @@
group=io.papermc.paper
mcVersion=26.2
mcVersion=26.3
# This is the current API version for use in (paper-)plugin.yml files
# During snapshot cycles this should be the anticipated version of the release target
apiVersion=26.2
channel=STABLE
apiVersion=26.3
channel=ALPHA
# Set to true while updating Minecraft version
updatingMinecraft=false
Binary file not shown.
+3 -1
View File
@@ -1,7 +1,9 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.8.0-bin.zip
networkTimeout=10000
retries=0
retryBackOffMs=500
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Vendored
+3 -3
View File
@@ -20,7 +20,7 @@
##############################################################################
#
# Gradle start up script for POSIX generated by Gradle.
# gradlew start up script for POSIX generated by Gradle.
#
# Important for running:
#
@@ -29,7 +29,7 @@
# bash, then to run this script, type that shell name before the whole
# command line, like:
#
# ksh Gradle
# ksh gradlew
#
# Busybox and similar reduced shells will NOT work, because this script
# requires all of these POSIX shell features:
@@ -57,7 +57,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/2d6327017519d23b96af35865dc997fcb544fb40/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/3d91ce3b8caaf77ad09f381f43615b715b53f72c/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
Vendored
+52 -33
View File
@@ -19,12 +19,39 @@
@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem gradlew startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
@rem Set local scope for the variables, and ensure extensions are enabled
setlocal EnableExtensions
@rem Catch executions from older scripts and ensure they exit cleanly.
@rem This can be removed once we can be reasonably confident that few people
@rem will be migrating directly to this new wrapper.
goto afterSafetyNet
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
goto exitWithErrorLevel
:afterSafetyNet
set DIRNAME=%~dp0
if "%DIRNAME%"=="" set DIRNAME=.
@@ -45,13 +72,14 @@ set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute
echo. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2
1>&2 echo.
1>&2 echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
1>&2 echo.
1>&2 echo Please set the JAVA_HOME variable in your environment to match the
1>&2 echo location of your Java installation.
goto fail
"%COMSPEC%" /c exit 1
goto exitWithErrorLevel
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
@@ -59,35 +87,26 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute
echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2
1>&2 echo.
1>&2 echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
1>&2 echo.
1>&2 echo Please set the JAVA_HOME variable in your environment to match the
1>&2 echo location of your Java installation.
goto fail
"%COMSPEC%" /c exit 1
goto exitWithErrorLevel
:execute
@rem Setup the command line
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
@rem Execute gradlew
@rem endlocal doesn't take effect until after the line is parsed and variables are expanded
@rem which allows us to clear the local environment before executing the java command
endlocal & "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* & call :exitWithErrorLevel & goto exitWithErrorLevel
:end
@rem End local scope for the variables with windows NT shell
if %ERRORLEVEL% equ 0 goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
set EXIT_CODE=%ERRORLEVEL%
if %EXIT_CODE% equ 0 set EXIT_CODE=1
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
exit /b %EXIT_CODE%
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega
@rem This label must not be changed. We rely on old scripts being able to jump to this point.
:exitWithErrorLevel
@rem Use "%COMSPEC%" /c exit to allow operators to work properly in scripts
"%COMSPEC%" /c exit %ERRORLEVEL%
+6 -1
View File
@@ -10,6 +10,11 @@
<property name="arguments" value="(${custom_javadoc_tags}|[A-Z].*)"/>
</module>
<module name="TreeWalker">
<!--Skip generated content by typewriter-->
<module name="SuppressionCommentFilter">
<property name="offCommentFormat" value="Start generate - \w+$"/>
<property name="onCommentFormat" value="End generate - \w+$"/>
</module>
<module name="JavadocVariable">
<!--requires on public fields-->
<property name="accessModifiers" value="public"/>
@@ -20,7 +25,7 @@
</module>
<module name="MissingJavadocPackage"/>
<module name="MissingJavadocType">
<property name="skipAnnotations" value="Generated, ApiStatus.Internal" />
<property name="skipAnnotations" value="Generated, ApiStatus.Internal"/>
</module>
</module>
</module>
+8 -10
View File
@@ -22,17 +22,17 @@ paperCheckstyle {
directoriesToSkipFile = layout.projectDirectory.file(".checkstyle/ignored_directories.txt")
}
val annotationsVersion = "26.0.2"
val annotationsVersion = "26.1.0"
val adventureVersion = "5.2.0"
val bungeeCordChatVersion = "1.21-R0.2-deprecated+build.21"
val slf4jVersion = "2.0.17"
val log4jVersion = "2.26.0"
val apiAndDocs: Configuration by configurations.creating
val apiAndDocs: Configuration = configurations.create("apiAndDocs")
configurations.api {
extendsFrom(apiAndDocs)
}
val javadocSourcepath: Configuration by configurations.creating {
val javadocSourcepath: Configuration = configurations.create("javadocSourcepath") {
attributes {
attribute(Category.CATEGORY_ATTRIBUTE, objects.named(Category.DOCUMENTATION))
attribute(Bundling.BUNDLING_ATTRIBUTE, objects.named(Bundling.EXTERNAL))
@@ -57,13 +57,11 @@ dependencies {
api("com.google.guava:guava:33.6.0-jre")
api("com.google.code.gson:gson:2.14.0")
api("org.yaml:snakeyaml:2.2")
api("org.joml:joml:1.10.8") {
isTransitive = false // https://github.com/JOML-CI/JOML/issues/352
}
api("org.joml:joml:1.10.9")
api("it.unimi.dsi:fastutil:8.5.18")
api("org.apache.logging.log4j:log4j-api:$log4jVersion")
api("org.slf4j:slf4j-api:$slf4jVersion")
api("com.mojang:brigadier:1.3.10")
api("com.mojang:brigadier:1.3.11")
// Deprecate bungeecord-chat in favor of adventure
api("net.md-5:bungeecord-chat:$bungeeCordChatVersion") {
@@ -89,7 +87,7 @@ dependencies {
testCompileOnly(annotations)
javadocSourcepath(annotations) // For adventure-api module requirements
val checkerQual = "org.checkerframework:checker-qual:3.49.2"
val checkerQual = "org.checkerframework:checker-qual:4.2.3"
compileOnlyApi(checkerQual)
testCompileOnly(checkerQual)
@@ -207,7 +205,7 @@ tasks.withType<Javadoc>().configureEach {
"https://guava.dev/releases/33.6.0-jre/api/docs/",
"https://www.javadocs.dev/org.yaml/snakeyaml/2.2/",
"https://www.javadocs.dev/org.jetbrains/annotations/$annotationsVersion/",
"https://www.javadocs.dev/org.joml/joml/1.10.8/",
"https://www.javadocs.dev/org.joml/joml/1.10.9/",
"https://www.javadocs.dev/com.google.code.gson/gson/2.14.0",
"https://jspecify.dev/docs/api/",
"https://jd.papermc.io/adventure/$adventureVersion/",
@@ -253,7 +251,7 @@ tasks.compileTestJava {
options.compilerArgs.add("-parameters")
}
val scanJarForBadCalls by tasks.registering(io.papermc.paperweight.tasks.ScanJarForBadCalls::class) {
val scanJarForBadCalls = tasks.register<io.papermc.paperweight.tasks.ScanJarForBadCalls>("scanJarForBadCalls") {
badAnnotations.add("Lio/papermc/paper/annotation/DoNotUse;")
jarToScan.set(tasks.jar.flatMap { it.archiveFile })
classpath.from(configurations.compileClasspath)
@@ -123,7 +123,7 @@ public interface VanillaGoal<T extends Mob> extends Goal<T> {
GoalKey<Cat> CAT_AVOID_ENTITY = create("cat_avoid_entity", Cat.class);
GoalKey<Cat> CAT_LIE_ON_BED = create("cat_lie_on_bed", Cat.class);
GoalKey<Cat> CAT_LIE_ON_BLOCK = create("cat_lie_on_block", Cat.class);
GoalKey<Cat> CAT_RELAX_ON_OWNER = create("cat_relax_on_owner", Cat.class);
@@ -171,7 +171,7 @@ public interface VanillaGoal<T extends Mob> extends Goal<T> {
GoalKey<Creature> TEMPT = create("tempt", Creature.class);
GoalKey<Creature> TRY_FIND_WATER = create("try_find_water", Creature.class);
GoalKey<Creature> TRY_FIND_LIQUID = create("try_find_liquid", Creature.class);
GoalKey<Creature> WATER_AVOIDING_RANDOM_FLYING = create("water_avoiding_random_flying", Creature.class);
@@ -181,6 +181,8 @@ public interface VanillaGoal<T extends Mob> extends Goal<T> {
GoalKey<Dolphin> DOLPHIN_JUMP = create("dolphin_jump", Dolphin.class);
GoalKey<Dolphin> DOLPHIN_MOVE_TO_ITEM = create("dolphin_move_to_item", Dolphin.class);
GoalKey<Dolphin> DOLPHIN_PLAY_WITH_ITEMS = create("dolphin_play_with_items", Dolphin.class);
GoalKey<Dolphin> DOLPHIN_SWIM_TO_TREASURE = create("dolphin_swim_to_treasure", Dolphin.class);
@@ -81,6 +81,13 @@ public final class BiomeKeys {
*/
public static final TypedKey<Biome> CRIMSON_FOREST = create(key("crimson_forest"));
/**
* {@code minecraft:dappled_forest}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Biome> DAPPLED_FOREST = create(key("dappled_forest"));
/**
* {@code minecraft:dark_forest}
*
@@ -655,6 +655,20 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> BLACK_CONCRETE_POWDER = create(key("black_concrete_powder"));
/**
* {@code minecraft:black_concrete_slab}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> BLACK_CONCRETE_SLAB = create(key("black_concrete_slab"));
/**
* {@code minecraft:black_concrete_stairs}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> BLACK_CONCRETE_STAIRS = create(key("black_concrete_stairs"));
/**
* {@code minecraft:black_glazed_terracotta}
*
@@ -704,6 +718,20 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> BLACK_WOOL = create(key("black_wool"));
/**
* {@code minecraft:black_wool_slab}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> BLACK_WOOL_SLAB = create(key("black_wool_slab"));
/**
* {@code minecraft:black_wool_stairs}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> BLACK_WOOL_STAIRS = create(key("black_wool_stairs"));
/**
* {@code minecraft:blackstone}
*
@@ -788,6 +816,20 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> BLUE_CONCRETE_POWDER = create(key("blue_concrete_powder"));
/**
* {@code minecraft:blue_concrete_slab}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> BLUE_CONCRETE_SLAB = create(key("blue_concrete_slab"));
/**
* {@code minecraft:blue_concrete_stairs}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> BLUE_CONCRETE_STAIRS = create(key("blue_concrete_stairs"));
/**
* {@code minecraft:blue_glazed_terracotta}
*
@@ -851,6 +893,20 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> BLUE_WOOL = create(key("blue_wool"));
/**
* {@code minecraft:blue_wool_slab}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> BLUE_WOOL_SLAB = create(key("blue_wool_slab"));
/**
* {@code minecraft:blue_wool_stairs}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> BLUE_WOOL_STAIRS = create(key("blue_wool_stairs"));
/**
* {@code minecraft:bone_block}
*
@@ -977,6 +1033,20 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> BROWN_CONCRETE_POWDER = create(key("brown_concrete_powder"));
/**
* {@code minecraft:brown_concrete_slab}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> BROWN_CONCRETE_SLAB = create(key("brown_concrete_slab"));
/**
* {@code minecraft:brown_concrete_stairs}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> BROWN_CONCRETE_STAIRS = create(key("brown_concrete_stairs"));
/**
* {@code minecraft:brown_glazed_terracotta}
*
@@ -1040,6 +1110,20 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> BROWN_WOOL = create(key("brown_wool"));
/**
* {@code minecraft:brown_wool_slab}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> BROWN_WOOL_SLAB = create(key("brown_wool_slab"));
/**
* {@code minecraft:brown_wool_stairs}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> BROWN_WOOL_STAIRS = create(key("brown_wool_stairs"));
/**
* {@code minecraft:bubble_column}
*
@@ -2048,6 +2132,20 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> CYAN_CONCRETE_POWDER = create(key("cyan_concrete_powder"));
/**
* {@code minecraft:cyan_concrete_slab}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> CYAN_CONCRETE_SLAB = create(key("cyan_concrete_slab"));
/**
* {@code minecraft:cyan_concrete_stairs}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> CYAN_CONCRETE_STAIRS = create(key("cyan_concrete_stairs"));
/**
* {@code minecraft:cyan_glazed_terracotta}
*
@@ -2097,6 +2195,20 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> CYAN_WOOL = create(key("cyan_wool"));
/**
* {@code minecraft:cyan_wool_slab}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> CYAN_WOOL_SLAB = create(key("cyan_wool_slab"));
/**
* {@code minecraft:cyan_wool_stairs}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> CYAN_WOOL_STAIRS = create(key("cyan_wool_stairs"));
/**
* {@code minecraft:damaged_anvil}
*
@@ -3105,6 +3217,20 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> GRAY_CONCRETE_POWDER = create(key("gray_concrete_powder"));
/**
* {@code minecraft:gray_concrete_slab}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> GRAY_CONCRETE_SLAB = create(key("gray_concrete_slab"));
/**
* {@code minecraft:gray_concrete_stairs}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> GRAY_CONCRETE_STAIRS = create(key("gray_concrete_stairs"));
/**
* {@code minecraft:gray_glazed_terracotta}
*
@@ -3154,6 +3280,20 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> GRAY_WOOL = create(key("gray_wool"));
/**
* {@code minecraft:gray_wool_slab}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> GRAY_WOOL_SLAB = create(key("gray_wool_slab"));
/**
* {@code minecraft:gray_wool_stairs}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> GRAY_WOOL_STAIRS = create(key("gray_wool_stairs"));
/**
* {@code minecraft:green_banner}
*
@@ -3203,6 +3343,20 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> GREEN_CONCRETE_POWDER = create(key("green_concrete_powder"));
/**
* {@code minecraft:green_concrete_slab}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> GREEN_CONCRETE_SLAB = create(key("green_concrete_slab"));
/**
* {@code minecraft:green_concrete_stairs}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> GREEN_CONCRETE_STAIRS = create(key("green_concrete_stairs"));
/**
* {@code minecraft:green_glazed_terracotta}
*
@@ -3252,6 +3406,20 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> GREEN_WOOL = create(key("green_wool"));
/**
* {@code minecraft:green_wool_slab}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> GREEN_WOOL_SLAB = create(key("green_wool_slab"));
/**
* {@code minecraft:green_wool_stairs}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> GREEN_WOOL_STAIRS = create(key("green_wool_stairs"));
/**
* {@code minecraft:grindstone}
*
@@ -3728,6 +3896,20 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> LIGHT_BLUE_CONCRETE_POWDER = create(key("light_blue_concrete_powder"));
/**
* {@code minecraft:light_blue_concrete_slab}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> LIGHT_BLUE_CONCRETE_SLAB = create(key("light_blue_concrete_slab"));
/**
* {@code minecraft:light_blue_concrete_stairs}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> LIGHT_BLUE_CONCRETE_STAIRS = create(key("light_blue_concrete_stairs"));
/**
* {@code minecraft:light_blue_glazed_terracotta}
*
@@ -3777,6 +3959,20 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> LIGHT_BLUE_WOOL = create(key("light_blue_wool"));
/**
* {@code minecraft:light_blue_wool_slab}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> LIGHT_BLUE_WOOL_SLAB = create(key("light_blue_wool_slab"));
/**
* {@code minecraft:light_blue_wool_stairs}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> LIGHT_BLUE_WOOL_STAIRS = create(key("light_blue_wool_stairs"));
/**
* {@code minecraft:light_gray_banner}
*
@@ -3826,6 +4022,20 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> LIGHT_GRAY_CONCRETE_POWDER = create(key("light_gray_concrete_powder"));
/**
* {@code minecraft:light_gray_concrete_slab}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> LIGHT_GRAY_CONCRETE_SLAB = create(key("light_gray_concrete_slab"));
/**
* {@code minecraft:light_gray_concrete_stairs}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> LIGHT_GRAY_CONCRETE_STAIRS = create(key("light_gray_concrete_stairs"));
/**
* {@code minecraft:light_gray_glazed_terracotta}
*
@@ -3875,6 +4085,20 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> LIGHT_GRAY_WOOL = create(key("light_gray_wool"));
/**
* {@code minecraft:light_gray_wool_slab}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> LIGHT_GRAY_WOOL_SLAB = create(key("light_gray_wool_slab"));
/**
* {@code minecraft:light_gray_wool_stairs}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> LIGHT_GRAY_WOOL_STAIRS = create(key("light_gray_wool_stairs"));
/**
* {@code minecraft:light_weighted_pressure_plate}
*
@@ -3959,6 +4183,20 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> LIME_CONCRETE_POWDER = create(key("lime_concrete_powder"));
/**
* {@code minecraft:lime_concrete_slab}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> LIME_CONCRETE_SLAB = create(key("lime_concrete_slab"));
/**
* {@code minecraft:lime_concrete_stairs}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> LIME_CONCRETE_STAIRS = create(key("lime_concrete_stairs"));
/**
* {@code minecraft:lime_glazed_terracotta}
*
@@ -4008,6 +4246,20 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> LIME_WOOL = create(key("lime_wool"));
/**
* {@code minecraft:lime_wool_slab}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> LIME_WOOL_SLAB = create(key("lime_wool_slab"));
/**
* {@code minecraft:lime_wool_stairs}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> LIME_WOOL_STAIRS = create(key("lime_wool_stairs"));
/**
* {@code minecraft:lodestone}
*
@@ -4071,6 +4323,20 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> MAGENTA_CONCRETE_POWDER = create(key("magenta_concrete_powder"));
/**
* {@code minecraft:magenta_concrete_slab}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> MAGENTA_CONCRETE_SLAB = create(key("magenta_concrete_slab"));
/**
* {@code minecraft:magenta_concrete_stairs}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> MAGENTA_CONCRETE_STAIRS = create(key("magenta_concrete_stairs"));
/**
* {@code minecraft:magenta_glazed_terracotta}
*
@@ -4120,6 +4386,20 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> MAGENTA_WOOL = create(key("magenta_wool"));
/**
* {@code minecraft:magenta_wool_slab}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> MAGENTA_WOOL_SLAB = create(key("magenta_wool_slab"));
/**
* {@code minecraft:magenta_wool_stairs}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> MAGENTA_WOOL_STAIRS = create(key("magenta_wool_stairs"));
/**
* {@code minecraft:magma_block}
*
@@ -4715,6 +4995,20 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> ORANGE_CONCRETE_POWDER = create(key("orange_concrete_powder"));
/**
* {@code minecraft:orange_concrete_slab}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> ORANGE_CONCRETE_SLAB = create(key("orange_concrete_slab"));
/**
* {@code minecraft:orange_concrete_stairs}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> ORANGE_CONCRETE_STAIRS = create(key("orange_concrete_stairs"));
/**
* {@code minecraft:orange_glazed_terracotta}
*
@@ -4722,6 +5016,13 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> ORANGE_GLAZED_TERRACOTTA = create(key("orange_glazed_terracotta"));
/**
* {@code minecraft:orange_poplar_leaves}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> ORANGE_POPLAR_LEAVES = create(key("orange_poplar_leaves"));
/**
* {@code minecraft:orange_shulker_box}
*
@@ -4771,6 +5072,20 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> ORANGE_WOOL = create(key("orange_wool"));
/**
* {@code minecraft:orange_wool_slab}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> ORANGE_WOOL_SLAB = create(key("orange_wool_slab"));
/**
* {@code minecraft:orange_wool_stairs}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> ORANGE_WOOL_STAIRS = create(key("orange_wool_stairs"));
/**
* {@code minecraft:oxeye_daisy}
*
@@ -5128,6 +5443,20 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> PINK_CONCRETE_POWDER = create(key("pink_concrete_powder"));
/**
* {@code minecraft:pink_concrete_slab}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> PINK_CONCRETE_SLAB = create(key("pink_concrete_slab"));
/**
* {@code minecraft:pink_concrete_stairs}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> PINK_CONCRETE_STAIRS = create(key("pink_concrete_stairs"));
/**
* {@code minecraft:pink_glazed_terracotta}
*
@@ -5191,6 +5520,20 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> PINK_WOOL = create(key("pink_wool"));
/**
* {@code minecraft:pink_wool_slab}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> PINK_WOOL_SLAB = create(key("pink_wool_slab"));
/**
* {@code minecraft:pink_wool_stairs}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> PINK_WOOL_STAIRS = create(key("pink_wool_stairs"));
/**
* {@code minecraft:piston}
*
@@ -5499,6 +5842,125 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> POLISHED_TUFF_WALL = create(key("polished_tuff_wall"));
/**
* {@code minecraft:poplar_button}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> POPLAR_BUTTON = create(key("poplar_button"));
/**
* {@code minecraft:poplar_door}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> POPLAR_DOOR = create(key("poplar_door"));
/**
* {@code minecraft:poplar_fence}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> POPLAR_FENCE = create(key("poplar_fence"));
/**
* {@code minecraft:poplar_fence_gate}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> POPLAR_FENCE_GATE = create(key("poplar_fence_gate"));
/**
* {@code minecraft:poplar_hanging_sign}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> POPLAR_HANGING_SIGN = create(key("poplar_hanging_sign"));
/**
* {@code minecraft:poplar_log}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> POPLAR_LOG = create(key("poplar_log"));
/**
* {@code minecraft:poplar_planks}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> POPLAR_PLANKS = create(key("poplar_planks"));
/**
* {@code minecraft:poplar_pressure_plate}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> POPLAR_PRESSURE_PLATE = create(key("poplar_pressure_plate"));
/**
* {@code minecraft:poplar_sapling}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> POPLAR_SAPLING = create(key("poplar_sapling"));
/**
* {@code minecraft:poplar_shelf}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> POPLAR_SHELF = create(key("poplar_shelf"));
/**
* {@code minecraft:poplar_sign}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> POPLAR_SIGN = create(key("poplar_sign"));
/**
* {@code minecraft:poplar_slab}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> POPLAR_SLAB = create(key("poplar_slab"));
/**
* {@code minecraft:poplar_stairs}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> POPLAR_STAIRS = create(key("poplar_stairs"));
/**
* {@code minecraft:poplar_trapdoor}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> POPLAR_TRAPDOOR = create(key("poplar_trapdoor"));
/**
* {@code minecraft:poplar_wall_hanging_sign}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> POPLAR_WALL_HANGING_SIGN = create(key("poplar_wall_hanging_sign"));
/**
* {@code minecraft:poplar_wall_sign}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> POPLAR_WALL_SIGN = create(key("poplar_wall_sign"));
/**
* {@code minecraft:poplar_wood}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> POPLAR_WOOD = create(key("poplar_wood"));
/**
* {@code minecraft:poppy}
*
@@ -5723,6 +6185,13 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> POTTED_PINK_TULIP = create(key("potted_pink_tulip"));
/**
* {@code minecraft:potted_poplar_sapling}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> POTTED_POPLAR_SAPLING = create(key("potted_poplar_sapling"));
/**
* {@code minecraft:potted_poppy}
*
@@ -5919,6 +6388,20 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> PURPLE_CONCRETE_POWDER = create(key("purple_concrete_powder"));
/**
* {@code minecraft:purple_concrete_slab}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> PURPLE_CONCRETE_SLAB = create(key("purple_concrete_slab"));
/**
* {@code minecraft:purple_concrete_stairs}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> PURPLE_CONCRETE_STAIRS = create(key("purple_concrete_stairs"));
/**
* {@code minecraft:purple_glazed_terracotta}
*
@@ -5968,6 +6451,20 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> PURPLE_WOOL = create(key("purple_wool"));
/**
* {@code minecraft:purple_wool_slab}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> PURPLE_WOOL_SLAB = create(key("purple_wool_slab"));
/**
* {@code minecraft:purple_wool_stairs}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> PURPLE_WOOL_STAIRS = create(key("purple_wool_stairs"));
/**
* {@code minecraft:purpur_block}
*
@@ -6108,6 +6605,20 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> RED_CONCRETE_POWDER = create(key("red_concrete_powder"));
/**
* {@code minecraft:red_concrete_slab}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> RED_CONCRETE_SLAB = create(key("red_concrete_slab"));
/**
* {@code minecraft:red_concrete_stairs}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> RED_CONCRETE_STAIRS = create(key("red_concrete_stairs"));
/**
* {@code minecraft:red_glazed_terracotta}
*
@@ -6157,6 +6668,13 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> RED_NETHER_BRICKS = create(key("red_nether_bricks"));
/**
* {@code minecraft:red_poplar_leaves}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> RED_POPLAR_LEAVES = create(key("red_poplar_leaves"));
/**
* {@code minecraft:red_sand}
*
@@ -6192,6 +6710,13 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> RED_SANDSTONE_WALL = create(key("red_sandstone_wall"));
/**
* {@code minecraft:red_shrub}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> RED_SHRUB = create(key("red_shrub"));
/**
* {@code minecraft:red_shulker_box}
*
@@ -6241,6 +6766,20 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> RED_WOOL = create(key("red_wool"));
/**
* {@code minecraft:red_wool_slab}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> RED_WOOL_SLAB = create(key("red_wool_slab"));
/**
* {@code minecraft:red_wool_stairs}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> RED_WOOL_STAIRS = create(key("red_wool_stairs"));
/**
* {@code minecraft:redstone_block}
*
@@ -6465,6 +7004,13 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> SEAGRASS = create(key("seagrass"));
/**
* {@code minecraft:shelf_mushroom}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> SHELF_MUSHROOM = create(key("shelf_mushroom"));
/**
* {@code minecraft:short_dry_grass}
*
@@ -6920,6 +7466,13 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> STONECUTTER = create(key("stonecutter"));
/**
* {@code minecraft:straw_bed}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> STRAW_BED = create(key("straw_bed"));
/**
* {@code minecraft:stripped_acacia_log}
*
@@ -7053,6 +7606,20 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> STRIPPED_PALE_OAK_WOOD = create(key("stripped_pale_oak_wood"));
/**
* {@code minecraft:stripped_poplar_log}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> STRIPPED_POPLAR_LOG = create(key("stripped_poplar_log"));
/**
* {@code minecraft:stripped_poplar_wood}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> STRIPPED_POPLAR_WOOD = create(key("stripped_poplar_wood"));
/**
* {@code minecraft:stripped_spruce_log}
*
@@ -8201,6 +8768,20 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> WHITE_CONCRETE_POWDER = create(key("white_concrete_powder"));
/**
* {@code minecraft:white_concrete_slab}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> WHITE_CONCRETE_SLAB = create(key("white_concrete_slab"));
/**
* {@code minecraft:white_concrete_stairs}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> WHITE_CONCRETE_STAIRS = create(key("white_concrete_stairs"));
/**
* {@code minecraft:white_glazed_terracotta}
*
@@ -8257,6 +8838,20 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> WHITE_WOOL = create(key("white_wool"));
/**
* {@code minecraft:white_wool_slab}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> WHITE_WOOL_SLAB = create(key("white_wool_slab"));
/**
* {@code minecraft:white_wool_stairs}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> WHITE_WOOL_STAIRS = create(key("white_wool_stairs"));
/**
* {@code minecraft:wildflowers}
*
@@ -8334,6 +8929,20 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> YELLOW_CONCRETE_POWDER = create(key("yellow_concrete_powder"));
/**
* {@code minecraft:yellow_concrete_slab}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> YELLOW_CONCRETE_SLAB = create(key("yellow_concrete_slab"));
/**
* {@code minecraft:yellow_concrete_stairs}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> YELLOW_CONCRETE_STAIRS = create(key("yellow_concrete_stairs"));
/**
* {@code minecraft:yellow_glazed_terracotta}
*
@@ -8341,6 +8950,13 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> YELLOW_GLAZED_TERRACOTTA = create(key("yellow_glazed_terracotta"));
/**
* {@code minecraft:yellow_poplar_leaves}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> YELLOW_POPLAR_LEAVES = create(key("yellow_poplar_leaves"));
/**
* {@code minecraft:yellow_shulker_box}
*
@@ -8383,6 +8999,20 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> YELLOW_WOOL = create(key("yellow_wool"));
/**
* {@code minecraft:yellow_wool_slab}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> YELLOW_WOOL_SLAB = create(key("yellow_wool_slab"));
/**
* {@code minecraft:yellow_wool_stairs}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> YELLOW_WOOL_STAIRS = create(key("yellow_wool_stairs"));
/**
* {@code minecraft:zombie_head}
*
@@ -32,6 +32,13 @@ public final class DataComponentTypeKeys {
*/
public static final TypedKey<DataComponentType> ADDITIONAL_TRADE_COST = create(key("additional_trade_cost"));
/**
* {@code minecraft:attack_animation}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> ATTACK_ANIMATION = create(key("attack_animation"));
/**
* {@code minecraft:attack_range}
*
@@ -88,6 +95,13 @@ public final class DataComponentTypeKeys {
*/
public static final TypedKey<DataComponentType> BLOCK_STATE = create(key("block_state"));
/**
* {@code minecraft:block_transformer}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> BLOCK_TRANSFORMER = create(key("block_transformer"));
/**
* {@code minecraft:blocks_attacks}
*
@@ -102,6 +116,13 @@ public final class DataComponentTypeKeys {
*/
public static final TypedKey<DataComponentType> BREAK_SOUND = create(key("break_sound"));
/**
* {@code minecraft:brewing_fuel}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> BREWING_FUEL = create(key("brewing_fuel"));
/**
* {@code minecraft:bucket_entity_data}
*
@@ -172,6 +193,13 @@ public final class DataComponentTypeKeys {
*/
public static final TypedKey<DataComponentType> CHICKEN_VARIANT = create(key("chicken/variant"));
/**
* {@code minecraft:compostable}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> COMPOSTABLE = create(key("compostable"));
/**
* {@code minecraft:consumable}
*
@@ -193,6 +221,13 @@ public final class DataComponentTypeKeys {
*/
public static final TypedKey<DataComponentType> CONTAINER_LOOT = create(key("container_loot"));
/**
* {@code minecraft:cooking_fuel}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> COOKING_FUEL = create(key("cooking_fuel"));
/**
* {@code minecraft:cow/sound_variant}
*
@@ -214,6 +249,13 @@ public final class DataComponentTypeKeys {
*/
public static final TypedKey<DataComponentType> CREATIVE_SLOT_LOCK = create(key("creative_slot_lock"));
/**
* {@code minecraft:cushion/color}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> CUSHION_COLOR = create(key("cushion/color"));
/**
* {@code minecraft:custom_data}
*
@@ -382,6 +424,13 @@ public final class DataComponentTypeKeys {
*/
public static final TypedKey<DataComponentType> INTANGIBLE_PROJECTILE = create(key("intangible_projectile"));
/**
* {@code minecraft:interact_animation}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> INTERACT_ANIMATION = create(key("interact_animation"));
/**
* {@code minecraft:item_model}
*
@@ -438,13 +487,6 @@ public final class DataComponentTypeKeys {
*/
public static final TypedKey<DataComponentType> LORE = create(key("lore"));
/**
* {@code minecraft:map_color}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> MAP_COLOR = create(key("map_color"));
/**
* {@code minecraft:map_decorations}
*
@@ -487,6 +529,13 @@ public final class DataComponentTypeKeys {
*/
public static final TypedKey<DataComponentType> MINIMUM_ATTACK_CHARGE = create(key("minimum_attack_charge"));
/**
* {@code minecraft:mob_visibility}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> MOB_VISIBILITY = create(key("mob_visibility"));
/**
* {@code minecraft:mooshroom/variant}
*
@@ -578,6 +627,13 @@ public final class DataComponentTypeKeys {
*/
public static final TypedKey<DataComponentType> PROVIDES_BANNER_PATTERNS = create(key("provides_banner_patterns"));
/**
* {@code minecraft:provides_pottery_pattern}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> PROVIDES_POTTERY_PATTERN = create(key("provides_pottery_pattern"));
/**
* {@code minecraft:provides_trim_material}
*
@@ -641,6 +697,20 @@ public final class DataComponentTypeKeys {
*/
public static final TypedKey<DataComponentType> SHULKER_COLOR = create(key("shulker/color"));
/**
* {@code minecraft:sign_text_back}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> SIGN_TEXT_BACK = create(key("sign_text_back"));
/**
* {@code minecraft:sign_text_front}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> SIGN_TEXT_FRONT = create(key("sign_text_front"));
/**
* {@code minecraft:stored_enchantments}
*
@@ -662,13 +732,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}
*
@@ -753,6 +816,20 @@ public final class DataComponentTypeKeys {
*/
public static final TypedKey<DataComponentType> VILLAGER_VARIANT = create(key("villager/variant"));
/**
* {@code minecraft:villager_food}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> VILLAGER_FOOD = create(key("villager_food"));
/**
* {@code minecraft:waxed}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> WAXED = create(key("waxed"));
/**
* {@code minecraft:weapon}
*
@@ -0,0 +1,201 @@
package io.papermc.paper.registry.keys;
import static net.kyori.adventure.key.Key.key;
import io.papermc.paper.annotation.GeneratedClass;
import io.papermc.paper.block.pot.PotPatternType;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key;
import org.jspecify.annotations.NullMarked;
/**
* Vanilla keys for {@link RegistryKey#DECORATED_POT_PATTERN}.
*
* @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 DecoratedPotPatternKeys {
/**
* {@code minecraft:angler}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotPatternType> ANGLER = create(key("angler"));
/**
* {@code minecraft:archer}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotPatternType> ARCHER = create(key("archer"));
/**
* {@code minecraft:arms_up}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotPatternType> ARMS_UP = create(key("arms_up"));
/**
* {@code minecraft:blade}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotPatternType> BLADE = create(key("blade"));
/**
* {@code minecraft:brewer}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotPatternType> BREWER = create(key("brewer"));
/**
* {@code minecraft:burn}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotPatternType> BURN = create(key("burn"));
/**
* {@code minecraft:danger}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotPatternType> DANGER = create(key("danger"));
/**
* {@code minecraft:explorer}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotPatternType> EXPLORER = create(key("explorer"));
/**
* {@code minecraft:flow}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotPatternType> FLOW = create(key("flow"));
/**
* {@code minecraft:friend}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotPatternType> FRIEND = create(key("friend"));
/**
* {@code minecraft:guster}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotPatternType> GUSTER = create(key("guster"));
/**
* {@code minecraft:heart}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotPatternType> HEART = create(key("heart"));
/**
* {@code minecraft:heartbreak}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotPatternType> HEARTBREAK = create(key("heartbreak"));
/**
* {@code minecraft:howl}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotPatternType> HOWL = create(key("howl"));
/**
* {@code minecraft:miner}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotPatternType> MINER = create(key("miner"));
/**
* {@code minecraft:mourner}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotPatternType> MOURNER = create(key("mourner"));
/**
* {@code minecraft:plenty}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotPatternType> PLENTY = create(key("plenty"));
/**
* {@code minecraft:prize}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotPatternType> PRIZE = create(key("prize"));
/**
* {@code minecraft:scrape}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotPatternType> SCRAPE = create(key("scrape"));
/**
* {@code minecraft:sheaf}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotPatternType> SHEAF = create(key("sheaf"));
/**
* {@code minecraft:shelter}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotPatternType> SHELTER = create(key("shelter"));
/**
* {@code minecraft:skull}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotPatternType> SKULL = create(key("skull"));
/**
* {@code minecraft:snort}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotPatternType> SNORT = create(key("snort"));
private DecoratedPotPatternKeys() {
}
/**
* Creates a typed key for {@link PotPatternType} in the registry {@code minecraft:decorated_pot_pattern}.
*
* @param key the value's key in the registry
* @return a new typed key
*/
public static TypedKey<PotPatternType> create(final Key key) {
return TypedKey.create(RegistryKey.DECORATED_POT_PATTERN, key);
}
}
File diff suppressed because it is too large. Load diff
@@ -25,6 +25,20 @@ import org.jspecify.annotations.NullMarked;
@NullMarked
@GeneratedClass
public final class MapDecorationTypeKeys {
/**
* {@code minecraft:abandoned_camp}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MapCursor.Type> ABANDONED_CAMP = create(key("abandoned_camp"));
/**
* {@code minecraft:ancient_city}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MapCursor.Type> ANCIENT_CITY = create(key("ancient_city"));
/**
* {@code minecraft:banner_black}
*
@@ -144,6 +158,13 @@ public final class MapDecorationTypeKeys {
*/
public static final TypedKey<MapCursor.Type> BLUE_MARKER = create(key("blue_marker"));
/**
* {@code minecraft:desert_pyramid}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MapCursor.Type> DESERT_PYRAMID = create(key("desert_pyramid"));
/**
* {@code minecraft:frame}
*
@@ -165,6 +186,13 @@ public final class MapDecorationTypeKeys {
*/
public static final TypedKey<MapCursor.Type> MANSION = create(key("mansion"));
/**
* {@code minecraft:mineshaft}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MapCursor.Type> MINESHAFT = create(key("mineshaft"));
/**
* {@code minecraft:monument}
*
@@ -172,6 +200,13 @@ public final class MapDecorationTypeKeys {
*/
public static final TypedKey<MapCursor.Type> MONUMENT = create(key("monument"));
/**
* {@code minecraft:ocean_ruin_warm}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MapCursor.Type> OCEAN_RUIN_WARM = create(key("ocean_ruin_warm"));
/**
* {@code minecraft:player}
*
@@ -4043,6 +4043,48 @@ public final class SoundEventKeys {
*/
public static final TypedKey<Sound> BLOCK_POLISHED_TUFF_STEP = create(key("block.polished_tuff.step"));
/**
* {@code minecraft:block.poplar_leaves.ambient}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> BLOCK_POPLAR_LEAVES_AMBIENT = create(key("block.poplar_leaves.ambient"));
/**
* {@code minecraft:block.poplar_leaves.break}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> BLOCK_POPLAR_LEAVES_BREAK = create(key("block.poplar_leaves.break"));
/**
* {@code minecraft:block.poplar_leaves.fall}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> BLOCK_POPLAR_LEAVES_FALL = create(key("block.poplar_leaves.fall"));
/**
* {@code minecraft:block.poplar_leaves.hit}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> BLOCK_POPLAR_LEAVES_HIT = create(key("block.poplar_leaves.hit"));
/**
* {@code minecraft:block.poplar_leaves.place}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> BLOCK_POPLAR_LEAVES_PLACE = create(key("block.poplar_leaves.place"));
/**
* {@code minecraft:block.poplar_leaves.step}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> BLOCK_POPLAR_LEAVES_STEP = create(key("block.poplar_leaves.step"));
/**
* {@code minecraft:block.portal.ambient}
*
@@ -4176,6 +4218,20 @@ public final class SoundEventKeys {
*/
public static final TypedKey<Sound> BLOCK_PUMPKIN_CARVE = create(key("block.pumpkin.carve"));
/**
* {@code minecraft:block.red_shrub.break}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> BLOCK_RED_SHRUB_BREAK = create(key("block.red_shrub.break"));
/**
* {@code minecraft:block.red_shrub.place}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> BLOCK_RED_SHRUB_PLACE = create(key("block.red_shrub.place"));
/**
* {@code minecraft:block.redstone_torch.burnout}
*
@@ -4715,6 +4771,41 @@ public final class SoundEventKeys {
*/
public static final TypedKey<Sound> BLOCK_SHELF_TAKE_ITEM = create(key("block.shelf.take_item"));
/**
* {@code minecraft:block.shelf_mushroom.bounce}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> BLOCK_SHELF_MUSHROOM_BOUNCE = create(key("block.shelf_mushroom.bounce"));
/**
* {@code minecraft:block.shelf_mushroom.break}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> BLOCK_SHELF_MUSHROOM_BREAK = create(key("block.shelf_mushroom.break"));
/**
* {@code minecraft:block.shelf_mushroom.fall}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> BLOCK_SHELF_MUSHROOM_FALL = create(key("block.shelf_mushroom.fall"));
/**
* {@code minecraft:block.shelf_mushroom.place}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> BLOCK_SHELF_MUSHROOM_PLACE = create(key("block.shelf_mushroom.place"));
/**
* {@code minecraft:block.shelf_mushroom.step}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> BLOCK_SHELF_MUSHROOM_STEP = create(key("block.shelf_mushroom.step"));
/**
* {@code minecraft:block.shroomlight.break}
*
@@ -5205,6 +5296,48 @@ public final class SoundEventKeys {
*/
public static final TypedKey<Sound> BLOCK_STONE_PRESSURE_PLATE_CLICK_ON = create(key("block.stone_pressure_plate.click_on"));
/**
* {@code minecraft:block.straw_bed.break}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> BLOCK_STRAW_BED_BREAK = create(key("block.straw_bed.break"));
/**
* {@code minecraft:block.straw_bed.break_leave}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> BLOCK_STRAW_BED_BREAK_LEAVE = create(key("block.straw_bed.break_leave"));
/**
* {@code minecraft:block.straw_bed.fall}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> BLOCK_STRAW_BED_FALL = create(key("block.straw_bed.fall"));
/**
* {@code minecraft:block.straw_bed.hit}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> BLOCK_STRAW_BED_HIT = create(key("block.straw_bed.hit"));
/**
* {@code minecraft:block.straw_bed.place}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> BLOCK_STRAW_BED_PLACE = create(key("block.straw_bed.place"));
/**
* {@code minecraft:block.straw_bed.step}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> BLOCK_STRAW_BED_STEP = create(key("block.straw_bed.step"));
/**
* {@code minecraft:block.sulfur.break}
*
@@ -7438,6 +7571,34 @@ public final class SoundEventKeys {
*/
public static final TypedKey<Sound> ENTITY_CREEPER_PRIMED = create(key("entity.creeper.primed"));
/**
* {@code minecraft:entity.cushion.break}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_CUSHION_BREAK = create(key("entity.cushion.break"));
/**
* {@code minecraft:entity.cushion.get_up}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_CUSHION_GET_UP = create(key("entity.cushion.get_up"));
/**
* {@code minecraft:entity.cushion.place}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_CUSHION_PLACE = create(key("entity.cushion.place"));
/**
* {@code minecraft:entity.cushion.sit}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_CUSHION_SIT = create(key("entity.cushion.sit"));
/**
* {@code minecraft:entity.dolphin.ambient}
*
@@ -25,6 +25,132 @@ import org.jspecify.annotations.NullMarked;
@NullMarked
@GeneratedClass
public final class StructureKeys {
/**
* {@code minecraft:abandoned_camp_bamboo_jungle}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Structure> ABANDONED_CAMP_BAMBOO_JUNGLE = create(key("abandoned_camp_bamboo_jungle"));
/**
* {@code minecraft:abandoned_camp_birch_forest}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Structure> ABANDONED_CAMP_BIRCH_FOREST = create(key("abandoned_camp_birch_forest"));
/**
* {@code minecraft:abandoned_camp_cherry_grove}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Structure> ABANDONED_CAMP_CHERRY_GROVE = create(key("abandoned_camp_cherry_grove"));
/**
* {@code minecraft:abandoned_camp_dappled_forest}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Structure> ABANDONED_CAMP_DAPPLED_FOREST = create(key("abandoned_camp_dappled_forest"));
/**
* {@code minecraft:abandoned_camp_flower_forest}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Structure> ABANDONED_CAMP_FLOWER_FOREST = create(key("abandoned_camp_flower_forest"));
/**
* {@code minecraft:abandoned_camp_forest}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Structure> ABANDONED_CAMP_FOREST = create(key("abandoned_camp_forest"));
/**
* {@code minecraft:abandoned_camp_meadow}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Structure> ABANDONED_CAMP_MEADOW = create(key("abandoned_camp_meadow"));
/**
* {@code minecraft:abandoned_camp_old_growth_birch_forest}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Structure> ABANDONED_CAMP_OLD_GROWTH_BIRCH_FOREST = create(key("abandoned_camp_old_growth_birch_forest"));
/**
* {@code minecraft:abandoned_camp_old_growth_pine_taiga}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Structure> ABANDONED_CAMP_OLD_GROWTH_PINE_TAIGA = create(key("abandoned_camp_old_growth_pine_taiga"));
/**
* {@code minecraft:abandoned_camp_old_growth_spruce_taiga}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Structure> ABANDONED_CAMP_OLD_GROWTH_SPRUCE_TAIGA = create(key("abandoned_camp_old_growth_spruce_taiga"));
/**
* {@code minecraft:abandoned_camp_pale_garden}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Structure> ABANDONED_CAMP_PALE_GARDEN = create(key("abandoned_camp_pale_garden"));
/**
* {@code minecraft:abandoned_camp_savanna}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Structure> ABANDONED_CAMP_SAVANNA = create(key("abandoned_camp_savanna"));
/**
* {@code minecraft:abandoned_camp_snowy_taiga}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Structure> ABANDONED_CAMP_SNOWY_TAIGA = create(key("abandoned_camp_snowy_taiga"));
/**
* {@code minecraft:abandoned_camp_sparse_jungle}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Structure> ABANDONED_CAMP_SPARSE_JUNGLE = create(key("abandoned_camp_sparse_jungle"));
/**
* {@code minecraft:abandoned_camp_swamp}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Structure> ABANDONED_CAMP_SWAMP = create(key("abandoned_camp_swamp"));
/**
* {@code minecraft:abandoned_camp_taiga}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Structure> ABANDONED_CAMP_TAIGA = create(key("abandoned_camp_taiga"));
/**
* {@code minecraft:abandoned_camp_windswept_forest}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Structure> ABANDONED_CAMP_WINDSWEPT_FOREST = create(key("abandoned_camp_windswept_forest"));
/**
* {@code minecraft:abandoned_camp_wooded_badlands}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Structure> ABANDONED_CAMP_WOODED_BADLANDS = create(key("abandoned_camp_wooded_badlands"));
/**
* {@code minecraft:ancient_city}
*
@@ -39,6 +39,132 @@ 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_structure/abandoned_camp_bamboo_jungle}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Biome> HAS_STRUCTURE_ABANDONED_CAMP_BAMBOO_JUNGLE = create(key("has_structure/abandoned_camp_bamboo_jungle"));
/**
* {@code #minecraft:has_structure/abandoned_camp_birch_forest}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Biome> HAS_STRUCTURE_ABANDONED_CAMP_BIRCH_FOREST = create(key("has_structure/abandoned_camp_birch_forest"));
/**
* {@code #minecraft:has_structure/abandoned_camp_cherry_grove}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Biome> HAS_STRUCTURE_ABANDONED_CAMP_CHERRY_GROVE = create(key("has_structure/abandoned_camp_cherry_grove"));
/**
* {@code #minecraft:has_structure/abandoned_camp_dappled_forest}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Biome> HAS_STRUCTURE_ABANDONED_CAMP_DAPPLED_FOREST = create(key("has_structure/abandoned_camp_dappled_forest"));
/**
* {@code #minecraft:has_structure/abandoned_camp_flower_forest}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Biome> HAS_STRUCTURE_ABANDONED_CAMP_FLOWER_FOREST = create(key("has_structure/abandoned_camp_flower_forest"));
/**
* {@code #minecraft:has_structure/abandoned_camp_forest}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Biome> HAS_STRUCTURE_ABANDONED_CAMP_FOREST = create(key("has_structure/abandoned_camp_forest"));
/**
* {@code #minecraft:has_structure/abandoned_camp_meadow}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Biome> HAS_STRUCTURE_ABANDONED_CAMP_MEADOW = create(key("has_structure/abandoned_camp_meadow"));
/**
* {@code #minecraft:has_structure/abandoned_camp_old_growth_birch_forest}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Biome> HAS_STRUCTURE_ABANDONED_CAMP_OLD_GROWTH_BIRCH_FOREST = create(key("has_structure/abandoned_camp_old_growth_birch_forest"));
/**
* {@code #minecraft:has_structure/abandoned_camp_old_growth_pine_taiga}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Biome> HAS_STRUCTURE_ABANDONED_CAMP_OLD_GROWTH_PINE_TAIGA = create(key("has_structure/abandoned_camp_old_growth_pine_taiga"));
/**
* {@code #minecraft:has_structure/abandoned_camp_old_growth_spruce_taiga}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Biome> HAS_STRUCTURE_ABANDONED_CAMP_OLD_GROWTH_SPRUCE_TAIGA = create(key("has_structure/abandoned_camp_old_growth_spruce_taiga"));
/**
* {@code #minecraft:has_structure/abandoned_camp_pale_garden}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Biome> HAS_STRUCTURE_ABANDONED_CAMP_PALE_GARDEN = create(key("has_structure/abandoned_camp_pale_garden"));
/**
* {@code #minecraft:has_structure/abandoned_camp_savanna}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Biome> HAS_STRUCTURE_ABANDONED_CAMP_SAVANNA = create(key("has_structure/abandoned_camp_savanna"));
/**
* {@code #minecraft:has_structure/abandoned_camp_snowy_taiga}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Biome> HAS_STRUCTURE_ABANDONED_CAMP_SNOWY_TAIGA = create(key("has_structure/abandoned_camp_snowy_taiga"));
/**
* {@code #minecraft:has_structure/abandoned_camp_sparse_jungle}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Biome> HAS_STRUCTURE_ABANDONED_CAMP_SPARSE_JUNGLE = create(key("has_structure/abandoned_camp_sparse_jungle"));
/**
* {@code #minecraft:has_structure/abandoned_camp_swamp}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Biome> HAS_STRUCTURE_ABANDONED_CAMP_SWAMP = create(key("has_structure/abandoned_camp_swamp"));
/**
* {@code #minecraft:has_structure/abandoned_camp_taiga}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Biome> HAS_STRUCTURE_ABANDONED_CAMP_TAIGA = create(key("has_structure/abandoned_camp_taiga"));
/**
* {@code #minecraft:has_structure/abandoned_camp_windswept_forest}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Biome> HAS_STRUCTURE_ABANDONED_CAMP_WINDSWEPT_FOREST = create(key("has_structure/abandoned_camp_windswept_forest"));
/**
* {@code #minecraft:has_structure/abandoned_camp_wooded_badlands}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Biome> HAS_STRUCTURE_ABANDONED_CAMP_WOODED_BADLANDS = create(key("has_structure/abandoned_camp_wooded_badlands"));
/**
* {@code #minecraft:has_structure/ancient_city}
*
@@ -207,6 +207,55 @@ public final class BlockTypeTagKeys {
*/
public static final TagKey<BlockType> BIRCH_LOGS = create(key("birch_logs"));
/**
* {@code #minecraft:blocks_dolphin_jump}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> BLOCKS_DOLPHIN_JUMP = create(key("blocks_dolphin_jump"));
/**
* {@code #minecraft:blocks_fluid_flow}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> BLOCKS_FLUID_FLOW = create(key("blocks_fluid_flow"));
/**
* {@code #minecraft:blocks_lava_fire_spread}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> BLOCKS_LAVA_FIRE_SPREAD = create(key("blocks_lava_fire_spread"));
/**
* {@code #minecraft:blocks_motion}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> BLOCKS_MOTION = create(key("blocks_motion"));
/**
* {@code #minecraft:blocks_motion_in_heightmap}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> BLOCKS_MOTION_IN_HEIGHTMAP = create(key("blocks_motion_in_heightmap"));
/**
* {@code #minecraft:blocks_motion_in_heightmap_no_leaves}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> BLOCKS_MOTION_IN_HEIGHTMAP_NO_LEAVES = create(key("blocks_motion_in_heightmap_no_leaves"));
/**
* {@code #minecraft:blocks_motion_no_leaves}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> BLOCKS_MOTION_NO_LEAVES = create(key("blocks_motion_no_leaves"));
/**
* {@code #minecraft:blocks_wind_charge_explosions}
*
@@ -263,6 +312,13 @@ public final class BlockTypeTagKeys {
*/
public static final TagKey<BlockType> CANDLES = create(key("candles"));
/**
* {@code #minecraft:cannot_place_basalt_pillar_on}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> CANNOT_PLACE_BASALT_PILLAR_ON = create(key("cannot_place_basalt_pillar_on"));
/**
* {@code #minecraft:cannot_replace_below_tree_trunk}
*
@@ -291,6 +347,27 @@ public final class BlockTypeTagKeys {
*/
public static final TagKey<BlockType> CANNOT_SUPPORT_SNOW_LAYER = create(key("cannot_support_snow_layer"));
/**
* {@code #minecraft:cat_does_not_teleport_to}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> CAT_DOES_NOT_TELEPORT_TO = create(key("cat_does_not_teleport_to"));
/**
* {@code #minecraft:cats_can_lie_on}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> CATS_CAN_LIE_ON = create(key("cats_can_lie_on"));
/**
* {@code #minecraft:cats_can_sit_on}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> CATS_CAN_SIT_ON = create(key("cats_can_sit_on"));
/**
* {@code #minecraft:cauldrons}
*
@@ -312,6 +389,13 @@ public final class BlockTypeTagKeys {
*/
public static final TagKey<BlockType> CAUSES_PERIODIC_GEYSER_ERUPTIONS = create(key("causes_periodic_geyser_eruptions"));
/**
* {@code #minecraft:causes_suffocation}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> CAUSES_SUFFOCATION = create(key("causes_suffocation"));
/**
* {@code #minecraft:cave_vines}
*
@@ -383,11 +467,32 @@ public final class BlockTypeTagKeys {
public static final TagKey<BlockType> CONCRETE_POWDERS = create(key("concrete_powders"));
/**
* {@code #minecraft:convertable_to_mud}
* {@code #minecraft:concrete_slabs}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> CONVERTABLE_TO_MUD = create(key("convertable_to_mud"));
public static final TagKey<BlockType> CONCRETE_SLABS = create(key("concrete_slabs"));
/**
* {@code #minecraft:concrete_stairs}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> CONCRETE_STAIRS = create(key("concrete_stairs"));
/**
* {@code #minecraft:conduit_effect_block}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> CONDUIT_EFFECT_BLOCK = create(key("conduit_effect_block"));
/**
* {@code #minecraft:convertible_to_mud}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> CONVERTIBLE_TO_MUD = create(key("convertible_to_mud"));
/**
* {@code #minecraft:copper}
@@ -459,6 +564,13 @@ public final class BlockTypeTagKeys {
*/
public static final TagKey<BlockType> CRYSTAL_SOUND_BLOCKS = create(key("crystal_sound_blocks"));
/**
* {@code #minecraft:cushion_uses_collision_shape}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> CUSHION_USES_COLLISION_SHAPE = create(key("cushion_uses_collision_shape"));
/**
* {@code #minecraft:dampens_vibrations}
*
@@ -466,6 +578,13 @@ public final class BlockTypeTagKeys {
*/
public static final TagKey<BlockType> DAMPENS_VIBRATIONS = create(key("dampens_vibrations"));
/**
* {@code #minecraft:dangerous_for_teleportation}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> DANGEROUS_FOR_TELEPORTATION = create(key("dangerous_for_teleportation"));
/**
* {@code #minecraft:dark_oak_logs}
*
@@ -578,6 +697,13 @@ public final class BlockTypeTagKeys {
*/
public static final TagKey<BlockType> ENCHANTMENT_POWER_TRANSMITTER = create(key("enchantment_power_transmitter"));
/**
* {@code #minecraft:enderman_does_not_teleport_to}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> ENDERMAN_DOES_NOT_TELEPORT_TO = create(key("enderman_does_not_teleport_to"));
/**
* {@code #minecraft:enderman_holdable}
*
@@ -585,6 +711,13 @@ public final class BlockTypeTagKeys {
*/
public static final TagKey<BlockType> ENDERMAN_HOLDABLE = create(key("enderman_holdable"));
/**
* {@code #minecraft:entities_can_teleport_to}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> ENTITIES_CAN_TELEPORT_TO = create(key("entities_can_teleport_to"));
/**
* {@code #minecraft:fall_damage_resetting}
*
@@ -725,6 +858,13 @@ public final class BlockTypeTagKeys {
*/
public static final TagKey<BlockType> HAPPY_GHAST_AVOIDS = create(key("happy_ghast_avoids"));
/**
* {@code #minecraft:height_specific_ore_replaceables}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> HEIGHT_SPECIFIC_ORE_REPLACEABLES = create(key("height_specific_ore_replaceables"));
/**
* {@code #minecraft:hoglin_repellents}
*
@@ -753,6 +893,13 @@ public final class BlockTypeTagKeys {
*/
public static final TagKey<BlockType> ICE = create(key("ice"));
/**
* {@code #minecraft:ice_melts_when_destroyed_above}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> ICE_MELTS_WHEN_DESTROYED_ABOVE = create(key("ice_melts_when_destroyed_above"));
/**
* {@code #minecraft:ice_spike_replaceable}
*
@@ -1034,11 +1181,11 @@ public final class BlockTypeTagKeys {
public static final TagKey<BlockType> NEEDS_STONE_TOOL = create(key("needs_stone_tool"));
/**
* {@code #minecraft:nether_carver_replaceables}
* {@code #minecraft:nether_portal_frame}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> NETHER_CARVER_REPLACEABLES = create(key("nether_carver_replaceables"));
public static final TagKey<BlockType> NETHER_PORTAL_FRAME = create(key("nether_portal_frame"));
/**
* {@code #minecraft:nylium}
@@ -1061,6 +1208,13 @@ public final class BlockTypeTagKeys {
*/
public static final TagKey<BlockType> OCCLUDES_VIBRATION_SIGNALS = create(key("occludes_vibration_signals"));
/**
* {@code #minecraft:ores}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> ORES = create(key("ores"));
/**
* {@code #minecraft:overrides_mushroom_light_requirement}
*
@@ -1068,13 +1222,6 @@ public final class BlockTypeTagKeys {
*/
public static final TagKey<BlockType> OVERRIDES_MUSHROOM_LIGHT_REQUIREMENT = create(key("overrides_mushroom_light_requirement"));
/**
* {@code #minecraft:overworld_carver_replaceables}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> OVERWORLD_CARVER_REPLACEABLES = create(key("overworld_carver_replaceables"));
/**
* {@code #minecraft:overworld_natural_logs}
*
@@ -1124,6 +1271,13 @@ public final class BlockTypeTagKeys {
*/
public static final TagKey<BlockType> POLAR_BEARS_SPAWNABLE_ON_ALTERNATE = create(key("polar_bears_spawnable_on_alternate"));
/**
* {@code #minecraft:poplar_logs}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> POPLAR_LOGS = create(key("poplar_logs"));
/**
* {@code #minecraft:portals}
*
@@ -1194,6 +1348,13 @@ public final class BlockTypeTagKeys {
*/
public static final TagKey<BlockType> REPLACEABLE_BY_TREES = create(key("replaceable_by_trees"));
/**
* {@code #minecraft:required_for_poplar_leaf_ambience}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> REQUIRED_FOR_POPLAR_LEAF_AMBIENCE = create(key("required_for_poplar_leaf_ambience"));
/**
* {@code #minecraft:sand}
*
@@ -1208,6 +1369,13 @@ public final class BlockTypeTagKeys {
*/
public static final TagKey<BlockType> SAPLINGS = create(key("saplings"));
/**
* {@code #minecraft:sculk_growth_inhibitors}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> SCULK_GROWTH_INHIBITORS = create(key("sculk_growth_inhibitors"));
/**
* {@code #minecraft:sculk_replaceable}
*
@@ -1250,6 +1418,13 @@ public final class BlockTypeTagKeys {
*/
public static final TagKey<BlockType> SHULKER_BOXES = create(key("shulker_boxes"));
/**
* {@code #minecraft:shulker_does_not_teleport_to}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> SHULKER_DOES_NOT_TELEPORT_TO = create(key("shulker_does_not_teleport_to"));
/**
* {@code #minecraft:signs}
*
@@ -1257,6 +1432,13 @@ public final class BlockTypeTagKeys {
*/
public static final TagKey<BlockType> SIGNS = create(key("signs"));
/**
* {@code #minecraft:skulls}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> SKULLS = create(key("skulls"));
/**
* {@code #minecraft:slabs}
*
@@ -1327,6 +1509,13 @@ public final class BlockTypeTagKeys {
*/
public static final TagKey<BlockType> SOUL_SPEED_BLOCKS = create(key("soul_speed_blocks"));
/**
* {@code #minecraft:speeds_up_zombie_villager_curing}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> SPEEDS_UP_ZOMBIE_VILLAGER_CURING = create(key("speeds_up_zombie_villager_curing"));
/**
* {@code #minecraft:speleothems}
*
@@ -1698,6 +1887,27 @@ public final class BlockTypeTagKeys {
*/
public static final TagKey<BlockType> TRIGGERS_AMBIENT_DRIED_GHAST_BLOCK_SOUNDS = create(key("triggers_ambient_dried_ghast_block_sounds"));
/**
* {@code #minecraft:turns_into_dirt_path}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> TURNS_INTO_DIRT_PATH = create(key("turns_into_dirt_path"));
/**
* {@code #minecraft:turns_into_farmland}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> TURNS_INTO_FARMLAND = create(key("turns_into_farmland"));
/**
* {@code #minecraft:uncarvable}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> UNCARVABLE = create(key("uncarvable"));
/**
* {@code #minecraft:underwater_bonemeals}
*
@@ -1726,6 +1936,20 @@ public final class BlockTypeTagKeys {
*/
public static final TagKey<BlockType> VIBRATION_RESONATORS = create(key("vibration_resonators"));
/**
* {@code #minecraft:villager_babies_can_jump_on_bed}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> VILLAGER_BABIES_CAN_JUMP_ON_BED = create(key("villager_babies_can_jump_on_bed"));
/**
* {@code #minecraft:villagers_can_sleep_on_bed}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> VILLAGERS_CAN_SLEEP_ON_BED = create(key("villagers_can_sleep_on_bed"));
/**
* {@code #minecraft:wall_corals}
*
@@ -1775,6 +1999,13 @@ public final class BlockTypeTagKeys {
*/
public static final TagKey<BlockType> WART_BLOCKS = create(key("wart_blocks"));
/**
* {@code #minecraft:washed_away_by_fluids}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> WASHED_AWAY_BY_FLUIDS = create(key("washed_away_by_fluids"));
/**
* {@code #minecraft:wither_immune}
*
@@ -1880,6 +2111,20 @@ public final class BlockTypeTagKeys {
*/
public static final TagKey<BlockType> WOOL_CARPETS = create(key("wool_carpets"));
/**
* {@code #minecraft:wool_slabs}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> WOOL_SLABS = create(key("wool_slabs"));
/**
* {@code #minecraft:wool_stairs}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> WOOL_STAIRS = create(key("wool_stairs"));
private BlockTypeTagKeys() {
}
@@ -81,6 +81,13 @@ public final class DamageTypeTagKeys {
*/
public static final TagKey<DamageType> BYPASSES_ARMOR = create(key("bypasses_armor"));
/**
* {@code #minecraft:bypasses_cooldown}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<DamageType> BYPASSES_COOLDOWN = create(key("bypasses_cooldown"));
/**
* {@code #minecraft:bypasses_effects}
*
@@ -228,6 +235,13 @@ public final class DamageTypeTagKeys {
*/
public static final TagKey<DamageType> NO_KNOCKBACK = create(key("no_knockback"));
/**
* {@code #minecraft:no_wolf_retaliation}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<DamageType> NO_WOLF_RETALIATION = create(key("no_wolf_retaliation"));
/**
* {@code #minecraft:panic_causes}
*
@@ -151,6 +151,13 @@ public final class EntityTypeTagKeys {
*/
public static final TagKey<EntityType> CANNOT_BE_AGE_LOCKED = create(key("cannot_be_age_locked"));
/**
* {@code #minecraft:cannot_be_dismounted_by_item_usage}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<EntityType> CANNOT_BE_DISMOUNTED_BY_ITEM_USAGE = create(key("cannot_be_dismounted_by_item_usage"));
/**
* {@code #minecraft:cannot_be_pushed_onto_boats}
*
@@ -25,6 +25,13 @@ import org.jspecify.annotations.NullMarked;
@NullMarked
@GeneratedClass
public final class FluidTagKeys {
/**
* {@code #minecraft:axolotl_tries_to_find}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Fluid> AXOLOTL_TRIES_TO_FIND = create(key("axolotl_tries_to_find"));
/**
* {@code #minecraft:bubble_column_can_occupy}
*
@@ -32,6 +39,27 @@ public final class FluidTagKeys {
*/
public static final TagKey<Fluid> BUBBLE_COLUMN_CAN_OCCUPY = create(key("bubble_column_can_occupy"));
/**
* {@code #minecraft:dolphin_tries_to_find}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Fluid> DOLPHIN_TRIES_TO_FIND = create(key("dolphin_tries_to_find"));
/**
* {@code #minecraft:entity_floatable}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Fluid> ENTITY_FLOATABLE = create(key("entity_floatable"));
/**
* {@code #minecraft:frog_tries_to_find_land_near}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Fluid> FROG_TRIES_TO_FIND_LAND_NEAR = create(key("frog_tries_to_find_land_near"));
/**
* {@code #minecraft:lava}
*
@@ -145,11 +145,11 @@ public final class ItemTypeTagKeys {
public static final TagKey<ItemType> BREAKS_DECORATED_POTS = create(key("breaks_decorated_pots"));
/**
* {@code #minecraft:brewing_fuel}
* {@code #minecraft:brewing_potion_inputs}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<ItemType> BREWING_FUEL = create(key("brewing_fuel"));
public static final TagKey<ItemType> BREWING_POTION_INPUTS = create(key("brewing_potion_inputs"));
/**
* {@code #minecraft:bundles}
@@ -242,6 +242,13 @@ public final class ItemTypeTagKeys {
*/
public static final TagKey<ItemType> CHICKEN_FOOD = create(key("chicken_food"));
/**
* {@code #minecraft:clonable_maps}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<ItemType> CLONABLE_MAPS = create(key("clonable_maps"));
/**
* {@code #minecraft:cluster_max_harvestables}
*
@@ -291,6 +298,20 @@ public final class ItemTypeTagKeys {
*/
public static final TagKey<ItemType> CONCRETE_POWDERS = create(key("concrete_powders"));
/**
* {@code #minecraft:concrete_slabs}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<ItemType> CONCRETE_SLABS = create(key("concrete_slabs"));
/**
* {@code #minecraft:concrete_stairs}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<ItemType> CONCRETE_STAIRS = create(key("concrete_stairs"));
/**
* {@code #minecraft:copper}
*
@@ -354,6 +375,13 @@ public final class ItemTypeTagKeys {
*/
public static final TagKey<ItemType> CRIMSON_STEMS = create(key("crimson_stems"));
/**
* {@code #minecraft:cushions}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<ItemType> CUSHIONS = create(key("cushions"));
/**
* {@code #minecraft:dampens_vibrations}
*
@@ -410,6 +438,13 @@ public final class ItemTypeTagKeys {
*/
public static final TagKey<ItemType> DOORS = create(key("doors"));
/**
* {@code #minecraft:douses_campfires}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<ItemType> DOUSES_CAMPFIRES = create(key("douses_campfires"));
/**
* {@code #minecraft:drowned_preferred_weapons}
*
@@ -592,6 +627,13 @@ public final class ItemTypeTagKeys {
*/
public static final TagKey<ItemType> ENCHANTABLE_WEAPON = create(key("enchantable/weapon"));
/**
* {@code #minecraft:extendable_maps}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<ItemType> EXTENDABLE_MAPS = create(key("extendable_maps"));
/**
* {@code #minecraft:fence_gates}
*
@@ -648,6 +690,13 @@ public final class ItemTypeTagKeys {
*/
public static final TagKey<ItemType> FROG_FOOD = create(key("frog_food"));
/**
* {@code #minecraft:furnace_fuel_bottom_takeable}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<ItemType> FURNACE_FUEL_BOTTOM_TAKEABLE = create(key("furnace_fuel_bottom_takeable"));
/**
* {@code #minecraft:furnace_minecart_fuel}
*
@@ -914,6 +963,13 @@ public final class ItemTypeTagKeys {
*/
public static final TagKey<ItemType> MUD = create(key("mud"));
/**
* {@code #minecraft:mushrooms}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<ItemType> MUSHROOMS = create(key("mushrooms"));
/**
* {@code #minecraft:nautilus_bucket_food}
*
@@ -970,6 +1026,13 @@ public final class ItemTypeTagKeys {
*/
public static final TagKey<ItemType> OCELOT_FOOD = create(key("ocelot_food"));
/**
* {@code #minecraft:ores}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<ItemType> ORES = create(key("ores"));
/**
* {@code #minecraft:pale_oak_logs}
*
@@ -1068,6 +1131,13 @@ public final class ItemTypeTagKeys {
*/
public static final TagKey<ItemType> PLANKS = create(key("planks"));
/**
* {@code #minecraft:poplar_logs}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<ItemType> POPLAR_LOGS = create(key("poplar_logs"));
/**
* {@code #minecraft:rabbit_food}
*
@@ -1586,6 +1656,20 @@ public final class ItemTypeTagKeys {
*/
public static final TagKey<ItemType> WOOL_CARPETS = create(key("wool_carpets"));
/**
* {@code #minecraft:wool_slabs}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<ItemType> WOOL_SLABS = create(key("wool_slabs"));
/**
* {@code #minecraft:wool_stairs}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<ItemType> WOOL_STAIRS = create(key("wool_stairs"));
/**
* {@code #minecraft:zombie_horse_food}
*
@@ -25,6 +25,34 @@ import org.jspecify.annotations.NullMarked;
@NullMarked
@GeneratedClass
public final class PotionTypeTagKeys {
/**
* {@code #minecraft:douses_fire}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<PotionType> DOUSES_FIRE = create(key("douses_fire"));
/**
* {@code #minecraft:extinguishes_entities}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<PotionType> EXTINGUISHES_ENTITIES = create(key("extinguishes_entities"));
/**
* {@code #minecraft:hurts_water_sensitive_entities}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<PotionType> HURTS_WATER_SENSITIVE_ENTITIES = create(key("hurts_water_sensitive_entities"));
/**
* {@code #minecraft:rehydrates_axolotls}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<PotionType> REHYDRATES_AXOLOTLS = create(key("rehydrates_axolotls"));
/**
* {@code #minecraft:tradeable}
*
@@ -25,6 +25,13 @@ import org.jspecify.annotations.NullMarked;
@NullMarked
@GeneratedClass
public final class StructureTagKeys {
/**
* {@code #minecraft:abandoned_camp}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Structure> ABANDONED_CAMP = create(key("abandoned_camp"));
/**
* {@code #minecraft:cats_spawn_as_black}
*
@@ -67,6 +74,83 @@ public final class StructureTagKeys {
*/
public static final TagKey<Structure> OCEAN_RUIN = create(key("ocean_ruin"));
/**
* {@code #minecraft:on_abandoned_camp_bamboo_jungle}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Structure> ON_ABANDONED_CAMP_BAMBOO_JUNGLE = create(key("on_abandoned_camp_bamboo_jungle"));
/**
* {@code #minecraft:on_abandoned_camp_birch_forest}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Structure> ON_ABANDONED_CAMP_BIRCH_FOREST = create(key("on_abandoned_camp_birch_forest"));
/**
* {@code #minecraft:on_abandoned_camp_cherry_grove}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Structure> ON_ABANDONED_CAMP_CHERRY_GROVE = create(key("on_abandoned_camp_cherry_grove"));
/**
* {@code #minecraft:on_abandoned_camp_dappled_forest}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Structure> ON_ABANDONED_CAMP_DAPPLED_FOREST = create(key("on_abandoned_camp_dappled_forest"));
/**
* {@code #minecraft:on_abandoned_camp_flower_forest}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Structure> ON_ABANDONED_CAMP_FLOWER_FOREST = create(key("on_abandoned_camp_flower_forest"));
/**
* {@code #minecraft:on_abandoned_camp_pale_garden}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Structure> ON_ABANDONED_CAMP_PALE_GARDEN = create(key("on_abandoned_camp_pale_garden"));
/**
* {@code #minecraft:on_abandoned_camp_swamp}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Structure> ON_ABANDONED_CAMP_SWAMP = create(key("on_abandoned_camp_swamp"));
/**
* {@code #minecraft:on_abandoned_camp_windswept_forest}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Structure> ON_ABANDONED_CAMP_WINDSWEPT_FOREST = create(key("on_abandoned_camp_windswept_forest"));
/**
* {@code #minecraft:on_ancient_city_maps}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Structure> ON_ANCIENT_CITY_MAPS = create(key("on_ancient_city_maps"));
/**
* {@code #minecraft:on_buried_trial_chambers_maps}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Structure> ON_BURIED_TRIAL_CHAMBERS_MAPS = create(key("on_buried_trial_chambers_maps"));
/**
* {@code #minecraft:on_desert_pyramid_maps}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Structure> ON_DESERT_PYRAMID_MAPS = create(key("on_desert_pyramid_maps"));
/**
* {@code #minecraft:on_desert_village_maps}
*
@@ -75,18 +159,32 @@ public final class StructureTagKeys {
public static final TagKey<Structure> ON_DESERT_VILLAGE_MAPS = create(key("on_desert_village_maps"));
/**
* {@code #minecraft:on_jungle_explorer_maps}
* {@code #minecraft:on_jungle_pyramid_maps}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Structure> ON_JUNGLE_EXPLORER_MAPS = create(key("on_jungle_explorer_maps"));
public static final TagKey<Structure> ON_JUNGLE_PYRAMID_MAPS = create(key("on_jungle_pyramid_maps"));
/**
* {@code #minecraft:on_ocean_explorer_maps}
* {@code #minecraft:on_mineshaft_maps}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Structure> ON_OCEAN_EXPLORER_MAPS = create(key("on_ocean_explorer_maps"));
public static final TagKey<Structure> ON_MINESHAFT_MAPS = create(key("on_mineshaft_maps"));
/**
* {@code #minecraft:on_ocean_monument_maps}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Structure> ON_OCEAN_MONUMENT_MAPS = create(key("on_ocean_monument_maps"));
/**
* {@code #minecraft:on_ocean_ruin_warm_maps}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Structure> ON_OCEAN_RUIN_WARM_MAPS = create(key("on_ocean_ruin_warm_maps"));
/**
* {@code #minecraft:on_plains_village_maps}
@@ -110,11 +208,11 @@ public final class StructureTagKeys {
public static final TagKey<Structure> ON_SNOWY_VILLAGE_MAPS = create(key("on_snowy_village_maps"));
/**
* {@code #minecraft:on_swamp_explorer_maps}
* {@code #minecraft:on_swamp_hut_maps}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Structure> ON_SWAMP_EXPLORER_MAPS = create(key("on_swamp_explorer_maps"));
public static final TagKey<Structure> ON_SWAMP_HUT_MAPS = create(key("on_swamp_hut_maps"));
/**
* {@code #minecraft:on_taiga_village_maps}
@@ -131,18 +229,11 @@ public final class StructureTagKeys {
public static final TagKey<Structure> ON_TREASURE_MAPS = create(key("on_treasure_maps"));
/**
* {@code #minecraft:on_trial_chambers_maps}
* {@code #minecraft:on_woodland_mansion_maps}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Structure> ON_TRIAL_CHAMBERS_MAPS = create(key("on_trial_chambers_maps"));
/**
* {@code #minecraft:on_woodland_explorer_maps}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Structure> ON_WOODLAND_EXPLORER_MAPS = create(key("on_woodland_explorer_maps"));
public static final TagKey<Structure> ON_WOODLAND_MANSION_MAPS = create(key("on_woodland_mansion_maps"));
/**
* {@code #minecraft:ruined_portal}
@@ -224,9 +224,11 @@ public class MaterialTags {
/**
* Covers all mushrooms.
*
* @deprecated in favour of {@link Tag#ITEMS_MUSHROOMS}
*/
public static final MaterialSetTag MUSHROOMS = new MaterialSetTag(keyFor("mushrooms"))
.add(Material.BROWN_MUSHROOM, Material.RED_MUSHROOM).lock();
@Deprecated(since = "26.3")
public static final MaterialSetTag MUSHROOMS = replacedBy(Tag.ITEMS_MUSHROOMS);
/**
* Covers all music disc items.
@@ -236,12 +238,14 @@ public class MaterialTags {
/**
* Covers all ores.
*
* @deprecated in favour of {@link Tag#ORES}, makes sure to also check for ancient debris if you relied on this edge case
*/
@SuppressWarnings("unchecked")
@Deprecated(since = "26.3")
public static final MaterialSetTag ORES = new MaterialSetTag(keyFor("ores"))
.add(Tag.COAL_ORES, Tag.COPPER_ORES, Tag.IRON_ORES, Tag.GOLD_ORES,
Tag.LAPIS_ORES, Tag.REDSTONE_ORES, Tag.DIAMOND_ORES, Tag.EMERALD_ORES)
.add(Material.ANCIENT_DEBRIS, Material.NETHER_QUARTZ_ORE).lock();
.add(Tag.ORES)
.add(Material.ANCIENT_DEBRIS).lock();
/**
* Covers all piston typed items and blocks including the piston head and moving piston.
@@ -591,7 +595,9 @@ public class MaterialTags {
*/
@SuppressWarnings("unchecked")
public static final MaterialSetTag COLORABLE = new MaterialSetTag(keyFor("colorable"))
.add(Tag.WOOL, Tag.WOOL_CARPETS, Tag.SHULKER_BOXES, Tag.BEDS, Tag.CONCRETE)
.add(Tag.WOOL, Tag.WOOL_CARPETS, Tag.WOOL_SLABS, Tag.WOOL_STAIRS,
Tag.CONCRETE_SLABS, Tag.CONCRETE_STAIRS,
Tag.SHULKER_BOXES, Tag.BEDS, Tag.ITEMS_CUSHIONS)
.add(STAINED_GLASS, STAINED_GLASS_PANES)
.lock();
@@ -17,7 +17,7 @@ import org.jspecify.annotations.Nullable;
/**
* Helps prepare a particle to be sent to players.
* <p>
* Usage of the builder is preferred over the super long {@link World#spawnParticle(Particle, Location, int, double, double, double, double, Object)} API
* Usage of the builder is preferred over the super long {@link World#spawnParticle(Particle, List, Player, double, double, double, int, double, double, double, double, double, double, Object, boolean, Particle.RandomizationType)} API.
*/
@NullMarked
public class ParticleBuilder implements Cloneable {
@@ -28,9 +28,10 @@ public class ParticleBuilder implements Cloneable {
private @Nullable Location location;
private int count = 1;
private double offsetX = 0, offsetY = 0, offsetZ = 0;
private double extra = 1;
private double speedX = 1, speedY = 1, speedZ = 1;
private @Nullable Object data;
private boolean force = true;
private Particle.RandomizationType randomizationType = Particle.RandomizationType.DEFAULT;
public ParticleBuilder(final Particle particle) {
this.particle = particle;
@@ -49,7 +50,8 @@ public class ParticleBuilder implements Cloneable {
this.location.getWorld().spawnParticle(
this.particle, this.receivers, this.source,
this.location.getX(), this.location.getY(), this.location.getZ(),
this.count, this.offsetX, this.offsetY, this.offsetZ, this.extra, this.data, this.force
this.count, this.offsetX, this.offsetY, this.offsetZ, this.speedX, this.speedY, this.speedZ,
this.data, this.force, this.randomizationType
);
return this;
}
@@ -131,7 +133,7 @@ public class ParticleBuilder implements Cloneable {
* world
* @return a reference to this object.
*/
public ParticleBuilder receivers(final Player @Nullable... receivers) {
public ParticleBuilder receivers(final Player @Nullable ... receivers) {
this.receivers = receivers != null ? Lists.newArrayList(receivers) : null;
return this;
}
@@ -357,12 +359,14 @@ public class ParticleBuilder implements Cloneable {
}
/**
* Gets the Particle extra data. Varies by particle on how this is used
* Gets the Particle extra data (speedX). Varies by particle on how this is used
*
* @return the extra particle data
* @deprecated use one of the {@code speed} methods instead
*/
@Deprecated(since = "26.3", forRemoval = true)
public double extra() {
return this.extra;
return this.speedX;
}
/**
@@ -370,9 +374,62 @@ public class ParticleBuilder implements Cloneable {
*
* @param extra the extra particle data
* @return a reference to this object.
* @deprecated use {@link #speed(double)} instead
*/
@Deprecated(since = "26.3", forRemoval = true)
public ParticleBuilder extra(final double extra) {
this.extra = extra;
return this.speed(extra);
}
/**
* Particle speed X. Varies by particle on how this is used
*
* @return the particle speed X
*/
public double speedX() {
return this.speedX;
}
/**
* Particle speed Y. Varies by particle on how this is used
*
* @return the particle speed Y
*/
public double speedY() {
return this.speedY;
}
/**
* Particle speed Z. Varies by particle on how this is used
*
* @return the particle speed Z
*/
public double speedZ() {
return this.speedZ;
}
/**
* Sets the particle speed. Varies by particle on how this is used
*
* @param speed Particle speed
* @return a reference to this object.
*/
public ParticleBuilder speed(final double speed) {
return this.speed(speed, speed, speed);
}
/**
* Sets the particle speed. Varies by particle on how this is used
*
* @param speedX Particle speed X
* @param speedY Particle speed Y
* @param speedZ Particle speed Z
* @return a reference to this object.
*/
public ParticleBuilder speed(final double speedX, final double speedY, final double speedZ) {
this.speedX = speedX;
this.speedY = speedY;
this.speedZ = speedZ;
return this;
}
@@ -419,6 +476,26 @@ public class ParticleBuilder implements Cloneable {
return this;
}
/**
* Gets the randomization type for the particle. This determines how the particle's position and velocity are randomized.
*
* @return the randomization type for the particle
*/
public Particle.RandomizationType randomizationType() {
return this.randomizationType;
}
/**
* Sets the randomization type for the particle. This determines how the particle's position and velocity are randomized.
*
* @param randomizationType the new randomization type for the particle
* @return a reference to this object.
*/
public ParticleBuilder randomizationType(final Particle.RandomizationType randomizationType) {
this.randomizationType = randomizationType;
return this;
}
/**
* Sets the particle Color.
* Only valid for particles with a data type of {@link Color}, {@link Particle.DustOptions} or {@link Particle.Spell}.
@@ -6,55 +6,96 @@ import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList;
import org.bukkit.event.inventory.InventoryEvent;
import org.bukkit.inventory.AnvilInventory;
import org.bukkit.inventory.InventoryView;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
import org.jspecify.annotations.Nullable;
/**
* Called when an anvil is damaged from being used
*/
public interface AnvilDamagedEvent extends InventoryEvent, Cancellable {
@NullMarked
public class AnvilDamagedEvent extends InventoryEvent implements Cancellable {
private static final HandlerList HANDLER_LIST = new HandlerList();
private DamageState damageState;
private boolean cancelled;
@ApiStatus.Internal
public AnvilDamagedEvent(final InventoryView inventory, final @Nullable BlockData blockData) {
super(inventory);
this.damageState = DamageState.getState(blockData);
}
@Override
AnvilInventory getInventory();
public AnvilInventory getInventory() {
return (AnvilInventory) super.getInventory();
}
/**
* Gets the new state of damage on the anvil
*
* @return Damage state
*/
DamageState getDamageState();
public DamageState getDamageState() {
return this.damageState;
}
/**
* Sets the new state of damage on the anvil
*
* @param damageState Damage state
*/
void setDamageState(DamageState damageState);
public void setDamageState(final DamageState damageState) {
this.damageState = damageState;
}
/**
* Gets if anvil is breaking on this use
*
* @return {@code true} if breaking
*/
boolean isBreaking();
public boolean isBreaking() {
return this.damageState == DamageState.BROKEN;
}
/**
* Sets if anvil is breaking on this use
*
* @param breaking {@code true} if breaking
*/
void setBreaking(boolean breaking);
static HandlerList getHandlerList() {
final class Holder {
private static final HandlerList HANDLER_LIST = new HandlerList();
public void setBreaking(final boolean breaking) {
if (breaking) {
this.damageState = DamageState.BROKEN;
} else if (this.damageState == DamageState.BROKEN) {
this.damageState = DamageState.DAMAGED;
}
return Holder.HANDLER_LIST;
}
@Override
public boolean isCancelled() {
return this.cancelled;
}
@Override
public void setCancelled(final boolean cancel) {
this.cancelled = cancel;
}
@Override
public HandlerList getHandlers() {
return HANDLER_LIST;
}
public static HandlerList getHandlerList() {
return HANDLER_LIST;
}
/**
* Represents the amount of damage on an anvil block
*/
enum DamageState {
public enum DamageState {
FULL(Material.ANVIL),
CHIPPED(Material.CHIPPED_ANVIL),
DAMAGED(Material.DAMAGED_ANVIL),
@@ -1,50 +1,88 @@
package com.destroystokyo.paper.event.block;
import org.bukkit.block.Block;
import org.bukkit.entity.Player;
import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList;
import org.bukkit.event.block.BlockEvent;
import org.bukkit.event.player.PlayerEvent;
import org.bukkit.potion.PotionEffect;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Called when a beacon effect is being applied to a player.
*/
public interface BeaconEffectEvent extends BlockEvent, PlayerEvent, Cancellable {
@NullMarked
public class BeaconEffectEvent extends BlockEvent implements Cancellable {
private static final HandlerList HANDLER_LIST = new HandlerList();
private final Player player;
private final boolean primary;
private PotionEffect effect;
private boolean cancelled;
@ApiStatus.Internal
public BeaconEffectEvent(final Block beacon, final PotionEffect effect, final Player player, final boolean primary) {
super(beacon);
this.effect = effect;
this.player = player;
this.primary = primary;
}
/**
* Gets the potion effect being applied.
*
* @return Potion effect
*/
PotionEffect getEffect();
public PotionEffect getEffect() {
return this.effect;
}
/**
* Sets the potion effect that will be applied.
*
* @param effect Potion effect
*/
void setEffect(PotionEffect effect);
public void setEffect(final PotionEffect effect) {
this.effect = effect;
}
/**
* Gets the player who the potion effect is being applied to.
*
* @return Affected player
*/
@Override
Player getPlayer();
public Player getPlayer() {
return this.player;
}
/**
* Gets whether the effect is a primary beacon effect.
*
* @return {@code true} if this event represents a primary effect
*/
boolean isPrimary();
public boolean isPrimary() {
return this.primary;
}
static HandlerList getHandlerList() {
final class Holder {
private static final HandlerList HANDLER_LIST = new HandlerList();
}
return Holder.HANDLER_LIST;
@Override
public boolean isCancelled() {
return this.cancelled;
}
@Override
public void setCancelled(final boolean cancel) {
this.cancelled = cancel;
}
@Override
public HandlerList getHandlers() {
return HANDLER_LIST;
}
public static HandlerList getHandlerList() {
return HANDLER_LIST;
}
}
@@ -1,9 +1,12 @@
package com.destroystokyo.paper.event.block;
import org.bukkit.block.Block;
import org.bukkit.block.data.BlockData;
import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList;
import org.bukkit.event.block.BlockExpEvent;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Fired anytime the server intends to 'destroy' a block through some triggering reason.
@@ -15,65 +18,103 @@ import org.bukkit.event.block.BlockExpEvent;
* <p>
* Events such as leaves decaying, pistons retracting (where the block is moving), does NOT fire this event.
*/
public interface BlockDestroyEvent extends BlockExpEvent, Cancellable {
@NullMarked
public class BlockDestroyEvent extends BlockExpEvent implements Cancellable {
private static final HandlerList HANDLER_LIST = new HandlerList();
private final BlockData newState;
private boolean willDrop;
private boolean playEffect = true;
private BlockData effectBlock;
private boolean cancelled;
@ApiStatus.Internal
public BlockDestroyEvent(final Block block, final BlockData newState, final BlockData effectBlock, final int xp, final boolean willDrop) {
super(block, xp);
this.newState = newState;
this.effectBlock = effectBlock;
this.willDrop = willDrop;
}
/**
* Gets the effect that will be played when the block is broken.
*
* @return block break effect
*/
BlockData getEffectBlock();
public BlockData getEffectBlock() {
return this.effectBlock;
}
/**
* Sets the effect that will be played when the block is broken.
* Note: {@link #playEffect()} must be {@code true} in order for this effect to be
* Note: {@link BlockDestroyEvent#playEffect()} must be {@code true} in order for this effect to be
* played.
*
* @param effectBlock block effect
*/
void setEffectBlock(BlockData effectBlock);
public void setEffectBlock(final BlockData effectBlock) {
this.effectBlock = effectBlock.clone();
}
/**
* @return The new state of this block (Air, or a Fluid type)
*/
BlockData getNewState();
public BlockData getNewState() {
return this.newState.clone();
}
/**
* @return If the server is going to drop the block in question with this destroy event
*/
boolean willDrop();
public boolean willDrop() {
return this.willDrop;
}
/**
* @param willDrop If the server is going to drop the block in question with this destroy event
*/
void setWillDrop(boolean willDrop);
public void setWillDrop(final boolean willDrop) {
this.willDrop = willDrop;
}
/**
* @return If the server is going to play the sound effect for this destruction
*/
boolean playEffect();
public boolean playEffect() {
return this.playEffect;
}
/**
* @param playEffect If the server should play the sound effect for this destruction
*/
void setPlayEffect(boolean playEffect);
public void setPlayEffect(final boolean playEffect) {
this.playEffect = playEffect;
}
/**
* @return If the event is cancelled, meaning the block will not be destroyed
*/
@Override
boolean isCancelled();
public boolean isCancelled() {
return this.cancelled;
}
/**
* If the event is cancelled, the block will remain in its previous state.
*/
@Override
void setCancelled(boolean cancel);
public void setCancelled(final boolean cancel) {
this.cancelled = cancel;
}
static HandlerList getHandlerList() {
final class Holder {
private static final HandlerList HANDLER_LIST = new HandlerList();
}
return Holder.HANDLER_LIST;
@Override
public HandlerList getHandlers() {
return HANDLER_LIST;
}
public static HandlerList getHandlerList() {
return HANDLER_LIST;
}
}
@@ -1,6 +1,8 @@
package com.destroystokyo.paper.event.block;
import org.bukkit.Material;
import org.bukkit.Warning;
import org.bukkit.block.Block;
import org.bukkit.enchantments.Enchantment;
import org.bukkit.entity.Entity;
import org.bukkit.entity.Player;
@@ -8,7 +10,9 @@ import org.bukkit.entity.TNTPrimed;
import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList;
import org.bukkit.event.block.BlockEvent;
import org.jspecify.annotations.Nullable;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
/**
* Called when TNT block is about to turn into {@link TNTPrimed}
@@ -20,14 +24,32 @@ import org.jspecify.annotations.Nullable;
* @deprecated use {@link org.bukkit.event.block.TNTPrimeEvent}
*/
@Deprecated(forRemoval = true, since = "1.19.4")
public interface TNTPrimeEvent extends BlockEvent, Cancellable {
@Warning(propagate = false)
public class TNTPrimeEvent extends BlockEvent implements Cancellable {
private static final HandlerList HANDLER_LIST = new HandlerList();
@NotNull private final PrimeReason reason;
@Nullable private final Entity primerEntity;
private boolean cancelled;
@ApiStatus.Internal
public TNTPrimeEvent(@NotNull Block block, @NotNull PrimeReason reason, @Nullable Entity primerEntity) {
super(block);
this.reason = reason;
this.primerEntity = primerEntity;
}
/**
* Gets the TNT prime reason
*
* @return Prime reason
*/
PrimeReason getReason();
@NotNull
public PrimeReason getReason() {
return this.reason;
}
/**
* Gets the TNT primer {@link Entity}.
@@ -38,7 +60,10 @@ public interface TNTPrimeEvent extends BlockEvent, Cancellable {
*
* @return The {@link Entity} who primed the TNT
*/
@Nullable Entity getPrimerEntity();
@Nullable
public Entity getPrimerEntity() {
return this.primerEntity;
}
/**
* Gets whether spawning {@link TNTPrimed} should be cancelled or not
@@ -46,7 +71,9 @@ public interface TNTPrimeEvent extends BlockEvent, Cancellable {
* @return Whether spawning {@link TNTPrimed} should be cancelled or not
*/
@Override
boolean isCancelled();
public boolean isCancelled() {
return this.cancelled;
}
/**
* Sets whether to cancel spawning {@link TNTPrimed} or not
@@ -54,16 +81,22 @@ public interface TNTPrimeEvent extends BlockEvent, Cancellable {
* @param cancel whether spawning {@link TNTPrimed} should be cancelled or not
*/
@Override
void setCancelled(boolean cancel);
static HandlerList getHandlerList() {
final class Holder {
private static final HandlerList HANDLER_LIST = new HandlerList();
}
return Holder.HANDLER_LIST;
public void setCancelled(boolean cancel) {
this.cancelled = cancel;
}
enum PrimeReason {
@NotNull
@Override
public HandlerList getHandlers() {
return HANDLER_LIST;
}
@NotNull
public static HandlerList getHandlerList() {
return HANDLER_LIST;
}
public enum PrimeReason {
/**
* When TNT prime was caused by other explosion (chain reaction)
*/
@@ -1,4 +0,0 @@
@NullMarked
package com.destroystokyo.paper.event.block;
import org.jspecify.annotations.NullMarked;
@@ -2,9 +2,12 @@ package com.destroystokyo.paper.event.brigadier;
import com.mojang.brigadier.tree.RootCommandNode;
import io.papermc.paper.command.brigadier.CommandSourceStack;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
import org.bukkit.event.HandlerList;
import org.bukkit.event.player.PlayerEvent;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Fired any time a Brigadier RootCommandNode is generated for a player to inform the client of commands.
@@ -27,26 +30,45 @@ import org.jetbrains.annotations.ApiStatus;
* <p>This is a draft/experimental API and is subject to change.</p>
*/
@ApiStatus.Experimental
public interface AsyncPlayerSendCommandsEvent<S extends CommandSourceStack> extends PlayerEvent {
@NullMarked
public class AsyncPlayerSendCommandsEvent<S extends CommandSourceStack> extends PlayerEvent {
private static final HandlerList HANDLER_LIST = new HandlerList();
private final RootCommandNode<S> node;
private final boolean hasFiredAsync;
@ApiStatus.Internal
public AsyncPlayerSendCommandsEvent(final Player player, final RootCommandNode<S> node, final boolean hasFiredAsync) {
super(player, !Bukkit.isPrimaryThread());
this.node = node;
this.hasFiredAsync = hasFiredAsync;
}
/**
* Gets the full Root Command Node being sent to the client, which is mutable.
*
* @return the root command node
*/
RootCommandNode<S> getCommandNode();
public RootCommandNode<S> getCommandNode() {
return this.node;
}
/**
* Gets if this event has already fired asynchronously.
*
* @return whether this event has already fired asynchronously
*/
boolean hasFiredAsync();
public boolean hasFiredAsync() {
return this.hasFiredAsync;
}
static HandlerList getHandlerList() {
final class Holder {
private static final HandlerList HANDLER_LIST = new HandlerList();
}
return Holder.HANDLER_LIST;
@Override
public HandlerList getHandlers() {
return HANDLER_LIST;
}
public static HandlerList getHandlerList() {
return HANDLER_LIST;
}
}
@@ -1,37 +1,71 @@
package com.destroystokyo.paper.event.brigadier;
import com.mojang.brigadier.suggestion.Suggestions;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList;
import org.bukkit.event.player.PlayerEvent;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Called when sending {@link Suggestions} to the client. Will be called asynchronously if a plugin
* marks the {@link com.destroystokyo.paper.event.server.AsyncTabCompleteEvent} event handled asynchronously,
* otherwise called synchronously.
* <p>
* If the suggestions are empty after this event has been called, nothing will be sent to the client.
*/
public interface AsyncPlayerSendSuggestionsEvent extends PlayerEvent, Cancellable {
@NullMarked
public class AsyncPlayerSendSuggestionsEvent extends PlayerEvent implements Cancellable {
private static final HandlerList HANDLER_LIST = new HandlerList();
private Suggestions suggestions;
private final String buffer;
private boolean cancelled;
@ApiStatus.Internal
public AsyncPlayerSendSuggestionsEvent(final Player player, final Suggestions suggestions, final String buffer) {
super(player, !Bukkit.isPrimaryThread());
this.suggestions = suggestions;
this.buffer = buffer;
}
/**
* Gets the input buffer sent to request these suggestions.
*
* @return the input buffer
*/
String getBuffer();
public String getBuffer() {
return this.buffer;
}
/**
* Gets the suggestions to be sent to client.
*
* @return the suggestions
*/
Suggestions getSuggestions();
public Suggestions getSuggestions() {
return this.suggestions;
}
/**
* Sets the suggestions to be sent to client.
* <p>
* Empty suggestions are never sent to the client.
*
* @param suggestions suggestions
*/
void setSuggestions(Suggestions suggestions);
public void setSuggestions(final Suggestions suggestions) {
this.suggestions = suggestions;
}
@Override
public boolean isCancelled() {
return this.cancelled;
}
/**
* Cancels sending suggestions to the client.
@@ -39,12 +73,16 @@ public interface AsyncPlayerSendSuggestionsEvent extends PlayerEvent, Cancellabl
* {@inheritDoc}
*/
@Override
void setCancelled(boolean cancel);
public void setCancelled(final boolean cancel) {
this.cancelled = cancel;
}
static HandlerList getHandlerList() {
final class Holder {
private static final HandlerList HANDLER_LIST = new HandlerList();
}
return Holder.HANDLER_LIST;
@Override
public HandlerList getHandlers() {
return HANDLER_LIST;
}
public static HandlerList getHandlerList() {
return HANDLER_LIST;
}
}
@@ -1,7 +1,6 @@
package com.destroystokyo.paper.event.brigadier;
import com.destroystokyo.paper.brigadier.BukkitBrigadierCommand;
import com.destroystokyo.paper.brigadier.BukkitBrigadierCommandSource;
import com.mojang.brigadier.tree.ArgumentCommandNode;
import com.mojang.brigadier.tree.LiteralCommandNode;
import com.mojang.brigadier.tree.RootCommandNode;
@@ -10,6 +9,7 @@ import org.bukkit.command.Command;
import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList;
import org.bukkit.event.server.ServerEvent;
import org.jetbrains.annotations.NotNull;
/**
* Fired anytime the server synchronizes Bukkit commands to Brigadier.
@@ -18,18 +18,42 @@ import org.bukkit.event.server.ServerEvent;
* This is done at Plugin Enable time after commands have been registered, but may also
* run at a later point in the server lifetime due to plugins, a server reload, etc.</p>
*
* @deprecated For removal, use the new brigadier api.
* @deprecated this event has been superseded by the Commands API and will be removed in a future release.
* Listen to {@link io.papermc.paper.plugin.lifecycle.event.types.LifecycleEvents#COMMANDS} instead
*/
@Deprecated(since = "1.20.6")
@Warning(reason = "This event has been superseded by the Commands API and will be removed in a future release. Listen to LifecycleEvents.COMMANDS instead.", value = true)
public interface CommandRegisteredEvent<S extends BukkitBrigadierCommandSource> extends ServerEvent, Cancellable {
@Warning(value = true, propagate = false)
public class CommandRegisteredEvent<S extends com.destroystokyo.paper.brigadier.BukkitBrigadierCommandSource> extends ServerEvent implements Cancellable {
private static final HandlerList HANDLER_LIST = new HandlerList();
private final String commandLabel;
private final Command command;
private final com.destroystokyo.paper.brigadier.BukkitBrigadierCommand<S> brigadierCommand;
private final RootCommandNode<S> root;
private final ArgumentCommandNode<S, String> defaultArgs;
private LiteralCommandNode<S> literal;
private boolean rawCommand = false;
private boolean cancelled;
public CommandRegisteredEvent(String commandLabel, com.destroystokyo.paper.brigadier.BukkitBrigadierCommand<S> brigadierCommand, Command command, RootCommandNode<S> root, LiteralCommandNode<S> literal, ArgumentCommandNode<S, String> defaultArgs) {
this.commandLabel = commandLabel;
this.brigadierCommand = brigadierCommand;
this.command = command;
this.root = root;
this.literal = literal;
this.defaultArgs = defaultArgs;
}
/**
* Gets the command label of the {@link Command} being registered.
*
* @return the command label
*/
String getCommandLabel();
public String getCommandLabel() {
return this.commandLabel;
}
/**
* Gets the {@link BukkitBrigadierCommand} for the {@link Command} being registered. This can be used
@@ -39,36 +63,27 @@ public interface CommandRegisteredEvent<S extends BukkitBrigadierCommandSource>
*
* @return the {@link BukkitBrigadierCommand}
*/
BukkitBrigadierCommand<S> getBrigadierCommand();
public BukkitBrigadierCommand<S> getBrigadierCommand() {
return this.brigadierCommand;
}
/**
* Gets the {@link Command} being registered.
*
* @return the {@link Command}
*/
Command getCommand();
public Command getCommand() {
return this.command;
}
/**
* Gets the {@link RootCommandNode} which is being registered to.
*
* @return the {@link RootCommandNode}
*/
RootCommandNode<S> getRoot();
/**
* Gets the {@link LiteralCommandNode} to be registered for the {@link Command}.
*
* @return the {@link LiteralCommandNode}
*/
LiteralCommandNode<S> getLiteral();
/**
* Sets the {@link LiteralCommandNode} used to register this command. The default literal is mutable, so
* this is primarily if you want to completely replace the object.
*
* @param literal new node
*/
void setLiteral(LiteralCommandNode<S> literal);
public RootCommandNode<S> getRoot() {
return this.root;
}
/**
* Gets the Bukkit APIs default arguments node (greedy string), for if
@@ -76,7 +91,28 @@ public interface CommandRegisteredEvent<S extends BukkitBrigadierCommandSource>
*
* @return default arguments node
*/
ArgumentCommandNode<S, String> getDefaultArgs();
public ArgumentCommandNode<S, String> getDefaultArgs() {
return this.defaultArgs;
}
/**
* Gets the {@link LiteralCommandNode} to be registered for the {@link Command}.
*
* @return the {@link LiteralCommandNode}
*/
public LiteralCommandNode<S> getLiteral() {
return this.literal;
}
/**
* Sets the {@link LiteralCommandNode} used to register this command. The default literal is mutable, so
* this is primarily if you want to completely replace the object.
*
* @param literal new node
*/
public void setLiteral(LiteralCommandNode<S> literal) {
this.literal = literal;
}
/**
* Gets whether this command should is treated as "raw".
@@ -84,7 +120,9 @@ public interface CommandRegisteredEvent<S extends BukkitBrigadierCommandSource>
* @see #setRawCommand(boolean)
* @return whether this command is treated as "raw"
*/
boolean isRawCommand();
public boolean isRawCommand() {
return this.rawCommand;
}
/**
* Sets whether this command should be treated as "raw".
@@ -98,7 +136,14 @@ public interface CommandRegisteredEvent<S extends BukkitBrigadierCommandSource>
*
* @param rawCommand whether this command should be treated as "raw"
*/
void setRawCommand(boolean rawCommand);
public void setRawCommand(final boolean rawCommand) {
this.rawCommand = rawCommand;
}
@Override
public boolean isCancelled() {
return this.cancelled;
}
/**
* Cancels registering this command to Brigadier, but will remain in Bukkit Command Map. Can be used to hide a
@@ -107,12 +152,17 @@ public interface CommandRegisteredEvent<S extends BukkitBrigadierCommandSource>
* {@inheritDoc}
*/
@Override
void setCancelled(boolean cancel);
public void setCancelled(boolean cancel) {
this.cancelled = cancel;
}
static HandlerList getHandlerList() {
final class Holder {
private static final HandlerList HANDLER_LIST = new HandlerList();
}
return Holder.HANDLER_LIST;
@NotNull
public HandlerList getHandlers() {
return HANDLER_LIST;
}
@NotNull
public static HandlerList getHandlerList() {
return HANDLER_LIST;
}
}
@@ -1,4 +0,0 @@
@NullMarked
package com.destroystokyo.paper.event.brigadier;
import org.jspecify.annotations.NullMarked;
@@ -2,18 +2,59 @@ package com.destroystokyo.paper.event.entity;
import io.papermc.paper.event.entity.EntityIgniteEvent;
import org.bukkit.entity.Creeper;
import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList;
import org.bukkit.event.entity.EntityEvent;
import org.checkerframework.checker.index.qual.Positive;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Called when a Creeper is ignited either by a
* flint and steel, {@link Creeper#ignite()} or
* {@link Creeper#setIgnited(boolean)}.
*/
public interface CreeperIgniteEvent extends EntityIgniteEvent {
@NullMarked
public class CreeperIgniteEvent extends EntityIgniteEvent {
private boolean ignited;
@ApiStatus.Internal
public CreeperIgniteEvent(final Creeper creeper, final boolean ignited) {
super(creeper, creeper.getMaxFuseTicks());
this.ignited = ignited;
}
@Override
Creeper getEntity();
public Creeper getEntity() {
return (Creeper) super.getEntity();
}
boolean isIgnited();
public boolean isIgnited() {
return this.ignited;
}
void setIgnited(boolean ignited);
public void setIgnited(final boolean ignited) {
this.ignited = ignited;
}
@Override
public @Positive int getFuseTime() {
return this.getEntity().getMaxFuseTicks();
}
@Override
public void setFuseTime(final @Positive int ticks) {
this.getEntity().setMaxFuseTicks(ticks);
}
@Override
public boolean isCancelled() {
return super.isCancelled();
}
@Override
public void setCancelled(final boolean cancel) {
super.setCancelled(cancel);
}
}
@@ -7,35 +7,68 @@ import org.bukkit.entity.LivingEntity;
import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList;
import org.bukkit.event.entity.EntityEvent;
import org.jetbrains.annotations.Unmodifiable;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Fired when a DragonFireball collides with a block/entity and spawns an AreaEffectCloud
*/
public interface EnderDragonFireballHitEvent extends EntityEvent, Cancellable {
@NullMarked
public class EnderDragonFireballHitEvent extends EntityEvent implements Cancellable {
private static final HandlerList HANDLER_LIST = new HandlerList();
private final Collection<LivingEntity> targets;
private final AreaEffectCloud areaEffectCloud;
private boolean cancelled;
@ApiStatus.Internal
public EnderDragonFireballHitEvent(final DragonFireball fireball, final Collection<LivingEntity> targets, final AreaEffectCloud areaEffectCloud) {
super(fireball);
this.targets = targets;
this.areaEffectCloud = areaEffectCloud;
}
/**
* The fireball involved in this event
*/
@Override
DragonFireball getEntity();
public DragonFireball getEntity() {
return (DragonFireball) super.getEntity();
}
/**
* The living entities hit by fireball
*
* @return the targets
*/
@Unmodifiable Collection<LivingEntity> getTargets();
public Collection<LivingEntity> getTargets() {
return this.targets;
}
/**
* @return The area effect cloud spawned in this collision
*/
AreaEffectCloud getAreaEffectCloud();
public AreaEffectCloud getAreaEffectCloud() {
return this.areaEffectCloud;
}
static HandlerList getHandlerList() {
final class Holder {
private static final HandlerList HANDLER_LIST = new HandlerList();
}
return Holder.HANDLER_LIST;
@Override
public boolean isCancelled() {
return this.cancelled;
}
@Override
public void setCancelled(final boolean cancel) {
this.cancelled = cancel;
}
@Override
public HandlerList getHandlers() {
return HANDLER_LIST;
}
public static HandlerList getHandlerList() {
return HANDLER_LIST;
}
}
@@ -5,27 +5,57 @@ import org.bukkit.entity.EnderDragon;
import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList;
import org.bukkit.event.entity.EntityEvent;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Fired when an EnderDragon spawns an AreaEffectCloud by shooting flames
*/
public interface EnderDragonFlameEvent extends EntityEvent, Cancellable {
@NullMarked
public class EnderDragonFlameEvent extends EntityEvent implements Cancellable {
private static final HandlerList HANDLER_LIST = new HandlerList();
private final AreaEffectCloud areaEffectCloud;
private boolean cancelled;
@ApiStatus.Internal
public EnderDragonFlameEvent(final EnderDragon enderDragon, final AreaEffectCloud areaEffectCloud) {
super(enderDragon);
this.areaEffectCloud = areaEffectCloud;
}
/**
* The enderdragon involved in this event
*/
@Override
EnderDragon getEntity();
public EnderDragon getEntity() {
return (EnderDragon) super.getEntity();
}
/**
* @return The area effect cloud spawned in this collision
*/
AreaEffectCloud getAreaEffectCloud();
public AreaEffectCloud getAreaEffectCloud() {
return this.areaEffectCloud;
}
static HandlerList getHandlerList() {
final class Holder {
private static final HandlerList HANDLER_LIST = new HandlerList();
}
return Holder.HANDLER_LIST;
@Override
public boolean isCancelled() {
return this.cancelled;
}
@Override
public void setCancelled(final boolean cancel) {
this.cancelled = cancel;
}
@Override
public HandlerList getHandlers() {
return HANDLER_LIST;
}
public static HandlerList getHandlerList() {
return HANDLER_LIST;
}
}
@@ -5,27 +5,57 @@ import org.bukkit.entity.EnderDragon;
import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList;
import org.bukkit.event.entity.EntityEvent;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Fired when an EnderDragon shoots a fireball
*/
public interface EnderDragonShootFireballEvent extends EntityEvent, Cancellable {
@NullMarked
public class EnderDragonShootFireballEvent extends EntityEvent implements Cancellable {
private static final HandlerList HANDLER_LIST = new HandlerList();
private final DragonFireball fireball;
private boolean cancelled;
@ApiStatus.Internal
public EnderDragonShootFireballEvent(final EnderDragon entity, final DragonFireball fireball) {
super(entity);
this.fireball = fireball;
}
/**
* The enderdragon shooting the fireball
*/
@Override
EnderDragon getEntity();
public EnderDragon getEntity() {
return (EnderDragon) super.getEntity();
}
/**
* @return The fireball being shot
*/
DragonFireball getFireball();
public DragonFireball getFireball() {
return this.fireball;
}
static HandlerList getHandlerList() {
final class Holder {
private static final HandlerList HANDLER_LIST = new HandlerList();
}
return Holder.HANDLER_LIST;
@Override
public boolean isCancelled() {
return this.cancelled;
}
@Override
public void setCancelled(final boolean cancel) {
this.cancelled = cancel;
}
@Override
public HandlerList getHandlers() {
return HANDLER_LIST;
}
public static HandlerList getHandlerList() {
return HANDLER_LIST;
}
}
@@ -28,6 +28,8 @@ import org.bukkit.entity.Player;
import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList;
import org.bukkit.event.entity.EntityEvent;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Fired when an Enderman determines if it should attack a player or not.
@@ -35,7 +37,19 @@ import org.bukkit.event.entity.EntityEvent;
* Starts off cancelled if the player is wearing a pumpkin head or is not looking
* at the Enderman, according to Vanilla rules.
*/
public interface EndermanAttackPlayerEvent extends EntityEvent, Cancellable {
@NullMarked
public class EndermanAttackPlayerEvent extends EntityEvent implements Cancellable {
private static final HandlerList HANDLER_LIST = new HandlerList();
private final Player player;
private boolean cancelled;
@ApiStatus.Internal
public EndermanAttackPlayerEvent(final Enderman entity, final Player player) {
super(entity);
this.player = player;
}
/**
* The enderman considering attacking
@@ -43,20 +57,26 @@ public interface EndermanAttackPlayerEvent extends EntityEvent, Cancellable {
* @return The enderman considering attacking
*/
@Override
Enderman getEntity();
public Enderman getEntity() {
return (Enderman) super.getEntity();
}
/**
* The player the Enderman is considering attacking
*
* @return The player the Enderman is considering attacking
*/
Player getPlayer();
public Player getPlayer() {
return this.player;
}
/**
* @return If cancelled, the enderman will not attack
*/
@Override
boolean isCancelled();
public boolean isCancelled() {
return this.cancelled;
}
/**
* {@inheritDoc}
@@ -64,12 +84,16 @@ public interface EndermanAttackPlayerEvent extends EntityEvent, Cancellable {
* Cancels if the Enderman will attack this player
*/
@Override
void setCancelled(boolean cancel);
public void setCancelled(final boolean cancel) {
this.cancelled = cancel;
}
static HandlerList getHandlerList() {
final class Holder {
private static final HandlerList HANDLER_LIST = new HandlerList();
}
return Holder.HANDLER_LIST;
@Override
public HandlerList getHandlers() {
return HANDLER_LIST;
}
public static HandlerList getHandlerList() {
return HANDLER_LIST;
}
}
@@ -4,18 +4,41 @@ import org.bukkit.entity.Enderman;
import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList;
import org.bukkit.event.entity.EntityEvent;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
public interface EndermanEscapeEvent extends EntityEvent, Cancellable {
@NullMarked
public class EndermanEscapeEvent extends EntityEvent implements Cancellable {
private static final HandlerList HANDLER_LIST = new HandlerList();
private final Reason reason;
private boolean cancelled;
@ApiStatus.Internal
public EndermanEscapeEvent(final Enderman entity, final Reason reason) {
super(entity);
this.reason = reason;
}
@Override
Enderman getEntity();
public Enderman getEntity() {
return (Enderman) super.getEntity();
}
/**
* Gets the reason the enderman is trying to escape.
*
* @return The reason
*/
Reason getReason();
public Reason getReason() {
return this.reason;
}
@Override
public boolean isCancelled() {
return this.cancelled;
}
/**
* Cancels the escape.
@@ -25,16 +48,20 @@ public interface EndermanEscapeEvent extends EntityEvent, Cancellable {
* innate immunities or damage behavior like arrows where the damage never happens.
*/
@Override
void setCancelled(boolean cancel);
static HandlerList getHandlerList() {
final class Holder {
private static final HandlerList HANDLER_LIST = new HandlerList();
}
return Holder.HANDLER_LIST;
public void setCancelled(final boolean cancel) {
this.cancelled = cancel;
}
enum Reason {
@Override
public HandlerList getHandlers() {
return HANDLER_LIST;
}
public static HandlerList getHandlerList() {
return HANDLER_LIST;
}
public enum Reason {
/**
* The enderman has stopped attacking and ran away
*/
@@ -1,28 +1,44 @@
package com.destroystokyo.paper.event.entity;
import org.bukkit.World;
import org.bukkit.entity.Entity;
import org.bukkit.event.HandlerList;
import org.bukkit.event.entity.CreatureSpawnEvent;
import org.bukkit.event.entity.EntityEvent;
import org.bukkit.event.world.WorldEvent;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Fired any time an entity is being added to the world for any reason (including a chunk loading).
* <p>
* Not to be confused with {@link CreatureSpawnEvent}
*/
public interface EntityAddToWorldEvent extends EntityEvent, WorldEvent {
@NullMarked
public class EntityAddToWorldEvent extends EntityEvent {
private static final HandlerList HANDLER_LIST = new HandlerList();
private final World world;
@ApiStatus.Internal
public EntityAddToWorldEvent(final Entity entity, final World world) {
super(entity);
this.world = world;
}
/**
* @return The world that the entity is being added to
*/
@Override
World getWorld();
public World getWorld() {
return this.world;
}
static HandlerList getHandlerList() {
final class Holder {
private static final HandlerList HANDLER_LIST = new HandlerList();
}
return Holder.HANDLER_LIST;
@Override
public HandlerList getHandlers() {
return HANDLER_LIST;
}
public static HandlerList getHandlerList() {
return HANDLER_LIST;
}
}
@@ -4,21 +4,47 @@ import org.bukkit.entity.LivingEntity;
import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList;
import org.bukkit.event.entity.EntityEvent;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Called when an entity jumps
* <p>
* Cancelling the event will stop the entity from jumping
*/
public interface EntityJumpEvent extends EntityEvent, Cancellable {
@NullMarked
public class EntityJumpEvent extends EntityEvent implements Cancellable {
private static final HandlerList HANDLER_LIST = new HandlerList();
private boolean cancelled;
@ApiStatus.Internal
public EntityJumpEvent(final LivingEntity entity) {
super(entity);
}
@Override
LivingEntity getEntity();
public LivingEntity getEntity() {
return (LivingEntity) super.getEntity();
}
static HandlerList getHandlerList() {
final class Holder {
private static final HandlerList HANDLER_LIST = new HandlerList();
}
return Holder.HANDLER_LIST;
@Override
public boolean isCancelled() {
return this.cancelled;
}
@Override
public void setCancelled(final boolean cancel) {
this.cancelled = cancel;
}
@Override
public HandlerList getHandlers() {
return HANDLER_LIST;
}
public static HandlerList getHandlerList() {
return HANDLER_LIST;
}
}
@@ -1,33 +1,52 @@
package com.destroystokyo.paper.event.entity;
import io.papermc.paper.event.entity.EntityKnockbackEvent;
import io.papermc.paper.event.entity.EntityPushedByEntityAttackEvent;
import org.bukkit.entity.Entity;
import org.bukkit.entity.LivingEntity;
import org.bukkit.util.Vector;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Fired when an Entity is knocked back by the hit of another Entity. The acceleration
* vector can be modified. If this event is cancelled, the entity is not knocked back.
*/
public interface EntityKnockbackByEntityEvent extends EntityPushedByEntityAttackEvent {
@NullMarked
public class EntityKnockbackByEntityEvent extends EntityPushedByEntityAttackEvent {
private final float knockbackStrength;
@ApiStatus.Internal
public EntityKnockbackByEntityEvent(final LivingEntity entity, final Entity hitBy, final EntityKnockbackEvent.Cause cause, final float knockbackStrength, final Vector knockback) {
super(entity, cause, hitBy, knockback);
this.knockbackStrength = knockbackStrength;
}
/**
* @return the entity which was knocked back
*/
@Override
LivingEntity getEntity();
public LivingEntity getEntity() {
return (LivingEntity) super.getEntity();
}
/**
* @return the original knockback strength.
* @apiNote this value doesn't necessarily relate to {@link #getKnockback()}.
*/
@ApiStatus.Obsolete(since = "1.20.6")
float getKnockbackStrength();
public float getKnockbackStrength() {
return this.knockbackStrength;
}
/**
* Gets the causing entity. Same as {@link #getPushedBy()}.
*
* @return the Entity which hit
*/
Entity getHitBy();
public Entity getHitBy() {
return super.getPushedBy();
}
}
@@ -5,6 +5,8 @@ import org.bukkit.entity.Entity;
import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList;
import org.bukkit.event.entity.EntityEvent;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
import org.jspecify.annotations.Nullable;
/**
@@ -13,7 +15,21 @@ import org.jspecify.annotations.Nullable;
* This event does not fire for the entities actual movement. Only when it
* is choosing to start moving to a location.
*/
public interface EntityPathfindEvent extends EntityEvent, Cancellable {
@NullMarked
public class EntityPathfindEvent extends EntityEvent implements Cancellable {
private static final HandlerList HANDLER_LIST = new HandlerList();
private final @Nullable Entity targetEntity;
private final Location location;
private boolean cancelled;
@ApiStatus.Internal
public EntityPathfindEvent(final Entity entity, final Location location, final @Nullable Entity targetEntity) {
super(entity);
this.targetEntity = targetEntity;
this.location = location;
}
/**
* The Entity that is pathfinding.
@@ -21,7 +37,9 @@ public interface EntityPathfindEvent extends EntityEvent, Cancellable {
* @return The Entity that is pathfinding.
*/
@Override
Entity getEntity();
public Entity getEntity() {
return this.entity;
}
/**
* If the Entity is trying to pathfind to an entity, this is the entity in relation.
@@ -30,34 +48,37 @@ public interface EntityPathfindEvent extends EntityEvent, Cancellable {
*
* @return The entity target or {@code null}
*/
@Nullable Entity getTargetEntity();
/**
* The Location of where the entity is about to move to.
* <br>
* Note that if the target happened to of been an entity
*
* @return Location of where the entity is trying to pathfind to.
*/
Location getTargetLocation();
/**
* The Location of where the entity is about to move to.
* <br>
* Note that if the target happened to of been an entity
*
* @return Location of where the entity is trying to pathfind to.
* @deprecated use {@link #getTargetLocation()}
*/
@Deprecated(forRemoval = true)
default Location getLoc() {
return this.getTargetLocation();
public @Nullable Entity getTargetEntity() {
return this.targetEntity;
}
static HandlerList getHandlerList() {
final class Holder {
private static final HandlerList HANDLER_LIST = new HandlerList();
}
return Holder.HANDLER_LIST;
/**
* The Location of where the entity is about to move to.
* <br>
* Note that if the target happened to of been an entity
*
* @return Location of where the entity is trying to pathfind to.
*/
public Location getLoc() {
return this.location.clone();
}
@Override
public boolean isCancelled() {
return this.cancelled;
}
@Override
public void setCancelled(final boolean cancel) {
this.cancelled = cancel;
}
@Override
public HandlerList getHandlers() {
return HANDLER_LIST;
}
public static HandlerList getHandlerList() {
return HANDLER_LIST;
}
}
@@ -1,26 +1,42 @@
package com.destroystokyo.paper.event.entity;
import org.bukkit.World;
import org.bukkit.entity.Entity;
import org.bukkit.event.HandlerList;
import org.bukkit.event.entity.EntityEvent;
import org.bukkit.event.world.WorldEvent;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Fired any time an entity is being removed from a world for any reason (including a chunk unloading).
* Note: The entity is updated prior to this event being called, as such, the entity's world may not be equal to {@link #getWorld()}.
*/
public interface EntityRemoveFromWorldEvent extends EntityEvent, WorldEvent {
@NullMarked
public class EntityRemoveFromWorldEvent extends EntityEvent {
private static final HandlerList HANDLER_LIST = new HandlerList();
private final World world;
@ApiStatus.Internal
public EntityRemoveFromWorldEvent(final Entity entity, final World world) {
super(entity);
this.world = world;
}
/**
* @return The world that the entity is being removed from
*/
@Override
World getWorld();
public World getWorld() {
return this.world;
}
static HandlerList getHandlerList() {
final class Holder {
private static final HandlerList HANDLER_LIST = new HandlerList();
}
return Holder.HANDLER_LIST;
@Override
public HandlerList getHandlers() {
return HANDLER_LIST;
}
public static HandlerList getHandlerList() {
return HANDLER_LIST;
}
}
@@ -1,17 +1,33 @@
package com.destroystokyo.paper.event.entity;
import org.bukkit.Location;
import org.bukkit.block.EndGateway;
import org.bukkit.entity.Entity;
import org.bukkit.event.entity.EntityTeleportEvent;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Fired any time an entity attempts to teleport in an end gateway
*/
public interface EntityTeleportEndGatewayEvent extends EntityTeleportEvent {
@NullMarked
public class EntityTeleportEndGatewayEvent extends EntityTeleportEvent {
private final EndGateway gateway;
@ApiStatus.Internal
public EntityTeleportEndGatewayEvent(final Entity entity, final Location from, final Location to, final EndGateway gateway) {
super(entity, from, to);
this.gateway = gateway;
}
/**
* The gateway triggering the teleport
*
* @return EndGateway used
*/
EndGateway getGateway();
public EndGateway getGateway() {
return this.gateway;
}
}
@@ -1,35 +1,65 @@
package com.destroystokyo.paper.event.entity;
import java.util.Collections;
import org.bukkit.entity.Entity;
import org.bukkit.entity.LightningStrike;
import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList;
import org.bukkit.event.entity.EntityTransformEvent;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Fired when lightning strikes an entity
*/
public interface EntityZapEvent extends EntityTransformEvent {
@NullMarked
public class EntityZapEvent extends EntityTransformEvent implements Cancellable {
private static final HandlerList HANDLER_LIST = new HandlerList();
private final LightningStrike bolt;
private boolean cancelled;
@ApiStatus.Internal
public EntityZapEvent(final Entity entity, final LightningStrike bolt, final Entity replacementEntity) {
super(entity, Collections.singletonList(replacementEntity), TransformReason.LIGHTNING);
this.bolt = bolt;
}
/**
* Gets the lightning bolt that is striking the entity.
*
* @return The lightning bolt responsible for this event
*/
LightningStrike getBolt();
public LightningStrike getBolt() {
return this.bolt;
}
/**
* Gets the entity that will replace the struck entity.
*
* @return The entity that will replace the struck entity
*/
default Entity getReplacementEntity() {
return this.getTransformedEntity();
public Entity getReplacementEntity() {
return super.getTransformedEntity();
}
static HandlerList getHandlerList() {
final class Holder {
private static final HandlerList HANDLER_LIST = new HandlerList();
}
return Holder.HANDLER_LIST;
@Override
public boolean isCancelled() {
return this.cancelled;
}
@Override
public void setCancelled(final boolean cancel) {
this.cancelled = cancel;
}
@Override
public HandlerList getHandlers() {
return HANDLER_LIST;
}
public static HandlerList getHandlerList() {
return HANDLER_LIST;
}
}
@@ -27,32 +27,62 @@ import org.bukkit.entity.ExperienceOrb;
import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList;
import org.bukkit.event.entity.EntityEvent;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Fired anytime the server is about to merge 2 experience orbs into one
*/
public interface ExperienceOrbMergeEvent extends EntityEvent, Cancellable {
@NullMarked
public class ExperienceOrbMergeEvent extends EntityEvent implements Cancellable {
private static final HandlerList HANDLER_LIST = new HandlerList();
private final ExperienceOrb mergeTarget;
private final ExperienceOrb mergeSource;
private boolean cancelled;
@ApiStatus.Internal
public ExperienceOrbMergeEvent(final ExperienceOrb mergeTarget, final ExperienceOrb mergeSource) {
super(mergeTarget);
this.mergeTarget = mergeTarget;
this.mergeSource = mergeSource;
}
/**
* {@return the orb that will absorb the other experience orb}
* @return The orb that will absorb the other experience orb
*/
ExperienceOrb getMergeTarget();
public ExperienceOrb getMergeTarget() {
return this.mergeTarget;
}
/**
* {@return the orb that is subject to being removed and merged into the target orb}
* @return The orb that is subject to being removed and merged into the target orb
*/
ExperienceOrb getMergeSource();
public ExperienceOrb getMergeSource() {
return this.mergeSource;
}
@Override
public boolean isCancelled() {
return this.cancelled;
}
/**
* @param cancel {@code true} if you wish to cancel this event, and prevent the orbs from merging
*/
@Override
void setCancelled(boolean cancel);
public void setCancelled(final boolean cancel) {
this.cancelled = cancel;
}
static HandlerList getHandlerList() {
final class Holder {
private static final HandlerList HANDLER_LIST = new HandlerList();
}
return Holder.HANDLER_LIST;
@Override
public HandlerList getHandlers() {
return HANDLER_LIST;
}
public static HandlerList getHandlerList() {
return HANDLER_LIST;
}
}
@@ -1,16 +1,32 @@
package com.destroystokyo.paper.event.entity;
import org.bukkit.Location;
import org.bukkit.entity.Entity;
import org.bukkit.entity.EntityType;
import org.bukkit.event.entity.CreatureSpawnEvent;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Called when a phantom is spawned for an exhausted player
*/
public interface PhantomPreSpawnEvent extends PreCreatureSpawnEvent {
@NullMarked
public class PhantomPreSpawnEvent extends PreCreatureSpawnEvent {
private final Entity entity;
@ApiStatus.Internal
public PhantomPreSpawnEvent(final Location location, final Entity entity, final CreatureSpawnEvent.SpawnReason reason) {
super(location, EntityType.PHANTOM, reason);
this.entity = entity;
}
/**
* Get the entity this phantom is spawning for
*
* @return the Entity
*/
Entity getSpawningEntity();
public Entity getSpawningEntity() {
return this.entity;
}
}
@@ -1,40 +1,65 @@
package com.destroystokyo.paper.event.entity;
import org.bukkit.entity.Player;
import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList;
import org.bukkit.event.player.PlayerEvent;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Fired when the server is calculating what chunks to try to spawn monsters in every Monster Spawn Tick event
*/
public interface PlayerNaturallySpawnCreaturesEvent extends PlayerEvent, Cancellable {
@NullMarked
public class PlayerNaturallySpawnCreaturesEvent extends PlayerEvent implements Cancellable {
private static final HandlerList HANDLER_LIST = new HandlerList();
private byte radius;
private boolean cancelled;
@ApiStatus.Internal
public PlayerNaturallySpawnCreaturesEvent(final Player player, final byte radius) {
super(player);
this.radius = radius;
}
/**
* @return The radius of chunks around this player to be included in natural spawn selection
*/
byte getSpawnRadius();
public byte getSpawnRadius() {
return this.radius;
}
/**
* @param radius The radius of chunks around this player to be included in natural spawn selection
*/
void setSpawnRadius(byte radius);
public void setSpawnRadius(final byte radius) {
this.radius = radius;
}
/**
* @return If this player's chunks will be excluded from natural spawns
*/
@Override
boolean isCancelled();
public boolean isCancelled() {
return this.cancelled;
}
/**
* @param cancel {@code true} if you wish to cancel this event, and not include this player's chunks for natural spawning
*/
@Override
void setCancelled(boolean cancel);
public void setCancelled(final boolean cancel) {
this.cancelled = cancel;
}
static HandlerList getHandlerList() {
final class Holder {
private static final HandlerList HANDLER_LIST = new HandlerList();
}
return Holder.HANDLER_LIST;
@Override
public HandlerList getHandlers() {
return HANDLER_LIST;
}
public static HandlerList getHandlerList() {
return HANDLER_LIST;
}
}
@@ -6,6 +6,8 @@ import org.bukkit.event.Cancellable;
import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;
import org.bukkit.event.entity.CreatureSpawnEvent;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* WARNING: This event only fires for a limited number of cases, and not for every case that {@link CreatureSpawnEvent} does.
@@ -17,27 +19,52 @@ import org.bukkit.event.entity.CreatureSpawnEvent;
* Currently: NATURAL and SPAWNER based reasons. <!-- Please submit a Pull Request for future additions. -->
* Also, Plugins that replace Entity Registrations with their own custom entities might not fire this event.
*/
public interface PreCreatureSpawnEvent extends Event, Cancellable {
@NullMarked
public class PreCreatureSpawnEvent extends Event implements Cancellable {
private static final HandlerList HANDLER_LIST = new HandlerList();
private final Location location;
private final EntityType type;
private final CreatureSpawnEvent.SpawnReason reason;
private boolean shouldAbortSpawn;
private boolean cancelled;
@ApiStatus.Internal
public PreCreatureSpawnEvent(final Location location, final EntityType type, final CreatureSpawnEvent.SpawnReason reason) {
this.location = location;
this.type = type;
this.reason = reason;
}
/**
* @return The location this creature is being spawned at
*/
Location getSpawnLocation();
public Location getSpawnLocation() {
return this.location.clone();
}
/**
* @return The type of creature being spawned
*/
EntityType getType();
public EntityType getType() {
return this.type;
}
/**
* @return Reason this creature is spawning (ie, NATURAL vs SPAWNER)
*/
CreatureSpawnEvent.SpawnReason getReason();
public CreatureSpawnEvent.SpawnReason getReason() {
return this.reason;
}
/**
* @return If the spawn process should be aborted vs trying more attempts
*/
boolean shouldAbortSpawn();
public boolean shouldAbortSpawn() {
return this.shouldAbortSpawn;
}
/**
* Set this if you are more blanket blocking all types of these spawns, and wish to abort the spawn process from
@@ -45,13 +72,17 @@ public interface PreCreatureSpawnEvent extends Event, Cancellable {
*
* @param shouldAbortSpawn Set if the spawn process should be aborted vs trying more attempts
*/
void setShouldAbortSpawn(boolean shouldAbortSpawn);
public void setShouldAbortSpawn(final boolean shouldAbortSpawn) {
this.shouldAbortSpawn = shouldAbortSpawn;
}
/**
* @return If the spawn of this creature is cancelled or not
*/
@Override
boolean isCancelled();
public boolean isCancelled() {
return this.cancelled;
}
/**
* Cancelling this event is more efficient than cancelling {@link CreatureSpawnEvent}
@@ -59,12 +90,16 @@ public interface PreCreatureSpawnEvent extends Event, Cancellable {
* @param cancel {@code true} if you wish to cancel this event, and abort the spawn of this creature
*/
@Override
void setCancelled(boolean cancel);
public void setCancelled(final boolean cancel) {
this.cancelled = cancel;
}
static HandlerList getHandlerList() {
final class Holder {
private static final HandlerList HANDLER_LIST = new HandlerList();
}
return Holder.HANDLER_LIST;
@Override
public HandlerList getHandlers() {
return HANDLER_LIST;
}
public static HandlerList getHandlerList() {
return HANDLER_LIST;
}
}
@@ -1,6 +1,10 @@
package com.destroystokyo.paper.event.entity;
import org.bukkit.Location;
import org.bukkit.entity.EntityType;
import org.bukkit.event.entity.CreatureSpawnEvent;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Called before an entity is spawned into a world by a spawner.
@@ -8,7 +12,18 @@ import org.bukkit.Location;
* This only includes the spawner's location and not the full BlockState snapshot for performance reasons.
* If you really need it you have to get the spawner yourself.
*/
public interface PreSpawnerSpawnEvent extends PreCreatureSpawnEvent {
@NullMarked
public class PreSpawnerSpawnEvent extends PreCreatureSpawnEvent {
Location getSpawnerLocation();
private final Location spawnerLocation;
@ApiStatus.Internal
public PreSpawnerSpawnEvent(final Location location, final EntityType type, final Location spawnerLocation) {
super(location, type, CreatureSpawnEvent.SpawnReason.SPAWNER);
this.spawnerLocation = spawnerLocation;
}
public Location getSpawnerLocation() {
return this.spawnerLocation.clone();
}
}
@@ -1,41 +1,76 @@
package com.destroystokyo.paper.event.entity;
import org.bukkit.Warning;
import org.bukkit.entity.Entity;
import org.bukkit.entity.Projectile;
import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList;
import org.bukkit.event.entity.EntityDamageByEntityEvent;
import org.bukkit.event.entity.EntityEvent;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.NotNull;
/**
* Called when a projectile collides with an entity
* <p>
* This event is called <b>before</b> {@link EntityDamageByEntityEvent}, and cancelling it will allow the projectile to continue flying
*
* @deprecated use {@link org.bukkit.event.entity.ProjectileHitEvent} and check if there is a hit entity
* @deprecated Deprecated, use {@link org.bukkit.event.entity.ProjectileHitEvent} and check if there is a hit entity
*/
@Deprecated(since = "1.19.3")
public interface ProjectileCollideEvent extends EntityEvent, Cancellable {
@Warning(propagate = false)
public class ProjectileCollideEvent extends EntityEvent implements Cancellable {
private static final HandlerList HANDLER_LIST = new HandlerList();
@NotNull private final Entity collidedWith;
private boolean cancelled;
@ApiStatus.Internal
public ProjectileCollideEvent(@NotNull Projectile projectile, @NotNull Entity collidedWith) {
super(projectile);
this.collidedWith = collidedWith;
}
/**
* Get the projectile that collided
*
* @return the projectile that collided
*/
@Override
Projectile getEntity();
@NotNull
public Projectile getEntity() {
return (Projectile) super.getEntity();
}
/**
* Get the entity the projectile collided with
*
* @return the entity collided with
*/
Entity getCollidedWith();
@NotNull
public Entity getCollidedWith() {
return this.collidedWith;
}
static HandlerList getHandlerList() {
final class Holder {
private static final HandlerList HANDLER_LIST = new HandlerList();
}
return Holder.HANDLER_LIST;
@Override
public boolean isCancelled() {
return this.cancelled;
}
@Override
public void setCancelled(boolean cancel) {
this.cancelled = cancel;
}
@NotNull
public static HandlerList getHandlerList() {
return HANDLER_LIST;
}
@NotNull
@Override
public HandlerList getHandlers() {
return HANDLER_LIST;
}
}
@@ -6,22 +6,52 @@ import org.bukkit.entity.SkeletonHorse;
import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList;
import org.bukkit.event.entity.EntityEvent;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Event called when a player gets close to a skeleton horse and triggers the lightning trap
*/
public interface SkeletonHorseTrapEvent extends EntityEvent, Cancellable {
@NullMarked
public class SkeletonHorseTrapEvent extends EntityEvent implements Cancellable {
private static final HandlerList HANDLER_LIST = new HandlerList();
private final List<HumanEntity> eligibleHumans;
private boolean cancelled;
@ApiStatus.Internal
public SkeletonHorseTrapEvent(final SkeletonHorse horse, final List<HumanEntity> eligibleHumans) {
super(horse);
this.eligibleHumans = eligibleHumans;
}
@Override
SkeletonHorse getEntity();
public SkeletonHorse getEntity() {
return (SkeletonHorse) super.getEntity();
}
List<HumanEntity> getEligibleHumans();
public List<HumanEntity> getEligibleHumans() {
return this.eligibleHumans;
}
static HandlerList getHandlerList() {
final class Holder {
private static final HandlerList HANDLER_LIST = new HandlerList();
}
return Holder.HANDLER_LIST;
@Override
public boolean isCancelled() {
return this.cancelled;
}
@Override
public void setCancelled(final boolean cancel) {
this.cancelled = cancel;
}
@Override
public HandlerList getHandlers() {
return HANDLER_LIST;
}
public static HandlerList getHandlerList() {
return HANDLER_LIST;
}
}
@@ -1,24 +1,41 @@
package com.destroystokyo.paper.event.entity;
import org.bukkit.entity.AbstractCubeMob;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Fired when a Slime decides to change its facing direction.
* <p>
* This event does not fire for the entity's actual movement. Only when it
* is choosing to change direction.
*/
public interface SlimeChangeDirectionEvent extends SlimePathfindEvent {
@NullMarked
public class SlimeChangeDirectionEvent extends SlimePathfindEvent {
private float yaw;
@ApiStatus.Internal
public SlimeChangeDirectionEvent(final AbstractCubeMob cubeMob, final float yaw) {
super(cubeMob);
this.yaw = yaw;
}
/**
* Get the new chosen yaw
*
* @return Chosen yaw
*/
float getNewYaw();
public float getNewYaw() {
return this.yaw;
}
/**
* Set the new chosen yaw
*
* @param yaw Chosen yaw
*/
void setNewYaw(float yaw);
public void setNewYaw(final float yaw) {
this.yaw = yaw;
}
}
@@ -4,6 +4,8 @@ import org.bukkit.entity.AbstractCubeMob;
import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList;
import org.bukkit.event.entity.EntityEvent;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Fired when a Slime decides to start pathfinding.
@@ -11,7 +13,17 @@ import org.bukkit.event.entity.EntityEvent;
* This event does not fire for the entity's actual movement. Only when it
* is choosing to start moving.
*/
public interface SlimePathfindEvent extends EntityEvent, Cancellable {
@NullMarked
public class SlimePathfindEvent extends EntityEvent implements Cancellable {
private static final HandlerList HANDLER_LIST = new HandlerList();
private boolean cancelled;
@ApiStatus.Internal
public SlimePathfindEvent(final AbstractCubeMob cubeMob) {
super(cubeMob);
}
/**
* The Slime that is pathfinding.
@@ -19,12 +31,26 @@ public interface SlimePathfindEvent extends EntityEvent, Cancellable {
* @return The Slime that is pathfinding.
*/
@Override
AbstractCubeMob getEntity();
public AbstractCubeMob getEntity() {
return (AbstractCubeMob) super.getEntity();
}
static HandlerList getHandlerList() {
final class Holder {
private static final HandlerList HANDLER_LIST = new HandlerList();
}
return Holder.HANDLER_LIST;
@Override
public boolean isCancelled() {
return this.cancelled;
}
@Override
public void setCancelled(final boolean cancel) {
this.cancelled = cancel;
}
@Override
public HandlerList getHandlers() {
return HANDLER_LIST;
}
public static HandlerList getHandlerList() {
return HANDLER_LIST;
}
}
@@ -1,10 +1,20 @@
package com.destroystokyo.paper.event.entity;
import org.bukkit.entity.AbstractCubeMob;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Fired when a Slime decides to start jumping while swimming in water/lava.
* <p>
* This event does not fire for the entity's actual movement. Only when it
* is choosing to start jumping.
*/
public interface SlimeSwimEvent extends SlimeWanderEvent {
@NullMarked
public class SlimeSwimEvent extends SlimeWanderEvent {
@ApiStatus.Internal
public SlimeSwimEvent(final AbstractCubeMob cubeMob) {
super(cubeMob);
}
}
@@ -1,6 +1,9 @@
package com.destroystokyo.paper.event.entity;
import org.bukkit.entity.AbstractCubeMob;
import org.bukkit.entity.LivingEntity;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Fired when a Slime decides to change direction to target a LivingEntity.
@@ -8,12 +11,23 @@ import org.bukkit.entity.LivingEntity;
* This event does not fire for the entity's actual movement. Only when it
* is choosing to start moving.
*/
public interface SlimeTargetLivingEntityEvent extends SlimePathfindEvent {
@NullMarked
public class SlimeTargetLivingEntityEvent extends SlimePathfindEvent {
private final LivingEntity target;
@ApiStatus.Internal
public SlimeTargetLivingEntityEvent(final AbstractCubeMob cubeMob, final LivingEntity target) {
super(cubeMob);
this.target = target;
}
/**
* Get the targeted entity
*
* @return Targeted entity
*/
LivingEntity getTarget();
public LivingEntity getTarget() {
return this.target;
}
}
@@ -1,10 +1,20 @@
package com.destroystokyo.paper.event.entity;
import org.bukkit.entity.AbstractCubeMob;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Fired when a Slime decides to start wandering.
* <p>
* This event does not fire for the entity's actual movement. Only when it
* is choosing to start moving.
*/
public interface SlimeWanderEvent extends SlimePathfindEvent {
@NullMarked
public class SlimeWanderEvent extends SlimePathfindEvent {
@ApiStatus.Internal
public SlimeWanderEvent(final AbstractCubeMob cubeMob) {
super(cubeMob);
}
}
@@ -1,39 +1,54 @@
package com.destroystokyo.paper.event.entity;
import com.google.common.base.Preconditions;
import org.bukkit.entity.Egg;
import org.bukkit.entity.EntityType;
import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;
import org.bukkit.event.entity.EntityEvent;
import org.checkerframework.checker.index.qual.NonNegative;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Called when a thrown egg might hatch.
* <p>
* This event fires for all thrown eggs that may hatch, players, dispensers, etc.
*/
public interface ThrownEggHatchEvent extends EntityEvent {
@NullMarked
public class ThrownEggHatchEvent extends Event {
private static final HandlerList HANDLER_LIST = new HandlerList();
private final Egg egg;
private boolean hatching;
private byte numHatches;
private EntityType hatchType;
@ApiStatus.Internal
public ThrownEggHatchEvent(final Egg egg, final boolean hatching, final byte numHatches, final EntityType hatchingType) {
this.egg = egg;
this.hatching = hatching;
this.numHatches = numHatches;
this.hatchType = hatchingType;
}
/**
* Gets the egg involved in this event.
*
* @return the egg involved in this event
* @deprecated use {@link #getEntity()}
*/
@Deprecated(forRemoval = true)
default Egg getEgg() {
return this.getEntity();
public Egg getEgg() {
return this.egg;
}
@Override
Egg getEntity();
/**
* Gets whether the egg is hatching or not. Will be what the server
* would've done without interaction.
*
* @return boolean Whether the egg is going to hatch or not
*/
boolean isHatching();
public boolean isHatching() {
return this.hatching;
}
/**
* Sets whether the egg will hatch or not.
@@ -41,7 +56,28 @@ public interface ThrownEggHatchEvent extends EntityEvent {
* @param hatching {@code true} if you want the egg to hatch, {@code false} if you want it
* not to
*/
void setHatching(boolean hatching);
public void setHatching(final boolean hatching) {
this.hatching = hatching;
}
/**
* Get the type of the mob being hatched ({@link EntityType#CHICKEN} by default)
*
* @return The type of the mob being hatched by the egg
*/
public EntityType getHatchingType() {
return this.hatchType;
}
/**
* Change the type of mob being hatched by the egg
*
* @param hatchType The type of the mob being hatched by the egg
*/
public void setHatchingType(final EntityType hatchType) {
Preconditions.checkArgument(hatchType.isSpawnable(), "Can't spawn that entity type from an egg!");
this.hatchType = hatchType;
}
/**
* Get the number of mob hatches from the egg. By default, the number will
@@ -54,7 +90,9 @@ public interface ThrownEggHatchEvent extends EntityEvent {
*
* @return The number of mobs going to be hatched by the egg
*/
@NonNegative byte getNumHatches();
public byte getNumHatches() {
return this.numHatches;
}
/**
* Change the number of mobs coming out of the hatched egg
@@ -64,26 +102,16 @@ public interface ThrownEggHatchEvent extends EntityEvent {
*
* @param numHatches The number of mobs coming out of the egg
*/
void setNumHatches(@NonNegative byte numHatches);
public void setNumHatches(final byte numHatches) {
this.numHatches = numHatches;
}
/**
* Get the type of the mob being hatched ({@link EntityType#CHICKEN} by default)
*
* @return The type of the mob being hatched by the egg
*/
EntityType getHatchingType();
@Override
public HandlerList getHandlers() {
return HANDLER_LIST;
}
/**
* Change the type of mob being hatched by the egg
*
* @param hatchType The type of the mob being hatched by the egg
*/
void setHatchingType(EntityType hatchType);
static HandlerList getHandlerList() {
final class Holder {
private static final HandlerList HANDLER_LIST = new HandlerList();
}
return Holder.HANDLER_LIST;
public static HandlerList getHandlerList() {
return HANDLER_LIST;
}
}
@@ -4,11 +4,23 @@ import org.bukkit.entity.Turtle;
import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList;
import org.bukkit.event.entity.EntityEvent;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Fired when a Turtle decides to go home
*/
public interface TurtleGoHomeEvent extends EntityEvent, Cancellable {
@NullMarked
public class TurtleGoHomeEvent extends EntityEvent implements Cancellable {
private static final HandlerList HANDLER_LIST = new HandlerList();
private boolean cancelled;
@ApiStatus.Internal
public TurtleGoHomeEvent(final Turtle turtle) {
super(turtle);
}
/**
* The turtle going home
@@ -16,12 +28,26 @@ public interface TurtleGoHomeEvent extends EntityEvent, Cancellable {
* @return The turtle
*/
@Override
Turtle getEntity();
public Turtle getEntity() {
return (Turtle) super.getEntity();
}
static HandlerList getHandlerList() {
final class Holder {
private static final HandlerList HANDLER_LIST = new HandlerList();
}
return Holder.HANDLER_LIST;
@Override
public boolean isCancelled() {
return this.cancelled;
}
@Override
public void setCancelled(final boolean cancel) {
this.cancelled = cancel;
}
@Override
public HandlerList getHandlers() {
return HANDLER_LIST;
}
public static HandlerList getHandlerList() {
return HANDLER_LIST;
}
}
@@ -5,12 +5,28 @@ import org.bukkit.entity.Turtle;
import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList;
import org.bukkit.event.entity.EntityEvent;
import org.checkerframework.common.value.qual.IntRange;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Fired when a Turtle lays eggs
*/
public interface TurtleLayEggEvent extends EntityEvent, Cancellable {
@NullMarked
public class TurtleLayEggEvent extends EntityEvent implements Cancellable {
private static final HandlerList HANDLER_LIST = new HandlerList();
private final Location location;
private int eggCount;
private boolean cancelled;
@ApiStatus.Internal
public TurtleLayEggEvent(final Turtle turtle, final Location location, final int eggCount) {
super(turtle);
this.location = location;
this.eggCount = eggCount;
}
/**
* The turtle laying the eggs
@@ -18,33 +34,57 @@ public interface TurtleLayEggEvent extends EntityEvent, Cancellable {
* @return The turtle
*/
@Override
Turtle getEntity();
public Turtle getEntity() {
return (Turtle) super.getEntity();
}
/**
* Get the location where the eggs are being laid
*
* @return Location of eggs
*/
Location getLocation();
public Location getLocation() {
return this.location.clone();
}
/**
* Get the number of eggs being laid
*
* @return Number of eggs
*/
@IntRange(from = 1, to = 4) int getEggCount();
public int getEggCount() {
return this.eggCount;
}
/**
* Set the number of eggs being laid
*
* @param eggCount Number of eggs
*/
void setEggCount(@IntRange(from = 0, to = 4) int eggCount);
static HandlerList getHandlerList() {
final class Holder {
private static final HandlerList HANDLER_LIST = new HandlerList();
public void setEggCount(final int eggCount) {
if (eggCount < 1) {
this.cancelled = true;
return;
}
return Holder.HANDLER_LIST;
this.eggCount = Math.min(eggCount, 4);
}
@Override
public boolean isCancelled() {
return this.cancelled;
}
@Override
public void setCancelled(final boolean cancel) {
this.cancelled = cancel;
}
@Override
public HandlerList getHandlers() {
return HANDLER_LIST;
}
public static HandlerList getHandlerList() {
return HANDLER_LIST;
}
}
@@ -5,11 +5,25 @@ import org.bukkit.entity.Turtle;
import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList;
import org.bukkit.event.entity.EntityEvent;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Fired when a Turtle starts digging to lay eggs
*/
public interface TurtleStartDiggingEvent extends EntityEvent, Cancellable {
@NullMarked
public class TurtleStartDiggingEvent extends EntityEvent implements Cancellable {
private static final HandlerList HANDLER_LIST = new HandlerList();
private final Location location;
private boolean cancelled;
@ApiStatus.Internal
public TurtleStartDiggingEvent(final Turtle turtle, final Location location) {
super(turtle);
this.location = location;
}
/**
* The turtle digging
@@ -17,19 +31,35 @@ public interface TurtleStartDiggingEvent extends EntityEvent, Cancellable {
* @return The turtle
*/
@Override
Turtle getEntity();
public Turtle getEntity() {
return (Turtle) super.getEntity();
}
/**
* Get the location where the turtle is digging
*
* @return Location where digging
*/
Location getLocation();
public Location getLocation() {
return this.location.clone();
}
static HandlerList getHandlerList() {
final class Holder {
private static final HandlerList HANDLER_LIST = new HandlerList();
}
return Holder.HANDLER_LIST;
@Override
public boolean isCancelled() {
return this.cancelled;
}
@Override
public void setCancelled(final boolean cancel) {
this.cancelled = cancel;
}
@Override
public HandlerList getHandlers() {
return HANDLER_LIST;
}
public static HandlerList getHandlerList() {
return HANDLER_LIST;
}
}
@@ -5,38 +5,67 @@ import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList;
import org.bukkit.event.entity.EntityEvent;
import org.bukkit.inventory.ItemStack;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
import org.jspecify.annotations.Nullable;
/**
* Fired when a witch consumes the potion in their hand to buff themselves.
*/
public interface WitchConsumePotionEvent extends EntityEvent, Cancellable {
@NullMarked
public class WitchConsumePotionEvent extends EntityEvent implements Cancellable {
private static final HandlerList HANDLER_LIST = new HandlerList();
private @Nullable ItemStack potion;
private boolean cancelled;
@ApiStatus.Internal
public WitchConsumePotionEvent(final Witch witch, final @Nullable ItemStack potion) {
super(witch);
this.potion = potion;
}
@Override
Witch getEntity();
public Witch getEntity() {
return (Witch) super.getEntity();
}
/**
* @return the potion the witch will consume and have the effects applied.
*/
@Nullable ItemStack getPotion();
public @Nullable ItemStack getPotion() {
return this.potion;
}
/**
* Sets the potion to be consumed and applied to the witch.
*
* @param potion The potion
*/
void setPotion(@Nullable ItemStack potion);
public void setPotion(final @Nullable ItemStack potion) {
this.potion = potion != null ? potion.clone() : null;
}
/**
* @return Event was cancelled or potion was {@code null}
*/
@Override
boolean isCancelled();
public boolean isCancelled() {
return this.cancelled || this.potion == null;
}
static HandlerList getHandlerList() {
final class Holder {
private static final HandlerList HANDLER_LIST = new HandlerList();
}
return Holder.HANDLER_LIST;
@Override
public void setCancelled(final boolean cancel) {
this.cancelled = cancel;
}
@Override
public HandlerList getHandlers() {
return HANDLER_LIST;
}
public static HandlerList getHandlerList() {
return HANDLER_LIST;
}
}
@@ -5,29 +5,61 @@ import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList;
import org.bukkit.event.entity.EntityEvent;
import org.bukkit.inventory.ItemStack;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
import org.jspecify.annotations.Nullable;
public interface WitchReadyPotionEvent extends EntityEvent, Cancellable {
@NullMarked
public class WitchReadyPotionEvent extends EntityEvent implements Cancellable {
private static final HandlerList HANDLER_LIST = new HandlerList();
private @Nullable ItemStack potion;
private boolean cancelled;
@ApiStatus.Internal
public WitchReadyPotionEvent(final Witch witch, final @Nullable ItemStack potion) {
super(witch);
this.potion = potion;
}
@Override
Witch getEntity();
public Witch getEntity() {
return (Witch) super.getEntity();
}
/**
* @return the potion the witch is readying to use
*/
@Nullable ItemStack getPotion();
public @Nullable ItemStack getPotion() {
return this.potion;
}
/**
* Sets the potion the which is going to hold and use
*
* @param potion The potion
*/
void setPotion(@Nullable ItemStack potion);
public void setPotion(final @Nullable ItemStack potion) {
this.potion = potion != null ? potion.clone() : null;
}
static HandlerList getHandlerList() {
final class Holder {
private static final HandlerList HANDLER_LIST = new HandlerList();
}
return Holder.HANDLER_LIST;
@Override
public boolean isCancelled() {
return this.cancelled;
}
@Override
public void setCancelled(final boolean cancel) {
this.cancelled = cancel;
}
@Override
public HandlerList getHandlers() {
return HANDLER_LIST;
}
public static HandlerList getHandlerList() {
return HANDLER_LIST;
}
}
@@ -6,43 +6,76 @@ import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList;
import org.bukkit.event.entity.EntityEvent;
import org.bukkit.inventory.ItemStack;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
import org.jspecify.annotations.Nullable;
/**
* Fired when a witch throws a potion at a player
*/
public interface WitchThrowPotionEvent extends EntityEvent, Cancellable {
@NullMarked
public class WitchThrowPotionEvent extends EntityEvent implements Cancellable {
private static final HandlerList HANDLER_LIST = new HandlerList();
private final LivingEntity target;
private @Nullable ItemStack potion;
private boolean cancelled;
@ApiStatus.Internal
public WitchThrowPotionEvent(final Witch witch, final LivingEntity target, final @Nullable ItemStack potion) {
super(witch);
this.target = target;
this.potion = potion;
}
@Override
Witch getEntity();
public Witch getEntity() {
return (Witch) super.getEntity();
}
/**
* @return The target of the potion
*/
LivingEntity getTarget();
public LivingEntity getTarget() {
return this.target;
}
/**
* @return The potion the witch will throw at a player
*/
@Nullable ItemStack getPotion();
public @Nullable ItemStack getPotion() {
return this.potion;
}
/**
* Sets the potion to be thrown at a player
*
* @param potion The potion
*/
void setPotion(@Nullable ItemStack potion);
public void setPotion(final @Nullable ItemStack potion) {
this.potion = potion != null ? potion.clone() : null;
}
/**
* @return Event was cancelled or potion was {@code null}
*/
@Override
boolean isCancelled();
public boolean isCancelled() {
return this.cancelled || this.potion == null;
}
static HandlerList getHandlerList() {
final class Holder {
private static final HandlerList HANDLER_LIST = new HandlerList();
}
return Holder.HANDLER_LIST;
@Override
public void setCancelled(final boolean cancel) {
this.cancelled = cancel;
}
@Override
public HandlerList getHandlers() {
return HANDLER_LIST;
}
public static HandlerList getHandlerList() {
return HANDLER_LIST;
}
}
@@ -1,4 +0,0 @@
@NullMarked
package com.destroystokyo.paper.event.entity;
import org.jspecify.annotations.NullMarked;
@@ -2,7 +2,11 @@ package com.destroystokyo.paper.event.inventory;
import org.bukkit.Warning;
import org.bukkit.inventory.GrindstoneInventory;
import org.jspecify.annotations.NullMarked;
import org.bukkit.inventory.InventoryView;
import org.bukkit.inventory.ItemStack;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
/**
* Called when an item is put in a slot for grinding in a Grindstone
@@ -10,10 +14,18 @@ import org.jspecify.annotations.NullMarked;
* @deprecated use {@link org.bukkit.event.inventory.PrepareGrindstoneEvent}
*/
@Deprecated(since = "1.16.1")
@Warning
@NullMarked
public interface PrepareGrindstoneEvent extends PrepareResultEvent {
@Warning(propagate = false)
public class PrepareGrindstoneEvent extends PrepareResultEvent {
@ApiStatus.Internal
public PrepareGrindstoneEvent(@NotNull InventoryView inventory, @Nullable ItemStack result) {
super(inventory, result);
}
@NotNull
@Override
GrindstoneInventory getInventory();
public GrindstoneInventory getInventory() {
return (GrindstoneInventory) super.getInventory();
}
}
@@ -1,9 +1,42 @@
package com.destroystokyo.paper.event.inventory;
import org.bukkit.event.inventory.PrepareInventoryResultEvent;
import org.bukkit.inventory.InventoryView;
import org.bukkit.inventory.ItemStack;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
import org.jspecify.annotations.Nullable;
/**
* Called when an item is put in an inventory containing a result slot
*/
public interface PrepareResultEvent extends PrepareInventoryResultEvent {
@NullMarked
public class PrepareResultEvent extends PrepareInventoryResultEvent {
// HandlerList on PrepareInventoryResultEvent to ensure api compat
@ApiStatus.Internal
public PrepareResultEvent(final InventoryView inventory, final @Nullable ItemStack result) {
super(inventory, result);
}
/**
* Get result item, may be {@code null}.
*
* @return result item
*/
@Override
public @Nullable ItemStack getResult() {
return super.getResult();
}
/**
* Set result item, may be {@code null}.
*
* @param result result item
*/
@Override
public void setResult(final @Nullable ItemStack result) {
super.setResult(result);
}
}
@@ -1,31 +1,69 @@
package com.destroystokyo.paper.event.player;
import org.bukkit.Warning;
import org.bukkit.entity.Player;
import org.bukkit.event.HandlerList;
import org.bukkit.event.player.PlayerEvent;
import org.jspecify.annotations.Nullable;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
/**
* @deprecated not called anymore
* @deprecated Not used
*/
@Deprecated(since = "1.16.4", forRemoval = true)
public interface IllegalPacketEvent extends PlayerEvent {
@Warning(value = true, propagate = false)
public class IllegalPacketEvent extends PlayerEvent {
boolean isShouldKick();
private static final HandlerList HANDLER_LIST = new HandlerList();
void setShouldKick(boolean shouldKick);
@Nullable private final String type;
@Nullable private final String exceptionMessage;
@Nullable private String kickMessage;
private boolean shouldKick = true;
@Nullable String getKickMessage();
@ApiStatus.Internal
public IllegalPacketEvent(@NotNull Player player, @Nullable String type, @Nullable String kickMessage, @NotNull Exception e) {
super(player);
this.type = type;
this.kickMessage = kickMessage;
this.exceptionMessage = e.getMessage();
}
void setKickMessage(@Nullable String kickMessage);
public boolean isShouldKick() {
return this.shouldKick;
}
@Nullable String getType();
public void setShouldKick(boolean shouldKick) {
this.shouldKick = shouldKick;
}
@Nullable String getExceptionMessage();
@Nullable
public String getKickMessage() {
return this.kickMessage;
}
static HandlerList getHandlerList() {
final class Holder {
private static final HandlerList HANDLER_LIST = new HandlerList();
}
return Holder.HANDLER_LIST;
public void setKickMessage(@Nullable String kickMessage) {
this.kickMessage = kickMessage;
}
@Nullable
public String getType() {
return this.type;
}
@Nullable
public String getExceptionMessage() {
return this.exceptionMessage;
}
@NotNull
public HandlerList getHandlers() {
return HANDLER_LIST;
}
@NotNull
public static HandlerList getHandlerList() {
return HANDLER_LIST;
}
}
@@ -2,41 +2,79 @@ package com.destroystokyo.paper.event.player;
import org.bukkit.advancement.Advancement;
import org.bukkit.advancement.AdvancementProgress;
import org.bukkit.entity.Player;
import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList;
import org.bukkit.event.player.PlayerEvent;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Called after a player is granted a criteria in an advancement.
* If cancelled the criteria will be revoked.
*/
public interface PlayerAdvancementCriterionGrantEvent extends PlayerEvent, Cancellable {
@NullMarked
public class PlayerAdvancementCriterionGrantEvent extends PlayerEvent implements Cancellable {
private static final HandlerList HANDLER_LIST = new HandlerList();
private final Advancement advancement;
private final String criterion;
private final AdvancementProgress advancementProgress;
private boolean cancelled;
@ApiStatus.Internal
public PlayerAdvancementCriterionGrantEvent(final Player player, final Advancement advancement, final String criterion) {
super(player);
this.advancement = advancement;
this.criterion = criterion;
this.advancementProgress = player.getAdvancementProgress(advancement);
}
/**
* Get the advancement which has been affected.
*
* @return affected advancement
*/
Advancement getAdvancement();
public Advancement getAdvancement() {
return this.advancement;
}
/**
* Get the criterion which has been granted.
*
* @return granted criterion
*/
String getCriterion();
public String getCriterion() {
return this.criterion;
}
/**
* Gets the current {@link AdvancementProgress}.
* Gets the current AdvancementProgress.
*
* @return advancement progress
*/
AdvancementProgress getAdvancementProgress();
public AdvancementProgress getAdvancementProgress() {
return this.advancementProgress;
}
static HandlerList getHandlerList() {
final class Holder {
private static final HandlerList HANDLER_LIST = new HandlerList();
}
return Holder.HANDLER_LIST;
@Override
public boolean isCancelled() {
return this.cancelled;
}
@Override
public void setCancelled(final boolean cancel) {
this.cancelled = cancel;
}
@Override
public HandlerList getHandlers() {
return HANDLER_LIST;
}
public static HandlerList getHandlerList() {
return HANDLER_LIST;
}
}
@@ -2,11 +2,13 @@ package com.destroystokyo.paper.event.player;
import java.util.Set;
import org.bukkit.Material;
import org.bukkit.entity.Player;
import org.bukkit.event.HandlerList;
import org.bukkit.event.player.PlayerEvent;
import org.bukkit.inventory.EquipmentSlot;
import org.bukkit.inventory.ItemStack;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
import org.jspecify.annotations.Nullable;
import static org.bukkit.Material.*;
@@ -17,8 +19,23 @@ import static org.bukkit.Material.*;
* Not currently called for environmental factors though it <strong>MAY BE IN THE FUTURE</strong>
* @apiNote Use {@link io.papermc.paper.event.entity.EntityEquipmentChangedEvent} for all entity equipment changes
*/
@NullMarked
@ApiStatus.Obsolete(since = "1.21.4")
public interface PlayerArmorChangeEvent extends PlayerEvent {
public class PlayerArmorChangeEvent extends PlayerEvent {
private static final HandlerList HANDLER_LIST = new HandlerList();
private final SlotType slotType;
private final ItemStack oldItem;
private final ItemStack newItem;
@ApiStatus.Internal
public PlayerArmorChangeEvent(final Player player, final SlotType slotType, final ItemStack oldItem, final ItemStack newItem) {
super(player);
this.slotType = slotType;
this.oldItem = oldItem;
this.newItem = newItem;
}
/**
* Gets the type of slot being altered.
@@ -27,41 +44,56 @@ public interface PlayerArmorChangeEvent extends PlayerEvent {
* @deprecated {@link SlotType} does not accurately represent what item types are valid in each slot. Use {@link #getSlot()} instead.
*/
@Deprecated(since = "1.21.4")
SlotType getSlotType();
public SlotType getSlotType() {
return this.slotType;
}
/**
* Gets the slot being altered.
*
* @return slot being altered
*/
EquipmentSlot getSlot();
public EquipmentSlot getSlot() {
return switch (this.slotType) {
case HEAD -> EquipmentSlot.HEAD;
case CHEST -> EquipmentSlot.CHEST;
case LEGS -> EquipmentSlot.LEGS;
case FEET -> EquipmentSlot.FEET;
};
}
/**
* Gets the existing item that's being replaced
*
* @return old item
*/
ItemStack getOldItem();
public ItemStack getOldItem() {
return this.oldItem;
}
/**
* Gets the new item that's replacing the old
*
* @return new item
*/
ItemStack getNewItem();
public ItemStack getNewItem() {
return this.newItem;
}
static HandlerList getHandlerList() {
final class Holder {
private static final HandlerList HANDLER_LIST = new HandlerList();
}
return Holder.HANDLER_LIST;
@Override
public HandlerList getHandlers() {
return HANDLER_LIST;
}
public static HandlerList getHandlerList() {
return HANDLER_LIST;
}
/**
* @deprecated {@link SlotType} does not accurately represent what item types are valid in each slot.
*/
@Deprecated(since = "1.21.4")
enum SlotType {
public enum SlotType {
HEAD(COPPER_HELMET, NETHERITE_HELMET, DIAMOND_HELMET, GOLDEN_HELMET, IRON_HELMET, CHAINMAIL_HELMET, LEATHER_HELMET, CARVED_PUMPKIN, PLAYER_HEAD, SKELETON_SKULL, ZOMBIE_HEAD, CREEPER_HEAD, WITHER_SKELETON_SKULL, TURTLE_HELMET, DRAGON_HEAD, PIGLIN_HEAD),
CHEST(COPPER_CHESTPLATE, NETHERITE_CHESTPLATE, DIAMOND_CHESTPLATE, GOLDEN_CHESTPLATE, IRON_CHESTPLATE, CHAINMAIL_CHESTPLATE, LEATHER_CHESTPLATE, ELYTRA),
LEGS(COPPER_LEGGINGS, NETHERITE_LEGGINGS, DIAMOND_LEGGINGS, GOLDEN_LEGGINGS, IRON_LEGGINGS, CHAINMAIL_LEGGINGS, LEATHER_LEGGINGS),
@@ -1,9 +1,13 @@
package com.destroystokyo.paper.event.player;
import org.bukkit.Warning;
import org.bukkit.entity.Entity;
import org.bukkit.entity.Player;
import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList;
import org.bukkit.event.player.PlayerEvent;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Called when processing a player's attack on an entity when the player's attack strength cooldown is reset.
@@ -14,22 +18,42 @@ import org.bukkit.event.player.PlayerEvent;
* Additionally, the cancellation of event is misleading as the client will reset the cooldown manually.
* So there is no way for the server to control this.
*/
@NullMarked
@Deprecated(since = "26.1", forRemoval = true)
public interface PlayerAttackEntityCooldownResetEvent extends PlayerEvent, Cancellable {
@Warning(value = true, propagate = false)
public class PlayerAttackEntityCooldownResetEvent extends PlayerEvent implements Cancellable {
/**
* Returns the entity attacked by the player
*
* @return the entity attacked by the player
*/
Entity getAttackedEntity();
private static final HandlerList HANDLER_LIST = new HandlerList();
private final Entity attackedEntity;
private final float cooledAttackStrength;
private boolean cancelled;
@ApiStatus.Internal
public PlayerAttackEntityCooldownResetEvent(final Player player, final Entity attackedEntity, final float cooledAttackStrength) {
super(player);
this.attackedEntity = attackedEntity;
this.cooledAttackStrength = cooledAttackStrength;
}
/**
* Get the value of the players cooldown attack strength when they initiated the attack
*
* @return returns the original player cooldown value
*/
float getCooledAttackStrength();
public float getCooledAttackStrength() {
return this.cooledAttackStrength;
}
/**
* Returns the entity attacked by the player
*
* @return the entity attacked by the player
*/
public Entity getAttackedEntity() {
return this.attackedEntity;
}
/**
* {@inheritDoc}
@@ -37,7 +61,9 @@ public interface PlayerAttackEntityCooldownResetEvent extends PlayerEvent, Cance
* If an attack cooldown event is cancelled, the players attack strength will remain at the same value instead of being reset.
*/
@Override
boolean isCancelled();
public boolean isCancelled() {
return this.cancelled;
}
/**
* {@inheritDoc}
@@ -45,12 +71,16 @@ public interface PlayerAttackEntityCooldownResetEvent extends PlayerEvent, Cance
* Cancelling this event will prevent the target player from having their cooldown reset from attacking this entity
*/
@Override
void setCancelled(boolean cancel);
public void setCancelled(final boolean cancel) {
this.cancelled = cancel;
}
static HandlerList getHandlerList() {
final class Holder {
private static final HandlerList HANDLER_LIST = new HandlerList();
}
return Holder.HANDLER_LIST;
@Override
public HandlerList getHandlers() {
return HANDLER_LIST;
}
public static HandlerList getHandlerList() {
return HANDLER_LIST;
}
}
@@ -1,57 +1,128 @@
package com.destroystokyo.paper.event.player;
import com.destroystokyo.paper.ClientOption;
import com.destroystokyo.paper.ClientOption.ChatVisibility;
import com.destroystokyo.paper.ClientOption.ParticleVisibility;
import com.destroystokyo.paper.SkinParts;
import java.util.Map;
import org.bukkit.entity.Player;
import org.bukkit.event.HandlerList;
import org.bukkit.event.player.PlayerEvent;
import org.bukkit.inventory.MainHand;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Called when the player changes their client settings
*/
public interface PlayerClientOptionsChangeEvent extends PlayerEvent {
@NullMarked
public class PlayerClientOptionsChangeEvent extends PlayerEvent {
String getLocale();
private static final HandlerList HANDLER_LIST = new HandlerList();
boolean hasLocaleChanged();
private final String locale;
private final int viewDistance;
private final ChatVisibility chatVisibility;
private final boolean chatColors;
private final SkinParts skinparts;
private final MainHand mainHand;
private final boolean allowsServerListings;
private final boolean textFilteringEnabled;
private final ParticleVisibility particleVisibility;
int getViewDistance();
@ApiStatus.Internal
public PlayerClientOptionsChangeEvent(final Player player, final Map<ClientOption<?>, ?> options) {
super(player);
boolean hasViewDistanceChanged();
this.locale = (String) options.get(ClientOption.LOCALE);
this.viewDistance = (int) options.get(ClientOption.VIEW_DISTANCE);
this.chatVisibility = (ChatVisibility) options.get(ClientOption.CHAT_VISIBILITY);
this.chatColors = (boolean) options.get(ClientOption.CHAT_COLORS_ENABLED);
this.skinparts = (SkinParts) options.get(ClientOption.SKIN_PARTS);
this.mainHand = (MainHand) options.get(ClientOption.MAIN_HAND);
this.allowsServerListings = (boolean) options.get(ClientOption.ALLOW_SERVER_LISTINGS);
this.textFilteringEnabled = (boolean) options.get(ClientOption.TEXT_FILTERING_ENABLED);
this.particleVisibility = (ParticleVisibility) options.get(ClientOption.PARTICLE_VISIBILITY);
}
ChatVisibility getChatVisibility();
public String getLocale() {
return this.locale;
}
boolean hasChatVisibilityChanged();
public boolean hasLocaleChanged() {
return !this.locale.equals(this.player.getClientOption(ClientOption.LOCALE));
}
boolean hasChatColorsEnabled();
public int getViewDistance() {
return this.viewDistance;
}
boolean hasChatColorsEnabledChanged();
public boolean hasViewDistanceChanged() {
return this.viewDistance != this.player.getClientOption(ClientOption.VIEW_DISTANCE);
}
SkinParts getSkinParts();
public ChatVisibility getChatVisibility() {
return this.chatVisibility;
}
boolean hasSkinPartsChanged();
public boolean hasChatVisibilityChanged() {
return this.chatVisibility != this.player.getClientOption(ClientOption.CHAT_VISIBILITY);
}
MainHand getMainHand();
public boolean hasChatColorsEnabled() {
return this.chatColors;
}
boolean hasMainHandChanged();
public boolean hasChatColorsEnabledChanged() {
return this.chatColors != this.player.getClientOption(ClientOption.CHAT_COLORS_ENABLED);
}
boolean hasTextFilteringEnabled();
public SkinParts getSkinParts() {
return this.skinparts;
}
boolean hasTextFilteringChanged();
public boolean hasSkinPartsChanged() {
return this.skinparts.getRaw() != this.player.getClientOption(ClientOption.SKIN_PARTS).getRaw();
}
boolean allowsServerListings();
public MainHand getMainHand() {
return this.mainHand;
}
boolean hasAllowServerListingsChanged();
public boolean hasMainHandChanged() {
return this.mainHand != this.player.getClientOption(ClientOption.MAIN_HAND);
}
ParticleVisibility getParticleVisibility();
public boolean hasTextFilteringEnabled() {
return this.textFilteringEnabled;
}
boolean hasParticleVisibilityChanged();
public boolean hasTextFilteringChanged() {
return this.textFilteringEnabled != this.player.getClientOption(ClientOption.TEXT_FILTERING_ENABLED);
}
static HandlerList getHandlerList() {
final class Holder {
private static final HandlerList HANDLER_LIST = new HandlerList();
}
return Holder.HANDLER_LIST;
public boolean allowsServerListings() {
return this.allowsServerListings;
}
public boolean hasAllowServerListingsChanged() {
return this.allowsServerListings != this.player.getClientOption(ClientOption.ALLOW_SERVER_LISTINGS);
}
public ParticleVisibility getParticleVisibility() {
return this.particleVisibility;
}
public boolean hasParticleVisibilityChanged() {
return this.particleVisibility != this.player.getClientOption(ClientOption.PARTICLE_VISIBILITY);
}
@Override
public HandlerList getHandlers() {
return HANDLER_LIST;
}
public static HandlerList getHandlerList() {
return HANDLER_LIST;
}
}
@@ -1,14 +1,16 @@
package com.destroystokyo.paper.event.player;
import io.papermc.paper.event.connection.ConnectionEvent;
import java.net.InetAddress;
import java.util.UUID;
import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;
import org.bukkit.event.player.AsyncPlayerPreLoginEvent;
import org.bukkit.event.player.PlayerQuitEvent;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* <p>
* This event is invoked when a player has disconnected. It is guaranteed that,
* if the server is in online-mode, that the provided uuid and username have been
* validated.
@@ -32,27 +34,50 @@ import org.bukkit.event.player.PlayerQuitEvent;
* The event may be invoked asynchronously or synchronously. Plugins should check
* {@link Event#isAsynchronous()} and handle accordingly.
*/
public interface PlayerConnectionCloseEvent extends ConnectionEvent {
@NullMarked
public class PlayerConnectionCloseEvent extends Event {
private static final HandlerList HANDLER_LIST = new HandlerList();
private final UUID playerUniqueId;
private final String playerName;
private final InetAddress ipAddress;
@ApiStatus.Internal
public PlayerConnectionCloseEvent(final UUID playerUniqueId, final String playerName, final InetAddress ipAddress, final boolean async) {
super(async);
this.playerUniqueId = playerUniqueId;
this.playerName = playerName;
this.ipAddress = ipAddress;
}
/**
* Returns the {@link UUID} of the player disconnecting.
* Returns the {@code UUID} of the player disconnecting.
*/
UUID getPlayerUniqueId();
public UUID getPlayerUniqueId() {
return this.playerUniqueId;
}
/**
* Returns the name of the player disconnecting.
*/
String getPlayerName();
public String getPlayerName() {
return this.playerName;
}
/**
* Returns the player's IP address.
*/
InetAddress getIpAddress();
public InetAddress getIpAddress() {
return this.ipAddress;
}
static HandlerList getHandlerList() {
final class Holder {
private static final HandlerList HANDLER_LIST = new HandlerList();
}
return Holder.HANDLER_LIST;
@Override
public HandlerList getHandlers() {
return HANDLER_LIST;
}
public static HandlerList getHandlerList() {
return HANDLER_LIST;
}
}
@@ -1,56 +1,99 @@
package com.destroystokyo.paper.event.player;
import org.bukkit.entity.Firework;
import org.bukkit.entity.Player;
import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList;
import org.bukkit.event.player.PlayerEvent;
import org.bukkit.inventory.EquipmentSlot;
import org.bukkit.inventory.ItemStack;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Fired when a player boosts elytra flight with a firework
*/
public interface PlayerElytraBoostEvent extends PlayerEvent, Cancellable {
@NullMarked
public class PlayerElytraBoostEvent extends PlayerEvent implements Cancellable {
private static final HandlerList HANDLER_LIST = new HandlerList();
private final ItemStack itemStack;
private final Firework firework;
private boolean consume = true;
private final EquipmentSlot hand;
private boolean cancelled;
@ApiStatus.Internal
public PlayerElytraBoostEvent(final Player player, final ItemStack itemStack, final Firework firework, final EquipmentSlot hand) {
super(player);
this.itemStack = itemStack;
this.firework = firework;
this.hand = hand;
}
/**
* Get the firework itemstack used
*
* @return ItemStack of firework
*/
ItemStack getItemStack();
public ItemStack getItemStack() {
return this.itemStack;
}
/**
* Get the firework entity that was spawned
*
* @return Firework entity
*/
Firework getFirework();
public Firework getFirework() {
return this.firework;
}
/**
* Get whether to consume the firework or not
*
* @return {@code true} to consume
*/
boolean shouldConsume();
public boolean shouldConsume() {
return this.consume;
}
/**
* Set whether to consume the firework or not
*
* @param consume {@code true} to consume
*/
void setShouldConsume(boolean consume);
public void setShouldConsume(final boolean consume) {
this.consume = consume;
}
/**
* Gets the hand holding the firework used for boosting this player.
*
* @return interaction hand
*/
EquipmentSlot getHand();
public EquipmentSlot getHand() {
return this.hand;
}
static HandlerList getHandlerList() {
final class Holder {
private static final HandlerList HANDLER_LIST = new HandlerList();
}
return Holder.HANDLER_LIST;
@Override
public boolean isCancelled() {
return this.cancelled;
}
@Override
public void setCancelled(final boolean cancel) {
this.cancelled = cancel;
}
@Override
public HandlerList getHandlers() {
return HANDLER_LIST;
}
public static HandlerList getHandlerList() {
return HANDLER_LIST;
}
}
@@ -1,10 +1,15 @@
package com.destroystokyo.paper.event.player;
import com.google.common.base.Preconditions;
import java.util.UUID;
import net.kyori.adventure.text.Component;
import net.kyori.adventure.text.format.NamedTextColor;
import net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer;
import org.bukkit.event.Cancellable;
import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
import org.jspecify.annotations.Nullable;
/**
@@ -15,14 +20,44 @@ import org.jspecify.annotations.Nullable;
*
* <p>WARNING: TAMPERING WITH THIS EVENT CAN BE DANGEROUS</p>
*/
public interface PlayerHandshakeEvent extends Event, Cancellable {
@NullMarked
public class PlayerHandshakeEvent extends Event implements Cancellable {
private static final HandlerList HANDLER_LIST = new HandlerList();
private final String originalHandshake;
private final String originalSocketAddressHostname;
private @Nullable String serverHostname;
private @Nullable String socketAddressHostname;
private @Nullable UUID uniqueId;
private @Nullable String propertiesJson;
private boolean failed;
private Component failMessage = Component.text("If you wish to use IP forwarding, please enable it in your BungeeCord config as well!", NamedTextColor.YELLOW);
private boolean cancelled;
@Deprecated
@ApiStatus.Internal
public PlayerHandshakeEvent(final String originalHandshake, final boolean cancelled) {
this(originalHandshake, "127.0.0.1", cancelled);
}
@ApiStatus.Internal
public PlayerHandshakeEvent(final String originalHandshake, final String originalSocketAddressHostname, final boolean cancelled) {
super(true);
this.originalHandshake = originalHandshake;
this.originalSocketAddressHostname = originalSocketAddressHostname;
this.cancelled = cancelled;
}
/**
* Gets the original handshake string.
*
* @return the original handshake string
*/
String getOriginalHandshake();
public String getOriginalHandshake() {
return this.originalHandshake;
}
/**
* Gets the original socket address hostname.
@@ -32,7 +67,9 @@ public interface PlayerHandshakeEvent extends Event, Cancellable {
*
* @return the original socket address hostname
*/
String getOriginalSocketAddressHostname();
public String getOriginalSocketAddressHostname() {
return this.originalSocketAddressHostname;
}
/**
* Gets the server hostname string.
@@ -41,7 +78,9 @@ public interface PlayerHandshakeEvent extends Event, Cancellable {
*
* @return the server hostname string
*/
@Nullable String getServerHostname();
public @Nullable String getServerHostname() {
return this.serverHostname;
}
/**
* Sets the server hostname string.
@@ -50,7 +89,9 @@ public interface PlayerHandshakeEvent extends Event, Cancellable {
*
* @param serverHostname the server hostname string
*/
void setServerHostname(String serverHostname);
public void setServerHostname(final String serverHostname) {
this.serverHostname = serverHostname;
}
/**
* Gets the socket address hostname string.
@@ -59,7 +100,9 @@ public interface PlayerHandshakeEvent extends Event, Cancellable {
*
* @return the socket address hostname string
*/
@Nullable String getSocketAddressHostname();
public @Nullable String getSocketAddressHostname() {
return this.socketAddressHostname;
}
/**
* Sets the socket address hostname string.
@@ -68,21 +111,27 @@ public interface PlayerHandshakeEvent extends Event, Cancellable {
*
* @param socketAddressHostname the socket address hostname string
*/
void setSocketAddressHostname(String socketAddressHostname);
public void setSocketAddressHostname(final String socketAddressHostname) {
this.socketAddressHostname = socketAddressHostname;
}
/**
* Gets the unique id.
*
* @return the unique id
*/
@Nullable UUID getUniqueId();
public @Nullable UUID getUniqueId() {
return this.uniqueId;
}
/**
* Sets the unique id.
*
* @param uniqueId the unique id
*/
void setUniqueId(UUID uniqueId);
public void setUniqueId(final UUID uniqueId) {
this.uniqueId = uniqueId;
}
/**
* Gets the profile properties.
@@ -91,7 +140,9 @@ public interface PlayerHandshakeEvent extends Event, Cancellable {
*
* @return the profile properties, as JSON
*/
@Nullable String getPropertiesJson();
public @Nullable String getPropertiesJson() {
return this.propertiesJson;
}
/**
* Determines if authentication failed.
@@ -101,7 +152,9 @@ public interface PlayerHandshakeEvent extends Event, Cancellable {
*
* @return {@code true} if authentication failed, {@code false} otherwise
*/
boolean isFailed();
public boolean isFailed() {
return this.failed;
}
/**
* Sets if authentication failed and the client should be disconnected.
@@ -111,7 +164,9 @@ public interface PlayerHandshakeEvent extends Event, Cancellable {
*
* @param failed {@code true} if authentication failed, {@code false} otherwise
*/
void setFailed(boolean failed);
public void setFailed(final boolean failed) {
this.failed = failed;
}
/**
* Sets the profile properties.
@@ -120,21 +175,27 @@ public interface PlayerHandshakeEvent extends Event, Cancellable {
*
* @param propertiesJson the profile properties, as JSON
*/
void setPropertiesJson(String propertiesJson);
public void setPropertiesJson(final String propertiesJson) {
this.propertiesJson = propertiesJson;
}
/**
* Gets the message to display to the client when authentication fails.
*
* @return the message to display to the client
*/
Component failMessage();
public Component failMessage() {
return this.failMessage;
}
/**
* Sets the message to display to the client when authentication fails.
*
* @param failMessage the message to display to the client
*/
void failMessage(Component failMessage);
public void failMessage(final Component failMessage) {
this.failMessage = failMessage;
}
/**
* Gets the message to display to the client when authentication fails.
@@ -143,7 +204,9 @@ public interface PlayerHandshakeEvent extends Event, Cancellable {
* @deprecated use {@link #failMessage()}
*/
@Deprecated
String getFailMessage();
public String getFailMessage() {
return LegacyComponentSerializer.legacySection().serialize(this.failMessage());
}
/**
* Sets the message to display to the client when authentication fails.
@@ -152,7 +215,10 @@ public interface PlayerHandshakeEvent extends Event, Cancellable {
* @deprecated use {@link #failMessage(Component)}
*/
@Deprecated
void setFailMessage(String failMessage);
public void setFailMessage(final String failMessage) {
Preconditions.checkArgument(failMessage != null && !failMessage.isEmpty(), "fail message cannot be null or empty");
this.failMessage(LegacyComponentSerializer.legacySection().deserialize(failMessage));
}
/**
* {@inheritDoc}
@@ -161,7 +227,9 @@ public interface PlayerHandshakeEvent extends Event, Cancellable {
* be processed.
*/
@Override
boolean isCancelled();
public boolean isCancelled() {
return this.cancelled;
}
/**
* {@inheritDoc}
@@ -170,12 +238,16 @@ public interface PlayerHandshakeEvent extends Event, Cancellable {
* be processed.
*/
@Override
void setCancelled(boolean cancel);
public void setCancelled(final boolean cancel) {
this.cancelled = cancel;
}
static HandlerList getHandlerList() {
final class Holder {
private static final HandlerList HANDLER_LIST = new HandlerList();
}
return Holder.HANDLER_LIST;
@Override
public HandlerList getHandlers() {
return HANDLER_LIST;
}
public static HandlerList getHandlerList() {
return HANDLER_LIST;
}
}
@@ -1,10 +1,14 @@
package com.destroystokyo.paper.event.player;
import com.google.common.base.Preconditions;
import org.bukkit.Location;
import org.bukkit.entity.Player;
import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList;
import org.bukkit.event.player.PlayerEvent;
import org.bukkit.event.player.PlayerMoveEvent;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Called when the server detects the player is jumping.
@@ -13,21 +17,66 @@ import org.bukkit.event.player.PlayerMoveEvent;
* when checking for jumps via {@link PlayerMoveEvent}, this event is fired whenever
* the server detects that the player is jumping.
*/
public interface PlayerJumpEvent extends PlayerEvent, Cancellable {
@NullMarked
public class PlayerJumpEvent extends PlayerEvent implements Cancellable {
private static final HandlerList HANDLER_LIST = new HandlerList();
private final Location to;
private Location from;
private boolean cancelled;
@ApiStatus.Internal
public PlayerJumpEvent(final Player player, final Location from, final Location to) {
super(player);
this.from = from;
this.to = to;
}
/**
* {@inheritDoc}
* <p>
* If this event is cancelled, the player will be moved or
* teleported back to the Location as defined by {@link #getFrom()}. This will not
* fire an event
*/
@Override
public boolean isCancelled() {
return this.cancelled;
}
/**
* {@inheritDoc}
* <p>
* If this event is cancelled, the player will be moved or
* teleported back to the Location as defined by {@link #getFrom()}. This will not
* fire an event
*/
@Override
public void setCancelled(final boolean cancel) {
this.cancelled = cancel;
}
/**
* Gets the location this player jumped from
*
* @return Location the player jumped from
*/
Location getFrom();
public Location getFrom() {
return this.from;
}
/**
* Sets the location to mark as where the player jumped from
*
* @param from New location to mark as the players previous location
*/
void setFrom(Location from);
public void setFrom(final Location from) {
Preconditions.checkArgument(from != null, "Cannot use null from location!");
Preconditions.checkArgument(from.getWorld() != null, "Cannot use from location with null world!");
this.from = from.clone();
}
/**
* Gets the location this player jumped to
@@ -37,32 +86,16 @@ public interface PlayerJumpEvent extends PlayerEvent, Cancellable {
*
* @return Location the player jumped to
*/
Location getTo();
public Location getTo() {
return this.to.clone();
}
/**
* {@inheritDoc}
* <p>
* If this event is cancelled, the player will be moved or
* teleported back to the Location as defined by {@link #getFrom()}. This will not
* fire an event
*/
@Override
boolean isCancelled();
public HandlerList getHandlers() {
return HANDLER_LIST;
}
/**
* {@inheritDoc}
* <p>
* If this event is cancelled, the player will be moved or
* teleported back to the Location as defined by {@link #getFrom()}. This will not
* fire an event
*/
@Override
void setCancelled(boolean cancel);
static HandlerList getHandlerList() {
final class Holder {
private static final HandlerList HANDLER_LIST = new HandlerList();
}
return Holder.HANDLER_LIST;
public static HandlerList getHandlerList() {
return HANDLER_LIST;
}
}
@@ -1,11 +1,14 @@
package com.destroystokyo.paper.event.player;
import org.bukkit.entity.Player;
import org.bukkit.entity.Projectile;
import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList;
import org.bukkit.event.entity.EntityShootBowEvent;
import org.bukkit.event.player.PlayerEvent;
import org.bukkit.inventory.ItemStack;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Called when a player shoots a projectile.
@@ -14,40 +17,76 @@ import org.bukkit.inventory.ItemStack;
* of a bow or crossbow. A plugin may listen to {@link EntityShootBowEvent}
* for these actions instead.
*/
public interface PlayerLaunchProjectileEvent extends PlayerEvent, Cancellable {
@NullMarked
public class PlayerLaunchProjectileEvent extends PlayerEvent implements Cancellable {
private static final HandlerList HANDLER_LIST = new HandlerList();
private final Projectile projectile;
private final ItemStack itemStack;
private boolean consumeItem = true;
private boolean cancelled;
@ApiStatus.Internal
public PlayerLaunchProjectileEvent(final Player shooter, final ItemStack itemStack, final Projectile projectile) {
super(shooter);
this.itemStack = itemStack;
this.projectile = projectile;
}
/**
* Gets the projectile which will be launched by this event
*
* @return the launched projectile
*/
Projectile getProjectile();
public Projectile getProjectile() {
return this.projectile;
}
/**
* Get the ItemStack used to fire the projectile
*
* @return The ItemStack used
*/
ItemStack getItemStack();
public ItemStack getItemStack() {
return this.itemStack;
}
/**
* Get whether to consume the ItemStack or not
*
* @return {@code true} to consume
*/
boolean shouldConsume();
public boolean shouldConsume() {
return this.consumeItem;
}
/**
* Set whether to consume the ItemStack or not
*
* @param consumeItem {@code true} to consume
*/
void setShouldConsume(boolean consumeItem);
public void setShouldConsume(final boolean consumeItem) {
this.consumeItem = consumeItem;
}
static HandlerList getHandlerList() {
final class Holder {
private static final HandlerList HANDLER_LIST = new HandlerList();
}
return Holder.HANDLER_LIST;
@Override
public boolean isCancelled() {
return this.cancelled;
}
@Override
public void setCancelled(final boolean cancel) {
this.cancelled = cancel;
}
@Override
public HandlerList getHandlers() {
return HANDLER_LIST;
}
public static HandlerList getHandlerList() {
return HANDLER_LIST;
}
}
@@ -24,19 +24,41 @@
package com.destroystokyo.paper.event.player;
import org.bukkit.entity.ExperienceOrb;
import org.bukkit.entity.Player;
import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList;
import org.bukkit.event.player.PlayerEvent;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Fired when a player is attempting to pick up an experience orb
*/
public interface PlayerPickupExperienceEvent extends PlayerEvent, Cancellable {
@NullMarked
public class PlayerPickupExperienceEvent extends PlayerEvent implements Cancellable {
private static final HandlerList HANDLER_LIST = new HandlerList();
private final ExperienceOrb experienceOrb;
private boolean cancelled;
@ApiStatus.Internal
public PlayerPickupExperienceEvent(final Player player, final ExperienceOrb experienceOrb) {
super(player);
this.experienceOrb = experienceOrb;
}
/**
* @return the experience orb that the player is picking up
* @return Returns the Orb that the player is picking up
*/
ExperienceOrb getExperienceOrb();
public ExperienceOrb getExperienceOrb() {
return this.experienceOrb;
}
@Override
public boolean isCancelled() {
return this.cancelled;
}
/**
* {@inheritDoc}
@@ -44,12 +66,16 @@ public interface PlayerPickupExperienceEvent extends PlayerEvent, Cancellable {
* If {@code true}, cancels picking up the experience orb, leaving it in the world
*/
@Override
void setCancelled(boolean cancel);
public void setCancelled(final boolean cancel) {
this.cancelled = cancel;
}
static HandlerList getHandlerList() {
final class Holder {
private static final HandlerList HANDLER_LIST = new HandlerList();
}
return Holder.HANDLER_LIST;
@Override
public HandlerList getHandlers() {
return HANDLER_LIST;
}
public static HandlerList getHandlerList() {
return HANDLER_LIST;
}
}
@@ -2,13 +2,31 @@ package com.destroystokyo.paper.event.player;
import io.papermc.paper.event.player.AbstractRespawnEvent;
import org.bukkit.Location;
import org.bukkit.entity.Player;
import org.bukkit.event.HandlerList;
import org.bukkit.event.player.PlayerRespawnEvent;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Fired after a player has respawned
*/
public interface PlayerPostRespawnEvent extends AbstractRespawnEvent {
@NullMarked
public class PlayerPostRespawnEvent extends AbstractRespawnEvent {
private static final HandlerList HANDLER_LIST = new HandlerList();
@ApiStatus.Internal
public PlayerPostRespawnEvent(
final Player respawnPlayer,
final Location respawnLocation,
final boolean isBedSpawn,
final boolean isAnchorSpawn,
final boolean missingRespawnBlock,
final PlayerRespawnEvent.RespawnReason respawnReason
) {
super(respawnPlayer, respawnLocation, isBedSpawn, isAnchorSpawn, missingRespawnBlock, respawnReason);
}
/**
* Returns the location of the respawned player.
@@ -16,15 +34,17 @@ public interface PlayerPostRespawnEvent extends AbstractRespawnEvent {
* @return location of the respawned player
* @see #getRespawnLocation()
*/
@ApiStatus.Obsolete(since = "1.21.5")
default Location getRespawnedLocation() {
return this.getRespawnLocation();
@ApiStatus.Obsolete
public Location getRespawnedLocation() {
return super.getRespawnLocation();
}
static HandlerList getHandlerList() {
final class Holder {
private static final HandlerList HANDLER_LIST = new HandlerList();
}
return Holder.HANDLER_LIST;
@Override
public HandlerList getHandlers() {
return HANDLER_LIST;
}
public static HandlerList getHandlerList() {
return HANDLER_LIST;
}
}
@@ -23,25 +23,45 @@
package com.destroystokyo.paper.event.player;
import org.bukkit.entity.Player;
import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList;
import org.bukkit.event.player.PlayerEvent;
import org.bukkit.inventory.ItemStack;
import org.jspecify.annotations.NullMarked;
/**
* Called when a player is firing a bow and the server is choosing an arrow to use.
*/
public interface PlayerReadyArrowEvent extends PlayerEvent, Cancellable {
@NullMarked
public class PlayerReadyArrowEvent extends PlayerEvent implements Cancellable {
private static final HandlerList HANDLER_LIST = new HandlerList();
private final ItemStack bow;
private final ItemStack arrow;
private boolean cancelled;
public PlayerReadyArrowEvent(final Player player, final ItemStack bow, final ItemStack arrow) {
super(player);
this.bow = bow;
this.arrow = arrow;
}
/**
* @return the player is using to fire the arrow
*/
ItemStack getBow();
public ItemStack getBow() {
return this.bow;
}
/**
* @return the arrow that is attempting to be used
*/
ItemStack getArrow();
public ItemStack getArrow() {
return this.arrow;
}
/**
* {@inheritDoc}
@@ -49,18 +69,24 @@ public interface PlayerReadyArrowEvent extends PlayerEvent, Cancellable {
* Whether use of this arrow is cancelled. On cancel, the server will try the next arrow available and fire another event.
*/
@Override
boolean isCancelled();
public boolean isCancelled() {
return this.cancelled;
}
/**
* Cancel use of this arrow. On cancel, the server will try the next arrow available and fire another event.
*/
@Override
void setCancelled(boolean cancel);
public void setCancelled(final boolean cancel) {
this.cancelled = cancel;
}
static HandlerList getHandlerList() {
final class Holder {
private static final HandlerList HANDLER_LIST = new HandlerList();
}
return Holder.HANDLER_LIST;
@Override
public HandlerList getHandlers() {
return HANDLER_LIST;
}
public static HandlerList getHandlerList() {
return HANDLER_LIST;
}
}
@@ -1,28 +1,50 @@
package com.destroystokyo.paper.event.player;
import org.bukkit.NamespacedKey;
import org.bukkit.entity.Player;
import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList;
import org.bukkit.event.player.PlayerEvent;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Called when a player clicks a recipe in the recipe book
*/
public interface PlayerRecipeBookClickEvent extends PlayerEvent, Cancellable {
@NullMarked
public class PlayerRecipeBookClickEvent extends PlayerEvent implements Cancellable {
private static final HandlerList HANDLER_LIST = new HandlerList();
private NamespacedKey recipe;
private boolean makeAll;
private boolean cancelled;
@ApiStatus.Internal
public PlayerRecipeBookClickEvent(final Player player, final NamespacedKey recipe, final boolean makeAll) {
super(player);
this.recipe = recipe;
this.makeAll = makeAll;
}
/**
* Gets the namespaced key of the recipe that was clicked by the player
*
* @return The namespaced key of the recipe
*/
NamespacedKey getRecipe();
public NamespacedKey getRecipe() {
return this.recipe;
}
/**
* Changes what recipe is requested. This sets the requested recipe to the recipe with the given key
*
* @param recipe The key of the recipe that should be requested
*/
void setRecipe(NamespacedKey recipe);
public void setRecipe(final NamespacedKey recipe) {
this.recipe = recipe;
}
/**
* Gets a boolean which indicates whether the player requested to make the maximum amount of results. This is
@@ -30,7 +52,9 @@ public interface PlayerRecipeBookClickEvent extends PlayerEvent, Cancellable {
*
* @return {@code true} if shift is pressed while the recipe is clicked
*/
boolean isMakeAll();
public boolean isMakeAll() {
return this.makeAll;
}
/**
* Sets whether the maximum amount of results should be made. If this is {@code true}, the request is handled as if
@@ -38,12 +62,26 @@ public interface PlayerRecipeBookClickEvent extends PlayerEvent, Cancellable {
*
* @param makeAll {@code true} if the request should attempt to make the maximum amount of results
*/
void setMakeAll(boolean makeAll);
public void setMakeAll(final boolean makeAll) {
this.makeAll = makeAll;
}
static HandlerList getHandlerList() {
final class Holder {
private static final HandlerList HANDLER_LIST = new HandlerList();
}
return Holder.HANDLER_LIST;
@Override
public boolean isCancelled() {
return this.cancelled;
}
@Override
public void setCancelled(final boolean cancel) {
this.cancelled = cancel;
}
@Override
public HandlerList getHandlers() {
return HANDLER_LIST;
}
public static HandlerList getHandlerList() {
return HANDLER_LIST;
}
}
@@ -6,6 +6,8 @@ import org.bukkit.entity.Player;
import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList;
import org.bukkit.event.player.PlayerEvent;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
import org.jspecify.annotations.Nullable;
/**
@@ -13,14 +15,37 @@ import org.jspecify.annotations.Nullable;
* <br>
* Cancelling this event will prevent the spawn from being set.
*/
public interface PlayerSetSpawnEvent extends PlayerEvent, Cancellable {
@NullMarked
public class PlayerSetSpawnEvent extends PlayerEvent implements Cancellable {
private static final HandlerList HANDLER_LIST = new HandlerList();
private final Cause cause;
private @Nullable Location location;
private boolean forced;
private boolean notifyPlayer;
private @Nullable Component notification;
private boolean cancelled;
@ApiStatus.Internal
public PlayerSetSpawnEvent(final Player player, final Cause cause, final @Nullable Location location, final boolean forced, final boolean notifyPlayer, final @Nullable Component notification) {
super(player);
this.cause = cause;
this.location = location;
this.forced = forced;
this.notifyPlayer = notifyPlayer;
this.notification = notification;
}
/**
* Gets the cause of this event.
*
* @return the cause
*/
Cause getCause();
public Cause getCause() {
return this.cause;
}
/**
* Gets the location that the spawn is set to. The yaw
@@ -30,7 +55,9 @@ public interface PlayerSetSpawnEvent extends PlayerEvent, Cancellable {
*
* @return the spawn location, or {@code null} if removing the location
*/
@Nullable Location getLocation();
public @Nullable Location getLocation() {
return this.location;
}
/**
* Sets the location to be set as the spawn location. The yaw
@@ -38,21 +65,27 @@ public interface PlayerSetSpawnEvent extends PlayerEvent, Cancellable {
*
* @param location the spawn location, or {@code null} to remove the spawn location
*/
void setLocation(@Nullable Location location);
public void setLocation(final @Nullable Location location) {
this.location = location != null ? location.clone() : null;
}
/**
* Gets if this is a force spawn location
*
* @return {@code true} if forced
*/
boolean isForced();
public boolean isForced() {
return this.forced;
}
/**
* Sets if this is a forced spawn location
*
* @param forced {@code true} to force
*/
void setForced(boolean forced);
public void setForced(final boolean forced) {
this.forced = forced;
}
/**
* Gets if this action will notify the player their spawn
@@ -60,7 +93,9 @@ public interface PlayerSetSpawnEvent extends PlayerEvent, Cancellable {
*
* @return {@code true} to notify
*/
boolean willNotifyPlayer();
public boolean willNotifyPlayer() {
return this.notifyPlayer;
}
/**
* Sets if this action will notify the player that their spawn
@@ -68,7 +103,9 @@ public interface PlayerSetSpawnEvent extends PlayerEvent, Cancellable {
*
* @param notifyPlayer {@code true} to notify
*/
void setNotifyPlayer(boolean notifyPlayer);
public void setNotifyPlayer(final boolean notifyPlayer) {
this.notifyPlayer = notifyPlayer;
}
/**
* Gets the notification message that will be sent to the player
@@ -76,23 +113,39 @@ public interface PlayerSetSpawnEvent extends PlayerEvent, Cancellable {
*
* @return {@code null} if no notification
*/
@Nullable Component getNotification();
public @Nullable Component getNotification() {
return this.notification;
}
/**
* Sets the notification message that will be sent to the player.
*
* @param notification {@code null} to send no message
*/
void setNotification(@Nullable Component notification);
static HandlerList getHandlerList() {
final class Holder {
private static final HandlerList HANDLER_LIST = new HandlerList();
}
return Holder.HANDLER_LIST;
public void setNotification(final @Nullable Component notification) {
this.notification = notification;
}
enum Cause {
@Override
public boolean isCancelled() {
return this.cancelled;
}
@Override
public void setCancelled(final boolean cancel) {
this.cancelled = cancel;
}
@Override
public HandlerList getHandlers() {
return HANDLER_LIST;
}
public static HandlerList getHandlerList() {
return HANDLER_LIST;
}
public enum Cause {
/**
* When a player interacts successfully with a bed.
*/
@@ -1,34 +1,68 @@
package com.destroystokyo.paper.event.player;
import org.bukkit.entity.Entity;
import org.bukkit.entity.Player;
import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList;
import org.bukkit.event.player.PlayerEvent;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Triggered when a player starts spectating an entity in spectator mode.
*/
public interface PlayerStartSpectatingEntityEvent extends PlayerEvent, Cancellable {
@NullMarked
public class PlayerStartSpectatingEntityEvent extends PlayerEvent implements Cancellable {
private static final HandlerList HANDLER_LIST = new HandlerList();
private final Entity currentSpectatorTarget;
private final Entity newSpectatorTarget;
private boolean cancelled;
@ApiStatus.Internal
public PlayerStartSpectatingEntityEvent(final Player player, final Entity currentSpectatorTarget, final Entity newSpectatorTarget) {
super(player);
this.currentSpectatorTarget = currentSpectatorTarget;
this.newSpectatorTarget = newSpectatorTarget;
}
/**
* Gets the entity that the player is currently spectating or themselves if they weren't spectating anything
*
* @return The entity the player is currently spectating (before they start spectating the new target).
*/
Entity getCurrentSpectatorTarget();
public Entity getCurrentSpectatorTarget() {
return this.currentSpectatorTarget;
}
/**
* Gets the new entity that the player will now be spectating
*
* @return The entity the player is now going to be spectating.
*/
Entity getNewSpectatorTarget();
public Entity getNewSpectatorTarget() {
return this.newSpectatorTarget;
}
static HandlerList getHandlerList() {
final class Holder {
private static final HandlerList HANDLER_LIST = new HandlerList();
}
return Holder.HANDLER_LIST;
@Override
public boolean isCancelled() {
return this.cancelled;
}
@Override
public void setCancelled(final boolean cancel) {
this.cancelled = cancel;
}
@Override
public HandlerList getHandlers() {
return HANDLER_LIST;
}
public static HandlerList getHandlerList() {
return HANDLER_LIST;
}
}
Loaded 100 of 1938 files, more files were not shown because too many files have changed in this diff. Show more