mirror of
https://gitlab.bixilon.de/bixilon/pixlyzer.git
synced 2025-09-10 07:35:13 -04:00
blocks: move material, hardness to block
This commit is contained in:
parent
5c364374f8
commit
329d342c49
@ -104,6 +104,9 @@ object BlockGenerator : Generator(
|
|||||||
ID_LIST_GET_METHOD.invoke(blockColorProviderList, BlockGenerator.REGISTRY.getRawId(block)) != null
|
ID_LIST_GET_METHOD.invoke(blockColorProviderList, BlockGenerator.REGISTRY.getRawId(block)) != null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
blockData["material"] = MaterialGenerator.MATERIALS.inverse()[block.material].toString()
|
||||||
|
blockData["hardness"] = block.hardness
|
||||||
|
|
||||||
val states = compound()
|
val states = compound()
|
||||||
|
|
||||||
// tints
|
// tints
|
||||||
@ -111,6 +114,7 @@ object BlockGenerator : Generator(
|
|||||||
Blocks.LARGE_FERN, Blocks.TALL_GRASS -> {
|
Blocks.LARGE_FERN, Blocks.TALL_GRASS -> {
|
||||||
blockData["tint"] = "minecraft:shearing_double_plant_tint"
|
blockData["tint"] = "minecraft:shearing_double_plant_tint"
|
||||||
}
|
}
|
||||||
|
|
||||||
Blocks.GRASS_BLOCK, Blocks.FERN, Blocks.GRASS, Blocks.POTTED_FERN -> {
|
Blocks.GRASS_BLOCK, Blocks.FERN, Blocks.GRASS, Blocks.POTTED_FERN -> {
|
||||||
blockData["tint"] = "minecraft:grass_tint"
|
blockData["tint"] = "minecraft:grass_tint"
|
||||||
}
|
}
|
||||||
@ -154,15 +158,12 @@ object BlockGenerator : Generator(
|
|||||||
REQUIRES_CORRECT_TOOL_FOR_DROP_FIELDS?.let {
|
REQUIRES_CORRECT_TOOL_FOR_DROP_FIELDS?.let {
|
||||||
stateData["requires_tool"] = it.getBoolean(state)
|
stateData["requires_tool"] = it.getBoolean(state)
|
||||||
}
|
}
|
||||||
stateData["hardness"] = BLOCK_STATE_GET_HARDNESS_METHOD.invoke(state, null, BlockPos(0, 0, 0)) as Float
|
|
||||||
|
|
||||||
|
|
||||||
if (!state.isOpaque) {
|
if (!state.isOpaque) {
|
||||||
stateData["is_opaque"] = state.isOpaque
|
stateData["is_opaque"] = state.isOpaque
|
||||||
}
|
}
|
||||||
|
|
||||||
stateData["material"] = MaterialGenerator.MATERIALS.inverse()[state.getMaterial()].toString()
|
|
||||||
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (hasColorProperties) {
|
if (hasColorProperties) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user