Class BroomPartBase

java.lang.Object
org.cyclops.evilcraft.core.broom.BroomPartBase
All Implemented Interfaces:
IBroomPart
Direct Known Subclasses:
BroomPartCapGem, BroomPartCapMetal, BroomPartModifier

public class BroomPartBase extends Object implements IBroomPart
Base implementation for broom parts.
  • Constructor Details

    • BroomPartBase

      public BroomPartBase(net.minecraft.resources.ResourceLocation id, IBroomPart.BroomPartType type, float length)
    • BroomPartBase

      public BroomPartBase(net.minecraft.resources.ResourceLocation id, IBroomPart.BroomPartType type, float length, net.minecraft.world.item.Rarity rarity, boolean effect)
  • Method Details

    • getId

      public net.minecraft.resources.ResourceLocation getId()
      Specified by:
      getId in interface IBroomPart
      Returns:
      The unique part identifier.
    • registerModelResourceLocation

      protected void registerModelResourceLocation()
    • getTranslationKey

      public String getTranslationKey()
      Specified by:
      getTranslationKey in interface IBroomPart
      Returns:
      The unlocalized name.
    • getTooltipLine

      @Nullable public net.minecraft.network.chat.Component getTooltipLine(String prefix)
      Description copied from interface: IBroomPart
      The line to be added to tooltips.
      Specified by:
      getTooltipLine in interface IBroomPart
      Parameters:
      prefix - A line prefix
      Returns:
      The line, null if no line should be shown
    • shouldAutoRegisterMissingItem

      public boolean shouldAutoRegisterMissingItem()
      Specified by:
      shouldAutoRegisterMissingItem in interface IBroomPart
      Returns:
      If an item for this part should be automatically registered if none has been provided.
    • getModelColor

      public int getModelColor()
      Specified by:
      getModelColor in interface IBroomPart
      Returns:
      The tint of this part's model.