Skip to content

Commit

Permalink
fixed weird issue - closes #40
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeryn99 committed Jul 24, 2023
1 parent 35044d5 commit a72164d
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,20 @@
import net.venturecraft.gliders.common.item.GliderItem;
import net.venturecraft.gliders.data.GliderData;
import net.venturecraft.gliders.util.GliderUtil;
import org.jetbrains.annotations.NotNull;

import java.util.List;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicReference;

public class GliderEvents implements LivingEntityEvents.Attack, PlayerEvents.Tracking, LivingEntityEvents.Tick, EntityEvents.LightningStrike, LivingEntityEvents.Hurt, LivingEntityEvents.ItemUse, PlayerEvents.AnvilUpdate {
public class GliderEvents implements LivingEntityEvents.Attack, PlayerEvents.Tracking, LivingEntityEvents.Tick, EntityEvents.LightningStrike, LivingEntityEvents.Hurt, PlayerEvents.AnvilUpdate {

public static void initEvents() {
GliderEvents instance = new GliderEvents();
EntityEvents.LIGHTNING_STRIKE.register(instance);
LivingEntityEvents.HURT.register(instance);
LivingEntityEvents.ITEM_USE_START.register(instance);
/* LivingEntityEvents.ITEM_USE_START.register(instance);
LivingEntityEvents.ITEM_USE_TICK.register(instance);
LivingEntityEvents.ITEM_USE_STOP.register(instance);
LivingEntityEvents.ITEM_USE_STOP.register(instance);*/
LivingEntityEvents.HURT.register(instance);
PlayerEvents.ANVIL_UPDATE.register(instance);
PlayerEvents.START_TRACKING.register(instance);
Expand Down Expand Up @@ -61,10 +60,12 @@ public void lightningStrike(List<Entity> entities, LightningBolt lightningBolt)
}
}

/*
@Override
public EventResult livingEntityItemUse(LivingEntity entity, @NotNull ItemStack stack, AtomicInteger duration) {
return GliderUtil.isGlidingWithActiveGlider(entity) ? EventResult.cancel() : EventResult.pass();
}
*/


@Override
Expand Down Expand Up @@ -118,4 +119,5 @@ public EventResult livingEntityAttack(LivingEntity entity, DamageSource damageSo
}
return EventResult.pass();
}

}

0 comments on commit a72164d

Please sign in to comment.