User Tools

Site Tools


tutorial:inventory

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
tutorial:inventory [2022/01/30 03:38] – Corrected Error in Example Code outercloudstudiotutorial:inventory [2022/07/19 02:44] – external edit 127.0.0.1
Line 103: Line 103:
     default void setStack(int slot, ItemStack stack) {     default void setStack(int slot, ItemStack stack) {
         getItems().set(slot, stack);         getItems().set(slot, stack);
-        if (stack.getCount() > getMaxCountPerStack()) { +        if (stack.getCount() > stack.getMaxCount()) { 
-            stack.setCount(getMaxCountPerStack());+            stack.setCount(stack.getMaxCount());
         }         }
     }     }
tutorial/inventory.txt · Last modified: 2023/11/06 23:28 by binaris00