Fix Bogged and Wolf armor not being shearable by custom shears. Closes #10005

This commit is contained in:
LexManos committed 2024-06-13 14:40:46 -07:00
1 parent 3d9e12a71d
commit bc0c89ff69
10 files changed
+124 -49

No files matched your search

@@ -23,8 +23,7 @@ import org.jetbrains.annotations.Nullable;
* to support mod-shears as well.
*
*/
public interface IForgeShearable
{
public interface IForgeShearable {
/**
* Checks if the object is currently shearable
* Example: Sheep return false when they have no wool
@@ -34,8 +33,7 @@ public interface IForgeShearable
* @param pos Block's position in level.
* @return If this is shearable, and onSheared should be called.
*/
default boolean isShearable(@NotNull ItemStack item, Level level, BlockPos pos)
{
default boolean isShearable(@NotNull ItemStack item, Level level, BlockPos pos) {
return true;
}
@@ -58,8 +56,7 @@ public interface IForgeShearable
* @return A List containing all items from this shearing. May be empty.
*/
@NotNull
default List<ItemStack> onSheared(@Nullable Player player, @NotNull ItemStack item, Level level, BlockPos pos, int fortune)
{
default List<ItemStack> onSheared(@Nullable Player player, @NotNull ItemStack item, Level level, BlockPos pos, int fortune) {
return Collections.emptyList();
}
}
@@ -67,7 +67,7 @@ public class ToolActions
/**
* Used during player attack to figure out if a sweep attack should be performed
*
*
* @see IForgeItem#getSweepHitBox
*/
public static final ToolAction SWORD_SWEEP = ToolAction.get("sword_sweep");