Interface HopperMinecart

All Superinterfaces:
Audience, CommandSender, Entity, HoverEventSource<HoverEvent.ShowEntity>, InventoryHolder, Lootable, LootableEntityInventory, LootableInventory, Metadatable, Minecart, Nameable, Permissible, PersistentDataHolder, PersistentDataViewHolder, Pointered, ServerOperator, Sound.Emitter, Vehicle

public interface HopperMinecart extends Minecart, InventoryHolder, LootableEntityInventory
Represents a Minecart with a Hopper inside it
  • Method Details

    • isEnabled

      boolean isEnabled()
      Checks whether or not this Minecart will pick up items into its inventory.
      Returns:
      true if the Minecart will pick up items
    • setEnabled

      void setEnabled(boolean enabled)
      Sets whether this Minecart will pick up items.
      Parameters:
      enabled - new enabled state
    • getPickupCooldown

      @Deprecated(forRemoval=true, since="1.19.4") int getPickupCooldown()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Hopper minecarts don't have cooldowns anymore
      Gets the number of ticks that this hopper minecart cannot pickup items up for.
      Returns:
      ticks left on cooldown
    • setPickupCooldown

      @Deprecated(forRemoval=true, since="1.19.4") void setPickupCooldown(int cooldown)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Hopper minecarts don't have cooldowns anymore
      Sets the number of ticks that this hopper minecart cannot pickup items for.
      Parameters:
      cooldown - cooldown length in ticks