FluidBuilder
Link to fluidbuilder
This class was added by a mod with mod-id contenttweaker
. 因此,如果要使用此功能,则需要安装此mod。
导入类
Link to 导入类
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.fluid.FluidBuilder;
已实现的接口
Link to 已实现的接口
FluidBuilder implements the following interfaces. That means all methods defined in these interfaces are also available in FluidBuilder
Constructor #构造函数
Link to constructor-构造函数
Creates a new FluidBuilder with default colorized textures
ZenScript Copynew FluidBuilder(isMolten as boolean, color as int) as FluidBuilder
new FluidBuilder(true, 0xff66ccff);
参数 | 类型 | 描述 |
---|---|---|
参数 isMolten | 类型 布尔值 | 描述 if the fluid is molten |
参数 color | 类型 int | 描述 the color of the fluid, ARGB |
Creates a new FluidBuilder with two textures
ZenScript Copynew FluidBuilder(isMolten as boolean, color as int, stillTexture as MCResourceLocation, flowTexture as MCResourceLocation) as FluidBuilder
new FluidBuilder(true, 0xff66ccff, <resource:contenttweaker:fluid/liquid>, <resource:contenttweaker:fluid/liquid_flowing>);
参数 | 类型 | 描述 |
---|---|---|
参数 isMolten | 类型 布尔值 | 描述 if the fluid is molten |
参数 color | 类型 int | 描述 the bucket fluid color, ARGB |
参数 stillTexture | 类型 MCResourceLocation | 描述 the texture resource location of still fluid block |
参数 flowTexture | 类型 MCResourceLocation | 描述 the texture resource location of flowing fluid block |
使用方式
Link to 使用方式
Name: build
Instructs CoT to actually build whatever this builder is supposed to be building.
Return Type: void
ZenScript Copy// FluidBuilder.build(resourceLocation as string) as void
myFluidBuilder.build("my_awesome_block");
参数 | 类型 | 描述 |
---|---|---|
参数 resourceLocation | 类型 string | 描述 The resource path to give this block |
Name: density
How fast you can walk in the fluid?
default value is 1000
Return Type: FluidBuilder
ZenScript Copy// FluidBuilder.density(density as int) as FluidBuilder
myFluidBuilder.density(1400);
参数 | 类型 | 描述 |
---|---|---|
参数 density | 类型 int | 描述 No Description Provided |
Name: gaseous
Is the fluid gaseous (flows upwards instead of downwards)?
Return Type: FluidBuilder
ZenScript Copy// FluidBuilder.gaseous() as FluidBuilder
myFluidBuilder.gaseous();
Name: luminosity
The light-level emitted by the fluid
default value is 0
Return Type: FluidBuilder
ZenScript Copy// FluidBuilder.luminosity(luminosity as int) as FluidBuilder
myFluidBuilder.luminosity(15);
参数 | 类型 | 描述 |
---|---|---|
参数 luminosity | 类型 int | 描述 No Description Provided |
Name: temperature
The Fluid's temperature
default value is 300
Return Type: FluidBuilder
ZenScript Copy// FluidBuilder.temperature(temperature as int) as FluidBuilder
myFluidBuilder.temperature(500);
参数 | 类型 | 描述 |
---|---|---|
参数 temperature | 类型 int | 描述 No Description Provided |
Name: viscosity
How quickly the fluid spreads
default value is 1000
Return Type: FluidBuilder
ZenScript Copy// FluidBuilder.viscosity(viscosity as int) as FluidBuilder
myFluidBuilder.viscosity(800);
参数 | 类型 | 描述 |
---|---|---|
参数 viscosity | 类型 int | 描述 No Description Provided |