Skip to content

Commit

Permalink
Fix Camo #102
Browse files Browse the repository at this point in the history
  • Loading branch information
Mrbysco committed Oct 2, 2024
1 parent 23573f0 commit e5fe27d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -571,8 +571,8 @@ private boolean applyModifier(ItemStack tool, ItemStack modifier, RecipeHolder<I
// TODO: refactor these static below into another place, possibly InfuserModifier class

static boolean applyCamo(ItemStack tool, ItemStack mod) {
List<MobEffectInstance> effects = mod.getOrDefault(DataComponents.POTION_CONTENTS, PotionContents.EMPTY).customEffects();
for (MobEffectInstance e : effects) {
PotionContents potionContents = mod.getOrDefault(DataComponents.POTION_CONTENTS, PotionContents.EMPTY);
for (MobEffectInstance e : potionContents.getAllEffects()) {
if (e.getEffect() == MobEffects.NIGHT_VISION) {
return addSightModifier(tool);
}
Expand Down

0 comments on commit e5fe27d

Please sign in to comment.