Class ItemMinecartBehavior

java.lang.Object
org.cloudburstmc.server.item.behavior.CloudItemBehavior
org.cloudburstmc.server.item.behavior.ItemMinecartBehavior
All Implemented Interfaces:
org.cloudburstmc.api.item.behavior.ItemBehavior

public class ItemMinecartBehavior extends CloudItemBehavior
author: MagicDroidX Nukkit Project
  • Field Details

    • minecartType

      protected final org.cloudburstmc.api.entity.EntityType<? extends org.cloudburstmc.api.entity.vehicle.Minecart> minecartType
  • Constructor Details

    • ItemMinecartBehavior

      public ItemMinecartBehavior()
  • Method Details

    • canBeActivated

      public boolean canBeActivated()
      Specified by:
      canBeActivated in interface org.cloudburstmc.api.item.behavior.ItemBehavior
      Overrides:
      canBeActivated in class CloudItemBehavior
    • onActivate

      public org.cloudburstmc.api.item.ItemStack onActivate(org.cloudburstmc.api.item.ItemStack itemStack, org.cloudburstmc.api.player.Player player, org.cloudburstmc.api.block.Block block, org.cloudburstmc.api.block.Block target, org.cloudburstmc.api.util.Direction face, com.nukkitx.math.vector.Vector3f clickPos, org.cloudburstmc.api.level.Level level)
      Specified by:
      onActivate in interface org.cloudburstmc.api.item.behavior.ItemBehavior
      Overrides:
      onActivate in class CloudItemBehavior
    • getMaxStackSize

      public int getMaxStackSize(org.cloudburstmc.api.item.ItemStack item)
      Specified by:
      getMaxStackSize in interface org.cloudburstmc.api.item.behavior.ItemBehavior
      Overrides:
      getMaxStackSize in class CloudItemBehavior