Skip to content

Commit

Permalink
fix: autocrafter contents not saving
Browse files Browse the repository at this point in the history
  • Loading branch information
MrTJP committed Jun 22, 2023
1 parent 8e9c9fa commit 2db953c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
public class AutoCrafterBlock extends BaseMachineBlock {

public AutoCrafterBlock() {
super(WOODEN_PROPERTIES);
super(STONE_PROPERTIES);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,15 @@ public AutoCrafterTile() {
public void saveToNBT(CompoundNBT tag) {
super.saveToNBT(tag);
tag.put("storage_inv", storageInventory.createTag());
tag.put("crafting_grid", craftingGrid.createTag());
tag.put("plan_inv", planInventory.createTag());
tag.putByte("plan_slot", (byte) planSlot);
}

@Override
public void loadFromNBT(CompoundNBT tag) {
super.loadFromNBT(tag);
storageInventory.fromTag(tag.getList("storage_inv", 10));
craftingGrid.fromTag(tag.getList("crafting_grid", 10));
planInventory.fromTag(tag.getList("plan_inv", 10));
planSlot = tag.getByte("plan_slot") & 0xFF;
}

Expand Down

0 comments on commit 2db953c

Please sign in to comment.