BlockBuilderSlab
Link to blockbuilderslab
A special builder that allows you to create slabs.
By default, this has 3 textures, one for the top, bottom and the 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.slab.BlockBuilderSlab;
Extending BlockTypeBuilder
Link to extending-blocktypebuilder
BlockBuilderSlab extends BlockTypeBuilder. That means all methods available in BlockTypeBuilder are also available in BlockBuilderSlab
Methods
Link to methods
Name: build
CoT에게 이 제작기가 빌드해야 하는 모든 블록을 실제로 빌드하도록 지시합니다.
Return Type: void
ZenScript Copy// BlockBuilderSlab.build(resourceLocation as string) as void
new BlockBuilder().withType<BlockBuilderSlab>().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 should use. 해당 텍스처의 네임스페이스가 CoT의 네임스페이스나 이를 지원하는 애드온에 있는 경우 기본적으로 이미지가 생성됩니다. Uses a function that takes the block's name as input and returns the bottom texture for it.
Returns: This builder, used for method chaining
Return Type: BlockBuilderSlab
ZenScript Copy// BlockBuilderSlab.withBottomTexture(bottomTexture as Function<MCResourceLocation,MCResourceLocation>) as BlockBuilderSlab
new BlockBuilder().withType<BlockBuilderSlab>().withBottomTexture((blockName as ResourceLocation) => new ResourceLocation(blockName.namespace, blockName.path + "_top"));
Parameter | Type | Description |
---|---|---|
Parameter bottomTexture | Type Function<MCResourceLocation,MCResourceLocation> | Description 사용할 함수 |
Name: withBottomTexture
Allows you to override the path of the texture that the bottom should use. 해당 텍스처의 네임스페이스가 CoT의 네임스페이스나 이를 지원하는 애드온에 있는 경우 기본적으로 이미지가 생성됩니다.
Returns: This builder, used for method chaining
Return Type: BlockBuilderSlab
ZenScript Copy// BlockBuilderSlab.withBottomTexture(bottomTexture as MCResourceLocation) as BlockBuilderSlab
new BlockBuilder().withType<BlockBuilderSlab>().withBottomTexture(<resource:contenttweaker:my_awesome_slab_bottom>);
Parameter | Type | Description |
---|---|---|
Parameter bottomTexture | Type MCResourceLocation | Description 측면에 쓰일 텍스처 |
Name: withSideTexture
측면(위/아래 제외 모든 면)에서 써야 하는 텍스처의 경로를 재정의합니다. 해당 텍스처의 네임스페이스가 CoT의 네임스페이스나 이를 지원하는 애드온에 있는 경우 기본적으로 이미지가 생성됩니다. Uses a function that takes the block's name as input and returns the sides texture for it.
Returns: This builder, used for method chaining
Return Type: BlockBuilderSlab
ZenScript Copy// BlockBuilderSlab.withSideTexture(sidesTexture as Function<MCResourceLocation,MCResourceLocation>) as BlockBuilderSlab
new BlockBuilder().withType<BlockBuilderSlab>().withSideTexture((blockName as ResourceLocation) => new ResourceLocation(blockName.namespace, blockName.path + "_sides"));
Parameter | Type | Description |
---|---|---|
Parameter sidesTexture | Type Function<MCResourceLocation,MCResourceLocation> | Description 사용할 함수 |
Name: withSideTexture
측면(위/아래 제외 모든 면)에서 써야 하는 텍스처의 경로를 재정의합니다. 해당 텍스처의 네임스페이스가 CoT의 네임스페이스나 이를 지원하는 애드온에 있는 경우 기본적으로 이미지가 생성됩니다.
Returns: This builder, used for method chaining
Return Type: BlockBuilderSlab
ZenScript Copy// BlockBuilderSlab.withSideTexture(sidesTexture as MCResourceLocation) as BlockBuilderSlab
new BlockBuilder().withType<BlockBuilderSlab>().withSideTexture(<resource:contenttweaker:my_awesome_slab_side>);
Parameter | Type | Description |
---|---|---|
Parameter sidesTexture | Type MCResourceLocation | Description 측면에 쓰일 텍스처 |
Name: withTopTexture
Allows you to override the path of the texture that the top should use. 해당 텍스처의 네임스페이스가 CoT의 네임스페이스나 이를 지원하는 애드온에 있는 경우 기본적으로 이미지가 생성됩니다. Uses a function that takes the block's name as input and returns the top texture for it.
Returns: This builder, used for method chaining
Return Type: BlockBuilderSlab
ZenScript Copy// BlockBuilderSlab.withTopTexture(topTexture as Function<MCResourceLocation,MCResourceLocation>) as BlockBuilderSlab
new BlockBuilder().withType<BlockBuilderSlab>().withTopTexture((blockName as ResourceLocation) => new ResourceLocation(blockName.namespace, blockName.path + "_top"));
Parameter | Type | Description |
---|---|---|
Parameter topTexture | Type Function<MCResourceLocation,MCResourceLocation> | Description 사용할 함수 |
Name: withTopTexture
Allows you to override the path of the texture that the top should use. 해당 텍스처의 네임스페이스가 CoT의 네임스페이스나 이를 지원하는 애드온에 있는 경우 기본적으로 이미지가 생성됩니다.
Returns: This builder, used for method chaining
Return Type: BlockBuilderSlab
ZenScript Copy// BlockBuilderSlab.withTopTexture(topTexture as MCResourceLocation) as BlockBuilderSlab
new BlockBuilder().withType<BlockBuilderSlab>().withTopTexture(<resource:contenttweaker:my_awesome_slab_top>);
Parameter | Type | Description |
---|---|---|
Parameter topTexture | Type MCResourceLocation | Description 측면에 쓰일 텍스처 |