tutorial:containers
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Next revisionBoth sides next revision | ||
tutorial:containers [2020/08/14 07:03] – screen handlers part 2, needs extra testing leocth2 | tutorial:containers [2020/08/14 07:09] – screen handlers part 2, needs extra testing leocth2 | ||
---|---|---|---|
Line 113: | Line 113: | ||
@Override | @Override | ||
- | protected | + | protected |
- | return new BiggerChestContainer(syncId, playerInventory, | + | return new BiggerChestScreenHandler(syncId, playerInventory, |
} | } | ||
Line 128: | Line 128: | ||
@Override | @Override | ||
- | public int getInvSize() { | + | public int size() { |
return INVENTORY_SIZE; | return INVENTORY_SIZE; | ||
} | } | ||
Line 135: | Line 135: | ||
public void fromTag(CompoundTag tag) { | public void fromTag(CompoundTag tag) { | ||
super.fromTag(tag); | super.fromTag(tag); | ||
- | this.inventory = DefaultedList.ofSize(this.getInvSize(), ItemStack.EMPTY); | + | this.inventory = DefaultedList.ofSize(this.size(), ItemStack.EMPTY); |
if (!this.deserializeLootTable(tag)) { | if (!this.deserializeLootTable(tag)) { | ||
Inventories.fromTag(tag, | Inventories.fromTag(tag, |
tutorial/containers.txt · Last modified: 2022/05/27 15:57 by solidblock