User Tools

Site Tools


tutorial:containers

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
tutorial:containers [2020/02/27 16:26] – use an alternate uncasting way mkpolitutorial:containers [2020/02/27 16:34] – adjusment mkpoli
Line 3: Line 3:
  
 ==== Block and BlockItem ==== ==== Block and BlockItem ====
-First we need to create Block and register it as well as its BlockItem.+First we need to create the Block and register it as well as its BlockItem.
  
 <code java [enable_line_numbers="true"] BiggerChestBlock.java> <code java [enable_line_numbers="true"] BiggerChestBlock.java>
Line 84: Line 84:
 } }
 </code> </code>
 +
 +You may refer to other tutorials to modify the appearance and other properties of the Block by adding models or adjusting rendering later.
  
 ==== BlockEntity ==== ==== BlockEntity ====
-BlockEntities are used for managing container inventories. Actually, it implements Inventory interface.+BlockEntity is used for managing container inventories. Actually, it implements Inventory interface. It is required to save and load the inventory.
  
 <code java [enable_line_numbers="true"] BiggerChestBlockEntity.java> <code java [enable_line_numbers="true"] BiggerChestBlockEntity.java>
tutorial/containers.txt · Last modified: 2022/05/27 15:57 by solidblock