Class EndCrystalItem

java.lang.Object
net.minecraft.item.Item
net.minecraft.item.EndCrystalItem
All Implemented Interfaces:
ItemConvertible

public class EndCrystalItem
extends Item
  • Constructor Details

    • EndCrystalItem

      public EndCrystalItem​(Item.Settings settings)
  • Method Details

    • useOnBlock

      public ActionResult useOnBlock​(ItemUsageContext context)
      Called when an item is used on a block.

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

      Overrides:
      useOnBlock in class Item
      Parameters:
      context - the usage context
      Returns:
      an action result that specifies if using the item on a block was successful.
    • hasGlint

      public boolean hasGlint​(ItemStack stack)
      Checks if the glint effect should be applied when the item is rendered.

      By default, returns true if the item has enchantments.

      Overrides:
      hasGlint in class Item