FluidBuilder
Link to fluidbuilder
This class was added by a mod with mod-id contenttweaker
. Perciò, è necessario avere questa mod installata per poter utilizzare questa funzione.
Importare la Classe
Link to importare-la-classe
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;
Interfacce Implementate
Link to interfacce-implementate
FluidBuilder implements the following interfaces. That means all methods defined in these interfaces are also available in FluidBuilder
Constructors
Link to constructors
Creates a new FluidBuilder with default colorized textures
ZenScript Copynew FluidBuilder(isMolten as boolean, color as int) as FluidBuilder
new FluidBuilder(true, 0xff66ccff);
Parametro | Tipo | Descrizione |
---|---|---|
Parametro isMolten | Tipo boolean | Descrizione if the fluid is molten |
Parametro color | Tipo int | Descrizione 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>);
Parametro | Tipo | Descrizione |
---|---|---|
Parametro isMolten | Tipo boolean | Descrizione if the fluid is molten |
Parametro color | Tipo int | Descrizione the bucket fluid color, ARGB |
Parametro stillTexture | Tipo MCResourceLocation | Descrizione the texture resource location of still fluid block |
Parametro flowTexture | Tipo MCResourceLocation | Descrizione the texture resource location of flowing fluid block |
Metodi
Link to metodi
Name: build
Istruisce CoT per costruire realmente qualsiasi cosa il costruttore dovrebbe star costruendo.
Return Type: void
ZenScript Copy// FluidBuilder.build(resourceLocation as string) as void
myFluidBuilder.build("my_awesome_block");
Parametro | Tipo | Descrizione |
---|---|---|
Parametro resourceLocation | Tipo string | Descrizione Il percorso della risorsa per dare questo blocco |
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);
Parametro | Tipo | Descrizione |
---|---|---|
Parametro density | Tipo int | Descrizione 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);
Parametro | Tipo | Descrizione |
---|---|---|
Parametro luminosity | Tipo int | Descrizione 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);
Parametro | Tipo | Descrizione |
---|---|---|
Parametro temperature | Tipo int | Descrizione 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);
Parametro | Tipo | Descrizione |
---|---|---|
Parametro viscosity | Tipo int | Descrizione No Description Provided |