Class UsefulHatsEventUtils

java.lang.Object
de.cech12.usefulhats.UsefulHatsEventUtils

public class UsefulHatsEventUtils extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    onBlockBreak(net.minecraft.world.entity.player.Player player, net.minecraft.world.level.block.state.BlockState state)
     
    static float
    onBreakSpeedCalculation(net.minecraft.world.entity.player.Player player, net.minecraft.world.level.block.state.BlockState state, float actualSpeed)
     
    static void
    onEntityJoinWorld(net.minecraft.world.entity.Entity entity)
     
    static void
    onEquip(net.minecraft.world.entity.LivingEntity entity, net.minecraft.world.item.ItemStack stack)
     
    static void
    onItemFished(net.minecraft.world.entity.player.Player entity)
     
    static void
    onLivingDiesBecauseOf(net.minecraft.world.entity.Entity entity)
     
    static void
    onLivingJump(net.minecraft.world.entity.LivingEntity entity)
     
    static int
    onLivingStartsUsingItem(net.minecraft.world.entity.LivingEntity entity, net.minecraft.world.item.ItemStack usedStack, int actualDuration)
     
    static void
    onUnequip(net.minecraft.world.entity.LivingEntity entity, net.minecraft.world.item.ItemStack stack)
     
    static boolean
    shouldEntityAvoidChangingTarget(net.minecraft.world.entity.LivingEntity entity, net.minecraft.world.entity.LivingEntity target)
    Should be called when an entity changes its target and evaluates if the new target should be avoided.
    static boolean
    shouldRightClickBeCancelled(net.minecraft.world.level.Level level, net.minecraft.world.entity.player.Player player, net.minecraft.world.item.ItemStack usedStack, net.minecraft.world.InteractionHand hand)
    Should be called if a right click is done and evaluates if the right click should be cancelled.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • UsefulHatsEventUtils

      public UsefulHatsEventUtils()
  • Method Details

    • onBreakSpeedCalculation

      public static float onBreakSpeedCalculation(net.minecraft.world.entity.player.Player player, net.minecraft.world.level.block.state.BlockState state, float actualSpeed)
    • onBlockBreak

      public static void onBlockBreak(net.minecraft.world.entity.player.Player player, net.minecraft.world.level.block.state.BlockState state)
    • onEntityJoinWorld

      public static void onEntityJoinWorld(net.minecraft.world.entity.Entity entity)
    • onItemFished

      public static void onItemFished(net.minecraft.world.entity.player.Player entity)
    • onLivingDiesBecauseOf

      public static void onLivingDiesBecauseOf(net.minecraft.world.entity.Entity entity)
    • onLivingJump

      public static void onLivingJump(net.minecraft.world.entity.LivingEntity entity)
    • onLivingStartsUsingItem

      public static int onLivingStartsUsingItem(net.minecraft.world.entity.LivingEntity entity, net.minecraft.world.item.ItemStack usedStack, int actualDuration)
    • onEquip

      public static void onEquip(net.minecraft.world.entity.LivingEntity entity, net.minecraft.world.item.ItemStack stack)
    • onUnequip

      public static void onUnequip(net.minecraft.world.entity.LivingEntity entity, net.minecraft.world.item.ItemStack stack)
    • shouldEntityAvoidChangingTarget

      public static boolean shouldEntityAvoidChangingTarget(net.minecraft.world.entity.LivingEntity entity, net.minecraft.world.entity.LivingEntity target)
      Should be called when an entity changes its target and evaluates if the new target should be avoided.
      Parameters:
      entity - entity
      target - new target
      Returns:
      true, if the new target should be avoided, else false
    • shouldRightClickBeCancelled

      public static boolean shouldRightClickBeCancelled(net.minecraft.world.level.Level level, net.minecraft.world.entity.player.Player player, net.minecraft.world.item.ItemStack usedStack, net.minecraft.world.InteractionHand hand)
      Should be called if a right click is done and evaluates if the right click should be cancelled.
      Parameters:
      level - level
      player - player
      usedStack - used ItemStack
      hand - hand
      Returns:
      true, if the right click should be cancelled, else false