Skip to content

Commit

Permalink
Merge pull request #14 from milkev/1.20.1
Browse files Browse the repository at this point in the history
Removed log spam. Oops
  • Loading branch information
milkev authored Mar 18, 2024
2 parents d3e96ef + 8eb8b14 commit b58051f
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/main/java/space/bbkr/shulkercharm/ShulkerCharmItem.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,13 @@ public void tick(ItemStack stack, SlotReference slot, LivingEntity entity) {

@Override
public void onUnequip(ItemStack stack, SlotReference slot, LivingEntity entity) {
System.out.println("onUnequiped called");
super.onUnequip(stack, slot, entity);
if (entity instanceof PlayerEntity player) {
if (!player.getWorld().isClient
&& ShulkerCharm.CHARM_FLIGHT.grants(player, VanillaAbilities.ALLOW_FLYING)
&& !slot.inventory().getStack(0).isOf(ShulkerCharm.SHULKER_CHARM)) {
ShulkerCharm.CHARM_FLIGHT.revokeFrom(player, VanillaAbilities.ALLOW_FLYING);
if (!VanillaAbilities.ALLOW_FLYING.isEnabledFor(player)) {
System.out.println("Shulker Charm Unequipped");
player.getAbilities().flying = false;
player.addStatusEffect(new StatusEffectInstance(StatusEffects.SLOW_FALLING, 100));
}
Expand Down

0 comments on commit b58051f

Please sign in to comment.