Compatibility
Minecraft: Java Edition
1.20.1–1.20.2
Platforms
Supported environments
Creators
Details
Licensed MIT
Published 2 years ago
Updated 2 years ago
Changelog
-
Command Arguments Added:
- The
customgivecommand now accepts two arguments:block_or_item: Expects a string representing the block or item name.amount: Expects an integer representing the amount of the custom item to give.
- This change allows for more flexibility in specifying the custom item and its quantity.
- The
-
Item Mapping Method Added:
- Added
getItemByNamemethod to map item names (block_or_item) to their respectiveIteminstances. - This method takes the lowercase item name as input and returns the corresponding
Itemobject. - The mapping includes several default items like "stone," "diamond," "iron_ingot," and others.
- Added
-
Usage of Block/Item Name and Amount:
- The
giveCustomItemFromClipboardmethod now takesblockOrItemandamountparameters to determine which item to create and how many to give.
- The
-
Error Message Update:
- In case of invalid NBT data or an unrecognized block/item name, the error message has been updated to "Invalid NBT data or block/item name."
-
ItemStack Amount:
- The
createItemStackFromNBTmethod now sets the amount of theItemStackbased on theamountparameter passed to it.
- The
-
Expanded Item Mapping:
- The
getItemByNamemethod includes a switch-case block that covers a variety of common items. You can extend this mapping as needed to support more items.
- The
These changes enhance the functionality and configurability of the customgive command, making it more versatile for giving custom items in the game.
Files
Metadata
Release channel
ReleaseVersion number
1.0.3Loaders
Game versions
1.20.1–1.20.2Downloads
396Publication date
October 7, 2023 at 12:57 AMPublisher

LianJordaan
Owner


