We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent adcb684 commit 19759c2Copy full SHA for 19759c2
common/src/main/java/dev/itsmeow/whisperwoods/blockentity/HandOfFateBlockEntity.java
@@ -339,7 +339,7 @@ public Item getDisplayItem() {
339
}
340
341
public void read(CompoundTag nbt) {
342
- if (nbt.contains("recipe")) {
+ if (nbt.contains("recipe") && !"empty".equals(nbt.getString("recipe"))) {
343
this.setRecipe(RECIPES.getOrDefault(nbt.getString("recipe"), null));
344
if (this.data != null) {
345
this.data.read(nbt);
@@ -355,6 +355,8 @@ public CompoundTag write(CompoundTag compound) {
355
356
this.data.write(compound);
357
358
+ } else {
359
+ compound.putString("recipe", "empty");
360
361
return compound;
362
0 commit comments