Skip to content
This repository has been archived by the owner on Jan 4, 2024. It is now read-only.

Commit

Permalink
Fix trinket EAM implementation (#65)
Browse files Browse the repository at this point in the history
  • Loading branch information
florensie committed Jun 22, 2022
1 parent c1c3ef3 commit 0479cb4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Fixed
- Fix Trinket entity attributes implementation (#65)

## [7.1.1] - 2022-06-22
### Fixed
- Fix deprecation warning when playing with Roughly Enough Items
Expand Down
7 changes: 5 additions & 2 deletions src/main/java/artifacts/common/item/curio/CurioItem.java
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,13 @@ protected void curioTick(LivingEntity livingEntity, ItemStack stack) {

@Override
public final Multimap<Attribute, AttributeModifier> getModifiers(ItemStack stack, SlotReference slot, LivingEntity entity, UUID uuid) {
Multimap<Attribute, AttributeModifier> modifiers = Trinket.super.getModifiers(stack, slot, entity, uuid);
if (TrinketsHelper.areEffectsEnabled(stack)) {
return this.applyModifiers(stack, slot, entity, uuid);
Multimap<Attribute, AttributeModifier> artifactModifiers = this.applyModifiers(stack, slot, entity, uuid);
modifiers.putAll(artifactModifiers);
}
return HashMultimap.create();

return modifiers;
}

protected Multimap<Attribute, AttributeModifier> applyModifiers(ItemStack stack, SlotReference slot, LivingEntity entity, UUID uuid) {
Expand Down

0 comments on commit 0479cb4

Please sign in to comment.