ephys / mc-shulker-enchantments

Enchantments you can use on your Shulker boxes! (See curseforge page)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Shulker Enchantments

See the CurseForge page for details

For developers

If your mod provides items that keep or have their own inventory in item form (such as Shulker Boxes, Satchels, Backpacks, etc...), and you wish for your items to support the enchantments provided by this mod, you can do so using the native Tags and the Capabilities systems.

Tagging

You simply need to tag your item with the shulker_enchantments:shulker_like item tag.
This will tell ShulkerEnchantments that your item accepts the enchantment.

Start by creating a file in resources called data/shulker_enchantments/tags/items/shulker_like.json, and place the following JSON in it:

{
  "replace": false,
  "values": ["<YOUR ITEM ID>"]
}

Where <YOUR ITEM ID> is the ID of the item you wish to add support to (eg. minecraft:shulker_box).

For more information about tags, see The Minecraft Tag documentation and Forge's Tag documentation

Capabilities

Lastly, your item's ItemStacks must have Forge's CapabilityItemHandler.ITEM_HANDLER_CAPABILITY capability attached. See Forge's Capabilities documentation to learn more about attaching capabilities to ItemStacks.

If you do not provide this capability, your item's inventory will be impossible to manipulate.

See how we add Item Handler capabilities to the native ShulkerBox ItemStack

Enchantment Glint

Shulker Box implementations typically use a TileEntity renderer to render the Shulker Box Item (emphasis on Item).
These typically do not support enchantment glints.
As a solution, you could use the TileEntity renderer only for the Block, and define a baked model for the shulker box item.

This is what we did for the vanilla shulker box

About

Enchantments you can use on your Shulker boxes! (See curseforge page)


Languages

Language:Java 100.0%