Class BlockPickedKubeEvent

java.lang.Object
dev.latvian.mods.kubejs.block.BlockPickedKubeEvent
All Implemented Interfaces:
KubeEntityEvent, KubeLivingEntityEvent, KubeEvent, KubeLevelEvent, KubePlayerEvent

@Info("Invoked when player middle-clicks on a block.\n") public class BlockPickedKubeEvent extends Object implements KubePlayerEvent
  • Field Details

    • level

      public final net.minecraft.world.level.Level level
    • block

      public final LevelBlock block
    • player

      public final net.minecraft.world.entity.player.Player player
  • Constructor Details

    • BlockPickedKubeEvent

      public BlockPickedKubeEvent(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.entity.player.Player player, net.minecraft.world.phys.HitResult hitResult)
  • Method Details

    • getLevel

      public net.minecraft.world.level.Level getLevel()
      Specified by:
      getLevel in interface KubeEntityEvent
      Specified by:
      getLevel in interface KubeLevelEvent
    • getEntity

      public net.minecraft.world.entity.player.Player getEntity()
      Specified by:
      getEntity in interface KubeEntityEvent
      Specified by:
      getEntity in interface KubeLivingEntityEvent
      Specified by:
      getEntity in interface KubePlayerEvent
    • getTarget

      public KubeRayTraceResult getTarget()
    • handle

      @Nullable @HideFromJS public static @Nullable net.minecraft.world.item.ItemStack handle(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.phys.HitResult target, net.minecraft.world.level.LevelReader levelReader, net.minecraft.core.BlockPos pos, net.minecraft.world.entity.player.Player player)