Finish converting most of the undeprecated api to jspecify

This commit is contained in:
Jake Potrebic 2024-09-30 11:44:36 -07:00
parent ba3c29b92e
commit e7e1ab56ca
No known key found for this signature in database
GPG key ID: ECE0B3C133C016C5
45 changed files with 1046 additions and 982 deletions

View file

@ -6,19 +6,20 @@ Subject: [PATCH] Add Shearable API
diff --git a/src/main/java/io/papermc/paper/entity/Shearable.java b/src/main/java/io/papermc/paper/entity/Shearable.java
new file mode 100644
index 0000000000000000000000000000000000000000..0d5793790ab6a47525ad33033517361205756338
index 0000000000000000000000000000000000000000..3991f2aa530c588f52e1f596d3b03743e8a8ecc4
--- /dev/null
+++ b/src/main/java/io/papermc/paper/entity/Shearable.java
@@ -0,0 +1,43 @@
@@ -0,0 +1,44 @@
+package io.papermc.paper.entity;
+
+import net.kyori.adventure.sound.Sound;
+import org.bukkit.entity.Entity;
+import org.jetbrains.annotations.NotNull;
+import org.jspecify.annotations.NullMarked;
+
+/**
+ * Represents an entity that can be sheared.
+ */
+@NullMarked
+public interface Shearable extends Entity {
+
+ /**
@ -44,7 +45,7 @@ index 0000000000000000000000000000000000000000..0d5793790ab6a47525ad330335173612
+ *
+ * @param source Sound source to play any sound effects on
+ */
+ void shear(@NotNull Sound.Source source);
+ void shear(Sound.Source source);
+
+ /**
+ * Gets if the entity would be able to be sheared or not naturally using shears.