tutorial:inventory
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
tutorial:inventory [2020/12/27 16:21] – [Inventory] Update Inventory and SidedInventory to recent yarn names (thank you Arbee!) technici4n | tutorial:inventory [2021/04/19 02:19] – onUse has a return type of ActionResult platymemo | ||
---|---|---|---|
Line 158: | Line 158: | ||
[...] | [...] | ||
@Override | @Override | ||
- | public void fromTag(CompoundTag tag) { | + | public void fromTag(BlockState state, |
- | super.fromTag(tag); | + | super.fromTag(state, |
Inventories.fromTag(tag, | Inventories.fromTag(tag, | ||
} | } | ||
Line 181: | Line 181: | ||
[...] | [...] | ||
@Override | @Override | ||
- | public | + | public |
- | if (world.isClient) return | + | if (world.isClient) return |
Inventory blockEntity = (Inventory) world.getBlockEntity(blockPos); | Inventory blockEntity = (Inventory) world.getBlockEntity(blockPos); | ||
Line 202: | Line 202: | ||
} | } | ||
} | } | ||
- | return | + | return |
} | } | ||
} | } | ||
Line 214: | Line 214: | ||
[...] | [...] | ||
@Override | @Override | ||
- | public | + | public |
... | ... | ||
if (!player.getStackInHand(hand).isEmpty()) { | if (!player.getStackInHand(hand).isEmpty()) { | ||
Line 233: | Line 233: | ||
} | } | ||
| | ||
- | return | + | return |
} | } | ||
} | } |
tutorial/inventory.txt · Last modified: 2024/08/27 03:03 by solidblock