Skip to content
Success

Changes

Summary

  1. SPIGOT-6507: Implement abstract skeleton and stray conversion (details)
Commit 85b8c1fda69f6f80e45ddd19590846c249e5b6bc by md_5
SPIGOT-6507: Implement abstract skeleton and stray conversion

The previous layout and class hierarchy of the skeleton API defined
variances of the skeleton, such as the wither skeleton or the stray, as
child types of the normal skeleton variance, which is technically
incorrect, yet did not produce any specific issue as the normal skeleton
variance did not have any unique logic.

With the introduction of powdered snow in the 1.17 update, the normal
skeleton variance now has unique logic, specifically the conversion to
a stay when stuck inside powdered snow, which cannot be represented in
the current API layout due to the prior mentioned hierarchy.

This commit implements the hierarchy changes made in the bukkit
repository by representing the new hierarchy on the craftbukkit side
through the CraftAbstractSkeleton and the respective additions to the
skeleton implementation in regards to the stray conversion.

This commit does not break ABI yet breaks backwards compatibility due to
the mentioned hierarchy changes. Plugins that previously used the
Skelton interface to compute whether or not an entity is skeleton-like
through instanceOf checks will now only match the normal skeleton variance
instead of any skeleton-like entity.
The file was modifiedsrc/main/java/org/bukkit/craftbukkit/entity/CraftSkeleton.java
The file was addednms-patches/net/minecraft/world/entity/monster/EntitySkeleton.patch
The file was modifiedsrc/main/java/org/bukkit/craftbukkit/entity/CraftWitherSkeleton.java
The file was addedsrc/main/java/org/bukkit/craftbukkit/entity/CraftAbstractSkeleton.java
The file was modifiedsrc/main/java/org/bukkit/craftbukkit/entity/CraftStray.java
The file was modifiedsrc/main/java/org/bukkit/craftbukkit/CraftWorld.java
The file was modifiedsrc/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java