Skip to content

Fix: add since to each deprecation in API, mark to-be removed API with forRemoval = true - #6823

Merged
eclipseisoffline merged 4 commits into
GeyserMC:feature/26.60from
eclipseisoffline:feature/api-deprecation-notices
Oct 26, 2026
Merged

eclipseisoffline merged 4 commits into
GeyserMC:feature/26.60from
eclipseisoffline:feature/api-deprecation-notices

Conversation

@eclipseisoffline

Copy link
Copy Markdown
Member

This PR adds a since = "<version>" parameter to each @Deprecated annotation in the API. For deprecations made in version 2.11.0 or earlier, it also marks the deprecation with forRemoval = true, to be removed in Geyser 2.13.0 (expected to release with Java Edition 26.4, this December).

Geyser's version policy states the following on deprecations:

Deprecated API should typically be removed two Minecraft versions after it becomes deprecated

However, this hasn't been kept up to in the past. This PR attempts to make a move on this, marking all API that should have been removed already, or is to be removed by 2.13.0, as deprecated-for-removal, and noting the planned removal version in API that is not yet marked for removal. A full list of classes/methods/fields to be removed can be found below.

With this PR, I'd also like to propose to mark all deprecations as deprecated-for-removal one version ahead of its removal from now on.

It should be noted that for some deprecations, an exact since version couldn't have been determined. In these cases, the Geyser version at the time of release has been used. This applies to the following annotations:

Please note that the custom items API v1, along with render offsets, are not yet deprecated-for-removal (despite being deprecated in 2.9.2/2.9.3), pending discussion in the team.

Classes, methods and fields marked for removal

The following classes/methods/fields have been marked to be removed in Geyser 2.13.0:

  • CustomBlockComponents#collisionBox() and its Builder variant: deprecated since 2.9.5.
  • CustomBlockComponents#unitCube() and its Builder variant: deprecated since 2.2.2.
  • MaterialInstance#ambientOcclusion() and its Builder variant: deprecated since 2.11.3.
  • JavaBlockState#pickItem() and its Builder variant: deprecated since 2.9.0.
  • JavaBlockState#hasBlockEntity() and its Builder variant: deprecated between 2.4.0 and 2.4.1.
  • Command#isSuggestedOpOnly() and its Builder variant: deprecated since 2.4.1.
  • Command#isExecutableOnConsole() and its Builder variant: deprecated since 2.4.1.
  • Command#subCommands() and its Builder variant: deprecated since 2.4.1.
  • GeyserConnection#shakeCamera(float, float, CameraShake): deprecated since 2.2.2.
  • GeyserConnection#stopCameraShake(): deprecated since 2.2.2.
  • GeyserConnection#sendFog(String...): deprecated since 2.2.2.
  • GeyserConnection#removeFog(String...): deprecated since 2.2.2.
  • GeyserConnection#fogEffects(): deprecated since 2.2.2.
  • GeyserEntity#updatePropertiesBatched(Consumer): deprecated since 2.11.0.
  • EntityData#switchHands(): deprecated since 2.9.3.
  • EntityData#showEmote(GeyserPlayerEntity, String): deprecated since 2.9.3.
  • EntityData#playerEntity(): deprecated since 2.9.3.
  • SessionLoadResourcePacksEvent#register(ResourcePack): deprecated since 2.6.2.
  • ConnectionRequestEvent#getInetSocketAddress(): deprecated between 2.3.0 and 2.3.1.
  • ConnectionRequestEvent#getProxyIp(): deprecated between 2.3.0 and 2.3.1.
  • ServerDefineCommandsEvent in org.geysermc.geyser.api.event.downstream: deprecated between 2.1.0 and 2.2.0.
  • GeyserLoadResourcePacksEvent: deprecated since 2.6.2.
  • ExtensionDescription#patchApiVersion(): deprecated since 2.4.1.
  • NonVanillaCustomItemData#toolTier() and its Builder variant: deprecated since 2.6.0.
  • NonVanillaCustomItemData#repairMaterials() and its Builder variant: deprecated since 2.6.0.
  • NonVanillaCustomItemData#isTool() and its Builder variant: deprecated since 2.1.0.
  • PackCodec#serialize(ResourcePack): deprecated since 2.6.2.
  • ItemRangeDispatchPredicate#bundleFullness(int): deprecated since 2.9.4.
  • PlatformType#ANDROID: deprecated between 2.2.0 and 2.2.1.
  • PlatformType#SPONGE: deprecated between 2.2.0 and 2.2.1.

@eclipseisoffline eclipseisoffline added API The issue/feature request relates to the Geyser API PR: Future API Addition An API addition which is planned for the next version of Geyser labels Oct 24, 2026
@eclipseisoffline
eclipseisoffline changed the base branch from master to feature/26.60 October 25, 2026 21:13
@eclipseisoffline
eclipseisoffline force-pushed the feature/26.60 branch 2 times, most recently from f21e9eb to 3869346 Compare October 26, 2026 21:41
@eclipseisoffline
eclipseisoffline merged commit 5089678 into GeyserMC:feature/26.60 Oct 26, 2026
3 checks passed
SendableMetatype pushed a commit to EduGeyser/EduGeyser that referenced this pull request Oct 29, 2026
…ith `forRemoval = true` (GeyserMC#6823)

* Ensure each deprecation in API has a `since` parameter, mark deprecations to be removed in 2.13.0 with forRemoval = true

* Add planned removal versions

* Add planned removal version to new deprecated method

(cherry picked from commit 5089678)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

API The issue/feature request relates to the Geyser API PR: Future API Addition An API addition which is planned for the next version of Geyser

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants