tutorial:screenhandler
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
tutorial:screenhandler [2022/12/17 15:37] – registry -> registries miir | tutorial:screenhandler [2024/02/19 02:51] (current) – [ScreenHandler and Screen] transferSlot -> quickMove per yarn mappings netuserget | ||
---|---|---|---|
Line 145: | Line 145: | ||
static { | static { | ||
BOX_BLOCK = Registry.register(Registries.BLOCK, | BOX_BLOCK = Registry.register(Registries.BLOCK, | ||
- | BOX_BLOCK_ITEM = Registry.register(Registries.ITEM, | + | BOX_BLOCK_ITEM = Registry.register(Registries.ITEM, |
//The parameter of build at the very end is always null, do not worry about it | //The parameter of build at the very end is always null, do not worry about it | ||
Line 217: | Line 217: | ||
// Shift + Player Inv Slot | // Shift + Player Inv Slot | ||
@Override | @Override | ||
- | public ItemStack | + | public ItemStack |
ItemStack newStack = ItemStack.EMPTY; | ItemStack newStack = ItemStack.EMPTY; | ||
Slot slot = this.slots.get(invSlot); | Slot slot = this.slots.get(invSlot); | ||
Line 261: | Line 261: | ||
int y = (height - backgroundHeight) / 2; | int y = (height - backgroundHeight) / 2; | ||
drawTexture(matrices, | drawTexture(matrices, | ||
+ | //in 1.20 or above,this method is in DrawContext class. | ||
} | } | ||
tutorial/screenhandler.txt · Last modified: 2024/02/19 02:51 by netuserget