Skip to content

Commit

Permalink
Fix: Crystalite Elytra should give set bonus
Browse files Browse the repository at this point in the history
  • Loading branch information
OpenBagTwo committed Oct 14, 2024
1 parent 9a2b329 commit 57fc43a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import org.betterx.betterend.events.ItemTooltipCallback;
import org.betterx.betterend.interfaces.MultiModelItem;
import org.betterx.betterend.item.CrystaliteArmor;
import org.betterx.betterend.item.CrystaliteElytra;
import org.betterx.betterend.registry.*;
import org.betterx.betterend.world.generator.GeneratorOptions;

Expand Down Expand Up @@ -65,7 +66,9 @@ public void onInitializeClient() {

public static void registerTooltips() {
ItemTooltipCallback.EVENT.register((player, stack, context, lines) -> {
if (stack.getItem() instanceof CrystaliteArmor) {
if ((stack.getItem() instanceof CrystaliteArmor)
|| (stack.getItem() instanceof CrystaliteElytra)
) {
boolean hasSet = false;
if (player != null) {
hasSet = CrystaliteArmor.hasFullSet(player);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ public CrystaliteArmor(Type type, Properties settings) {

public static boolean hasFullSet(LivingEntity owner) {
for (ItemStack armorStack : owner.getArmorSlots()) {
if (!(armorStack.getItem() instanceof CrystaliteArmor)) {
if (
!(armorStack.getItem() instanceof CrystaliteArmor)
&& !(armorStack.getItem() instanceof CrystaliteElytra)
) {
return false;
}
}
Expand Down

0 comments on commit 57fc43a

Please sign in to comment.