Handle new translations

This commit is contained in:
KennyTV 2021-04-10 16:54:10 +02:00
parent ad48770606
commit 75031f66b5
No known key found for this signature in database
GPG Key ID: 6BE3B555EBC5982B
3 changed files with 310 additions and 3 deletions

View File

@ -19,8 +19,8 @@ package nl.matsv.viabackwards.protocol.protocol1_16_4to1_17;
import nl.matsv.viabackwards.api.BackwardsProtocol;
import nl.matsv.viabackwards.api.data.BackwardsMappings;
import nl.matsv.viabackwards.api.entities.storage.EntityTracker;
import nl.matsv.viabackwards.api.rewriters.SoundRewriter;
import nl.matsv.viabackwards.api.rewriters.TranslatableRewriter;
import nl.matsv.viabackwards.protocol.protocol1_16_4to1_17.packets.BlockItemPackets1_17;
import nl.matsv.viabackwards.protocol.protocol1_16_4to1_17.packets.EntityPackets1_17;
import us.myles.ViaVersion.api.data.UserConnection;
@ -48,6 +48,7 @@ public class Protocol1_16_4To1_17 extends BackwardsProtocol<ClientboundPackets1_
public static final BackwardsMappings MAPPINGS = new BackwardsMappings("1.17", "1.16.2", Protocol1_17To1_16_4.class, true);
private static final int[] EMPTY_ARRAY = {};
private BlockItemPackets1_17 blockItemPackets;
private TranslatableRewriter translatableRewriter;
public Protocol1_16_4To1_17() {
super(ClientboundPackets1_17.class, ClientboundPackets1_16_2.class, ServerboundPackets1_17.class, ServerboundPackets1_16_2.class);
@ -57,7 +58,15 @@ public class Protocol1_16_4To1_17 extends BackwardsProtocol<ClientboundPackets1_
protected void registerPackets() {
executeAsyncAfterLoaded(Protocol1_17To1_16_4.class, MAPPINGS::load);
blockItemPackets = new BlockItemPackets1_17(this, null);
translatableRewriter = new TranslatableRewriter(this);
translatableRewriter.registerChatMessage(ClientboundPackets1_17.CHAT_MESSAGE);
translatableRewriter.registerBossBar(ClientboundPackets1_17.BOSSBAR);
translatableRewriter.registerDisconnect(ClientboundPackets1_17.DISCONNECT);
translatableRewriter.registerTabList(ClientboundPackets1_17.TAB_LIST);
translatableRewriter.registerOpenWindow(ClientboundPackets1_17.OPEN_WINDOW);
translatableRewriter.registerPing();
blockItemPackets = new BlockItemPackets1_17(this, translatableRewriter);
blockItemPackets.register();
new EntityPackets1_17(this).register();
@ -224,6 +233,10 @@ public class Protocol1_16_4To1_17 extends BackwardsProtocol<ClientboundPackets1_
return blockItemPackets;
}
public TranslatableRewriter getTranslatableRewriter() {
return translatableRewriter;
}
@Override
public BackwardsMappings getMappingData() {
return MAPPINGS;

View File

@ -154,7 +154,7 @@ public class EntityPackets1_17 extends EntityRewriter<Protocol1_16_4To1_17> {
} else if (type == MetaType1_14.OptChat) {
JsonElement text = meta.getCastedValue();
if (text != null) {
//protocol.getTranslatableRewriter().processText(text); //TODO
protocol.getTranslatableRewriter().processText(text);
}
} else if (type == MetaType1_14.PARTICLE) {
Particle particle = (Particle) meta.getValue();

View File

@ -1,4 +1,298 @@
{
"1.17": {
"gui.socialInteractions.title": "Social Interactions",
"gui.socialInteractions.tab_all": "All",
"gui.socialInteractions.tab_hidden": "Hidden",
"gui.socialInteractions.tab_blocked": "Blocked",
"gui.socialInteractions.blocking_hint": "Manage with Microsoft account",
"gui.socialInteractions.status_hidden": "Hidden",
"gui.socialInteractions.status_blocked": "Blocked",
"gui.socialInteractions.status_offline": "Offline",
"gui.socialInteractions.status_hidden_offline": "Hidden - Offline",
"gui.socialInteractions.status_blocked_offline": "Blocked - Offline",
"gui.socialInteractions.server_label.single": "%s - %s player",
"gui.socialInteractions.server_label.multiple": "%s - %s players",
"gui.socialInteractions.search_hint": "Search...",
"gui.socialInteractions.search_empty": "Couldn't find any players with that name",
"gui.socialInteractions.empty_hidden": "No players hidden in chat",
"gui.socialInteractions.empty_blocked": "No blocked players in chat",
"gui.socialInteractions.hide": "Hide in Chat",
"gui.socialInteractions.show": "Show in Chat",
"gui.socialInteractions.hidden_in_chat": "Chat messages from %s will be hidden",
"gui.socialInteractions.shown_in_chat": "Chat messages from %s will be shown",
"gui.socialInteractions.tooltip.hide": "Hide messages from %s in chat",
"gui.socialInteractions.tooltip.show": "Show messages from %s in chat",
"selectWorld.pre_worldheight": "Loading of old worlds is temporarily disabled.",
"selectWorld.backupQuestion.snapshot": "Do you really want to load this world?",
"selectWorld.backupWarning.snapshot": "This world was last played in version %s; you are on version %s. Please make a backup in case you experience world corruptions!",
"selectWorld.backupQuestion.downgrade": "Downgrading a world is not supported",
"selectWorld.backupWarning.downgrade": "This world was last played in version %s; you are on version %s. Downgrading a world could cause corruption - we cannot guarantee that it will load or work. If you still want to continue, please make a backup!",
"multiplayer.requiredTexturePrompt.line1": "This server requires the use of a custom resource pack.",
"multiplayer.requiredTexturePrompt.line2": "Rejecting a custom resource pack will disconnect you from this server.",
"multiplayer.requiredTexturePrompt.disconnect": "Server requires a custom resource pack",
"multiplayer.status.incompatible": "Incompatible version!",
"multiplayer.disconnect.incompatible": "Incompatible client! Please use %s",
"multiplayer.socialInteractions.not_available": "Social Interactions are only available in Multiplayer worlds",
"chat.disabled.options": "Chat disabled in client options",
"chat.disabled.launcher": "Chat disabled by launcher option, cannot send message",
"chat.disabled.profile": "Chat not allowed by account settings, cannot send message",
"disconnect.loginFailedInfo.insufficientPrivileges": "Multiplayer is disabled. Please check your Microsoft account settings.",
"options.accessibility.link": "Accessibility Guide",
"options.hideMatchedNames": "Hide Matched Names",
"options.hideMatchedNames.tooltip": "3rd-party Servers may send chat messages in non-standard formats.\nWith this option on: hidden players will be matched based on chat sender names.",
"options.darkMojangStudiosBackgroundColor": "Monochrome Logo",
"options.darkMojangStudiosBackgroundColor.tooltip": "Changes the Mojang Studios loading screen background color to black.",
"key.socialInteractions": "Social Interactions Screen",
"resourcePack.vanilla.description": "The default resources for Minecraft",
"dataPack.vanilla.description": "The default data for Minecraft",
"block.minecraft.light": "Light",
"block.minecraft.deepslate_gold_ore": "Deepslate Gold Ore",
"block.minecraft.deepslate_iron_ore": "Deepslate Iron Ore",
"block.minecraft.deepslate_coal_ore": "Deepslate Coal Ore",
"block.minecraft.deepslate_diamond_ore": "Deepslate Diamond Ore",
"block.minecraft.deepslate_redstone_ore": "Deepslate Redstone Ore",
"block.minecraft.deepslate_lapis_ore": "Deepslate Lapis Lazuli Ore",
"block.minecraft.water_cauldron": "Water Cauldron",
"block.minecraft.lava_cauldron": "Lava Cauldron",
"block.minecraft.powder_snow_cauldron": "Powder Snow Cauldron",
"block.minecraft.deepslate_emerald_ore": "Deepslate Emerald Ore",
"block.minecraft.dirt_path": "Dirt Path",
"block.minecraft.candle": "Candle",
"block.minecraft.white_candle": "White Candle",
"block.minecraft.orange_candle": "Orange Candle",
"block.minecraft.magenta_candle": "Magenta Candle",
"block.minecraft.light_blue_candle": "Light Blue Candle",
"block.minecraft.yellow_candle": "Yellow Candle",
"block.minecraft.lime_candle": "Lime Candle",
"block.minecraft.pink_candle": "Pink Candle",
"block.minecraft.gray_candle": "Gray Candle",
"block.minecraft.light_gray_candle": "Light Gray Candle",
"block.minecraft.cyan_candle": "Cyan Candle",
"block.minecraft.purple_candle": "Purple Candle",
"block.minecraft.blue_candle": "Blue Candle",
"block.minecraft.brown_candle": "Brown Candle",
"block.minecraft.green_candle": "Green Candle",
"block.minecraft.red_candle": "Red Candle",
"block.minecraft.black_candle": "Black Candle",
"block.minecraft.candle_cake": "Candle Cake",
"block.minecraft.white_candle_cake": "White Candle Cake",
"block.minecraft.orange_candle_cake": "Orange Candle Cake",
"block.minecraft.magenta_candle_cake": "Magenta Candle Cake",
"block.minecraft.light_blue_candle_cake": "Light Blue Candle Cake",
"block.minecraft.yellow_candle_cake": "Yellow Candle Cake",
"block.minecraft.lime_candle_cake": "Lime Candle Cake",
"block.minecraft.pink_candle_cake": "Pink Candle Cake",
"block.minecraft.gray_candle_cake": "Gray Candle Cake",
"block.minecraft.light_gray_candle_cake": "Light Gray Candle Cake",
"block.minecraft.cyan_candle_cake": "Cyan Candle Cake",
"block.minecraft.purple_candle_cake": "Purple Candle Cake",
"block.minecraft.blue_candle_cake": "Blue Candle Cake",
"block.minecraft.brown_candle_cake": "Brown Candle Cake",
"block.minecraft.green_candle_cake": "Green Candle Cake",
"block.minecraft.red_candle_cake": "Red Candle Cake",
"block.minecraft.black_candle_cake": "Black Candle Cake",
"block.minecraft.amethyst_block": "Block of Amethyst",
"block.minecraft.small_amethyst_bud": "Small Amethyst Bud",
"block.minecraft.medium_amethyst_bud": "Medium Amethyst Bud",
"block.minecraft.large_amethyst_bud": "Large Amethyst Bud",
"block.minecraft.amethyst_cluster": "Amethyst Cluster",
"block.minecraft.budding_amethyst": "Budding Amethyst",
"block.minecraft.calcite": "Calcite",
"block.minecraft.tuff": "Tuff",
"block.minecraft.tinted_glass": "Tinted Glass",
"block.minecraft.dripstone_block": "Dripstone Block",
"block.minecraft.pointed_dripstone": "Pointed Dripstone",
"block.minecraft.copper_ore": "Copper Ore",
"block.minecraft.deepslate_copper_ore": "Deepslate Copper Ore",
"block.minecraft.copper_block": "Block of Copper",
"block.minecraft.exposed_copper": "Exposed Copper",
"block.minecraft.weathered_copper": "Weathered Copper",
"block.minecraft.oxidized_copper": "Oxidized Copper",
"block.minecraft.cut_copper": "Cut Copper",
"block.minecraft.exposed_cut_copper": "Exposed Cut Copper",
"block.minecraft.weathered_cut_copper": "Weathered Cut Copper",
"block.minecraft.oxidized_cut_copper": "Oxidized Cut Copper",
"block.minecraft.cut_copper_stairs": "Cut Copper Stairs",
"block.minecraft.exposed_cut_copper_stairs": "Exposed Cut Copper Stairs",
"block.minecraft.weathered_cut_copper_stairs": "Weathered Cut Copper Stairs",
"block.minecraft.oxidized_cut_copper_stairs": "Oxidized Cut Copper Stairs",
"block.minecraft.cut_copper_slab": "Cut Copper Slab",
"block.minecraft.exposed_cut_copper_slab": "Exposed Cut Copper Slab",
"block.minecraft.weathered_cut_copper_slab": "Weathered Cut Copper Slab",
"block.minecraft.oxidized_cut_copper_slab": "Oxidized Cut Copper Slab",
"block.minecraft.waxed_copper_block": "Waxed Block of Copper",
"block.minecraft.waxed_exposed_copper": "Waxed Exposed Copper",
"block.minecraft.waxed_weathered_copper": "Waxed Weathered Copper",
"block.minecraft.waxed_oxidized_copper": "Waxed Oxidized Copper",
"block.minecraft.waxed_cut_copper": "Waxed Cut Copper",
"block.minecraft.waxed_exposed_cut_copper": "Waxed Exposed Cut Copper",
"block.minecraft.waxed_weathered_cut_copper": "Waxed Weathered Cut Copper",
"block.minecraft.waxed_oxidized_cut_copper": "Waxed Oxidized Cut Copper",
"block.minecraft.waxed_cut_copper_stairs": "Waxed Cut Copper Stairs",
"block.minecraft.waxed_exposed_cut_copper_stairs": "Waxed Exposed Cut Copper Stairs",
"block.minecraft.waxed_weathered_cut_copper_stairs": "Waxed Weathered Cut Copper Stairs",
"block.minecraft.waxed_oxidized_cut_copper_stairs": "Waxed Oxidized Cut Copper Stairs",
"block.minecraft.waxed_cut_copper_slab": "Waxed Cut Copper Slab",
"block.minecraft.waxed_exposed_cut_copper_slab": "Waxed Exposed Cut Copper Slab",
"block.minecraft.waxed_weathered_cut_copper_slab": "Waxed Weathered Cut Copper Slab",
"block.minecraft.waxed_oxidized_cut_copper_slab": "Waxed Oxidized Cut Copper Slab",
"block.minecraft.lightning_rod": "Lightning Rod",
"block.minecraft.cave_vines": "Cave Vines",
"block.minecraft.cave_vines_plant": "Cave Vines Plant",
"block.minecraft.spore_blossom": "Spore Blossom",
"block.minecraft.azalea": "Azalea",
"block.minecraft.flowering_azalea": "Flowering Azalea",
"block.minecraft.azalea_leaves": "Azalea Leaves",
"block.minecraft.azalea_leaves_flowers": "Flowering Azalea Leaves",
"block.minecraft.moss_carpet": "Moss Carpet",
"block.minecraft.moss_block": "Moss Block",
"block.minecraft.big_dripleaf": "Big Dripleaf",
"block.minecraft.big_dripleaf_stem": "Big Dripleaf Stem",
"block.minecraft.small_dripleaf": "Small Dripleaf",
"block.minecraft.rooted_dirt": "Rooted Dirt",
"block.minecraft.hanging_roots": "Hanging Roots",
"block.minecraft.powder_snow": "Powder Snow",
"block.minecraft.glow_lichen": "Glow Lichen",
"block.minecraft.sculk_sensor": "Sculk Sensor",
"block.minecraft.deepslate": "Deepslate",
"block.minecraft.cobbled_deepslate": "Cobbled Deepslate",
"block.minecraft.cobbled_deepslate_slab": "Cobbled Deepslate Slab",
"block.minecraft.cobbled_deepslate_stairs": "Cobbled Deepslate Stairs",
"block.minecraft.cobbled_deepslate_wall": "Cobbled Deepslate Wall",
"block.minecraft.chiseled_deepslate": "Chiseled Deepslate",
"block.minecraft.polished_deepslate": "Polished Deepslate",
"block.minecraft.polished_deepslate_slab": "Polished Deepslate Slab",
"block.minecraft.polished_deepslate_stairs": "Polished Deepslate Stairs",
"block.minecraft.polished_deepslate_wall": "Polished Deepslate Wall",
"block.minecraft.deepslate_bricks": "Deepslate Bricks",
"block.minecraft.deepslate_brick_slab": "Deepslate Brick Slab",
"block.minecraft.deepslate_brick_stairs": "Deepslate Brick Stairs",
"block.minecraft.deepslate_brick_wall": "Deepslate Brick Wall",
"block.minecraft.deepslate_tiles": "Deepslate Tiles",
"block.minecraft.deepslate_tile_slab": "Deepslate Tile Slab",
"block.minecraft.deepslate_tile_stairs": "Deepslate Tile Stairs",
"block.minecraft.deepslate_tile_wall": "Deepslate Tile Wall",
"block.minecraft.cracked_deepslate_bricks": "Cracked Deepslate Bricks",
"block.minecraft.cracked_deepslate_tiles": "Cracked Deepslate Tiles",
"block.minecraft.infested_deepslate": "Infested Deepslate",
"block.minecraft.smooth_basalt": "Smooth Basalt",
"item.minecraft.bundle": "Bundle",
"item.minecraft.bundle.fullness": "%s/%s",
"item.minecraft.raw_copper": "Raw Copper",
"item.minecraft.raw_iron": "Raw Iron",
"item.minecraft.raw_gold": "Raw Gold",
"item.minecraft.copper_ingot": "Copper Ingot",
"item.minecraft.powder_snow_bucket": "Powder Snow Bucket",
"item.minecraft.axolotl_bucket": "Bucket of Axolotl",
"item.minecraft.amethyst_shard": "Amethyst Shard",
"item.minecraft.spyglass": "Spyglass",
"item.minecraft.glow_berries": "Glow Berries",
"item.minecraft.axolotl_spawn_egg": "Axolotl Spawn Egg",
"item.minecraft.glow_squid_spawn_egg": "Glow Squid Spawn Egg",
"item.minecraft.goat_spawn_egg": "Goat Spawn Egg",
"item.minecraft.glow_ink_sac": "Glow Ink Sac",
"item.minecraft.glow_item_frame": "Glow Item Frame",
"entity.minecraft.axolotl": "Axolotl",
"entity.minecraft.glow_item_frame": "Glow Item Frame",
"entity.minecraft.glow_squid": "Glow Squid",
"entity.minecraft.goat": "Goat",
"death.attack.stalagmite": "%1$s was impaled on a stalagmite",
"death.attack.stalagmite.player": "%1$s was impaled on a stalagmite whilst fighting %2$s",
"death.attack.fallingStalactite": "%1$s was skewered by a falling stalactite",
"death.attack.fallingStalactite.player": "%1$s was skewered by a falling stalactite whilst fighting %2$s",
"death.attack.freeze": "%1$s froze to death",
"death.attack.freeze.player": "%1$s was frozen to death by %2$s",
"advMode.mode": "Mode",
"advMode.type": "Type",
"advMode.triggering": "Triggering",
"advMode.trackOutput": "Track output",
"block.minecraft.banner.base.black": "Fully Black Field",
"block.minecraft.banner.base.red": "Fully Red Field",
"block.minecraft.banner.base.green": "Fully Green Field",
"block.minecraft.banner.base.brown": "Fully Brown Field",
"block.minecraft.banner.base.blue": "Fully Blue Field",
"block.minecraft.banner.base.purple": "Fully Purple Field",
"block.minecraft.banner.base.cyan": "Fully Cyan Field",
"block.minecraft.banner.base.light_gray": "Fully Light Gray Field",
"block.minecraft.banner.base.gray": "Fully Gray Field",
"block.minecraft.banner.base.pink": "Fully Pink Field",
"block.minecraft.banner.base.lime": "Fully Lime Field",
"block.minecraft.banner.base.yellow": "Fully Yellow Field",
"block.minecraft.banner.base.light_blue": "Fully Light Blue Field",
"block.minecraft.banner.base.magenta": "Fully Magenta Field",
"block.minecraft.banner.base.orange": "Fully Orange Field",
"block.minecraft.banner.base.white": "Fully White Field",
"subtitles.block.amethyst_block.chime": "Amethyst chimes",
"subtitles.block.big_dripleaf.tilt_down": "Dripleaf tilts down",
"subtitles.block.big_dripleaf.tilt_up": "Dripleaf tilts up",
"subtitles.block.candle.crackle": "Candle crackles",
"subtitles.block.cake.add_candle": "Cake squishes",
"subtitles.item.honeycomb.wax_on": "Wax on",
"subtitles.block.pointed_dripstone.land": "Stalactite crashes down",
"subtitles.block.pointed_dripstone.drip_lava": "Lava drips",
"subtitles.block.pointed_dripstone.drip_water": "Water drips",
"subtitles.block.pointed_dripstone.drip_lava_into_cauldron": "Lava drips into Cauldron",
"subtitles.block.pointed_dripstone.drip_water_into_cauldron": "Water drips into Cauldron",
"subtitles.block.sculk_sensor.clicking": "Sculk Sensor starts clicking",
"subtitles.block.sculk_sensor.clicking_stop": "Sculk Sensor stops clicking",
"subtitles.entity.axolotl.attack": "Axolotl attacks",
"subtitles.entity.axolotl.death": "Axolotl dies",
"subtitles.entity.axolotl.hurt": "Axolotl hurts",
"subtitles.entity.axolotl.idle_air": "Axolotl chirps",
"subtitles.entity.axolotl.idle_water": "Axolotl chirps",
"subtitles.entity.axolotl.splash": "Axolotl splashes",
"subtitles.entity.axolotl.swim": "Axolotl swims",
"subtitles.entity.glow_item_frame.add_item": "Glow Item Frame fills",
"subtitles.entity.glow_item_frame.break": "Glow Item Frame breaks",
"subtitles.entity.glow_item_frame.place": "Glow Item Frame placed",
"subtitles.entity.glow_item_frame.remove_item": "Glow Item Frame empties",
"subtitles.entity.glow_item_frame.rotate_item": "Glow Item Frame clicks",
"subtitles.entity.glow_squid.ambient": "Glow Squid swims",
"subtitles.entity.glow_squid.death": "Glow Squid dies",
"subtitles.entity.glow_squid.hurt": "Glow Squid hurts",
"subtitles.entity.glow_squid.squirt": "Glow Squid shoots ink",
"subtitles.entity.player.freeze_hurt": "Player freezes",
"subtitles.entity.skeleton.converted_to_stray": "Skeleton converts to Stray",
"subtitles.item.axe.scrape": "Axe scrapes",
"subtitles.item.axe.wax_off": "Wax off",
"subtitles.item.bucket.fill_axolotl": "Axolotl scooped",
"subtitles.item.spyglass.use": "Spyglass expands",
"subtitles.item.spyglass.stop_using": "Spyglass retracts",
"subtitles.item.ink_sac.use": "Ink Sac splotches",
"subtitles.item.glow_ink_sac.use": "Glow Ink Sac splotches",
"subtitles.item.dye.use": "Dye stains",
"debug.profiling.help": "F3 + L = Start/stop profiling",
"debug.profiling.start": "Profiling started. Ends in %s seconds or when pressing F3 + L again",
"debug.profiling.stop": "Profiling ended. Saved results to %s",
"tutorial.bundleInsert.title": "Use a Bundle",
"tutorial.bundleInsert.description": "Right Click to add items",
"tutorial.socialInteractions.title": "Social Interactions",
"tutorial.socialInteractions.description": "Press %s to open",
"commands.give.failed.toomanyitems": "Can't give more than %s of %s",
"commands.item.target.not_a_container": "Target position %s, %s, %s is not a container",
"commands.item.source.not_a_container": "Source position %s, %s, %s is not a container",
"commands.item.target.no_such_slot": "The target does not have slot %s",
"commands.item.source.no_such_slot": "The source does not have slot %s",
"commands.item.target.no_changes": "No targets accepted item into slot %s",
"commands.item.target.no_changed.known_item": "No targets accepted item %s into slot %s",
"commands.item.block.set.success": "Replaced a slot at %s, %s, %s with %s",
"commands.item.entity.set.success.single": "Replaced a slot on %s with %s",
"commands.item.entity.set.success.multiple": "Replaced a slot on %s entities with %s",
"argument.angle.invalid": "Invalid angle",
"argument.pos.outofbounds": "That position is outside the allowed boundaries.",
"item_modifier.unknown": "Unknown item modifier: %s",
"biome.minecraft.dripstone_caves": "Dripstone Caves",
"biome.minecraft.lush_caves": "Lush Caves",
"gamerule.freezeDamage": "Deal freeze damage",
"gamerule.playersSleepingPercentage": "Sleep percentage",
"gamerule.playersSleepingPercentage.description": "The percentage of players who must be sleeping to skip the night.",
"mirror.none": "|",
"mirror.left_right": "← →",
"mirror.front_back": "↑ ↓",
"sleep.not_possible": "No amount of rest can pass this night",
"sleep.players_sleeping": "%s/%s players sleeping",
"sleep.skipping_night": "Sleeping through this night"
},
"1.16.2": {
"multiplayer.disconnect.missing_tags": "Incomplete set of tags received from server.\nPlease contact server operator.",
"chat.square_brackets": "[%s]",