All Mods Resource Packs Data Packs Shaders Modpacks Plugins
Trinkets Updated

Trinkets Updated

by Patbox • Downloads: 0 • Followers: 0
Description
Gallery
Changelog
Versions

Trinkets Updated

A data-driven accessory mod for Minecraft for Fabric and NeoForge modloaders, based on Trinkets by Emi

Image of the Trinkets UI

About

Trinkets adds a slot group and slot system to Minecraft. Slot groups are collections of slots for a certain body part or more vague area. By default, there are 6 slot groups (head, chest, legs, feet, offhand, hand) that can have slots added to them, but more groups can be added if desired. Trinkets' UI is intuitive to use, accessible, and attempts to do away with clutter. Its system means that you'll never have a slot that's not used for anything, as mods request the slots they want.

Features

Model Attachment API

Flexible and designed with compatibility in mind API allowing you to easily render custom trinkets as attached to any body part of any entity based on vanilla model system. This includes compatibility with mods and resource packs such as Entity Model Features and Fresh Animations.

Fully optional Cosmetic Slot support and trinket equipment hiding

Trinkets Updated adds optional support for cosmetic slots and trinket hiding directly into the mod. While by default these features are disabled (as they could feel unfair in multiplayer setting), players in singleplayer, server owners on servers and modpacks makers for all can easily enable it by changing the config file, allowing them to set the desired experience just as they want to.

Configurable styling

While by default Trinkets Updated should look exactly like good old original Trinkets, it exposed multiple styling options, from changing how the slots are positioned, whatever they are hidden or show extra indicators such as slot being compatible with currently held item or show that slot contains more other slots within. Additionally, you can toggle both slot and item tooltips, which can help you to keep the style you wanted. S

Data Driven at it's core

Custom trinkets can be defined with json files via tags or custom components on the items. Additionally, you can easily define the rendering of such trinkets purely with a resource pack. Slots and slot groups are also data driven, making it easy to create and modify them, from their size to mobs which support them. Mods need to declare to use slots before they are accessible to the player, preventing creation of unused ones. You can get some example official datapacks on Modrinth!

Vanilla component and feature support

Trinkets implement a basic support for vanilla features such as glider component, which allows you to enable items using them to be easily turned into a trinket with a simple data pack and a resource pack. Additionally, things such as enchantments should also work fully correctly, giving you bit of that needed flexibility.

Multiplatform without extra dependencies needed

Only dependency needed by Trinkets Updated is local mod loader apis (Fabric API on Fabric, nothing extra on NeoForge). This allows to keep the library slim, easy to port and have minimal effects on other unrelated areas. Trinkets API's themselves were also made to be used in the same way on both Fabric and NeoForge, eliminating requirement of handling integration code separately on both platforms.

Download

You can get this mod from Modrinth, CurseForge or GitHub Releases

Developers

To add Trinkets to your project you need to add these repos to your repositories in your build.gradle

repositories {
    maven {
        name = "Nucleoid"
        url = 'https://maven.nucleoid.xyz/releases'
    }
}

And then to add Trinkets you add it as a dependency in your build.gradle

dependencies {
    implementation "eu.pb4:trinkets:${trinkets_version}"
}

Trinkets works as a universal jar, which means the same jar file can be used for Fabric, NeoForge and common. For optional / conditional compatibility, you can check for trinkets_updated mod id on both platform.

For versions, see https://maven.nucleoid.xyz/#/releases/eu/pb4/trinkets

For basic tutorials and comprehensive documentation, visit this repository's wiki! You can also see the test mod here: https://github.com/Patbox/trinkets/tree/main/src/testmod

All Versions

+ Add Version
Name Game version Platforms Published Downloads Actions
26.2
Fabric Neoforge
1d ago 1
26.1.x
Fabric Neoforge
1d ago 1
26.3
Fabric Neoforge
1d ago 1
26.3.x
Fabric Neoforge
1d ago 1
26.1.x
Fabric Neoforge
1d ago 1
26.2
Fabric Neoforge
1d ago 1
26.1.x
Fabric Neoforge
1d ago 1
26.2
Fabric Neoforge
1d ago 1
26.2
Fabric Neoforge
1d ago 1
26.2
Fabric Neoforge
1d ago 1
26.1.x
Fabric Neoforge
1d ago 1
26.2-rc-2
Fabric Neoforge
1d ago 1
26.1.x
Fabric Neoforge
1d ago 1
26.1.x
Fabric Neoforge
1d ago 1
26.1.x
Fabric Neoforge
1d ago 1
26.1.x
Fabric Neoforge
1d ago 1
26.1.x
Fabric Neoforge
1d ago 1
26.1.x
Fabric Neoforge
1d ago 1
26.1.x
Fabric Neoforge
1d ago 1
26.1.x
Fabric Neoforge
1d ago 1
26.1.x
Fabric Neoforge
1d ago 1
26.1.x
Fabric Neoforge
1d ago 1
26.1.x
Fabric
1d ago 1
1.21.11
Fabric
1d ago 1
  • Updated to 26.3 (rc-1).
  • Added TrinketsAttachment#getSlotAccess(String slotId, int index, boolean cosmetic) - Allows to easily access cosmetic slots.
  • Fixed TrinketsAttachment#getSlotAccess(TrinketSlotReference) not distinguishing cosmetic slots correctly.
  • Fixed mixin error warning on dedicated servers.
  • NeoForge version might not work as it was untested, hopefully it will™
  • Added new events:
  • TrinketModifySlotCountCallback - Allows you to easily modify the Trinket inventory's slot count dynamically. Server only!
  • TrinketSlotCountChangedCallback - Triggered after slot count was changed!
  • TrinketEquipmentAttributeModifiersCallback - Allows to provide additional attributes for a given trinket item.
  • New TrinketInventory methods:
  • #updateSlotCount() - Triggers update of the amount of available slots for given inventory.
  • #addSlotCountModifier(AttributeModifier) - Adds slot count attribute modifier.
  • #removeSlotCountModifier(Identifier) - Removes slot count attribute modifier.
  • New TrinketSlotUtils class with these utility methods.
  • #createSlot(TrinketSlotAccess access, int x, int y) - Creates standalone slot for given slot access.
  • #mayPlace(TrinketSlotAccess, ItemStack) - If item can be inserted into given slot.
  • #mayPickup(TrinketSlotAccess, ItemStack) - If item can be picked up from given slot.
  • #isSlotCompatible(TrinketSlotAccess, ItemStack) - Checks if given slot is logically compatible with stack.
  • #isEquipable(TrinketSlotAccess, ItemStack) - Checks if given stack can be equipped.
  • Added /trinkets <entity> <slot> modifiers command, allowing you to easily modify amount of slots at runtime.
  • Added compatibility with Just Enough Items, Roughly Enough Items and Reliable Recipe Viewer's exclusion areas.
  • Fixed removing NBT data with /data command not clearing out Trinkets slots correctly.
  • Added support for exclusion areas for Just Enough Items and Roughly Enough Items.
  • Deprecate TrinketRendererRegistry#getRenderer for removal.
  • Added TrinketRendererRegistry#registerRenderer variant that take a Function<EntityRendererProvider.Context, TrinketRenderer> as it's argument.
  • Command text is now translatable.
  • Added new events:
  • TrinketModifySlotCountCallback - Allows you to easily modify the Trinket inventory's slot count dynamically. Server only!
  • TrinketSlotCountChangedCallback - Triggered after slot count was changed!
  • TrinketEquipmentAttributeModifiersCallback - Allows to provide additional attributes for a given trinket item.
  • New TrinketInventory methods:
  • #updateSlotCount() - Triggers update of the amount of available slots for given inventory.
  • #addSlotCountModifier(AttributeModifier) - Adds slot count attribute modifier.
  • #removeSlotCountModifier(Identifier) - Removes slot count attribute modifier.
  • New TrinketSlotUtils class with these utility methods.
  • #createSlot(TrinketSlotAccess access, int x, int y) - Creates standalone slot for given slot access.
  • #mayPlace(TrinketSlotAccess, ItemStack) - If item can be inserted into given slot.
  • #mayPickup(TrinketSlotAccess, ItemStack) - If item can be picked up from given slot.
  • #isSlotCompatible(TrinketSlotAccess, ItemStack) - Checks if given slot is logically compatible with stack.
  • #isEquipable(TrinketSlotAccess, ItemStack) - Checks if given stack can be equipped.
  • Added /trinkets <entity> <slot> modifiers command, allowing you to easily modify amount of slots at runtime.
  • Added compatibility with Just Enough Items, Roughly Enough Items and Reliable Recipe Viewer's exclusion areas.
  • Fixed removing NBT data with /data command not clearing out Trinkets slots correctly.
  • Added support for exclusion areas for Just Enough Items and Roughly Enough Items.
  • Deprecate TrinketRendererRegistry#getRenderer for removal.
  • Added TrinketRendererRegistry#registerRenderer variant that take a Function<EntityRendererProvider.Context, TrinketRenderer> as it's argument.
  • Command text is now translatable.
  • Added support for toggling visibility of Trinkets:
  • It's disabled by default and needs to be enabled by the server to work. Toggling it on client alone (when not in singleplayer) will do nothing.
  • Trinkets will be disabled both locally and for any other player seeing you.
  • This was a requested feature, and while I originally though about making it an addon, decided to just add it direct as default disabled thing.
  • Added support for decorative / cosmetic slots:
  • It's disabled by default and needs to be enabled by the server to work. Toggling it on client alone (when not in singleplayer) will do nothing.
  • Trinkets in this slot won't apply any gameplay effect, instead being just visual.
  • Trinkets in cosmetic slots will override rendering of the one in regular slot.
  • This was a requested feature, and while I originally though about making it an addon, decided to just add it direct as default disabled thing.
  • Reworked Trinket slot logic to no split the slot ids from visual position of slots:
  • This allows more flexibility / future changes, while preventing slot id desyncs.
  • Additionally changed the Force Sidebar option to a Style selector with these options:
  • Default - Classic style of Trinkets, equal to old OFF value,
  • Grouped Sidebar - Sidebar that keeps the slot groups, equal to old ON value,
  • Flat Sidebar - Sidebar, but all slots are visible at all times (NEW!).
  • Added trinkets:any_trinket predicate type for slot definitions.
  • Added option to highlight compatible slots (disabled by default).
  • Added TrinketCanUnequipCallback, matching the equip based one (or canUnequip on TrinketCallback).
  • The data driven rendering is now part of the api, allowing data-generation of related files as well as easy way to add custom logic to it.
  • Lanterns now have a default visuals when put in Belt slot.
  • Bunch of bugfixes, including a crash™

## What's Changed

## New Contributors

  • Added new equipped and allEquipped methods, as alternative to deprecated methods below. (Will be backported to 26.1)
  • They require the requireActive argument to be provided (checks if trinket is allowed to apply effects) and return List<TrinketSlotAccess> over a Tuple<TSA, ItemStack>.
  • Deprecated getEquipped and getAllEquipped methods, as Tuple class they depended on got removed.
  • (26.2) Provided temporary implementation of Tuple to allow some deprecation period before removal of effected methods.
  • NeoForge compatibility is untested and might not work correctly.

  • Fixed game crashing with -Dmixin.debug=true

  • Added Config Screen to allow dynamic in game modification of Trinkets settings. It's accessible via Mod Menu/List.
  • Added Sidebar-only UI Style:
  • Rather than having slots inside of other equipment slots, they will shown on the sidebar instead.
  • It is optional and disabled by default. It can be enabled in Trinkets config.
  • Sidebar size can now be configured.
  • Improved compatibility with Entity Model Features mod:
  • Applies both api/code and data driven trinket rendering (so won't change for mods not using Trinket's provided utility methods).
  • Do note the compatibility isn't perfect and more heavily modified (or vanilla non-conforming) models
might show trinkets wrong or not render them at all.
  • Most popular packs, such as Fresh Animations (including player addon) will look correctly now through!
  • Added support for rendering trinkets in first person:
  • It is optional and disabled by default. It can be enabled in Trinkets config.
  • Added events for checking if item is compatible with trinket slot and for checking if trinket is equipable.
  • Added datagen utilities:
  • Allows easily create / configure slot types and entities with data generation.
  • See local loader's api for reference.
  • You can now set the asset_id field in Trinkets Equipment component.
  • Added an option to toggle showing slot names as a tooltip on hover (it's disabled by by default).
  • Added an option to toggle Trinket item tooltip (it's enabled by default).
  • Max default stack size of trinkets slots is now set to 1 (like equipment slots):
  • This can be changed by setting the max_stack_size property in slot type definition.
  • Trinkets are counted within player Inventory contains checks and in case of /clear command.
  • Data driven trinket rendering is now exclusive with code driven one.
  • Totems of Undying (and other items with death protection component) will now work in Trinkets slots (requires a datapack to enable it).
  • Improved the look of Trinket slot indicator option.
  • Added support for creation of passive trinkets and slot types that won't apply any effects by default.
  • Trinkets can now make players hidden for entities using LivingEntity#PLAYER_NOT_WEARING_DISGUISE_ITEM check for trinkets being in the minecraft:gaze_disguise_equipment tag.
  • Attributes provided via trinkets:attributes component are now unique by default. This behaviour can be toggled by changing the unique field.
  • Attributes provided via trinkets:attributes component can now customise the display just like vanilla ones do.
  • Fixed new slot predicate format not being read correctly.
  • Added support for hidden slots (slots that aren't accessible directly out of default trinkets slots).
  • Added injected-interface for ItemStack, adding trinkets-compatible hurtAndBreak method.
  • Data driven trinket models definitions can now define the priority, at which they are applied:
  • Definition will override the ones with lower or equal priority rather than just based on load order.
  • Default models (provided with Trinkets itself) all have priority set to -1000
  • API for getting only "renderable" and droppable item stacks from trinket attachment. These apis are primarily intended for improving mod compatibility.
  • Fixed compatibility with Controlify mod.


## What's Changed
  • prevent Invalid player data on dedicated servers by @macuguita in https://github.com/Patbox/trinkets/pull/12
  • Slot name now displays even if callback prevents equipment.
  • It will however change the color from blue to dark gray.

  • 26.1 Slot Modification and GUI fixes by @Aquaeyes in https://github.com/Patbox/trinkets/pull/10
  • Fix tag support for entity slot definition
  • Optionally toggable extended slot indicator icons (configured via config/tinkers.json file)
  • A new icon

Few more fixes and new apis, most notably:
  • TrinkersApi#getDropRule
  • TrinketsAttachment#getInventory(slotId)
  • Restored TrinketsInventory#getAttachment
  • (Breaking, but not used) TrinketSlotReference no longer holds SlotType
  • TrinketsAttachment#getSlotAccess and TrinketsInventory#getSlotAccess to get valid slot access (or null)
  • Rename TrinketRenderer#extractStates to TrinketRenderer#submit (ABI compatible via mixin)
  • CrustyFroge (CurseForge) release as soon as they approve

Fix trinket callback tick function not being called (oops).
Glider component now works correctly in Trinkets slots (no equipment visuals yet)

Now with a lot of refactors! As my plan to make trinkets bit more modern, I decided to make the api/impl separation cleaner, but also prepare it for addition of new features and improvements.
## Main changes include:
  • Updated to 26.1.1 and remapped to Mojmap
  • Changed package from dev.emi.trinkets to eu.pb4.trinkets, as well as many renames
  • Texture files moved and cleaned up to match current vanilla standard
  • SlotAttributes was reworked and no longer depends on unregistered attribute instances
  • Events now use the Yumi Framework over Fabric one (as pre-requisite of NeoForge support)
  • Slot predicates can now work as an AND and OR logic in json, by using objects with "and" key or "or" key. These can be nested as much as one needs.
  • Dropped dependency on Cardinal Components API.
You can see the more complete list here: <https://github.com/Patbox/trinkets/blob/main/patbox-changes>

You also read this right, I plan to make my fork of Trinkets compatible with NeoForge as a single universal jar (same as some of LambdaAurora's mods and libraries). However my focus still be first and foremost on the Fabric side of things, since I do think it's where the fun is at™
Trinkets Updated Icon
Download Trinkets Updated
Select game version
Select platform