From e7daeed5aef03f044706d2ab1a66d0a2ac14f14c Mon Sep 17 00:00:00 2001 From: Moritz Zwerger Date: Thu, 14 Dec 2023 21:29:52 +0100 Subject: [PATCH] refactor fallback registries --- .../registries/fallback/FallbackRegistries.kt | 105 +-- .../data/registries/registries/Registries.kt | 6 - .../registries/registries/RegistriesLoader.kt | 27 +- .../play/channel/vanila/BrandHandler.kt | 4 +- .../mappings/enums/entity/actions.json | 22 + .../mappings/enums/entity/animations.json | 29 + .../mappings/enums/entity/data_types.json | 159 ++++ .../mappings/enums/entity/equipment.json | 17 + .../mappings/enums/title_actions.json | 17 + .../mappings/registries/block_data_types.json | 365 ++++++++ .../mappings/registries/channels.json | 27 + .../mappings/registries/container_type.json | 40 + .../mappings/registries/entity/objects.json | 94 +++ .../registries/entity/variant/cat.json | 48 ++ .../mappings/registries/game_events.json | 160 ++++ .../mappings/registries/message_types.json | 28 + .../mappings/registries/vibration_source.json | 10 + .../mappings/registries/world_events.json | 7 + .../minosoft/mapping/default_registries.json | 781 ------------------ .../assets/minosoft/mapping/enums.json | 270 ------ 20 files changed, 1077 insertions(+), 1139 deletions(-) create mode 100644 src/main/resources/assets/minecraft/mappings/enums/entity/actions.json create mode 100644 src/main/resources/assets/minecraft/mappings/enums/entity/animations.json create mode 100644 src/main/resources/assets/minecraft/mappings/enums/entity/data_types.json create mode 100644 src/main/resources/assets/minecraft/mappings/enums/entity/equipment.json create mode 100644 src/main/resources/assets/minecraft/mappings/enums/title_actions.json create mode 100644 src/main/resources/assets/minecraft/mappings/registries/block_data_types.json create mode 100644 src/main/resources/assets/minecraft/mappings/registries/channels.json create mode 100644 src/main/resources/assets/minecraft/mappings/registries/container_type.json create mode 100644 src/main/resources/assets/minecraft/mappings/registries/entity/objects.json create mode 100644 src/main/resources/assets/minecraft/mappings/registries/entity/variant/cat.json create mode 100644 src/main/resources/assets/minecraft/mappings/registries/game_events.json create mode 100644 src/main/resources/assets/minecraft/mappings/registries/message_types.json create mode 100644 src/main/resources/assets/minecraft/mappings/registries/vibration_source.json create mode 100644 src/main/resources/assets/minecraft/mappings/registries/world_events.json delete mode 100644 src/main/resources/assets/minosoft/mapping/default_registries.json delete mode 100644 src/main/resources/assets/minosoft/mapping/enums.json diff --git a/src/main/java/de/bixilon/minosoft/data/registries/fallback/FallbackRegistries.kt b/src/main/java/de/bixilon/minosoft/data/registries/fallback/FallbackRegistries.kt index 49621be4e..ed6717b45 100644 --- a/src/main/java/de/bixilon/minosoft/data/registries/fallback/FallbackRegistries.kt +++ b/src/main/java/de/bixilon/minosoft/data/registries/fallback/FallbackRegistries.kt @@ -13,9 +13,8 @@ package de.bixilon.minosoft.data.registries.fallback -import de.bixilon.kutil.json.JsonUtil.asJsonObject import de.bixilon.minosoft.assets.IntegratedAssets -import de.bixilon.minosoft.assets.util.InputStreamUtil.readJson +import de.bixilon.minosoft.assets.util.InputStreamUtil.readJsonObject import de.bixilon.minosoft.data.container.equipment.EquipmentSlots import de.bixilon.minosoft.data.entities.EntityAnimations import de.bixilon.minosoft.data.entities.EntityObjectType @@ -26,7 +25,6 @@ import de.bixilon.minosoft.data.registries.chat.ChatMessageType import de.bixilon.minosoft.data.registries.containers.ContainerType import de.bixilon.minosoft.data.registries.entities.variants.CatVariant import de.bixilon.minosoft.data.registries.identified.Namespaces.minecraft -import de.bixilon.minosoft.data.registries.identified.Namespaces.minosoft import de.bixilon.minosoft.data.registries.identified.ResourceLocation import de.bixilon.minosoft.data.registries.registries.registry.PerVersionEnumRegistry import de.bixilon.minosoft.data.registries.registries.registry.PerVersionRegistry @@ -39,79 +37,56 @@ import de.bixilon.minosoft.util.logging.LogLevels import de.bixilon.minosoft.util.logging.LogMessageType object FallbackRegistries { - private val ENUM_RESOURCE_LOCATION = minosoft("mapping/enums.json") - private val REGISTRIES_RESOURCE_LOCATION = minosoft("mapping/default_registries.json") - private var initialized = false + private val registries: MutableMap, ResourceLocation> = mutableMapOf() + private val enums: MutableMap, ResourceLocation> = mutableMapOf() - val EQUIPMENT_SLOTS_REGISTRY = PerVersionEnumRegistry(EquipmentSlots) - val HAND_EQUIPMENT_SLOTS_REGISTRY = PerVersionEnumRegistry(EquipmentSlots) - val ARMOR_EQUIPMENT_SLOTS_REGISTRY = PerVersionEnumRegistry(EquipmentSlots) - val ARMOR_STAND_EQUIPMENT_SLOTS_REGISTRY = PerVersionEnumRegistry(EquipmentSlots) + val EQUIPMENT_SLOTS = PerVersionEnumRegistry(EquipmentSlots).register(minecraft("entity/equipment")) + val ENTITY_OBJECT = PerVersionRegistry { Registry(codec = EntityObjectType) }.register(minecraft("entity/objects")) + val ENTITY_DATA_TYPES = PerVersionEnumRegistry(EntityDataTypes).register(minecraft("entity/data_types")) + val ENTITY_ACTIONS = PerVersionEnumRegistry(EntityActionC2SP.EntityActions).register(minecraft("entity/actions")) + val ENTITY_ANIMATION = PerVersionEnumRegistry(EntityAnimations).register(minecraft("entity/animations")) - val ENTITY_DATA_TYPES_REGISTRY = PerVersionEnumRegistry(EntityDataTypes) + val CAT_VARIANT: PerVersionRegistry> = PerVersionRegistry { Registry(codec = CatVariant) }.register(minecraft("entity/variant/cat")) - val TITLE_ACTIONS_REGISTRY = PerVersionEnumRegistry(TitleS2CF.TitleActions) - - val ENTITY_ANIMATION_REGISTRY = PerVersionEnumRegistry(EntityAnimations) - val ENTITY_ACTIONS_REGISTRY = PerVersionEnumRegistry(EntityActionC2SP.EntityActions) - - val ENTITY_OBJECT_REGISTRY = PerVersionRegistry { Registry(codec = EntityObjectType) } - - val BLOCK_DATA_TYPE_REGISTRY: PerVersionRegistry> = PerVersionRegistry { Registry(codec = BlockDataDataType) } - - val DEFAULT_PLUGIN_CHANNELS_REGISTRY: PerVersionRegistry> = PerVersionRegistry { Registry(codec = PluginChannel) } - - val CONTAINER_TYPE_REGISTRY: PerVersionRegistry> = PerVersionRegistry { Registry(codec = ContainerType) } - - val GAME_EVENT_REGISTRY: PerVersionRegistry = PerVersionRegistry { ResourceLocationRegistry() } - val WORLD_EVENT_REGISTRY: PerVersionRegistry = PerVersionRegistry { ResourceLocationRegistry() } - - val CAT_VARIANT_REGISTRY: PerVersionRegistry> = PerVersionRegistry { Registry(codec = CatVariant) } + val TITLE_ACTIONS = PerVersionEnumRegistry(TitleS2CF.TitleActions).register(minecraft("title_actions")) + val DEFAULT_PLUGIN_CHANNELS: PerVersionRegistry> = PerVersionRegistry { Registry(codec = PluginChannel) }.register(minecraft("channels")) + val MESSAGE_TYPES: PerVersionRegistry> = PerVersionRegistry { Registry(codec = ChatMessageType) }.register(minecraft("message_types")) + val VIBRATION_SOURCE: PerVersionRegistry = PerVersionRegistry { ResourceLocationRegistry() }.register(minecraft("vibration_source")) - val MESSAGE_TYPES_REGISTRY: PerVersionRegistry> = PerVersionRegistry { Registry(codec = ChatMessageType) } - val VIBRATION_SOURCE: PerVersionRegistry = PerVersionRegistry { ResourceLocationRegistry() } + val BLOCK_DATA_TYPE: PerVersionRegistry> = PerVersionRegistry { Registry(codec = BlockDataDataType) }.register(minecraft("block_data_types")) + + val CONTAINER_TYPE: PerVersionRegistry> = PerVersionRegistry { Registry(codec = ContainerType) }.register(minecraft("container_type")) + + val GAME_EVENT: PerVersionRegistry = PerVersionRegistry { ResourceLocationRegistry() }.register(minecraft("game_events")) + val WORLD_EVENT: PerVersionRegistry = PerVersionRegistry { ResourceLocationRegistry() }.register(minecraft("world_events")) fun load() { - check(!initialized) { "Already initialized!" } - Log.log(LogMessageType.OTHER, LogLevels.VERBOSE) { "Loading default registries..." } + Log.log(LogMessageType.LOADING, LogLevels.VERBOSE) { "Loading default registries..." } + if (this.registries.isEmpty() || this.enums.isEmpty()) throw IllegalArgumentException("Empty register?") - val enumJson: Map = IntegratedAssets.DEFAULT[ENUM_RESOURCE_LOCATION].readJson() + for ((registry, file) in registries) { + val data = IntegratedAssets.DEFAULT[file.prefix("mappings/registries/").suffix(".json")].readJsonObject() + registry.initialize(data) + } + for ((registry, file) in enums) { + val data = IntegratedAssets.DEFAULT[file.prefix("mappings/enums/").suffix(".json")].readJsonObject() + registry.initialize(data) + } + this.registries.clear() + this.enums.clear() - EQUIPMENT_SLOTS_REGISTRY.initialize(enumJson[ResourceLocation.of("equipment_slots")].asJsonObject()) - HAND_EQUIPMENT_SLOTS_REGISTRY.initialize(enumJson[ResourceLocation.of("hand_equipment_slots")].asJsonObject()) - ARMOR_EQUIPMENT_SLOTS_REGISTRY.initialize(enumJson[ResourceLocation.of("armor_equipment_slots")].asJsonObject()) - ARMOR_STAND_EQUIPMENT_SLOTS_REGISTRY.initialize(enumJson[ResourceLocation.of("armor_stand_equipment_slots")].asJsonObject()) + Log.log(LogMessageType.LOADING, LogLevels.VERBOSE) { "Loaded default registries!" } + } - ENTITY_DATA_TYPES_REGISTRY.initialize(enumJson[ResourceLocation.of("entity_data_data_types")].asJsonObject()) // ToDo + private fun > T.register(file: ResourceLocation): T { + registries[this] = file + return this + } - TITLE_ACTIONS_REGISTRY.initialize(enumJson[ResourceLocation.of("title_actions")].asJsonObject()) - - ENTITY_ANIMATION_REGISTRY.initialize(enumJson[ResourceLocation.of("entity_animations")].asJsonObject()) - ENTITY_ACTIONS_REGISTRY.initialize(enumJson[ResourceLocation.of("entity_actions")].asJsonObject()) - - - val registriesJson: Map = IntegratedAssets.DEFAULT[REGISTRIES_RESOURCE_LOCATION].readJson() - - DEFAULT_PLUGIN_CHANNELS_REGISTRY.initialize(registriesJson[ResourceLocation.of("default_channels")].asJsonObject()) - - ENTITY_OBJECT_REGISTRY.initialize(registriesJson[ResourceLocation.of("entity_objects")].asJsonObject()) - - BLOCK_DATA_TYPE_REGISTRY.initialize(registriesJson[ResourceLocation.of("block_data_data_types")].asJsonObject()) - - CONTAINER_TYPE_REGISTRY.initialize(registriesJson[ResourceLocation.of("container_types")].asJsonObject()) - - GAME_EVENT_REGISTRY.initialize(registriesJson[ResourceLocation.of("game_events")].asJsonObject()) - WORLD_EVENT_REGISTRY.initialize(registriesJson[ResourceLocation.of("world_events")].asJsonObject()) - - - CAT_VARIANT_REGISTRY.initialize(registriesJson[ResourceLocation.of("variants/cat")].asJsonObject()) - - MESSAGE_TYPES_REGISTRY.initialize(registriesJson[minecraft("message_types")].asJsonObject()) - VIBRATION_SOURCE.initialize(registriesJson[minecraft("vibration_source")].asJsonObject()) - - initialized = true - Log.log(LogMessageType.OTHER, LogLevels.VERBOSE) { "Loaded default registries!" } + private fun > T.register(file: ResourceLocation): T { + enums[this] = file + return this } } diff --git a/src/main/java/de/bixilon/minosoft/data/registries/registries/Registries.kt b/src/main/java/de/bixilon/minosoft/data/registries/registries/Registries.kt index 8c971852c..18281466b 100644 --- a/src/main/java/de/bixilon/minosoft/data/registries/registries/Registries.kt +++ b/src/main/java/de/bixilon/minosoft/data/registries/registries/Registries.kt @@ -104,9 +104,6 @@ class Registries( val frogVariants: Registry = register("frog_variant", Registry(codec = FrogVariant)) val equipmentSlot: EnumRegistry = EnumRegistry(values = EquipmentSlots) - val handEquipmentSlot: EnumRegistry = EnumRegistry(values = EquipmentSlots) - val armorEquipmentSlot: EnumRegistry = EnumRegistry(values = EquipmentSlots) - val armorStandEquipmentSlot: EnumRegistry = EnumRegistry(values = EquipmentSlots) val entityDataTypes: EnumRegistry = EnumRegistry(values = EntityDataTypes, fixer = EntityDataTypesFixer) @@ -169,9 +166,6 @@ class Registries( worker += WorkerTask(this::shape.i) { this.shape.load(pixlyzerData["shapes"]?.toJsonObject()) } worker += WorkerTask(this::equipmentSlot.i) { equipmentSlot.initialize(pixlyzerData["equipment_slots"]) } - worker += WorkerTask(this::handEquipmentSlot.i) { handEquipmentSlot.initialize(pixlyzerData["hand_equipment_slots"]) } - worker += WorkerTask(this::armorEquipmentSlot.i) { armorEquipmentSlot.initialize(pixlyzerData["armor_equipment_slots"]) } - worker += WorkerTask(this::armorStandEquipmentSlot.i) { armorStandEquipmentSlot.initialize(pixlyzerData["armor_stand_equipment_slots"]) } worker += WorkerTask(this::entityDataTypes.i) { entityDataTypes.initialize(pixlyzerData["entity_data_data_types"]) } diff --git a/src/main/java/de/bixilon/minosoft/data/registries/registries/RegistriesLoader.kt b/src/main/java/de/bixilon/minosoft/data/registries/registries/RegistriesLoader.kt index ad017ef68..0c20de3d0 100644 --- a/src/main/java/de/bixilon/minosoft/data/registries/registries/RegistriesLoader.kt +++ b/src/main/java/de/bixilon/minosoft/data/registries/registries/RegistriesLoader.kt @@ -31,22 +31,19 @@ object RegistriesLoader { } private fun Registries.setDefaultParents(version: Version) { - equipmentSlot.parent = FallbackRegistries.EQUIPMENT_SLOTS_REGISTRY.forVersion(version) - handEquipmentSlot.parent = FallbackRegistries.HAND_EQUIPMENT_SLOTS_REGISTRY.forVersion(version) - armorEquipmentSlot.parent = FallbackRegistries.ARMOR_EQUIPMENT_SLOTS_REGISTRY.forVersion(version) - armorStandEquipmentSlot.parent = FallbackRegistries.ARMOR_STAND_EQUIPMENT_SLOTS_REGISTRY.forVersion(version) - entityDataTypes.parent = FallbackRegistries.ENTITY_DATA_TYPES_REGISTRY.forVersion(version) - titleActions.parent = FallbackRegistries.TITLE_ACTIONS_REGISTRY.forVersion(version) - entityAnimation.parent = FallbackRegistries.ENTITY_ANIMATION_REGISTRY.forVersion(version) - entityActions.parent = FallbackRegistries.ENTITY_ACTIONS_REGISTRY.forVersion(version) - entityObjectType.parent = FallbackRegistries.ENTITY_OBJECT_REGISTRY.forVersion(version) - messageType.parent = FallbackRegistries.MESSAGE_TYPES_REGISTRY.forVersion(version) + equipmentSlot.parent = FallbackRegistries.EQUIPMENT_SLOTS.forVersion(version) + entityDataTypes.parent = FallbackRegistries.ENTITY_DATA_TYPES.forVersion(version) + titleActions.parent = FallbackRegistries.TITLE_ACTIONS.forVersion(version) + entityAnimation.parent = FallbackRegistries.ENTITY_ANIMATION.forVersion(version) + entityActions.parent = FallbackRegistries.ENTITY_ACTIONS.forVersion(version) + entityObjectType.parent = FallbackRegistries.ENTITY_OBJECT.forVersion(version) + messageType.parent = FallbackRegistries.MESSAGE_TYPES.forVersion(version) - containerType.parent = FallbackRegistries.CONTAINER_TYPE_REGISTRY.forVersion(version) - gameEvent.parent = FallbackRegistries.GAME_EVENT_REGISTRY.forVersion(version) - worldEvent.parent = FallbackRegistries.WORLD_EVENT_REGISTRY.forVersion(version) - blockDataType.parent = FallbackRegistries.BLOCK_DATA_TYPE_REGISTRY.forVersion(version) + containerType.parent = FallbackRegistries.CONTAINER_TYPE.forVersion(version) + gameEvent.parent = FallbackRegistries.GAME_EVENT.forVersion(version) + worldEvent.parent = FallbackRegistries.WORLD_EVENT.forVersion(version) + blockDataType.parent = FallbackRegistries.BLOCK_DATA_TYPE.forVersion(version) vibrationSource.parent = FallbackRegistries.VIBRATION_SOURCE.forVersion(version) - catVariants.parent = FallbackRegistries.CAT_VARIANT_REGISTRY.forVersion(version) + catVariants.parent = FallbackRegistries.CAT_VARIANT.forVersion(version) } } diff --git a/src/main/java/de/bixilon/minosoft/protocol/network/connection/play/channel/vanila/BrandHandler.kt b/src/main/java/de/bixilon/minosoft/protocol/network/connection/play/channel/vanila/BrandHandler.kt index 8cd1c0f62..fa756bd91 100644 --- a/src/main/java/de/bixilon/minosoft/protocol/network/connection/play/channel/vanila/BrandHandler.kt +++ b/src/main/java/de/bixilon/minosoft/protocol/network/connection/play/channel/vanila/BrandHandler.kt @@ -32,13 +32,13 @@ object BrandHandler { } private fun PlayConnection.getBrandChannel(): ResourceLocation { - return FallbackRegistries.DEFAULT_PLUGIN_CHANNELS_REGISTRY.forVersion(version)[DefaultPluginChannels.BRAND]!!.name + return FallbackRegistries.DEFAULT_PLUGIN_CHANNELS.forVersion(version)[DefaultPluginChannels.BRAND]!!.name } private fun PlayConnection.sendBrand(channel: ResourceLocation, brand: String) { val buffer = PlayOutByteBuffer(this) buffer.writeBareByteArray(brand.encodeNetwork()) - sendPacket(ChannelC2SP(channel, buffer)) + network.send(ChannelC2SP(channel, buffer)) } fun PlayConnection.sendBrand() { diff --git a/src/main/resources/assets/minecraft/mappings/enums/entity/actions.json b/src/main/resources/assets/minecraft/mappings/enums/entity/actions.json new file mode 100644 index 000000000..74c52b1e3 --- /dev/null +++ b/src/main/resources/assets/minecraft/mappings/enums/entity/actions.json @@ -0,0 +1,22 @@ +{ + "0": [ + "START_SNEAKING", + "STOP_SNEAKING", + "LEAVE_BED", + "START_SPRINTING", + "STOP_SPRINTING", + "START_JUMPING_WITH_HORSE", + "OPEN_HORSE_INVENTORY" + ], + "77": [ + "START_SNEAKING", + "STOP_SNEAKING", + "LEAVE_BED", + "START_SPRINTING", + "STOP_SPRINTING", + "START_JUMPING_WITH_HORSE", + "STOP_JUMPING_WITH_HORSE", + "OPEN_HORSE_INVENTORY", + "START_ELYTRA_FLYING" + ] +} diff --git a/src/main/resources/assets/minecraft/mappings/enums/entity/animations.json b/src/main/resources/assets/minecraft/mappings/enums/entity/animations.json new file mode 100644 index 000000000..9604fe82e --- /dev/null +++ b/src/main/resources/assets/minecraft/mappings/enums/entity/animations.json @@ -0,0 +1,29 @@ +{ + "0": { + "0": "SWING_MAIN_ARM", + "1": "TAKE_DAMAGE", + "2": "LEAVE_BED", + "3": "EAT_FOOD", + "4": "CRITICAL_HIT", + "5": "ENCHANTED_HIT", + "102": "UNKNOWN_1", + "104": "START_SNEAKING", + "105": "STOP_SNEAKING" + }, + "47": { + "0": "SWING_MAIN_ARM", + "1": "TAKE_DAMAGE", + "2": "LEAVE_BED", + "3": "EAT_FOOD", + "4": "CRITICAL_HIT", + "5": "ENCHANTED_HIT" + }, + "110": [ + "SWING_MAIN_ARM", + "TAKE_DAMAGE", + "LEAVE_BED", + "SWING_OFF_ARM", + "CRITICAL_HIT", + "ENCHANTED_HIT" + ] +} diff --git a/src/main/resources/assets/minecraft/mappings/enums/entity/data_types.json b/src/main/resources/assets/minecraft/mappings/enums/entity/data_types.json new file mode 100644 index 000000000..e1eeddfa3 --- /dev/null +++ b/src/main/resources/assets/minecraft/mappings/enums/entity/data_types.json @@ -0,0 +1,159 @@ +{ + "0": [ + "BYTE", + "SHORT", + "INTEGER", + "FLOAT", + "STRING", + "ITEM_STACK", + "VEC3I" + ], + "46": [ + "BYTE", + "SHORT", + "INTEGER", + "FLOAT", + "STRING", + "ITEM_STACK", + "VEC3I", + "ROTATION" + ], + "57": [ + "BYTE", + "VAR_INT", + "FLOAT", + "STRING", + "TEXT_COMPONENT", + "ITEM_STACK", + "BOOLEAN", + "ROTATION", + "VEC3I", + "OPTIONAL_VEC3I", + "DIRECTION", + "OPTIONAL_UUID" + ], + "67": [ + "BYTE", + "VAR_INT", + "FLOAT", + "STRING", + "TEXT_COMPONENT", + "ITEM_STACK", + "BOOLEAN", + "ROTATION", + "VEC3I", + "OPTIONAL_VEC3I", + "DIRECTION", + "OPTIONAL_UUID", + "BLOCK_STATE" + ], + "210": [ + "BYTE", + "VAR_INT", + "FLOAT", + "STRING", + "TEXT_COMPONENT", + "ITEM_STACK", + "BOOLEAN", + "ROTATION", + "VEC3I", + "OPTIONAL_VEC3I", + "DIRECTION", + "OPTIONAL_UUID", + "OPTIONAL_BLOCK_STATE" + ], + "318": [ + "BYTE", + "VAR_INT", + "FLOAT", + "STRING", + "TEXT_COMPONENT", + "ITEM_STACK", + "BOOLEAN", + "ROTATION", + "VEC3I", + "OPTIONAL_VEC3I", + "DIRECTION", + "OPTIONAL_UUID", + "OPTIONAL_BLOCK_STATE", + "NBT" + ], + "346": [ + "BYTE", + "VAR_INT", + "FLOAT", + "STRING", + "TEXT_COMPONENT", + "OPTIONAL_TEXT_COMPONENT", + "ITEM_STACK", + "BOOLEAN", + "ROTATION", + "VEC3I", + "OPTIONAL_VEC3I", + "DIRECTION", + "OPTIONAL_UUID", + "OPTIONAL_BLOCK_STATE", + "NBT", + "PARTICLE" + ], + "451": [ + "BYTE", + "VAR_INT", + "FLOAT", + "STRING", + "TEXT_COMPONENT", + "OPTIONAL_TEXT_COMPONENT", + "ITEM_STACK", + "BOOLEAN", + "ROTATION", + "VEC3I", + "OPTIONAL_VEC3I", + "DIRECTION", + "OPTIONAL_UUID", + "OPTIONAL_BLOCK_STATE", + "NBT", + "PARTICLE", + "VILLAGER_DATA" + ], + "459": [ + "BYTE", + "VAR_INT", + "FLOAT", + "STRING", + "TEXT_COMPONENT", + "OPTIONAL_TEXT_COMPONENT", + "ITEM_STACK", + "BOOLEAN", + "ROTATION", + "VEC3I", + "OPTIONAL_VEC3I", + "DIRECTION", + "OPTIONAL_UUID", + "OPTIONAL_BLOCK_STATE", + "NBT", + "PARTICLE", + "VILLAGER_DATA", + "FIREWORK_DATA" + ], + "461": [ + "BYTE", + "VAR_INT", + "FLOAT", + "STRING", + "TEXT_COMPONENT", + "OPTIONAL_TEXT_COMPONENT", + "ITEM_STACK", + "BOOLEAN", + "ROTATION", + "VEC3I", + "OPTIONAL_VEC3I", + "DIRECTION", + "OPTIONAL_UUID", + "OPTIONAL_BLOCK_STATE", + "NBT", + "PARTICLE", + "VILLAGER_DATA", + "FIREWORK_DATA", + "POSE" + ] +} diff --git a/src/main/resources/assets/minecraft/mappings/enums/entity/equipment.json b/src/main/resources/assets/minecraft/mappings/enums/entity/equipment.json new file mode 100644 index 000000000..16e86eb49 --- /dev/null +++ b/src/main/resources/assets/minecraft/mappings/enums/entity/equipment.json @@ -0,0 +1,17 @@ +{ + "0": [ + "MAIN_HAND", + "FEET", + "LEGS", + "CHEST", + "HEAD" + ], + "49": [ + "MAIN_HAND", + "OFF_HAND", + "FEET", + "LEGS", + "CHEST", + "HEAD" + ] +} diff --git a/src/main/resources/assets/minecraft/mappings/enums/title_actions.json b/src/main/resources/assets/minecraft/mappings/enums/title_actions.json new file mode 100644 index 000000000..22720265f --- /dev/null +++ b/src/main/resources/assets/minecraft/mappings/enums/title_actions.json @@ -0,0 +1,17 @@ +{ + "18": [ + "TITLE_TEXT", + "SUBTITLE", + "TIMES", + "HIDE", + "RESET" + ], + "302": [ + "TITLE_TEXT", + "SUBTITLE", + "HOTBAR_TEXT", + "TIMES", + "HIDE", + "RESET" + ] +} diff --git a/src/main/resources/assets/minecraft/mappings/registries/block_data_types.json b/src/main/resources/assets/minecraft/mappings/registries/block_data_types.json new file mode 100644 index 000000000..2e42d6f2b --- /dev/null +++ b/src/main/resources/assets/minecraft/mappings/registries/block_data_types.json @@ -0,0 +1,365 @@ +{ + "0": { + "minecraft:spawner": { + "id": 1 + }, + "minecraft:command_block": { + "id": 2 + }, + "minecraft:skull": { + "id": 3 + }, + "minecraft:flower_pot": { + "id": 4 + } + }, + "30": { + "minecraft:spawner": { + "id": 1 + }, + "minecraft:command_block": { + "id": 2 + }, + "minecraft:skull": { + "id": 3 + }, + "minecraft:flower_pot": { + "id": 4 + }, + "minecraft:banner": { + "id": 6 + } + }, + "33": { + "minecraft:spawner": { + "id": 1 + }, + "minecraft:command_block": { + "id": 2 + }, + "minecraft:beacon": { + "id": 3 + }, + "minecraft:skull": { + "id": 4 + }, + "minecraft:flower_pot": { + "id": 5 + }, + "minecraft:banner": { + "id": 6 + } + }, + "49": { + "minecraft:spawner": { + "id": 1 + }, + "minecraft:command_block": { + "id": 2 + }, + "minecraft:beacon": { + "id": 3 + }, + "minecraft:skull": { + "id": 4 + }, + "minecraft:flower_pot": { + "id": 5 + }, + "minecraft:banner": { + "id": 6 + }, + "minecraft:data_structure": { + "id": 7 + }, + "minecraft:end_gateway": { + "id": 8 + } + }, + "110": { + "minecraft:spawner": { + "id": 1 + }, + "minecraft:command_block": { + "id": 2 + }, + "minecraft:beacon": { + "id": 3 + }, + "minecraft:skull": { + "id": 4 + }, + "minecraft:flower_pot": { + "id": 5 + }, + "minecraft:banner": { + "id": 6 + }, + "minecraft:data_structure": { + "id": 7 + }, + "minecraft:end_gateway": { + "id": 8 + }, + "minecraft:sign": { + "id": 9 + } + }, + "307": { + "minecraft:spawner": { + "id": 1 + }, + "minecraft:command_block": { + "id": 2 + }, + "minecraft:beacon": { + "id": 3 + }, + "minecraft:skull": { + "id": 4 + }, + "minecraft:flower_pot": { + "id": 5 + }, + "minecraft:banner": { + "id": 6 + }, + "minecraft:data_structure": { + "id": 7 + }, + "minecraft:end_gateway": { + "id": 8 + }, + "minecraft:sign": { + "id": 9 + }, + "minecraft:shulker_box": { + "id": 10 + } + }, + "321": { + "minecraft:spawner": { + "id": 1 + }, + "minecraft:command_block": { + "id": 2 + }, + "minecraft:beacon": { + "id": 3 + }, + "minecraft:skull": { + "id": 4 + }, + "minecraft:flower_pot": { + "id": 5 + }, + "minecraft:banner": { + "id": 6 + }, + "minecraft:data_structure": { + "id": 7 + }, + "minecraft:end_gateway": { + "id": 8 + }, + "minecraft:sign": { + "id": 9 + }, + "minecraft:shulker_box": { + "id": 10 + }, + "minecraft:bed": { + "id": 11 + } + }, + "346": { + "minecraft:spawner": { + "id": 1 + }, + "minecraft:command_block": { + "id": 2 + }, + "minecraft:beacon": { + "id": 3 + }, + "minecraft:skull": { + "id": 4 + }, + "minecraft:banner": { + "id": 6 + }, + "minecraft:data_structure": { + "id": 7 + }, + "minecraft:end_gateway": { + "id": 8 + }, + "minecraft:sign": { + "id": 9 + }, + "minecraft:shulker_box": { + "id": 10 + }, + "minecraft:bed": { + "id": 11 + } + }, + "371": { + "minecraft:spawner": { + "id": 1 + }, + "minecraft:command_block": { + "id": 2 + }, + "minecraft:beacon": { + "id": 3 + }, + "minecraft:skull": { + "id": 4 + }, + "minecraft:conduit": { + "id": 5 + }, + "minecraft:banner": { + "id": 6 + }, + "minecraft:data_structure": { + "id": 7 + }, + "minecraft:end_gateway": { + "id": 8 + }, + "minecraft:sign": { + "id": 9 + }, + "minecraft:shulker_box": { + "id": 10 + }, + "minecraft:bed": { + "id": 11 + } + }, + "445": { + "minecraft:spawner": { + "id": 1 + }, + "minecraft:command_block": { + "id": 2 + }, + "minecraft:beacon": { + "id": 3 + }, + "minecraft:skull": { + "id": 4 + }, + "minecraft:conduit": { + "id": 5 + }, + "minecraft:banner": { + "id": 6 + }, + "minecraft:data_structure": { + "id": 7 + }, + "minecraft:end_gateway": { + "id": 8 + }, + "minecraft:sign": { + "id": 9 + }, + "minecraft:shulker_box": { + "id": 10 + }, + "minecraft:bed": { + "id": 11 + }, + "minecraft:jigsaw": { + "id": 12 + } + }, + "452": { + "minecraft:spawner": { + "id": 1 + }, + "minecraft:command_block": { + "id": 2 + }, + "minecraft:beacon": { + "id": 3 + }, + "minecraft:skull": { + "id": 4 + }, + "minecraft:conduit": { + "id": 5 + }, + "minecraft:banner": { + "id": 6 + }, + "minecraft:data_structure": { + "id": 7 + }, + "minecraft:end_gateway": { + "id": 8 + }, + "minecraft:sign": { + "id": 9 + }, + "minecraft:shulker_box": { + "id": 10 + }, + "minecraft:bed": { + "id": 11 + }, + "minecraft:jigsaw": { + "id": 12 + }, + "minecraft:campfire": { + "id": 13 + } + }, + "550": { + "minecraft:spawner": { + "id": 1 + }, + "minecraft:command_block": { + "id": 2 + }, + "minecraft:beacon": { + "id": 3 + }, + "minecraft:skull": { + "id": 4 + }, + "minecraft:conduit": { + "id": 5 + }, + "minecraft:banner": { + "id": 6 + }, + "minecraft:data_structure": { + "id": 7 + }, + "minecraft:end_gateway": { + "id": 8 + }, + "minecraft:sign": { + "id": 9 + }, + "minecraft:shulker_box": { + "id": 10 + }, + "minecraft:bed": { + "id": 11 + }, + "minecraft:jigsaw": { + "id": 12 + }, + "minecraft:campfire": { + "id": 13 + }, + "minecraft:bee_hive": { + "id": 14 + } + } +} diff --git a/src/main/resources/assets/minecraft/mappings/registries/channels.json b/src/main/resources/assets/minecraft/mappings/registries/channels.json new file mode 100644 index 000000000..84df9f191 --- /dev/null +++ b/src/main/resources/assets/minecraft/mappings/registries/channels.json @@ -0,0 +1,27 @@ +{ + "0": { + "minecraft:brand": { + "name": "MC|Brand" + }, + "minecraft:stop_sound": { + "name": "MC|StopSound" + }, + "minecraft:register": { + "name": "REGISTER" + }, + "minecraft:unregister": { + "name": "UNREGISTER" + } + }, + "385": { + "minecraft:brand": { + "name": "minecraft:brand" + }, + "minecraft:register": { + "name": "minecraft:register" + }, + "minecraft:unregister": { + "name": "minecraft:unregister" + } + } +} diff --git a/src/main/resources/assets/minecraft/mappings/registries/container_type.json b/src/main/resources/assets/minecraft/mappings/registries/container_type.json new file mode 100644 index 000000000..e412ada5a --- /dev/null +++ b/src/main/resources/assets/minecraft/mappings/registries/container_type.json @@ -0,0 +1,40 @@ +{ + "0": { + "minecraft:chest": { + "id": 0 + }, + "minecraft:crafting_table": { + "id": 1 + }, + "minecraft:furnace": { + "id": 2 + }, + "minecraft:dispenser": { + "id": 3 + }, + "minecraft:enchanting_table": { + "id": 4 + }, + "minecraft:brewing_stand": { + "id": 5 + }, + "minecraft:villager": { + "id": 6 + }, + "minecraft:beacon": { + "id": 7 + }, + "minecraft:anvil": { + "id": 8 + }, + "minecraft:hopper": { + "id": 9 + }, + "minecraft:dropper": { + "id": 9 + }, + "minecraft:EntityHorse": { + "id": 9 + } + } +} diff --git a/src/main/resources/assets/minecraft/mappings/registries/entity/objects.json b/src/main/resources/assets/minecraft/mappings/registries/entity/objects.json new file mode 100644 index 000000000..a612adcf2 --- /dev/null +++ b/src/main/resources/assets/minecraft/mappings/registries/entity/objects.json @@ -0,0 +1,94 @@ +{ + "0": { + "minecraft:boat": { + "id": 1 + }, + "minecraft:item": { + "id": 2 + }, + "minecraft:area_effect_cloud": { + "id": 3 + }, + "minecraft:minecart": { + "id": 10 + }, + "minecraft:tnt": { + "id": 50 + }, + "minecraft:end_crystal": { + "id": 51 + }, + "minecraft:arrow": { + "id": 60 + }, + "minecraft:snowball": { + "id": 61 + }, + "minecraft:egg": { + "id": 62 + }, + "minecraft:fireball": { + "id": 63 + }, + "minecraft:small_fireball": { + "id": 64 + }, + "minecraft:ender_pearl": { + "id": 65 + }, + "minecraft:wither_skull": { + "id": 66 + }, + "minecraft:shulker_bullet": { + "id": 67 + }, + "minecraft:llama_spit": { + "id": 68 + }, + "minecraft:falling_block": { + "id": 70 + }, + "minecraft:item_frame": { + "id": 71 + }, + "minecraft:eye_of_ender": { + "id": 72 + }, + "minecraft:potion": { + "id": 73 + }, + "minecraft:falling_dragon_egg": { + "id": 74 + }, + "minecraft:experience_bottle": { + "id": 75 + }, + "minecraft:firework_rocket": { + "id": 76 + }, + "minecraft:leash_knot": { + "id": 77 + }, + "minecraft:armor_stand": { + "id": 78 + }, + "minecraft:evoker_fangs": { + "id": 79 + }, + "minecraft:fishing_bobber": { + "id": 90 + }, + "minecraft:spectral_arrow": { + "id": 91 + }, + "minecraft:tipped_arrow": { + "id": 91 + }, + "minecraft:dragon_fireball": { + "id": 93 + }, + "minecraft:trident": { + "id": 94 + } + } +} diff --git a/src/main/resources/assets/minecraft/mappings/registries/entity/variant/cat.json b/src/main/resources/assets/minecraft/mappings/registries/entity/variant/cat.json new file mode 100644 index 000000000..952cd2f4d --- /dev/null +++ b/src/main/resources/assets/minecraft/mappings/registries/entity/variant/cat.json @@ -0,0 +1,48 @@ +{ + "0": { + "minecraft:tabby": { + "id": 0, + "texture": "entity/cat/tabby" + }, + "minecraft:black": { + "id": 1, + "texture": "entity/cat/black" + }, + "minecraft:red": { + "id": 2, + "texture": "entity/cat/red" + }, + "minecraft:siamese": { + "id": 3, + "texture": "entity/cat/siamese" + }, + "minecraft:british": { + "id": 4, + "texture": "entity/cat/british_shorthair" + }, + "minecraft:calico": { + "id": 5, + "texture": "entity/cat/calico" + }, + "minecraft:persian": { + "id": 6, + "texture": "entity/cat/persian" + }, + "minecraft:ragdoll": { + "id": 7, + "texture": "entity/cat/ragdoll" + }, + "minecraft:white": { + "id": 8, + "texture": "entity/cat/white" + }, + "minecraft:jellie": { + "id": 9, + "texture": "entity/cat/jellie" + }, + "minecraft:all_black": { + "id": 10, + "texture": "entity/cat/all_black" + } + } +} diff --git a/src/main/resources/assets/minecraft/mappings/registries/game_events.json b/src/main/resources/assets/minecraft/mappings/registries/game_events.json new file mode 100644 index 000000000..013150cc6 --- /dev/null +++ b/src/main/resources/assets/minecraft/mappings/registries/game_events.json @@ -0,0 +1,160 @@ +{ + "0": { + "minecraft:bed_break": { + "id": 0 + }, + "minecraft:rain_stop": { + "id": 1 + }, + "minecraft:rain_start": { + "id": 2 + }, + "minecraft:gamemode_change": { + "id": 3 + }, + "minecraft:win_game": { + "id": 4 + }, + "minecraft:hide_demo_messages": { + "id": 5 + }, + "minecraft:arrow_player_hit": { + "id": 6 + }, + "minecraft:rain_gradient_set": { + "id": 7 + }, + "minecraft:thunder_gradient_set": { + "id": 8 + }, + "minecraft:pufferfish_sting": { + "id": 9 + }, + "minecraft:elder_guardian_effect": { + "id": 10 + } + }, + "552": { + "minecraft:bed_break": { + "id": 0 + }, + "minecraft:rain_start": { + "id": 1 + }, + "minecraft:rain_stop": { + "id": 2 + }, + "minecraft:gamemode_change": { + "id": 3 + }, + "minecraft:win_game": { + "id": 4 + }, + "minecraft:hide_demo_messages": { + "id": 5 + }, + "minecraft:arrow_player_hit": { + "id": 6 + }, + "minecraft:rain_gradient_set": { + "id": 7 + }, + "minecraft:thunder_gradient_set": { + "id": 8 + }, + "minecraft:pufferfish_sting": { + "id": 9 + }, + "minecraft:elder_guardian_effect": { + "id": 10 + }, + "minecraft:immediate_respawn": { + "id": 11 + } + }, + "906": { + "minecraft:bed_break": { + "id": 0 + }, + "minecraft:rain_start": { + "id": 1 + }, + "minecraft:rain_stop": { + "id": 2 + }, + "minecraft:gamemode_change": { + "id": 3 + }, + "minecraft:win_game": { + "id": 4 + }, + "minecraft:hide_demo_messages": { + "id": 5 + }, + "minecraft:arrow_player_hit": { + "id": 6 + }, + "minecraft:rain_gradient_set": { + "id": 7 + }, + "minecraft:thunder_gradient_set": { + "id": 8 + }, + "minecraft:pufferfish_sting": { + "id": 9 + }, + "minecraft:elder_guardian_effect": { + "id": 10 + }, + "minecraft:immediate_respawn": { + "id": 11 + }, + "minecraft:limited_crafting": { + "id": 12 + } + }, + "916": { + "minecraft:bed_break": { + "id": 0 + }, + "minecraft:rain_start": { + "id": 1 + }, + "minecraft:rain_stop": { + "id": 2 + }, + "minecraft:gamemode_change": { + "id": 3 + }, + "minecraft:win_game": { + "id": 4 + }, + "minecraft:hide_demo_messages": { + "id": 5 + }, + "minecraft:arrow_player_hit": { + "id": 6 + }, + "minecraft:rain_gradient_set": { + "id": 7 + }, + "minecraft:thunder_gradient_set": { + "id": 8 + }, + "minecraft:pufferfish_sting": { + "id": 9 + }, + "minecraft:elder_guardian_effect": { + "id": 10 + }, + "minecraft:immediate_respawn": { + "id": 11 + }, + "minecraft:limited_crafting": { + "id": 12 + }, + "minecraft:receive_chunks": { + "id": 13 + } + } +} diff --git a/src/main/resources/assets/minecraft/mappings/registries/message_types.json b/src/main/resources/assets/minecraft/mappings/registries/message_types.json new file mode 100644 index 000000000..7b3e528a3 --- /dev/null +++ b/src/main/resources/assets/minecraft/mappings/registries/message_types.json @@ -0,0 +1,28 @@ +{ + "0": { + "minecraft:chat": { + "id": 0, + "position": "chat", + "chat": { + "translation_key": "%s", + "parameters": ["content"] + } + }, + "minecraft:system": { + "id": 1, + "position": "system", + "chat": { + "translation_key": "%s", + "parameters": ["content"] + } + }, + "minecraft:game": { + "id": 2, + "position": "hotbar", + "chat": { + "translation_key": "%s", + "parameters": ["content"] + } + } + } +} diff --git a/src/main/resources/assets/minecraft/mappings/registries/vibration_source.json b/src/main/resources/assets/minecraft/mappings/registries/vibration_source.json new file mode 100644 index 000000000..a7d9e7eda --- /dev/null +++ b/src/main/resources/assets/minecraft/mappings/registries/vibration_source.json @@ -0,0 +1,10 @@ +{ + "0": { + "minecraft:block": { + "id": 0 + }, + "minecraft:entity": { + "id": 1 + } + } +} diff --git a/src/main/resources/assets/minecraft/mappings/registries/world_events.json b/src/main/resources/assets/minecraft/mappings/registries/world_events.json new file mode 100644 index 000000000..c0a015828 --- /dev/null +++ b/src/main/resources/assets/minecraft/mappings/registries/world_events.json @@ -0,0 +1,7 @@ +{ + "0": { + "minecraft:block_destroyed": { + "id": 2001 + } + } +} diff --git a/src/main/resources/assets/minosoft/mapping/default_registries.json b/src/main/resources/assets/minosoft/mapping/default_registries.json deleted file mode 100644 index 07c38f4c0..000000000 --- a/src/main/resources/assets/minosoft/mapping/default_registries.json +++ /dev/null @@ -1,781 +0,0 @@ -{ - "minecraft:default_channels": { - "0": { - "minecraft:brand": { - "name": "MC|Brand" - }, - "minecraft:stop_sound": { - "name": "MC|StopSound" - }, - "minecraft:register": { - "name": "REGISTER" - }, - "minecraft:unregister": { - "name": "UNREGISTER" - } - }, - "385": { - "minecraft:brand": { - "name": "minecraft:brand" - }, - "minecraft:register": { - "name": "minecraft:register" - }, - "minecraft:unregister": { - "name": "minecraft:unregister" - } - } - }, - "minecraft:entity_objects": { - "0": { - "minecraft:boat": { - "id": 1 - }, - "minecraft:item": { - "id": 2 - }, - "minecraft:area_effect_cloud": { - "id": 3 - }, - "minecraft:minecart": { - "id": 10 - }, - "minecraft:tnt": { - "id": 50 - }, - "minecraft:end_crystal": { - "id": 51 - }, - "minecraft:arrow": { - "id": 60 - }, - "minecraft:snowball": { - "id": 61 - }, - "minecraft:egg": { - "id": 62 - }, - "minecraft:fireball": { - "id": 63 - }, - "minecraft:small_fireball": { - "id": 64 - }, - "minecraft:ender_pearl": { - "id": 65 - }, - "minecraft:wither_skull": { - "id": 66 - }, - "minecraft:shulker_bullet": { - "id": 67 - }, - "minecraft:llama_spit": { - "id": 68 - }, - "minecraft:falling_block": { - "id": 70 - }, - "minecraft:item_frame": { - "id": 71 - }, - "minecraft:eye_of_ender": { - "id": 72 - }, - "minecraft:potion": { - "id": 73 - }, - "minecraft:falling_dragon_egg": { - "id": 74 - }, - "minecraft:experience_bottle": { - "id": 75 - }, - "minecraft:firework_rocket": { - "id": 76 - }, - "minecraft:leash_knot": { - "id": 77 - }, - "minecraft:armor_stand": { - "id": 78 - }, - "minecraft:evoker_fangs": { - "id": 79 - }, - "minecraft:fishing_bobber": { - "id": 90 - }, - "minecraft:spectral_arrow": { - "id": 91 - }, - "minecraft:tipped_arrow": { - "id": 91 - }, - "minecraft:dragon_fireball": { - "id": 93 - }, - "minecraft:trident": { - "id": 94 - } - } - }, - "minecraft:block_data_data_types": { - "0": { - "minecraft:spawner": { - "id": 1 - }, - "minecraft:command_block": { - "id": 2 - }, - "minecraft:skull": { - "id": 3 - }, - "minecraft:flower_pot": { - "id": 4 - } - }, - "30": { - "minecraft:spawner": { - "id": 1 - }, - "minecraft:command_block": { - "id": 2 - }, - "minecraft:skull": { - "id": 3 - }, - "minecraft:flower_pot": { - "id": 4 - }, - "minecraft:banner": { - "id": 6 - } - }, - "33": { - "minecraft:spawner": { - "id": 1 - }, - "minecraft:command_block": { - "id": 2 - }, - "minecraft:beacon": { - "id": 3 - }, - "minecraft:skull": { - "id": 4 - }, - "minecraft:flower_pot": { - "id": 5 - }, - "minecraft:banner": { - "id": 6 - } - }, - "49": { - "minecraft:spawner": { - "id": 1 - }, - "minecraft:command_block": { - "id": 2 - }, - "minecraft:beacon": { - "id": 3 - }, - "minecraft:skull": { - "id": 4 - }, - "minecraft:flower_pot": { - "id": 5 - }, - "minecraft:banner": { - "id": 6 - }, - "minecraft:data_structure": { - "id": 7 - }, - "minecraft:end_gateway": { - "id": 8 - } - }, - "110": { - "minecraft:spawner": { - "id": 1 - }, - "minecraft:command_block": { - "id": 2 - }, - "minecraft:beacon": { - "id": 3 - }, - "minecraft:skull": { - "id": 4 - }, - "minecraft:flower_pot": { - "id": 5 - }, - "minecraft:banner": { - "id": 6 - }, - "minecraft:data_structure": { - "id": 7 - }, - "minecraft:end_gateway": { - "id": 8 - }, - "minecraft:sign": { - "id": 9 - } - }, - "307": { - "minecraft:spawner": { - "id": 1 - }, - "minecraft:command_block": { - "id": 2 - }, - "minecraft:beacon": { - "id": 3 - }, - "minecraft:skull": { - "id": 4 - }, - "minecraft:flower_pot": { - "id": 5 - }, - "minecraft:banner": { - "id": 6 - }, - "minecraft:data_structure": { - "id": 7 - }, - "minecraft:end_gateway": { - "id": 8 - }, - "minecraft:sign": { - "id": 9 - }, - "minecraft:shulker_box": { - "id": 10 - } - }, - "321": { - "minecraft:spawner": { - "id": 1 - }, - "minecraft:command_block": { - "id": 2 - }, - "minecraft:beacon": { - "id": 3 - }, - "minecraft:skull": { - "id": 4 - }, - "minecraft:flower_pot": { - "id": 5 - }, - "minecraft:banner": { - "id": 6 - }, - "minecraft:data_structure": { - "id": 7 - }, - "minecraft:end_gateway": { - "id": 8 - }, - "minecraft:sign": { - "id": 9 - }, - "minecraft:shulker_box": { - "id": 10 - }, - "minecraft:bed": { - "id": 11 - } - }, - "346": { - "minecraft:spawner": { - "id": 1 - }, - "minecraft:command_block": { - "id": 2 - }, - "minecraft:beacon": { - "id": 3 - }, - "minecraft:skull": { - "id": 4 - }, - "minecraft:banner": { - "id": 6 - }, - "minecraft:data_structure": { - "id": 7 - }, - "minecraft:end_gateway": { - "id": 8 - }, - "minecraft:sign": { - "id": 9 - }, - "minecraft:shulker_box": { - "id": 10 - }, - "minecraft:bed": { - "id": 11 - } - }, - "371": { - "minecraft:spawner": { - "id": 1 - }, - "minecraft:command_block": { - "id": 2 - }, - "minecraft:beacon": { - "id": 3 - }, - "minecraft:skull": { - "id": 4 - }, - "minecraft:conduit": { - "id": 5 - }, - "minecraft:banner": { - "id": 6 - }, - "minecraft:data_structure": { - "id": 7 - }, - "minecraft:end_gateway": { - "id": 8 - }, - "minecraft:sign": { - "id": 9 - }, - "minecraft:shulker_box": { - "id": 10 - }, - "minecraft:bed": { - "id": 11 - } - }, - "445": { - "minecraft:spawner": { - "id": 1 - }, - "minecraft:command_block": { - "id": 2 - }, - "minecraft:beacon": { - "id": 3 - }, - "minecraft:skull": { - "id": 4 - }, - "minecraft:conduit": { - "id": 5 - }, - "minecraft:banner": { - "id": 6 - }, - "minecraft:data_structure": { - "id": 7 - }, - "minecraft:end_gateway": { - "id": 8 - }, - "minecraft:sign": { - "id": 9 - }, - "minecraft:shulker_box": { - "id": 10 - }, - "minecraft:bed": { - "id": 11 - }, - "minecraft:jigsaw": { - "id": 12 - } - }, - "452": { - "minecraft:spawner": { - "id": 1 - }, - "minecraft:command_block": { - "id": 2 - }, - "minecraft:beacon": { - "id": 3 - }, - "minecraft:skull": { - "id": 4 - }, - "minecraft:conduit": { - "id": 5 - }, - "minecraft:banner": { - "id": 6 - }, - "minecraft:data_structure": { - "id": 7 - }, - "minecraft:end_gateway": { - "id": 8 - }, - "minecraft:sign": { - "id": 9 - }, - "minecraft:shulker_box": { - "id": 10 - }, - "minecraft:bed": { - "id": 11 - }, - "minecraft:jigsaw": { - "id": 12 - }, - "minecraft:campfire": { - "id": 13 - } - }, - "550": { - "minecraft:spawner": { - "id": 1 - }, - "minecraft:command_block": { - "id": 2 - }, - "minecraft:beacon": { - "id": 3 - }, - "minecraft:skull": { - "id": 4 - }, - "minecraft:conduit": { - "id": 5 - }, - "minecraft:banner": { - "id": 6 - }, - "minecraft:data_structure": { - "id": 7 - }, - "minecraft:end_gateway": { - "id": 8 - }, - "minecraft:sign": { - "id": 9 - }, - "minecraft:shulker_box": { - "id": 10 - }, - "minecraft:bed": { - "id": 11 - }, - "minecraft:jigsaw": { - "id": 12 - }, - "minecraft:campfire": { - "id": 13 - }, - "minecraft:bee_hive": { - "id": 14 - } - } - }, - "minecraft:container_types": { - "0": { - "minecraft:chest": { - "id": 0 - }, - "minecraft:crafting_table": { - "id": 1 - }, - "minecraft:furnace": { - "id": 2 - }, - "minecraft:dispenser": { - "id": 3 - }, - "minecraft:enchanting_table": { - "id": 4 - }, - "minecraft:brewing_stand": { - "id": 5 - }, - "minecraft:villager": { - "id": 6 - }, - "minecraft:beacon": { - "id": 7 - }, - "minecraft:anvil": { - "id": 8 - }, - "minecraft:hopper": { - "id": 9 - }, - "minecraft:dropper": { - "id": 9 - }, - "minecraft:EntityHorse": { - "id": 9 - } - } - }, - "minecraft:game_events": { - "0": { - "minecraft:bed_break": { - "id": 0 - }, - "minecraft:rain_stop": { - "id": 1 - }, - "minecraft:rain_start": { - "id": 2 - }, - "minecraft:gamemode_change": { - "id": 3 - }, - "minecraft:win_game": { - "id": 4 - }, - "minecraft:hide_demo_messages": { - "id": 5 - }, - "minecraft:arrow_player_hit": { - "id": 6 - }, - "minecraft:rain_gradient_set": { - "id": 7 - }, - "minecraft:thunder_gradient_set": { - "id": 8 - }, - "minecraft:pufferfish_sting": { - "id": 9 - }, - "minecraft:elder_guardian_effect": { - "id": 10 - } - }, - "552": { - "minecraft:bed_break": { - "id": 0 - }, - "minecraft:rain_start": { - "id": 1 - }, - "minecraft:rain_stop": { - "id": 2 - }, - "minecraft:gamemode_change": { - "id": 3 - }, - "minecraft:win_game": { - "id": 4 - }, - "minecraft:hide_demo_messages": { - "id": 5 - }, - "minecraft:arrow_player_hit": { - "id": 6 - }, - "minecraft:rain_gradient_set": { - "id": 7 - }, - "minecraft:thunder_gradient_set": { - "id": 8 - }, - "minecraft:pufferfish_sting": { - "id": 9 - }, - "minecraft:elder_guardian_effect": { - "id": 10 - }, - "minecraft:immediate_respawn": { - "id": 11 - } - }, - "906": { - "minecraft:bed_break": { - "id": 0 - }, - "minecraft:rain_start": { - "id": 1 - }, - "minecraft:rain_stop": { - "id": 2 - }, - "minecraft:gamemode_change": { - "id": 3 - }, - "minecraft:win_game": { - "id": 4 - }, - "minecraft:hide_demo_messages": { - "id": 5 - }, - "minecraft:arrow_player_hit": { - "id": 6 - }, - "minecraft:rain_gradient_set": { - "id": 7 - }, - "minecraft:thunder_gradient_set": { - "id": 8 - }, - "minecraft:pufferfish_sting": { - "id": 9 - }, - "minecraft:elder_guardian_effect": { - "id": 10 - }, - "minecraft:immediate_respawn": { - "id": 11 - }, - "minecraft:limited_crafting": { - "id": 12 - } - }, - "916": { - "minecraft:bed_break": { - "id": 0 - }, - "minecraft:rain_start": { - "id": 1 - }, - "minecraft:rain_stop": { - "id": 2 - }, - "minecraft:gamemode_change": { - "id": 3 - }, - "minecraft:win_game": { - "id": 4 - }, - "minecraft:hide_demo_messages": { - "id": 5 - }, - "minecraft:arrow_player_hit": { - "id": 6 - }, - "minecraft:rain_gradient_set": { - "id": 7 - }, - "minecraft:thunder_gradient_set": { - "id": 8 - }, - "minecraft:pufferfish_sting": { - "id": 9 - }, - "minecraft:elder_guardian_effect": { - "id": 10 - }, - "minecraft:immediate_respawn": { - "id": 11 - }, - "minecraft:limited_crafting": { - "id": 12 - }, - "minecraft:receive_chunks": { - "id": 13 - } - } - }, - "minecraft:world_events": { - "0": { - "minecraft:block_destroyed": { - "id": 2001 - } - } - }, - "minecraft:variants/cat": { - "0": { - "minecraft:tabby": { - "id": 0, - "texture": "minecraft:textures/entity/cat/tabby.png" - }, - "minecraft:black": { - "id": 1, - "texture": "minecraft:textures/entity/cat/black.png" - }, - "minecraft:red": { - "id": 2, - "texture": "minecraft:textures/entity/cat/red.png" - }, - "minecraft:siamese": { - "id": 3, - "texture": "minecraft:textures/entity/cat/siamese.png" - }, - "minecraft:british": { - "id": 4, - "texture": "minecraft:textures/entity/cat/british_shorthair.png" - }, - "minecraft:calico": { - "id": 5, - "texture": "minecraft:textures/entity/cat/calico.png" - }, - "minecraft:persian": { - "id": 6, - "texture": "minecraft:textures/entity/cat/persian.png" - }, - "minecraft:ragdoll": { - "id": 7, - "texture": "minecraft:textures/entity/cat/ragdoll.png" - }, - "minecraft:white": { - "id": 8, - "texture": "minecraft:textures/entity/cat/white.png" - }, - "minecraft:jellie": { - "id": 9, - "texture": "minecraft:textures/entity/cat/jellie.png" - }, - "minecraft:all_black": { - "id": 10, - "texture": "minecraft:textures/entity/cat/all_black.png" - } - } - }, - "minecraft:message_types": { - "0": { - "minecraft:chat": { - "id": 0, - "position": "chat", - "chat": { - "translation_key": "%s", - "parameters": ["content"] - } - }, - "minecraft:system": { - "id": 1, - "position": "system", - "chat": { - "translation_key": "%s", - "parameters": ["content"] - } - }, - "minecraft:game": { - "id": 2, - "position": "hotbar", - "chat": { - "translation_key": "%s", - "parameters": ["content"] - } - } - } - }, - "minecraft:vibration_source": { - "0": { - "minecraft:block": { - "id": 0 - }, - "minecraft:entity": { - "id": 1 - } - } - } -} diff --git a/src/main/resources/assets/minosoft/mapping/enums.json b/src/main/resources/assets/minosoft/mapping/enums.json deleted file mode 100644 index 1d00d34e4..000000000 --- a/src/main/resources/assets/minosoft/mapping/enums.json +++ /dev/null @@ -1,270 +0,0 @@ -{ - "minecraft:equipment_slots": { - "0": [ - "MAIN_HAND", - "FEET", - "LEGS", - "CHEST", - "HEAD" - ], - "49": [ - "MAIN_HAND", - "OFF_HAND", - "FEET", - "LEGS", - "CHEST", - "HEAD" - ] - }, - "minecraft:hand_equipment_slots": { - "0": [ - "MAIN_HAND", - "OFF_HAND" - ] - }, - "minecraft:armor_equipment_slots": { - "0": [ - "FEET", - "LEGS", - "CHEST", - "HEAD" - ] - }, - "minecraft:armor_stand_equipment_slots": { - "0": [ - "MAIN_HAND", - "FEET", - "LEGS", - "CHEST", - "HEAD", - "OFF_HAND" - ] - }, - "minecraft:entity_data_data_types": { - "0": [ - "BYTE", - "SHORT", - "INTEGER", - "FLOAT", - "STRING", - "ITEM_STACK", - "VEC3I" - ], - "46": [ - "BYTE", - "SHORT", - "INTEGER", - "FLOAT", - "STRING", - "ITEM_STACK", - "VEC3I", - "ROTATION" - ], - "57": [ - "BYTE", - "VAR_INT", - "FLOAT", - "STRING", - "TEXT_COMPONENT", - "ITEM_STACK", - "BOOLEAN", - "ROTATION", - "VEC3I", - "OPTIONAL_VEC3I", - "DIRECTION", - "OPTIONAL_UUID" - ], - "67": [ - "BYTE", - "VAR_INT", - "FLOAT", - "STRING", - "TEXT_COMPONENT", - "ITEM_STACK", - "BOOLEAN", - "ROTATION", - "VEC3I", - "OPTIONAL_VEC3I", - "DIRECTION", - "OPTIONAL_UUID", - "BLOCK_STATE" - ], - "210": [ - "BYTE", - "VAR_INT", - "FLOAT", - "STRING", - "TEXT_COMPONENT", - "ITEM_STACK", - "BOOLEAN", - "ROTATION", - "VEC3I", - "OPTIONAL_VEC3I", - "DIRECTION", - "OPTIONAL_UUID", - "OPTIONAL_BLOCK_STATE" - ], - "318": [ - "BYTE", - "VAR_INT", - "FLOAT", - "STRING", - "TEXT_COMPONENT", - "ITEM_STACK", - "BOOLEAN", - "ROTATION", - "VEC3I", - "OPTIONAL_VEC3I", - "DIRECTION", - "OPTIONAL_UUID", - "OPTIONAL_BLOCK_STATE", - "NBT" - ], - "346": [ - "BYTE", - "VAR_INT", - "FLOAT", - "STRING", - "TEXT_COMPONENT", - "OPTIONAL_TEXT_COMPONENT", - "ITEM_STACK", - "BOOLEAN", - "ROTATION", - "VEC3I", - "OPTIONAL_VEC3I", - "DIRECTION", - "OPTIONAL_UUID", - "OPTIONAL_BLOCK_STATE", - "NBT", - "PARTICLE" - ], - "451": [ - "BYTE", - "VAR_INT", - "FLOAT", - "STRING", - "TEXT_COMPONENT", - "OPTIONAL_TEXT_COMPONENT", - "ITEM_STACK", - "BOOLEAN", - "ROTATION", - "VEC3I", - "OPTIONAL_VEC3I", - "DIRECTION", - "OPTIONAL_UUID", - "OPTIONAL_BLOCK_STATE", - "NBT", - "PARTICLE", - "VILLAGER_DATA" - ], - "459": [ - "BYTE", - "VAR_INT", - "FLOAT", - "STRING", - "TEXT_COMPONENT", - "OPTIONAL_TEXT_COMPONENT", - "ITEM_STACK", - "BOOLEAN", - "ROTATION", - "VEC3I", - "OPTIONAL_VEC3I", - "DIRECTION", - "OPTIONAL_UUID", - "OPTIONAL_BLOCK_STATE", - "NBT", - "PARTICLE", - "VILLAGER_DATA", - "FIREWORK_DATA" - ], - "461": [ - "BYTE", - "VAR_INT", - "FLOAT", - "STRING", - "TEXT_COMPONENT", - "OPTIONAL_TEXT_COMPONENT", - "ITEM_STACK", - "BOOLEAN", - "ROTATION", - "VEC3I", - "OPTIONAL_VEC3I", - "DIRECTION", - "OPTIONAL_UUID", - "OPTIONAL_BLOCK_STATE", - "NBT", - "PARTICLE", - "VILLAGER_DATA", - "FIREWORK_DATA", - "POSE" - ] - }, - "minecraft:title_actions": { - "18": [ - "TITLE_TEXT", - "SUBTITLE", - "TIMES", - "HIDE", - "RESET" - ], - "302": [ - "TITLE_TEXT", - "SUBTITLE", - "HOTBAR_TEXT", - "TIMES", - "HIDE", - "RESET" - ] - }, - "minecraft:entity_animations": { - "0": { - "0": "SWING_MAIN_ARM", - "1": "TAKE_DAMAGE", - "2": "LEAVE_BED", - "3": "EAT_FOOD", - "4": "CRITICAL_HIT", - "5": "ENCHANTED_HIT", - "102": "UNKNOWN_1", - "104": "START_SNEAKING", - "105": "STOP_SNEAKING" - }, - "47": { - "0": "SWING_MAIN_ARM", - "1": "TAKE_DAMAGE", - "2": "LEAVE_BED", - "3": "EAT_FOOD", - "4": "CRITICAL_HIT", - "5": "ENCHANTED_HIT" - }, - "110": [ - "SWING_MAIN_ARM", - "TAKE_DAMAGE", - "LEAVE_BED", - "SWING_OFF_ARM", - "CRITICAL_HIT", - "ENCHANTED_HIT" - ] - }, - "minecraft:entity_actions": { - "0": [ - "START_SNEAKING", - "STOP_SNEAKING", - "LEAVE_BED", - "START_SPRINTING", - "STOP_SPRINTING", - "START_JUMPING_WITH_HORSE", - "OPEN_HORSE_INVENTORY" - ], - "77": [ - "START_SNEAKING", - "STOP_SNEAKING", - "LEAVE_BED", - "START_SPRINTING", - "STOP_SPRINTING", - "START_JUMPING_WITH_HORSE", - "STOP_JUMPING_WITH_HORSE", - "OPEN_HORSE_INVENTORY", - "START_ELYTRA_FLYING" - ] - } -}