fix block rotations

This commit is contained in:
Bixilon 2021-02-15 21:43:13 +01:00
parent 6eebca8b8c
commit 1862a70e8a
No known key found for this signature in database
GPG Key ID: 5CAD791931B09AC4
2 changed files with 7 additions and 3 deletions

View File

@ -322,7 +322,6 @@ class VersionMapping(var version: Version?) {
for (statesJson in json.getAsJsonArray("states")) {
check(statesJson is JsonObject) { "Invalid block state json" }
val block = loadBlockState(ModIdentifier(mod, identifierName!!), statesJson)
var blockId = getBlockId(block.identifier)
val blockNumericId = getBlockId(statesJson, !version.isFlattened())
@ -360,6 +359,10 @@ class VersionMapping(var version: Version?) {
}
val blockStates = block.getAsJsonObject("states")
for (identifier in blockStates.keySet()) {
if (identifier == "dispenser") {
Log.debug("")
}
loadBlockModelState(mod, identifier!!, blockStates)
}
}
@ -413,7 +416,8 @@ class VersionMapping(var version: Version?) {
for (blockState in blockStates) {
if (blockState.bareEquals(state)) {
for (type in value.getAsJsonArray("types")) {
blockState.blockModels.add(BlockModel(blockModels[ModIdentifier(type.asJsonObject["model"].asString.replace("block/", ""))], value))
check(type is JsonObject) { "Invalid block type json" }
blockState.blockModels.add(BlockModel(blockModels[ModIdentifier(type["model"].asString.replace("block/", ""))], type))
}
ckecked = true
}

View File

@ -70,7 +70,7 @@ class ChunkRenderer(private val connection: Connection, private val world: World
section.getBlock(position.getLocationByDirection(Directions.EAST))
}
// if(block.fullIdentifier != "minecraft:dropper"){
// if (block.identifier.fullIdentifier != "minecraft:dispenser") {
// continue
// }