πŸ› οΈ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

chevron-rightCasinghashtag

Definition : createCasing(registrate,name,connectedTexturesSprite)

Parameters :

  • registrate CreateRegistrate β€” The registrate of your mod

  • name String β€” The name of the casing in your shaft

  • connectedTexturesSprite CTSpriteShiftEntry β€” 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
)
chevron-rightEncased Shafthashtag

Definition : createEncasedShaft(registrate,name,casing,connectedTexturesSprite)

Parameters :

  • registrate CreateRegistrate β€” The registrate of your mod

  • name String β€” The name of the casing in your shaft

  • casing Supplier<Block> β€” Supplier of the casing block applied to the shaft

  • connectedTexturesSprite CTSpriteShiftEntry β€” 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
)
chevron-rightEncased Cogwheelhashtag

Definition : createEncasedCogwheel(registrate,name,casing,connectedTexturesSprite,verticalCogwheelSide,horizontalCogwheelSide)

Parameters :

  • registrate CreateRegistrate β€” The registrate of your mod

  • name String β€” The name of the casing in your shaft

  • casing Supplier<Block> β€” Supplier of the casing block applied to the shaft

  • connectedTexturesSprite CTSpriteShiftEntry β€” The sprite with the connected texture of your casing

  • verticalCogwheelSide CTSpriteShiftEntry β€” The sprite for the vertical side of the cogwheel

  • horizontalCogwheelSide CTSpriteShiftEntry β€” 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
)
chevron-rightEncased Large Cogwheelhashtag

Definition : createEncasedLargeCogwheel(registrate,name,casing,connectedTexturesSprite)

Parameters :

  • registrate CreateRegistrate β€” The registrate of your mod

  • name String β€” The name of the casing in your shaft

  • casing Supplier<Block> β€” Supplier of the casing block applied to the shaft

  • connectedTexturesSprite CTSpriteShiftEntry β€” 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
)
chevron-rightEncased Pipehashtag

Definition : createEncasedPipe(registrate,name,casing,connectedTexturesSprite)

Parameters :

  • registrate CreateRegistrate β€” The registrate of your mod

  • name String β€” The name of the casing in your shaft

  • casing Supplier<Block> β€” Supplier of the casing block applied to the shaft

  • connectedTexturesSprite CTSpriteShiftEntry β€” 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 :

chevron-rightGearboxhashtag

Definition : createGearbox(registrate,name,connectedTexturesSprite,shouldGenerateVerticalItem)

Parameters :

  • registrate CreateRegistrate β€” The registrate of your mod

  • name String β€” The name of the casing in your shaft

  • connectedTexturesSprite CTSpriteShiftEntry β€” The sprite with the connected texture of your casing

  • shouldGenerateVerticalItem boolean β€” Whether to generate a vertical item for the gearbox

Returns : BlockEntry<ApiGearboxBlock> β€” The Block Entry of the Gearbox

Example :

chevron-rightDepothashtag

Definition : createDepot(registrate, name)

Parameters :

  • registrate CreateRegistrate β€” The registrate of your mod

  • name String β€” The name of the depot (e.g. andesite)

Returns : BlockEntry<ApiDepotBlock> β€” The Block Entry of the Depot

Example :

chevron-rightMixerhashtag

Definition : createMixer(registrate, name)

Parameters :

  • registrate CreateRegistrate β€” The registrate of your mod

  • name String β€” The name of the mixer (e.g. andesite)

Returns : BlockEntry<ApiMixerBlock> β€” The Block Entry of the Mixer

Example :

chevron-rightSmall Cogwheelhashtag

Definition : createSmallCogwheel(registrate, name)

Parameters :

  • registrate CreateRegistrate β€” The registrate of your mod

  • name String β€” The name of the cogwheel (e.g. andesite)

Returns : BlockEntry<ApiCogwheelBlock> β€” The Block Entry of the Small Cogwheel

Example :

chevron-rightLarge Cogwheelhashtag

Definition : createLargeCogwheel(registrate, name, shaftlessModel)

Parameters :

  • registrate CreateRegistrate β€” The registrate of your mod

  • name String β€” The name of the cogwheel (e.g. andesite)

  • shaftlessModel PartialModel β€” The model used when the cogwheel is shaftless

Returns : BlockEntry<ApiCogwheelBlock> β€” The Block Entry of the Large Cogwheel

Example :

chevron-rightFor Custom Shaftshashtag

Definition : forCustomShafts(action)

Parameters :

  • action Consumer<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