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

Commit

Permalink
Revert usage of loom interface injection
Browse files Browse the repository at this point in the history
Fixes #58, bug in fabric-loom: FabricMC/fabric-loom#611
  • Loading branch information
florensie committed Apr 10, 2022
1 parent 74ec104 commit 70aa948
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 8 deletions.
7 changes: 6 additions & 1 deletion 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).

## [7.0.1] - 2022-04-10
### Fixed
- Removed use of loom's interface injection as it caused issues with refmap remapping

## [7.0.0] - 2022-04-09
### Added
- You can now toggle an Artifact to effects-only, which will hide it on the player model
Expand Down Expand Up @@ -241,7 +245,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- Initial release

[Unreleased]: https://github.com/florensie/artifacts-fabric/compare/v7.0.0...HEAD
[Unreleased]: https://github.com/florensie/artifacts-fabric/compare/v7.0.1...HEAD
[7.0.0]: https://github.com/florensie/artifacts-fabric/compare/v7.0.0...v7.0.1
[7.0.0]: https://github.com/florensie/artifacts-fabric/compare/v6.0.0...v7.0.0
[6.0.0]: https://github.com/florensie/artifacts-fabric/compare/v5.0.1...v6.0.0
[5.0.2]: https://github.com/florensie/artifacts-fabric/compare/v5.0.1...v5.0.2
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ minecraft_version=1.18.2-rc1
loader_version=0.13.3

# Mod Properties
mod_version=7.0.0
mod_version=7.0.1
maven_group=artifacts
archives_base_name=artifacts

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package artifacts.common.item.curio.belt;

import artifacts.common.item.curio.CurioItem;
import artifacts.extensions.MobEffectInstanceExtensions;
import net.minecraft.sounds.SoundEvents;
import net.minecraft.world.effect.MobEffectCategory;
import net.minecraft.world.entity.LivingEntity;
Expand All @@ -13,7 +14,7 @@ protected void curioTick(LivingEntity livingEntity, ItemStack stack) {
// Reduce duration of all negative status effects to 80
livingEntity.getActiveEffectsMap().forEach((effect, instance) -> {
if (!effect.isInstantenous() && effect.getCategory() != MobEffectCategory.BENEFICIAL && instance.getDuration() > 80) {
instance.artifacts$setDuration(80);
((MobEffectInstanceExtensions) instance).artifacts$setDuration(80);
}
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public abstract class MobEffectInstanceMixin implements MobEffectInstanceExtensi
public void artifacts$setDuration(int duration) {
// Recursively set duration for hidden effects
if (this.hiddenEffect != null) {
this.hiddenEffect.artifacts$setDuration(duration);
((MobEffectInstanceExtensions) this.hiddenEffect).artifacts$setDuration(duration);
}

this.duration = duration;
Expand Down
4 changes: 0 additions & 4 deletions src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,6 @@
},

"custom": {
"loom:injected_interfaces": {
"net/minecraft/class_1429": ["artifacts/extensions/AnimalExtensions"],
"net/minecraft/class_1293": ["artifacts/extensions/MobEffectInstanceExtensions"]
},
"cardinal-components": [
"artifacts:dropped_item_entity",
"artifacts:entity_kill_tracker",
Expand Down

0 comments on commit 70aa948

Please sign in to comment.