BlockBuilderStairs
Link to blockbuilderstairs
A special Block Builder that allows you to create stairs.
Stairs will have not one but three textures that you will need to supply: One for the top, one for the bottom and one for the sides. By default these textures will use your blockname as name, suffixed by _top
, _bottom
or _sides
. 대부분의 경우와 마찬가지로, 기본적으로 샘플 이미지가 생성되어 제공됩니다.
This class was added by a mod with mod-id contenttweaker
. So you need to have this mod installed if you want to use this feature.
Importing the class
Link to importing-the-class
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.
ZenScript Copyimport mods.contenttweaker.block.stairs.BlockBuilderStairs;
Extending BlockTypeBuilder
Link to extending-blocktypebuilder
BlockBuilderStairs extends BlockTypeBuilder. That means all methods available in BlockTypeBuilder are also available in BlockBuilderStairs
Methods
Link to methods
Name: build
CoT에게 이 제작기가 빌드해야 하는 모든 블록을 실제로 빌드하도록 지시합니다.
Return Type: void
ZenScript Copy// BlockBuilderStairs.build(resourceLocation as string) as void
new BlockBuilder().withType<BlockBuilderStairs>().build("my_awesome_block");
Parameter | Type | Description |
---|---|---|
Parameter resourceLocation | Type string | Description 해당 블록의 리소스 경로 |
Name: withBottomTexture
Allows you to override the path of the texture that the bottom side should use. 해당 텍스처의 네임스페이스가 CoT의 네임스페이스나 이를 지원하는 애드온에 있는 경우 기본적으로 이미지가 생성됩니다. 블록의 이름을 입력으로 받아 끝 면 텍스처를 반환하는 함수를 씁니다.
Returns: This builder, used for method chaining
Return Type: BlockBuilderStairs
ZenScript Copy// BlockBuilderStairs.withBottomTexture(bottomTexture as Function<MCResourceLocation,MCResourceLocation>) as BlockBuilderStairs
new BlockBuilder().withType<BlockBuilderStairs>().withBottomTexture((blockName as ResourceLocation) => new ResourceLocation(blockName.namespace, blockName.path + "_bottom"));
Parameter | Type | Description |
---|---|---|
Parameter bottomTexture | Type Function<MCResourceLocation,MCResourceLocation> | Description 사용할 함수 |
Name: withBottomTexture
Allows you to override the path of the texture that the bottom side should use. 해당 텍스처의 네임스페이스가 CoT의 네임스페이스나 이를 지원하는 애드온에 있는 경우 기본적으로 이미지가 생성됩니다.
Returns: This builder, used for method chaining
Return Type: BlockBuilderStairs
ZenScript CopyBlockBuilderStairs.withBottomTexture(bottomTexture as MCResourceLocation) as BlockBuilderStairs
Parameter | Type | Description |
---|---|---|
Parameter bottomTexture | Type MCResourceLocation | Description The texture to be used for the bottom side |
Name: withSidesTexture
Allows you to override the path of the texture that the sides should use. 해당 텍스처의 네임스페이스가 CoT의 네임스페이스나 이를 지원하는 애드온에 있는 경우 기본적으로 이미지가 생성됩니다. 블록의 이름을 입력으로 받아 끝 면 텍스처를 반환하는 함수를 씁니다.
Returns: This builder, used for method chaining
Return Type: BlockBuilderStairs
ZenScript Copy// BlockBuilderStairs.withSidesTexture(sidesTexture as Function<MCResourceLocation,MCResourceLocation>) as BlockBuilderStairs
new BlockBuilder().withType<BlockBuilderStairs>().withSidesTexture((blockName as ResourceLocation) => new ResourceLocation(blockName.namespace, blockName.path + "_sides"));
Parameter | Type | Description |
---|---|---|
Parameter sidesTexture | Type Function<MCResourceLocation,MCResourceLocation> | Description 사용할 함수 |
Name: withSidesTexture
Allows you to override the path of the texture that the sides should use. 해당 텍스처의 네임스페이스가 CoT의 네임스페이스나 이를 지원하는 애드온에 있는 경우 기본적으로 이미지가 생성됩니다.
Returns: This builder, used for method chaining
Return Type: BlockBuilderStairs
ZenScript CopyBlockBuilderStairs.withSidesTexture(sidesTexture as MCResourceLocation) as BlockBuilderStairs
Parameter | Type | Description |
---|---|---|
Parameter sidesTexture | Type MCResourceLocation | Description The texture to be used for the sides |
Name: withTopTexture
Allows you to override the path of the texture that the top side should use. 해당 텍스처의 네임스페이스가 CoT의 네임스페이스나 이를 지원하는 애드온에 있는 경우 기본적으로 이미지가 생성됩니다. 블록의 이름을 입력으로 받아 끝 면 텍스처를 반환하는 함수를 씁니다.
Returns: This builder, used for method chaining
Return Type: BlockBuilderStairs
ZenScript CopyBlockBuilderStairs.withTopTexture(topTexture as Function<MCResourceLocation,MCResourceLocation>) as BlockBuilderStairs
Parameter | Type | Description |
---|---|---|
Parameter topTexture | Type Function<MCResourceLocation,MCResourceLocation> | Description 사용할 함수 |
Name: withTopTexture
Allows you to override the path of the texture that the top side should use. 해당 텍스처의 네임스페이스가 CoT의 네임스페이스나 이를 지원하는 애드온에 있는 경우 기본적으로 이미지가 생성됩니다.
Returns: This builder, used for method chaining
Return Type: BlockBuilderStairs
ZenScript Copy// BlockBuilderStairs.withTopTexture(topTexture as MCResourceLocation) as BlockBuilderStairs
new BlockBuilder().withType<BlockBuilderStairs>().withTopTexture(<resource:contenttweaker:my_awesome_stairs_top>);
Parameter | Type | Description |
---|---|---|
Parameter topTexture | Type MCResourceLocation | Description The texture to be used for the top side |