We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d696438 commit a2d8178Copy full SHA for a2d8178
Common/src/main/java/net/darkhax/bookshelf/api/serialization/SerializerIngredient.java
@@ -1,5 +1,6 @@
1
package net.darkhax.bookshelf.api.serialization;
2
3
+import com.google.gson.JsonArray;
4
import com.google.gson.JsonElement;
5
import net.minecraft.nbt.Tag;
6
import net.minecraft.network.FriendlyByteBuf;
@@ -16,6 +17,12 @@ private SerializerIngredient() {
16
17
@Override
18
public Ingredient fromJSON(JsonElement json) {
19
20
+ // Support Empty Ingredient
21
+ if (json instanceof JsonArray array && array.isEmpty()) {
22
+
23
+ return Ingredient.EMPTY;
24
+ }
25
26
return Ingredient.fromJson(json);
27
}
28
0 commit comments