Class InformationProviderComponent

java.lang.Object
org.cyclops.cyclopscore.item.InformationProviderComponent

public class InformationProviderComponent extends Object
A component that can be used for IInformationProvider implementations.
  • Constructor Summary

    Constructors
    Constructor
    Description
    InformationProviderComponent(net.minecraft.world.level.block.Block block)
    Make a new instance.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addInformation(net.minecraft.world.item.ItemStack itemStack, net.minecraft.world.level.Level world, List<net.minecraft.network.chat.Component> list, net.minecraft.world.item.TooltipFlag flag)
    Add information to the given list for the given item.
    net.minecraft.world.level.block.Block
    Get the blockState that uses this component.
    boolean
    If the blockState that uses this component implements IInformationProvider.
    void
    setBlock(net.minecraft.world.level.block.Block block)
    Set the blockState that uses this component.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • InformationProviderComponent

      public InformationProviderComponent(net.minecraft.world.level.block.Block block)
      Make a new instance.
      Parameters:
      block - The blockState for which the component is used.
  • Method Details

    • addInformation

      public void addInformation(net.minecraft.world.item.ItemStack itemStack, net.minecraft.world.level.Level world, List<net.minecraft.network.chat.Component> list, net.minecraft.world.item.TooltipFlag flag)
      Add information to the given list for the given item.
      Parameters:
      itemStack - The ItemStack to add info for.
      world - The player that will see the info.
      list - The info list where the info will be added.
      flag - No idea...
    • isHasInfo

      public boolean isHasInfo()
      If the blockState that uses this component implements IInformationProvider.
      Returns:
      If the blockState provides info.
    • getBlock

      public net.minecraft.world.level.block.Block getBlock()
      Get the blockState that uses this component.
      Returns:
      The blockState.
    • setBlock

      public void setBlock(net.minecraft.world.level.block.Block block)
      Set the blockState that uses this component.
      Parameters:
      block - The blockState.