1
0
mirror of https://github.com/GeyserMC/Geyser.git synced 2025-12-29 19:59:13 +00:00

Allow recipes to default count as 1

This commit is contained in:
Camotoy
2024-06-12 22:47:47 -04:00
parent 52a93ecc18
commit 3528b1d692

View File

@@ -136,7 +136,7 @@ public final class RecipeRegistryLoader implements RegistryLoader<String, Map<Re
*/
private static ItemStack toItemStack(NbtMap nbt, MinecraftCodecHelper helper) {
int id = nbt.getInt("id");
int count = nbt.getInt("count");
int count = nbt.getInt("count", 1);
String componentsRaw = nbt.getString("components", null);
if (componentsRaw != null) {
byte[] bytes = Base64.getDecoder().decode(componentsRaw);