13
0
geforkt von Mirrors/Paper

SPIGOT-7849: Fix FoodComponent serialize with "using-converts-to" using null

By: Doc <nachito94@msn.com>
Dieser Commit ist enthalten in:
CraftBukkit/Spigot 2024-07-26 07:25:02 +10:00
Ursprung 983dd759e8
Commit 7fae51f18d

Datei anzeigen

@ -62,7 +62,12 @@ public final class CraftFoodComponent implements FoodComponent {
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;
}