public class BroomPartRegistry extends java.lang.Object implements IBroomPartRegistry
| Constructor and Description |
|---|
BroomPartRegistry() |
| Modifier and Type | Method and Description |
|---|---|
java.util.Map<BroomModifier,java.lang.Float> |
getBaseModifiersFromBroom(net.minecraft.item.ItemStack broomStack)
Get the broom base modifiers from the given itemstack.
|
<P extends IBroomPart> |
getBaseModifiersFromPart(P part)
Get the base modifiers for the given part.
|
java.util.Collection<IBroomPart> |
getBroomParts(net.minecraft.item.ItemStack broomStack)
Get the broom parts in the given itemstack.
|
<P extends IBroomPart> |
getItemsFromPart(P part)
Get the identifying items of the given part.
|
IBroomPart |
getPart(net.minecraft.util.ResourceLocation partId)
Get the part from the given id.
|
<P extends IBroomPart> |
getPartFromItem(net.minecraft.item.ItemStack item)
Get the part of the given item-form.
|
net.minecraft.util.ResourceLocation |
getPartModel(IBroomPart part)
Get the model resource location of the given part.
|
java.util.Collection<net.minecraft.util.ResourceLocation> |
getPartModels()
Get all registered model resource locations for the parts.
|
java.util.Collection<IBroomPart> |
getParts() |
java.util.Collection<IBroomPart> |
getParts(IBroomPart.BroomPartType type) |
void |
onTooltipEvent(net.minecraftforge.event.entity.player.ItemTooltipEvent event) |
<P extends IBroomPart> |
registerBaseModifiers(P part,
BroomModifier modifier,
float modifierValue)
Assign base modifier to the given part.
|
<P extends IBroomPart> |
registerBaseModifiers(P part,
java.util.Map<BroomModifier,java.lang.Float> modifiers)
Assign base modifiers to the given part.
|
<P extends IBroomPart> |
registerPart(P part)
Register a new broom part.
|
<P extends IBroomPart> |
registerPartItem(P part,
net.minecraft.item.ItemStack item)
Assign a part item to the given part.
|
void |
registerPartModel(IBroomPart part,
net.minecraft.util.ResourceLocation modelLocation)
Register a model resource location for the given part.
|
void |
setBroomParts(net.minecraft.item.ItemStack broomStack,
java.util.Collection<IBroomPart> broomParts)
Apply the given broom parts to the given itemstack.
|
public <P extends IBroomPart> P registerPart(P part)
IBroomPartRegistryregisterPart in interface IBroomPartRegistryP - The type of part.part - The part.public <P extends IBroomPart> void registerPartItem(@Nullable P part, net.minecraft.item.ItemStack item)
IBroomPartRegistryregisterPartItem in interface IBroomPartRegistryP - The type of part.part - The part.item - The item-form of this part.public <P extends IBroomPart> void registerBaseModifiers(@Nullable P part, java.util.Map<BroomModifier,java.lang.Float> modifiers)
IBroomPartRegistryregisterBaseModifiers in interface IBroomPartRegistryP - The type of part.part - The part.modifiers - The modifiers.public <P extends IBroomPart> void registerBaseModifiers(@Nullable P part, BroomModifier modifier, float modifierValue)
IBroomPartRegistryregisterBaseModifiers in interface IBroomPartRegistryP - The type of part.part - The part.modifier - The modifier.modifierValue - The modifier value.public <P extends IBroomPart> java.util.Map<BroomModifier,java.lang.Float> getBaseModifiersFromPart(P part)
IBroomPartRegistrygetBaseModifiersFromPart in interface IBroomPartRegistryP - The part type.part - The part.public java.util.Map<BroomModifier,java.lang.Float> getBaseModifiersFromBroom(net.minecraft.item.ItemStack broomStack)
IBroomPartRegistrygetBaseModifiersFromBroom in interface IBroomPartRegistrybroomStack - The broom item stackpublic <P extends IBroomPart> java.util.Collection<net.minecraft.item.ItemStack> getItemsFromPart(P part)
IBroomPartRegistrygetItemsFromPart in interface IBroomPartRegistryP - The part type.part - The part.public <P extends IBroomPart> P getPartFromItem(net.minecraft.item.ItemStack item)
IBroomPartRegistrygetPartFromItem in interface IBroomPartRegistryP - The part type.item - The item-form of this part.public java.util.Collection<IBroomPart> getParts()
getParts in interface IBroomPartRegistrypublic IBroomPart getPart(net.minecraft.util.ResourceLocation partId)
IBroomPartRegistrygetPart in interface IBroomPartRegistrypartId - The unique part id.public java.util.Collection<IBroomPart> getParts(IBroomPart.BroomPartType type)
getParts in interface IBroomPartRegistrytype - The type of parts to retrieve.public void registerPartModel(IBroomPart part, net.minecraft.util.ResourceLocation modelLocation)
IBroomPartRegistryregisterPartModel in interface IBroomPartRegistrypart - The partmodelLocation - The model resource location.public net.minecraft.util.ResourceLocation getPartModel(IBroomPart part)
IBroomPartRegistrygetPartModel in interface IBroomPartRegistrypart - The part.public java.util.Collection<net.minecraft.util.ResourceLocation> getPartModels()
IBroomPartRegistrygetPartModels in interface IBroomPartRegistrypublic java.util.Collection<IBroomPart> getBroomParts(net.minecraft.item.ItemStack broomStack)
IBroomPartRegistrygetBroomParts in interface IBroomPartRegistrybroomStack - The broom item stackpublic void setBroomParts(net.minecraft.item.ItemStack broomStack,
java.util.Collection<IBroomPart> broomParts)
IBroomPartRegistrysetBroomParts in interface IBroomPartRegistrybroomStack - The broom item stackbroomParts - The broom parts.public void onTooltipEvent(net.minecraftforge.event.entity.player.ItemTooltipEvent event)