From e8266fff03e1bb45c9d7a883446354e0bc10d918 Mon Sep 17 00:00:00 2001 From: Eclipse Date: Sat, 11 May 2024 17:30:39 +0000 Subject: [PATCH] Move tool property back to non vanilla custom item --- .../api/item/custom/CustomItemData.java | 19 ------------------- .../item/custom/NonVanillaCustomItemData.java | 16 +++++++++++++++- 2 files changed, 15 insertions(+), 20 deletions(-) diff --git a/api/src/main/java/org/geysermc/geyser/api/item/custom/CustomItemData.java b/api/src/main/java/org/geysermc/geyser/api/item/custom/CustomItemData.java index 916635308..7dd0725e7 100644 --- a/api/src/main/java/org/geysermc/geyser/api/item/custom/CustomItemData.java +++ b/api/src/main/java/org/geysermc/geyser/api/item/custom/CustomItemData.java @@ -201,17 +201,6 @@ public interface CustomItemData { */ boolean canAlwaysEat(); - /** - * @deprecated Use {@link #displayHandheld()} instead. - * Gets if the item is a tool. This is used to set the render type of the item, if the item is handheld. - * - * @return if the item is a tool - */ - @Deprecated - default boolean isTool() { - return displayHandheld(); - } - static CustomItemData.Builder builder() { return GeyserApi.api().provider(CustomItemData.Builder.class); } @@ -264,14 +253,6 @@ public interface CustomItemData { Builder canAlwaysEat(boolean canAlwaysEat); - /** - * @deprecated Use {@link #displayHandheld(boolean)} instead. - */ - @Deprecated - default Builder tool(boolean isTool) { - return displayHandheld(isTool); - } - CustomItemData build(); } } diff --git a/api/src/main/java/org/geysermc/geyser/api/item/custom/NonVanillaCustomItemData.java b/api/src/main/java/org/geysermc/geyser/api/item/custom/NonVanillaCustomItemData.java index edd45b249..7cb3e629e 100644 --- a/api/src/main/java/org/geysermc/geyser/api/item/custom/NonVanillaCustomItemData.java +++ b/api/src/main/java/org/geysermc/geyser/api/item/custom/NonVanillaCustomItemData.java @@ -78,6 +78,17 @@ public interface NonVanillaCustomItemData extends CustomItemData { */ String block(); + /** + * @deprecated Use {@link #displayHandheld()} instead. + * Gets if the item is a tool. This is used to set the render type of the item, if the item is handheld. + * + * @return if the item is a tool + */ + @Deprecated + default boolean isTool() { + return displayHandheld(); + } + static NonVanillaCustomItemData.Builder builder() { return GeyserApi.api().provider(NonVanillaCustomItemData.Builder.class); } @@ -149,7 +160,10 @@ public interface NonVanillaCustomItemData extends CustomItemData { @Override Builder canAlwaysEat(boolean canAlwaysEat); - @Override + /** + * @deprecated Use {@link #displayHandheld(boolean)} instead. + */ + @Deprecated default Builder tool(boolean isTool) { return displayHandheld(isTool); }