π οΈAPI Usage
This page will describe how use the API from
Create Encased
β οΈ Warning: All of these methods doesn't generate blockstates, models or textures, you need to do them manually
Available Features
Casing Related Methods
Casing
Definition : createCasing(registrate,name,connectedTexturesSprite)
Parameters :
registrateCreateRegistrate β The registrate of your modnameString β The name of the casing in your shaftconnectedTexturesSpriteCTSpriteShiftEntry β The sprite with the connected texture of your casing
Returns : BlockEntry<CasingBlock> β The Block Entry of the Casing
Example :
CreateCasingApi.createCasing(
Create.REGISTRATE,
"andesite",
AllSpriteShifts.ANDESITE_CASING
)Encased Shaft
Definition : createEncasedShaft(registrate,name,casing,connectedTexturesSprite)
Parameters :
registrateCreateRegistrate β The registrate of your modnameString β The name of the casing in your shaftcasingSupplier<Block> β Supplier of the casing block applied to the shaftconnectedTexturesSpriteCTSpriteShiftEntry β The sprite with the connected texture of your casing
Returns : BlockEntry<PublicEncasedShaftBlock> β The Block Entry of the Encased Shaft
Example :
CreateCasingApi.createEncasedShaft(
Create.REGISTRATE,
"andesite",
() -> AllBlocks.ANDESITE_CASING.get(),
AllSpriteShifts.ANDESITE_CASING
)Encased Cogwheel
Definition : createEncasedCogwheel(registrate,name,casing,connectedTexturesSprite,verticalCogwheelSide,horizontalCogwheelSide)
Parameters :
registrateCreateRegistrate β The registrate of your modnameString β The name of the casing in your shaftcasingSupplier<Block> β Supplier of the casing block applied to the shaftconnectedTexturesSpriteCTSpriteShiftEntry β The sprite with the connected texture of your casingverticalCogwheelSideCTSpriteShiftEntry β The sprite for the vertical side of the cogwheelhorizontalCogwheelSideCTSpriteShiftEntry β The sprite for the horizontal side of the cogwheel
Returns : BlockEntry<PublicEncasedCogwheelBlock> β The Block Entry of the Encased Cogwheel
Example :
CreateCasingApi.createEncasedCogwheel(
Create.REGISTRATE,
"andesite",
() -> AllBlocks.ANDESITE_CASING.get(),
AllSpriteShifts.ANDESITE_CASING,
AllSpriteShifts.ANDESITE_ENCASED_COGWHEEL_SIDE,
AllSpriteShifts.ANDESITE_ENCASED_COGWHEEL_OTHERSIDE
)Encased Large Cogwheel
Definition : createEncasedLargeCogwheel(registrate,name,casing,connectedTexturesSprite)
Parameters :
registrateCreateRegistrate β The registrate of your modnameString β The name of the casing in your shaftcasingSupplier<Block> β Supplier of the casing block applied to the shaftconnectedTexturesSpriteCTSpriteShiftEntry β The sprite with the connected texture of your casing
Returns : BlockEntry<PublicEncasedCogwheelBlock> β The Block Entry of the Encased Large Cogwheel
Example :
CreateCasingApi.createEncasedLargeCogwheel(
Create.REGISTRATE,
"andesite",
() -> AllBlocks.ANDESITE_CASING.get(),
AllSpriteShifts.ANDESITE_CASING
)Encased Pipe
Definition : createEncasedPipe(registrate,name,casing,connectedTexturesSprite)
Parameters :
registrateCreateRegistrate β The registrate of your modnameString β The name of the casing in your shaftcasingSupplier<Block> β Supplier of the casing block applied to the shaftconnectedTexturesSpriteCTSpriteShiftEntry β The sprite with the connected texture of your casing
Returns : BlockEntry<PublicEncasedPipeBlock> β The Block Entry of the Encased Pipe
β οΈ Warning : This method doesn't create an item because Create doesn't offer the possibility to do it
Example :
Gearbox
Definition : createGearbox(registrate,name,connectedTexturesSprite,shouldGenerateVerticalItem)
Parameters :
registrateCreateRegistrate β The registrate of your modnameString β The name of the casing in your shaftconnectedTexturesSpriteCTSpriteShiftEntry β The sprite with the connected texture of your casingshouldGenerateVerticalItemboolean β Whether to generate a vertical item for the gearbox
Returns : BlockEntry<ApiGearboxBlock> β The Block Entry of the Gearbox
Example :
Depot
Definition : createDepot(registrate, name)
Parameters :
registrateCreateRegistrate β The registrate of your modnameString β The name of the depot (e.g. andesite)
Returns : BlockEntry<ApiDepotBlock> β The Block Entry of the Depot
Example :
Mixer
Definition : createMixer(registrate, name)
Parameters :
registrateCreateRegistrate β The registrate of your modnameString β The name of the mixer (e.g. andesite)
Returns : BlockEntry<ApiMixerBlock> β The Block Entry of the Mixer
Example :
Shaft and Cogwheels Related Methods
Small Cogwheel
Definition : createSmallCogwheel(registrate, name)
Parameters :
registrateCreateRegistrate β The registrate of your modnameString β The name of the cogwheel (e.g. andesite)
Returns : BlockEntry<ApiCogwheelBlock> β The Block Entry of the Small Cogwheel
Example :
Large Cogwheel
Definition : createLargeCogwheel(registrate, name, shaftlessModel)
Parameters :
registrateCreateRegistrate β The registrate of your modnameString β The name of the cogwheel (e.g. andesite)shaftlessModelPartialModel β The model used when the cogwheel is shaftless
Returns : BlockEntry<ApiCogwheelBlock> β The Block Entry of the Large Cogwheel
Example :
For Custom Shafts
Definition : forCustomShafts(action)
Parameters :
actionConsumer<BlockEntry<? extends ShaftBlock>> β A consumer that will receive each registered custom shaft
Returns : void β This method is used for performing an action on all custom shafts registered via the API
Example :
Additional informations
Takes in note that these methods can change at any time and may not work as intended for some peoples
The datagen will be added to these methods in a future update.
It's recommanded to use these method with the registrate from Create Encased (CreateCasing.REGISTRATE) because the stress config verify if the block is from the mod.
Last updated