Skip to content

Commit

Permalink
fixed a funni bug again
Browse files Browse the repository at this point in the history
  • Loading branch information
CammiePone committed Oct 18, 2021
1 parent 54f7f97 commit 3c03a2f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ yarn_mappings=1.17.1+build.43
loader_version=0.11.6

# Mod Properties
mod_version=1.4
mod_version=1.5
maven_group=dev.cammiescorner
archives_base_name=icarus

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,14 @@ public static void handle(MinecraftServer server, ServerPlayerEntity player, Ser

component.ifPresent(trinketComponent -> trinketComponent.getAllEquipped().forEach(pair -> {
ItemStack stack = pair.getRight();
WingItem wings = (WingItem) stack.getItem();

if(!wings.isUsable(stack))
wings.stopFlying(player);
if(stack.getItem() instanceof WingItem wings) {
if(!wings.isUsable(stack))
wings.stopFlying(player);

if(stack.isIn(MELTS))
stack.damage(1, player, p -> p.sendEquipmentBreakStatus(EquipmentSlot.CHEST));
if(stack.isIn(MELTS))
stack.damage(1, player, p -> p.sendEquipmentBreakStatus(EquipmentSlot.CHEST));
}
}));
}
});
Expand Down

0 comments on commit 3c03a2f

Please sign in to comment.