fix some datafixer bugs

This commit is contained in:
Bixilon 2021-07-06 18:55:02 +02:00
parent 33f411f4b7
commit 39e7b2d937
No known key found for this signature in database
GPG Key ID: 5CAD791931B09AC4
2 changed files with 4 additions and 4 deletions

View File

@ -19,14 +19,13 @@ import de.bixilon.minosoft.datafixer.DataFixerUtil.asResourceLocationMap
object BlockEntityFixer {
private val RENAMES: Map<ResourceLocation, ResourceLocation> = mapOf(
"Furnace" to "minecraft:furnace",
"Furnace" to "minecraft:lit_furnace",
"Chest" to "minecraft:chest",
"Chest" to "minecraft:trapped_chest",
"EnderChest" to "minecraft:ender_chest",
"RecordPlayer" to "minecraft:jukebox",
"Trap" to "minecraft:dispenser",
"Dropper" to "minecraft:dropper",
"Sign" to "minecraft:sign",
"wall_sign" to "minecraft:sign",
"MobSpawner" to "minecraft:mob_spawner",
"Music" to "minecraft:noteblock",
"Cauldron" to "minecraft:brewing_stand",
@ -52,7 +51,8 @@ object BlockEntityFixer {
"Airportal" to "minecraft:end_portal",
"EndGateway" to "minecraft:end_gateway",
"Banner" to "minecraft:shield",
"minecraft:noteblock" to "minecraft:note_block"
"minecraft:noteblock" to "minecraft:note_block",
// ToDo: flower_pot
).asResourceLocationMap()

View File

@ -19,7 +19,7 @@ object DataFixerUtil {
fun Map<String, String>.asResourceLocationMap(): Map<ResourceLocation, ResourceLocation> {
val out: MutableMap<ResourceLocation, ResourceLocation> = mutableMapOf()
for ((key, value) in this) {
out[ResourceLocation.getResourceLocation(key)] = ResourceLocation.getResourceLocation(value)
out[ResourceLocation(key)] = ResourceLocation(value)
}
return out.toMap()
}