Skip to content

Commit

Permalink
Splatter accepts offhand enchantments.
Browse files Browse the repository at this point in the history
  • Loading branch information
Provismet committed Feb 9, 2024
1 parent a516991 commit 9611bc0
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

import com.provismet.AdditionalArmoury.registries.AAEnchantmentTargets;
import com.provismet.CombatPlusCore.enchantments.WeaponUtilityEnchantment;
import com.provismet.CombatPlusCore.utility.CPCEnchantmentHelper;

import net.minecraft.enchantment.Enchantment;
import net.minecraft.entity.EquipmentSlot;

public class SplatterEnchantment extends WeaponUtilityEnchantment {
Expand All @@ -24,4 +26,10 @@ public int getMaxPower(int level) {
public int getMaxLevel () {
return 2;
}

@Override
protected boolean canAccept(Enchantment other) {
if (CPCEnchantmentHelper.isOffhand(other)) return true;
return super.canAccept(other);
}
}

0 comments on commit 9611bc0

Please sign in to comment.