类 ModelBuilder.ElementBuilder
java.lang.Object
net.minecraftforge.client.model.generators.ModelBuilder.ElementBuilder
- 封闭类:
ModelBuilder<T extends ModelBuilder<T>>
-
嵌套类概要
嵌套类修饰符和类型类说明class
class
-
字段概要
字段修饰符和类型字段说明private ForgeFaceData
private int
private final Map
<Direction, ModelBuilder<T>.ElementBuilder.FaceBuilder> private org.joml.Vector3f
private ModelBuilder<T>.ElementBuilder.RotationBuilder
private boolean
private org.joml.Vector3f
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明private BiConsumer
<Direction, ModelBuilder<T>.ElementBuilder.FaceBuilder> addTexture
(String texture) Modify all possible faces dynamically using a function, creating new faces as necessary.ao
(boolean ao) Set the ambient occlusion of the element.(专用程序包) BlockElement
build()
calculateNormals
(boolean calc) Sets whether we should calculate actual normals for the faces of this model or inherit them from facing the way vanilla doescolor
(int color) Sets the color of the element.Create a typical cube element, creating new faces as needed, applying the given texture, and setting the cullface.data
(ForgeFaceData data) emission
(int value) emissivity
(int blockLight, int skyLight) Set the block and sky light of the element (0-15).end()
Return or create the face builder for the given direction.faces
(BiConsumer<Direction, ModelBuilder<T>.ElementBuilder.FaceBuilder> action) Modify all existing faces dynamically using a function.from
(float x, float y, float z) Set the "from" position for this element.rotation()
shade
(boolean shade) Texture all existing faces in the current element with the given texture.textureAll
(String texture) Texture all possible faces in the current element with the given texture, creating new faces where necessary.to
(float x, float y, float z) Set the "to" position for this element.private void
validateCoordinate
(float coord, char name) private void
validatePosition
(org.joml.Vector3f pos)
-
字段详细资料
-
from
private org.joml.Vector3f from -
to
private org.joml.Vector3f to -
faces
private final Map<Direction,ModelBuilder<T extends ModelBuilder<T>>.ElementBuilder.FaceBuilder> faces -
rotation
-
shade
private boolean shade -
data
-
emission
private int emission
-
-
构造器详细资料
-
ElementBuilder
public ElementBuilder()
-
-
方法详细资料
-
validateCoordinate
private void validateCoordinate(float coord, char name) -
validatePosition
private void validatePosition(org.joml.Vector3f pos) -
from
Set the "from" position for this element.- 参数:
x
- x-position for this vectory
- y-position for this vectorz
- z-position for this vector- 返回:
- this builder
- 抛出:
IllegalArgumentException
- if the vector is out of bounds (any coordinate not between -16 and 32, inclusive)
-
to
Set the "to" position for this element.- 参数:
x
- x-position for this vectory
- y-position for this vectorz
- z-position for this vector- 返回:
- this builder
- 抛出:
IllegalArgumentException
- if the vector is out of bounds (any coordinate not between -16 and 32, inclusive)
-
face
Return or create the face builder for the given direction.- 参数:
dir
- the direction- 返回:
- the face builder for the given direction
- 抛出:
NullPointerException
- ifdir
isnull
-
rotation
-
shade
-
allFaces
public ModelBuilder<T>.ElementBuilder allFaces(BiConsumer<Direction, ModelBuilder<T>.ElementBuilder.FaceBuilder> action) Modify all possible faces dynamically using a function, creating new faces as necessary.- 参数:
action
- the function to apply to each direction- 返回:
- this builder
- 抛出:
NullPointerException
- ifaction
isnull
-
faces
public ModelBuilder<T>.ElementBuilder faces(BiConsumer<Direction, ModelBuilder<T>.ElementBuilder.FaceBuilder> action) Modify all existing faces dynamically using a function.- 参数:
action
- the function to apply to each direction- 返回:
- this builder
- 抛出:
NullPointerException
- ifaction
isnull
-
textureAll
Texture all possible faces in the current element with the given texture, creating new faces where necessary.- 参数:
texture
- the texture- 返回:
- this builder
- 抛出:
NullPointerException
- iftexture
isnull
-
texture
Texture all existing faces in the current element with the given texture.- 参数:
texture
- the texture- 返回:
- this builder
- 抛出:
NullPointerException
- iftexture
isnull
-
cube
Create a typical cube element, creating new faces as needed, applying the given texture, and setting the cullface.- 参数:
texture
- the texture- 返回:
- this builder
- 抛出:
NullPointerException
- iftexture
isnull
-
emissivity
Set the block and sky light of the element (0-15). Traditional "emissivity" values were set both of these to the same value.- 参数:
blockLight
- the block lightskyLight
- the sky light- 返回:
- this builder
-
color
Sets the color of the element.- 参数:
color
- the color in ARGB format.- 返回:
- this builder
-
ao
Set the ambient occlusion of the element.- 参数:
ao
- the ambient occlusion- 返回:
- this builder
-
calculateNormals
Sets whether we should calculate actual normals for the faces of this model or inherit them from facing the way vanilla does- 参数:
calc
- whether to calculate normals- 返回:
- this builder
-
data
-
emission
-
addTexture
-
build
BlockElement build() -
end
-