Class Materials
- All Implemented Interfaces:
NBTData
Used to map the face of a block to a material instance, and set the rendering method and parameters.
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionany
(Materials.RenderMethod renderMethod, boolean ambientOcclusion, boolean faceDimming, String texture) 指定所有面对应的渲染方法、渲染参数和材质。any
(Materials.RenderMethod renderMethod, String texture) ambientOcclusion=true, faceDimming=truestatic Materials
builder()
Builder materials.down
(Materials.RenderMethod renderMethod, boolean ambientOcclusion, boolean faceDimming, String texture) 指定down面对应的渲染方法、渲染参数和材质。down
(Materials.RenderMethod renderMethod, String texture) ambientOcclusion=true, faceDimming=trueeast
(Materials.RenderMethod renderMethod, boolean ambientOcclusion, boolean faceDimming, String texture) 指定east面对应的渲染方法、渲染参数和材质。east
(Materials.RenderMethod renderMethod, String texture) ambientOcclusion=true, faceDimming=truenorth
(Materials.RenderMethod renderMethod, boolean ambientOcclusion, boolean faceDimming, String texture) 指定north面对应的渲染方法、渲染参数和材质。north
(Materials.RenderMethod renderMethod, String texture) ambientOcclusion=true, faceDimming=truevoid
process
(String face, boolean ambientOcclusion, boolean faceDimming, String renderMethodName, String texture) 指定对应对应的渲染方法、渲染参数和材质。此方法是完全自定义的,请在使用之前抓包确认参数合法性south
(Materials.RenderMethod renderMethod, boolean ambientOcclusion, boolean faceDimming, String texture) 指定south面对应的渲染方法、渲染参数和材质。south
(Materials.RenderMethod renderMethod, String texture) ambientOcclusion=true, faceDimming=trueup
(Materials.RenderMethod renderMethod, boolean ambientOcclusion, boolean faceDimming, String texture) 指定up面对应的渲染方法、渲染参数和材质。up
(Materials.RenderMethod renderMethod, String texture) ambientOcclusion=true, faceDimming=truewest
(Materials.RenderMethod renderMethod, boolean ambientOcclusion, boolean faceDimming, String texture) 指定west面对应的渲染方法、渲染参数和材质。west
(Materials.RenderMethod renderMethod, String texture) ambientOcclusion=true, faceDimming=true
-
Method Details
-
builder
Builder materials.- Returns:
- the materials
-
up
ambientOcclusion=true, faceDimming=true -
up
public Materials up(Materials.RenderMethod renderMethod, boolean ambientOcclusion, boolean faceDimming, String texture) 指定up面对应的渲染方法、渲染参数和材质。Specify the corresponding rendering method, rendering parameters and texture's name for the up face.
- Parameters:
renderMethod
- 要使用的渲染方法
Rendering method to be usedtexture
- 指定up方向的材质名称
Specify the texture's name of the up faceambientOcclusion
- 在照明时是否应该应用环境光遮蔽?
Should I apply ambient light shielding when lighting?faceDimming
- 是否应该根据它所面对的方向变暗?
Should it be dimmed according to the direction it is facing?- Returns:
- the materials
-
down
ambientOcclusion=true, faceDimming=true -
down
public Materials down(Materials.RenderMethod renderMethod, boolean ambientOcclusion, boolean faceDimming, String texture) 指定down面对应的渲染方法、渲染参数和材质。Specify the corresponding rendering method, rendering parameters and texture's name for the down face.
- Parameters:
renderMethod
- 要使用的渲染方法
Rendering method to be usedtexture
- 指定down方向的材质名称
Specify the texture's name of the down faceambientOcclusion
- 在照明时是否应该应用环境光遮蔽?
Should I apply ambient light shielding when lighting?faceDimming
- 是否应该根据它所面对的方向变暗?
Should it be dimmed according to the direction it is facing?- Returns:
- the materials
-
north
ambientOcclusion=true, faceDimming=true -
north
public Materials north(Materials.RenderMethod renderMethod, boolean ambientOcclusion, boolean faceDimming, String texture) 指定north面对应的渲染方法、渲染参数和材质。Specify the corresponding rendering method, rendering parameters and texture's name for the north face.
- Parameters:
renderMethod
- 要使用的渲染方法
Rendering method to be usedtexture
- 指定north方向的材质名称
Specify the texture's name of the north faceambientOcclusion
- 在照明时是否应该应用环境光遮蔽?
Should I apply ambient light shielding when lighting?faceDimming
- 是否应该根据它所面对的方向变暗?
Should it be dimmed according to the direction it is facing?- Returns:
- the materials
-
south
ambientOcclusion=true, faceDimming=true -
south
public Materials south(Materials.RenderMethod renderMethod, boolean ambientOcclusion, boolean faceDimming, String texture) 指定south面对应的渲染方法、渲染参数和材质。Specify the corresponding rendering method, rendering parameters and texture's name for the south face.
- Parameters:
renderMethod
- 要使用的渲染方法
Rendering method to be usedtexture
- 指定south方向的材质名称
Specify the texture's name of the south faceambientOcclusion
- 在照明时是否应该应用环境光遮蔽?
Should I apply ambient light shielding when lighting?faceDimming
- 是否应该根据它所面对的方向变暗?
Should it be dimmed according to the direction it is facing?- Returns:
- the materials
-
east
ambientOcclusion=true, faceDimming=true -
east
public Materials east(Materials.RenderMethod renderMethod, boolean ambientOcclusion, boolean faceDimming, String texture) 指定east面对应的渲染方法、渲染参数和材质。Specify the corresponding rendering method, rendering parameters and texture's name for the east face.
- Parameters:
renderMethod
- 要使用的渲染方法
Rendering method to be usedtexture
- 指定east方向的材质名称
Specify the texture's name of the east faceambientOcclusion
- 在照明时是否应该应用环境光遮蔽?
Should I apply ambient light shielding when lighting?faceDimming
- 是否应该根据它所面对的方向变暗?
Should it be dimmed according to the direction it is facing?- Returns:
- the materials
-
west
ambientOcclusion=true, faceDimming=true -
west
public Materials west(Materials.RenderMethod renderMethod, boolean ambientOcclusion, boolean faceDimming, String texture) 指定west面对应的渲染方法、渲染参数和材质。Specify the corresponding rendering method, rendering parameters and texture's name for the west face.
- Parameters:
renderMethod
- 要使用的渲染方法
Rendering method to be usedtexture
- 指定west方向的材质名称
Specify the texture's name of the west faceambientOcclusion
- 在照明时是否应该应用环境光遮蔽?
Should I apply ambient light shielding when lighting?faceDimming
- 是否应该根据它所面对的方向变暗?
Should it be dimmed according to the direction it is facing?- Returns:
- the materials
-
any
ambientOcclusion=true, faceDimming=true -
any
public Materials any(Materials.RenderMethod renderMethod, boolean ambientOcclusion, boolean faceDimming, String texture) 指定所有面对应的渲染方法、渲染参数和材质。Specify all corresponding rendering method, rendering parameters and texture name.
- Parameters:
renderMethod
- 要使用的渲染方法
Rendering method to be usedtexture
- 材质名称
Specify the texture's nameambientOcclusion
- 在照明时是否应该应用环境光遮蔽?
Should I apply ambient light shielding when lighting?faceDimming
- 是否应该根据它所面对的方向变暗?
Should it be dimmed according to the direction it is facing?- Returns:
- the materials
-
process
public void process(@NotNull String face, boolean ambientOcclusion, boolean faceDimming, @NotNull String renderMethodName, @NotNull String texture) 指定对应对应的渲染方法、渲染参数和材质。此方法是完全自定义的,请在使用之前抓包确认参数合法性- Parameters:
face
- 指定面的名称,可选值为:up, down, north, south, east, west, *ambientOcclusion
- 在照明时是否应该应用环境光遮蔽?
Should it be applied ambient light shielding when lighting?faceDimming
- 是否应该根据它所面对的方向变暗?
Should it be dimmed according to the direction it is facing?renderMethodName
- 要使用的渲染方法
Rendering method to be usedtexture
- 材质名称
Specify the texture's name
-
toCompoundTag
- Specified by:
toCompoundTag
in interfaceNBTData
-