Package org.cyclops.evilcraft.api.broom
Interface IBroomPartRegistry
- All Superinterfaces:
org.cyclops.cyclopscore.init.IRegistry
- All Known Implementing Classes:
BroomPartRegistry
public interface IBroomPartRegistry
extends org.cyclops.cyclopscore.init.IRegistry
Registry for broom parts.
-
Method Summary
Modifier and TypeMethodDescriptiongetBaseModifiersFromBroom(net.minecraft.world.item.ItemStack broomStack) Get the broom base modifiers from the given itemstack.<P extends IBroomPart>
Map<BroomModifier,Float> getBaseModifiersFromPart(P part) Get the base modifiers for the given part.getBroomParts(net.minecraft.world.item.ItemStack broomStack) Get the broom parts in the given itemstack.<P extends IBroomPart>
Collection<net.minecraft.world.item.ItemStack>getItemsFromPart(P part) Get the identifying items of the given part.getPart(net.minecraft.resources.ResourceLocation partId) Get the part from the given id.<P extends IBroomPart>
PgetPartFromItem(net.minecraft.world.item.ItemStack item) Get the part of the given item-form.net.minecraft.resources.ResourceLocationgetPartModel(IBroomPart part) Get the model resource location of the given part.Collection<net.minecraft.resources.ResourceLocation>Get all registered model resource locations for the parts.getParts()<P extends IBroomPart>
voidregisterBaseModifiers(P part, Map<BroomModifier, Float> modifiers) Assign base modifiers to the given part.<P extends IBroomPart>
voidregisterBaseModifiers(P part, BroomModifier modifier, float modifierValue) Assign base modifier to the given part.<P extends IBroomPart>
PregisterPart(P part) Register a new broom part.<P extends IBroomPart>
voidregisterPartItem(P part, net.minecraft.world.item.ItemStack item) Assign a part item to the given part.voidregisterPartModel(IBroomPart part, net.minecraft.resources.ResourceLocation modelLocation) Register a model resource location for the given part.voidsetBroomParts(net.minecraft.world.item.ItemStack broomStack, Collection<IBroomPart> broomParts) Apply the given broom parts to the given itemstack.
-
Method Details
-
registerPart
Register a new broom part.- Type Parameters:
P- The type of part.- Parameters:
part- The part.- Returns:
- The registered part.
-
registerPartItem
<P extends IBroomPart> void registerPartItem(@Nullable P part, net.minecraft.world.item.ItemStack item) Assign a part item to the given part.- Type Parameters:
P- The type of part.- Parameters:
part- The part.item- The item-form of this part.
-
registerBaseModifiers
<P extends IBroomPart> void registerBaseModifiers(@Nullable P part, Map<BroomModifier, Float> modifiers) Assign base modifiers to the given part.- Type Parameters:
P- The type of part.- Parameters:
part- The part.modifiers- The modifiers.
-
registerBaseModifiers
<P extends IBroomPart> void registerBaseModifiers(@Nullable P part, BroomModifier modifier, float modifierValue) Assign base modifier to the given part.- Type Parameters:
P- The type of part.- Parameters:
part- The part.modifier- The modifier.modifierValue- The modifier value.
-
getBaseModifiersFromPart
Get the base modifiers for the given part.- Type Parameters:
P- The part type.- Parameters:
part- The part.- Returns:
- The base modifiers.
-
getBaseModifiersFromBroom
Get the broom base modifiers from the given itemstack.- Parameters:
broomStack- The broom item stack- Returns:
- The broom base modifiers.
-
getItemsFromPart
Get the identifying items of the given part.- Type Parameters:
P- The part type.- Parameters:
part- The part.- Returns:
- The identifying items
-
getPartFromItem
Get the part of the given item-form.- Type Parameters:
P- The part type.- Parameters:
item- The item-form of this part.- Returns:
- The part or null.
-
getParts
Collection<IBroomPart> getParts()- Returns:
- All broom parts.
-
getPart
Get the part from the given id.- Parameters:
partId- The unique part id.- Returns:
- The corresponding part or null.
-
getParts
- Parameters:
type- The type of parts to retrieve.- Returns:
- All broom parts of the given type..
-
registerPartModel
Register a model resource location for the given part.- Parameters:
part- The partmodelLocation- The model resource location.
-
getPartModel
Get the model resource location of the given part.- Parameters:
part- The part.- Returns:
- The model resource location.
-
getPartModels
Collection<net.minecraft.resources.ResourceLocation> getPartModels()Get all registered model resource locations for the parts.- Returns:
- All model resource locations.
-
getBroomParts
Get the broom parts in the given itemstack.- Parameters:
broomStack- The broom item stack- Returns:
- The broom parts.
-
setBroomParts
void setBroomParts(net.minecraft.world.item.ItemStack broomStack, Collection<IBroomPart> broomParts) Apply the given broom parts to the given itemstack.- Parameters:
broomStack- The broom item stackbroomParts- The broom parts.
-