Package org.cyclops.evilcraft.core.broom
Class BroomPartBase
java.lang.Object
org.cyclops.evilcraft.core.broom.BroomPartBase
- All Implemented Interfaces:
IBroomPart
- Direct Known Subclasses:
BroomPartCapGem,BroomPartCapMetal,BroomPartModifier
Base implementation for broom parts.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.cyclops.evilcraft.api.broom.IBroomPart
IBroomPart.BroomPartType, IBroomPart.IBroomPartTypeModelOffsetter -
Constructor Summary
ConstructorsConstructorDescriptionBroomPartBase(net.minecraft.resources.ResourceLocation id, IBroomPart.BroomPartType type, float length) BroomPartBase(net.minecraft.resources.ResourceLocation id, IBroomPart.BroomPartType type, float length, net.minecraft.world.item.Rarity rarity, boolean effect) -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.resources.ResourceLocationgetId()intnet.minecraft.network.chat.ComponentgetTooltipLine(String prefix) The line to be added to tooltips.protected voidbooleanMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.cyclops.evilcraft.api.broom.IBroomPart
getLength, getRarity, getType, isEffect
-
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:
getIdin interfaceIBroomPart- Returns:
- The unique part identifier.
-
registerModelResourceLocation
protected void registerModelResourceLocation() -
getTranslationKey
- Specified by:
getTranslationKeyin interfaceIBroomPart- Returns:
- The unlocalized name.
-
getTooltipLine
Description copied from interface:IBroomPartThe line to be added to tooltips.- Specified by:
getTooltipLinein interfaceIBroomPart- Parameters:
prefix- A line prefix- Returns:
- The line, null if no line should be shown
-
shouldAutoRegisterMissingItem
public boolean shouldAutoRegisterMissingItem()- Specified by:
shouldAutoRegisterMissingItemin interfaceIBroomPart- Returns:
- If an item for this part should be automatically registered if none has been provided.
-
getModelColor
public int getModelColor()- Specified by:
getModelColorin interfaceIBroomPart- Returns:
- The tint of this part's model.
-