Appendix D. Items Reference

The items module provides a suite of useful functions for creating item stacks, which are collections of objects that are typically stored in a player’s inventory. Each of the functions in this appendix can be called in three ways:

Image If there is no parameter supplied, the function will return the equivalent material, that is, one of the values of the net.canarymod.api.inventory.ItemType type. For example, calling items.diamondOre() will return the net.canarymod.api.inventory.ItemType.DiamondOre value, which can be used anywhere the CanaryMod API expects a net.canarymod.api.inventory.ItemType object.

If a number is supplied ...

Get A Beginner’s Guide to Writing Minecraft Plugins in JavaScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.