Class PumpkinBlock

All Implemented Interfaces:
ItemConvertible

public class PumpkinBlock
extends GourdBlock
  • Constructor Details

  • Method Details

    • onUse

      public ActionResult onUse​(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit)
      Called when this block is used by a player. This, by default, is bound to using the right mouse button.

      This method is called on both the logical client and logical server, so take caution when overriding this method. The logical side can be checked using world.isClient().

      If the action result is successful on a logical client, then the action will be sent to the logical server for processing.

      Overrides:
      onUse in class AbstractBlock
      Returns:
      an action result that specifies if using the block was successful.
    • getStem

      public StemBlock getStem()
      Specified by:
      getStem in class GourdBlock
    • getAttachedStem

      public AttachedStemBlock getAttachedStem()
      Specified by:
      getAttachedStem in class GourdBlock