Campanion

Campanion

2M Downloads

Loyalty can't be applied to tridents

copygirl opened this issue ยท 4 comments

commented

Due to the mixin to Enchantment.isAcceptableItem, loyalty can't be put on any item anymore including Vanilla tridents.

Additionally, one question: One of my friends was hoping loyalty could be put on spears. Is this not supposed to be possible?

commented

Fixed in d5d100b

commented

Ah, yeah that is a problem. Also yes, loyalty isn't supposed to be able to be put on spears, but piercing should. The enchantments are super bugged though, definitely need to fix that.

commented

I'm just gonna link this so when I get around to tweaking the PR we can look into addressing this again FabricMC/fabric#1102

commented

Depending on how long it will take for the PR to be included, a simple fix could still be applied to the mixin in Campanion.

Not that it's a huge issue for me personally. As the server owner I just went into creative and applied the enchantment that way. But players not able or willing to "cheat" this way might be affected. Loyalty is arguably the most important enchantment on tridents.

edit: Something along the lines of:

if (stack.getItem() instanceof SpearItem) {
	if ((Object) this == Enchantments.PIERCING || (Object) this == Enchantments.IMPALING) {
		info.setReturnValue(true);
	} else if ((Object) this == Enchantments.LOYALTY) {
		info.setReturnValue(false);
	}
}