https://github.com/ephys/mc-shulker-enchantments
Enchantments you can use on your Shulker boxes! (See curseforge page)
https://github.com/ephys/mc-shulker-enchantments
Last synced: 10 months ago
JSON representation
Enchantments you can use on your Shulker boxes! (See curseforge page)
- Host: GitHub
- URL: https://github.com/ephys/mc-shulker-enchantments
- Owner: ephys
- Created: 2020-10-19T20:34:45.000Z (over 5 years ago)
- Default Branch: 1.18.2
- Last Pushed: 2023-04-14T11:45:15.000Z (about 3 years ago)
- Last Synced: 2025-01-31T16:51:40.310Z (over 1 year ago)
- Language: Java
- Homepage:
- Size: 572 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Shulker Enchantments
[See the CurseForge page for details](https://www.curseforge.com/minecraft/mc-mods/shulker-enchantments)
## 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:
```json
{
"replace": false,
"values": [""]
}
```
Where `` 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](https://minecraft.gamepedia.com/Tag) and [Forge's Tag documentation](https://mcforge.readthedocs.io/en/latest/utilities/tags/)
### Capabilities
Lastly, your item's *`ItemStack`s* must have Forge's `CapabilityItemHandler.ITEM_HANDLER_CAPABILITY` capability attached. See [Forge's Capabilities documentation](https://mcforge.readthedocs.io/en/stable/datastorage/capabilities/) 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](https://github.com/ephys/mc-shulker-enchantments/blob/0db51810ae4b0fcb92214f1e4c79d6b57e1522b4/src/main/java/be/ephys/shulker_enchantments/siphon/SiphonEnchantment.java#L67)
### 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](https://github.com/ephys/mc-shulker-enchantments/blob/master/src/main/resources/assets/minecraft/models/item/black_shulker_box.json)