BlockBuilderSlab
A special builder that allows you to create slabs.
By default, this has 3 textures, one for the top, bottom and the sides. As with most things here, sample images are generated for you by default, though.
This class was added by a mod with mod-id contenttweaker
. Так что если вы хотите использовать эту функцию, вам нужно установить этот мод.
Импорт класса
It might be required for you to import the package if you encounter any issues (like casting an Array), so better be safe than sorry and add the import at the very top of the file.
Extending BlockTypeBuilder
BlockBuilderSlab extends BlockTypeBuilder. That means all methods available in BlockTypeBuilder are also available in BlockBuilderSlab
Methods
withBottomTexture
Allows you to override the path of the texture that the bottom should use. If that texture's namespace is in the namespace of CoT or any of its addons (that support it) then the image will be created by default. Uses a function that takes the block's name as input and returns the bottom texture for it.
Return Type: BlockBuilderSlab
Allows you to override the path of the texture that the bottom should use. If that texture's namespace is in the namespace of CoT or any of its addons (that support it) then the image will be created by default.
Return Type: BlockBuilderSlab
withSideTexture
Allows you to override the path of the texture that the sides (everything but top/bottom) should use. If that texture's namespace is in the namespace of CoT or any of its addons (that support it) then the image will be created by default. Uses a function that takes the block's name as input and returns the sides texture for it.
Return Type: BlockBuilderSlab
Allows you to override the path of the texture that the sides (everything but top/bottom) should use. If that texture's namespace is in the namespace of CoT or any of its addons (that support it) then the image will be created by default.
Return Type: BlockBuilderSlab
withTopTexture
Allows you to override the path of the texture that the top should use. If that texture's namespace is in the namespace of CoT or any of its addons (that support it) then the image will be created by default. Uses a function that takes the block's name as input and returns the top texture for it.
Return Type: BlockBuilderSlab
Allows you to override the path of the texture that the top should use. If that texture's namespace is in the namespace of CoT or any of its addons (that support it) then the image will be created by default.
Return Type: BlockBuilderSlab