Move tool property back to non vanilla custom item

This commit is contained in:
Eclipse 2024-05-11 17:30:39 +00:00
parent d31e94a7b1
commit e8266fff03
No known key found for this signature in database
GPG key ID: 441A0B7FDD01D03A
2 changed files with 15 additions and 20 deletions

View file

@ -201,17 +201,6 @@ public interface CustomItemData {
*/ */
boolean canAlwaysEat(); 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() { static CustomItemData.Builder builder() {
return GeyserApi.api().provider(CustomItemData.Builder.class); return GeyserApi.api().provider(CustomItemData.Builder.class);
} }
@ -264,14 +253,6 @@ public interface CustomItemData {
Builder canAlwaysEat(boolean canAlwaysEat); Builder canAlwaysEat(boolean canAlwaysEat);
/**
* @deprecated Use {@link #displayHandheld(boolean)} instead.
*/
@Deprecated
default Builder tool(boolean isTool) {
return displayHandheld(isTool);
}
CustomItemData build(); CustomItemData build();
} }
} }

View file

@ -78,6 +78,17 @@ public interface NonVanillaCustomItemData extends CustomItemData {
*/ */
String block(); 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() { static NonVanillaCustomItemData.Builder builder() {
return GeyserApi.api().provider(NonVanillaCustomItemData.Builder.class); return GeyserApi.api().provider(NonVanillaCustomItemData.Builder.class);
} }
@ -149,7 +160,10 @@ public interface NonVanillaCustomItemData extends CustomItemData {
@Override @Override
Builder canAlwaysEat(boolean canAlwaysEat); Builder canAlwaysEat(boolean canAlwaysEat);
@Override /**
* @deprecated Use {@link #displayHandheld(boolean)} instead.
*/
@Deprecated
default Builder tool(boolean isTool) { default Builder tool(boolean isTool) {
return displayHandheld(isTool); return displayHandheld(isTool);
} }