Skip to content

Commit

Permalink
SPIGOT-7849: Fix FoodComponent serialize with "using-converts-to" usi…
Browse files Browse the repository at this point in the history
…ng null
  • Loading branch information
Doc94 authored and md-5 committed Jul 25, 2024
1 parent 2c54749 commit 0cc6acb
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,12 @@ public Map<String, Object> serialize() {
result.put("saturation", getSaturation());
result.put("can-always-eat", canAlwaysEat());
result.put("eat-seconds", getEatSeconds());
result.put("using-converts-to", getUsingConvertsTo());

ItemStack usingConvertsTo = getUsingConvertsTo();
if (usingConvertsTo != null) {
result.put("using-converts-to", usingConvertsTo);
}

result.put("effects", getEffects());
return result;
}
Expand Down

0 comments on commit 0cc6acb

Please sign in to comment.