2021-10-17 21:39:48 +02:00
|
|
|
--- a/net/minecraft/world/entity/Shearable.java
|
|
|
|
+++ b/net/minecraft/world/entity/Shearable.java
|
2024-12-14 12:36:08 +01:00
|
|
|
@@ -5,7 +_,16 @@
|
2021-05-18 21:32:02 +02:00
|
|
|
import net.minecraft.world.item.ItemStack;
|
|
|
|
|
|
|
|
public interface Shearable {
|
2024-12-14 12:36:08 +01:00
|
|
|
+ default void shear(ServerLevel level, SoundSource soundSource, ItemStack shears, java.util.List<net.minecraft.world.item.ItemStack> drops) { this.shear(level, soundSource, shears); } // Paper - Add drops to shear events
|
|
|
|
void shear(ServerLevel level, SoundSource soundSource, ItemStack shears);
|
2021-10-17 21:39:48 +02:00
|
|
|
|
|
|
|
boolean readyForShearing();
|
2024-12-14 12:36:08 +01:00
|
|
|
+
|
2021-10-17 21:39:48 +02:00
|
|
|
+ net.minecraft.world.level.Level level(); // Shearable API - expose default level needed for shearing.
|
2021-05-18 21:32:02 +02:00
|
|
|
+
|
|
|
|
+ // Paper start - custom shear drops; ensure all implementing entities override this
|
|
|
|
+ default java.util.List<net.minecraft.world.item.ItemStack> generateDefaultDrops(final ServerLevel serverLevel, final ItemStack shears) {
|
|
|
|
+ return java.util.Collections.emptyList();
|
|
|
|
+ }
|
|
|
|
+ // Paper end - custom shear drops
|
2021-10-17 21:39:48 +02:00
|
|
|
}
|