3
0
Mirror von https://github.com/ViaVersion/ViaBackwards.git synchronisiert 2024-12-26 16:12:43 +01:00
Dieser Commit ist enthalten in:
KennyTV 2020-05-20 17:08:15 +02:00
Ursprung f487f13e82
Commit cb8cdf27a4
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 6BE3B555EBC5982B
5 geänderte Dateien mit 77 neuen und 10 gelöschten Zeilen

Datei anzeigen

@ -34,13 +34,22 @@ public class Protocol1_15_2To1_16 extends BackwardsProtocol {
TranslatableRewriter translatableRewriter = new TranslatableRewriter1_16(this); TranslatableRewriter translatableRewriter = new TranslatableRewriter1_16(this);
translatableRewriter.registerBossBar(0x0D, 0x0D); translatableRewriter.registerBossBar(0x0D, 0x0D);
translatableRewriter.registerChatMessage(0x0F, 0x0F);
translatableRewriter.registerCombatEvent(0x33, 0x33); translatableRewriter.registerCombatEvent(0x33, 0x33);
translatableRewriter.registerDisconnect(0x1B, 0x1B); translatableRewriter.registerDisconnect(0x1B, 0x1B);
translatableRewriter.registerPlayerList(0x54, 0x54); translatableRewriter.registerPlayerList(0x54, 0x54);
translatableRewriter.registerTitle(0x50, 0x50); translatableRewriter.registerTitle(0x50, 0x50);
translatableRewriter.registerPing(); translatableRewriter.registerPing();
// Chat Message
registerOutgoing(State.PLAY, 0x0F, 0x0F, new PacketRemapper() {
@Override
public void registerMap() {
handler(wrapper -> wrapper.write(Type.STRING, translatableRewriter.processTranslate(wrapper.read(Type.STRING))));
map(Type.BYTE);
map(Type.UUID, Type.NOTHING); // Sender
}
});
// Open Window // Open Window
registerOutgoing(State.PLAY, 0x2F, 0x2F, new PacketRemapper() { registerOutgoing(State.PLAY, 0x2F, 0x2F, new PacketRemapper() {
@Override @Override

Datei anzeigen

@ -4,6 +4,7 @@ import nl.matsv.viabackwards.api.rewriters.EntityRewriter;
import nl.matsv.viabackwards.protocol.protocol1_14_4to1_15.data.ParticleMapping; import nl.matsv.viabackwards.protocol.protocol1_14_4to1_15.data.ParticleMapping;
import nl.matsv.viabackwards.protocol.protocol1_15_2to1_16.Protocol1_15_2To1_16; import nl.matsv.viabackwards.protocol.protocol1_15_2to1_16.Protocol1_15_2To1_16;
import nl.matsv.viabackwards.protocol.protocol1_15_2to1_16.data.BackwardsMappings; import nl.matsv.viabackwards.protocol.protocol1_15_2to1_16.data.BackwardsMappings;
import us.myles.ViaVersion.api.PacketWrapper;
import us.myles.ViaVersion.api.entities.Entity1_15Types; import us.myles.ViaVersion.api.entities.Entity1_15Types;
import us.myles.ViaVersion.api.entities.Entity1_16Types; import us.myles.ViaVersion.api.entities.Entity1_16Types;
import us.myles.ViaVersion.api.entities.EntityType; import us.myles.ViaVersion.api.entities.EntityType;
@ -12,6 +13,7 @@ import us.myles.ViaVersion.api.minecraft.metadata.MetaType;
import us.myles.ViaVersion.api.minecraft.metadata.Metadata; import us.myles.ViaVersion.api.minecraft.metadata.Metadata;
import us.myles.ViaVersion.api.minecraft.metadata.types.MetaType1_14; import us.myles.ViaVersion.api.minecraft.metadata.types.MetaType1_14;
import us.myles.ViaVersion.api.remapper.PacketRemapper; import us.myles.ViaVersion.api.remapper.PacketRemapper;
import us.myles.ViaVersion.api.remapper.ValueTransformer;
import us.myles.ViaVersion.api.type.Type; import us.myles.ViaVersion.api.type.Type;
import us.myles.ViaVersion.api.type.types.Particle; import us.myles.ViaVersion.api.type.types.Particle;
import us.myles.ViaVersion.api.type.types.version.Types1_14; import us.myles.ViaVersion.api.type.types.version.Types1_14;
@ -20,6 +22,21 @@ import us.myles.ViaVersion.protocols.protocol1_9_3to1_9_1_2.storage.ClientWorld;
public class EntityPackets1_16 extends EntityRewriter<Protocol1_15_2To1_16> { public class EntityPackets1_16 extends EntityRewriter<Protocol1_15_2To1_16> {
private final ValueTransformer<String, Integer> dimensionTransformer = new ValueTransformer<String, Integer>(Type.STRING, Type.INT) {
@Override
public Integer transform(PacketWrapper wrapper, String input) throws Exception {
switch (input) {
case "minecraft:the_nether":
return -1;
default:
case "minecraft:overworld":
return 0;
case "minecraft:the_end":
return 1;
}
}
};
public EntityPackets1_16(Protocol1_15_2To1_16 protocol) { public EntityPackets1_16(Protocol1_15_2To1_16 protocol) {
super(protocol); super(protocol);
} }
@ -36,7 +53,7 @@ public class EntityPackets1_16 extends EntityRewriter<Protocol1_15_2To1_16> {
protocol.registerOutgoing(State.PLAY, 0x3B, 0x3B, new PacketRemapper() { protocol.registerOutgoing(State.PLAY, 0x3B, 0x3B, new PacketRemapper() {
@Override @Override
public void registerMap() { public void registerMap() {
map(Type.INT); map(dimensionTransformer);
map(Type.LONG); map(Type.LONG);
map(Type.BYTE); map(Type.BYTE);
handler(wrapper -> { handler(wrapper -> {
@ -59,7 +76,8 @@ public class EntityPackets1_16 extends EntityRewriter<Protocol1_15_2To1_16> {
public void registerMap() { public void registerMap() {
map(Type.INT); // Entity ID map(Type.INT); // Entity ID
map(Type.UNSIGNED_BYTE); // Gamemode map(Type.UNSIGNED_BYTE); // Gamemode
map(Type.INT); // Dimension map(Type.NBT, Type.NOTHING); // whatever this is
map(dimensionTransformer); // Dimension
map(Type.LONG); // Seed map(Type.LONG); // Seed
map(Type.UNSIGNED_BYTE); // Max players map(Type.UNSIGNED_BYTE); // Max players
handler(wrapper -> { handler(wrapper -> {

Datei anzeigen

@ -40,7 +40,7 @@
"block": true "block": true
}, },
"449": { "449": {
"id": 32, "id": 418,
"name": "1.11 Totem of Undying" "name": "1.11 Totem of Undying"
}, },
"450": { "450": {

Datei anzeigen

@ -6222,6 +6222,13 @@
"block.nether_gold_ore.fall": "block.metal.fall", "block.nether_gold_ore.fall": "block.metal.fall",
"block.nether_gold_ore.hit": "block.metal.hit", "block.nether_gold_ore.hit": "block.metal.hit",
"block.nether_gold_ore.place": "block.metal.place", "block.nether_gold_ore.place": "block.metal.place",
"block.nether_gold_ore.step": "block.metal.step" "block.nether_gold_ore.step": "block.metal.step",
"entity.donkey.eat": "entity.horse.eat",
"entity.fox.teleport": "entity.enderman.teleport",
"entity.mule.angry": "entity.donkey.angry",
"entity.mule.eat": "entity.horse.eat",
"entity.parrot.imitate.hoglin": "entity.ravager.ambient",
"entity.parrot.imitate.piglin": "entity.zombie_pigman.ambient",
"entity.parrot.imitate.zoglin": "entity.ravager.ambient"
} }
} }

Datei anzeigen

@ -1,11 +1,29 @@
{ {
"1.16": { "1.16": {
"selectWorld.edit.export_worldgen_settings": "Export World Generation Settings",
"selectWorld.edit.export_worldgen_settings.success": "Exported",
"selectWorld.edit.export_worldgen_settings.failure": "Export failed",
"selectWorld.locked": "Locked by another running instance of Minecraft", "selectWorld.locked": "Locked by another running instance of Minecraft",
"selectWorld.backupQuestion.experimental": "Worlds using Experimental Settings are not supported",
"selectWorld.backupWarning.experimental": "This world uses experimental settings that could stop working at any time. We cannot guarantee it will load or work. Here be dragons!",
"selectWorld.tooltip.experimental": "This world is using experimental settings",
"selectWorld.access_failure": "Failed to access world", "selectWorld.access_failure": "Failed to access world",
"selectWorld.delete_failure": "Failed to delete world", "selectWorld.delete_failure": "Failed to delete world",
"editGamerule.title": "Edit game rules", "editGamerule.title": "Edit game rules",
"editGamerule.default": "Default: %s", "editGamerule.default": "Default: %s",
"selectWorld.gameRules": "Game Rules", "selectWorld.gameRules": "Game Rules",
"selectWorld.import_worldgen_settings": "Import settings",
"selectWorld.import_worldgen_settings.select_file": "Select settings file (.json)",
"selectWorld.import_worldgen_settings.failure": "Error importing settings",
"selectWorld.import_worldgen_settings.experimental.title": "Warning! These settings are using experimental features",
"selectWorld.import_worldgen_settings.experimental.question": "These settings are experimental and could one day stop working. Do you wish to proceed?",
"selectWorld.import_worldgen_settings.deprecated.title": "Warning! These settings are using deprecated features",
"selectWorld.import_worldgen_settings.deprecated.question": "Some features used are deprecated and will stop working in the future. Do you wish to proceed?",
"generator.large_biomes": "Large Biomes",
"generator.custom": "Custom",
"generator.single_biome_surface": "Single Biome",
"generator.single_biome_caves": "Caves",
"generator.single_biome_floating_islands": "Floating islands",
"multiplayer.status.ping": "%s ms", "multiplayer.status.ping": "%s ms",
"chat.queue": "[+%s pending lines]", "chat.queue": "[+%s pending lines]",
"options.entityDistanceScaling": "Entity Distance", "options.entityDistanceScaling": "Entity Distance",
@ -13,6 +31,7 @@
"options.chat.line_spacing": "Line Spacing", "options.chat.line_spacing": "Line Spacing",
"options.chat.delay_none": "Chat Delay: None", "options.chat.delay_none": "Chat Delay: None",
"options.chat.delay": "Chat Delay: %s seconds", "options.chat.delay": "Chat Delay: %s seconds",
"title.multiplayer.disabled": "Multiplayer is disabled, please check your launcher settings.",
"block.minecraft.nether_gold_ore": "Nether Gold Ore", "block.minecraft.nether_gold_ore": "Nether Gold Ore",
"block.minecraft.soul_torch": "Soul Torch", "block.minecraft.soul_torch": "Soul Torch",
"block.minecraft.soul_wall_torch": "Soul Wall Torch", "block.minecraft.soul_wall_torch": "Soul Wall Torch",
@ -186,23 +205,28 @@
"subtitles.block.conduit.ambient": "Conduit pulses", "subtitles.block.conduit.ambient": "Conduit pulses",
"subtitles.block.conduit.attack.target": "Conduit attacks", "subtitles.block.conduit.attack.target": "Conduit attacks",
"subtitles.block.conduit.deactivate": "Conduit deactivates", "subtitles.block.conduit.deactivate": "Conduit deactivates",
"subtitles.block.enchantment_table.use": "Enchanting table used", "subtitles.block.enchantment_table.use": "Enchanting Table used",
"subtitles.block.end_portal.spawn": "End Portal opens", "subtitles.block.end_portal.spawn": "End Portal opens",
"subtitles.block.end_portal_frame.fill": "Eye of Ender attaches", "subtitles.block.end_portal_frame.fill": "Eye of Ender attaches",
"subtitles.block.portal.travel": "Portal noise fades",
"subtitles.block.portal.trigger": "Portal noise intensifies",
"subtitles.block.pumpkin.carve": "Shears carve", "subtitles.block.pumpkin.carve": "Shears carve",
"subtitles.block.respawn_anchor.ambient": "Portal whooshes", "subtitles.block.respawn_anchor.ambient": "Portal whooshes",
"subtitles.block.respawn_anchor.charge": "Respawn anchor is charged", "subtitles.block.respawn_anchor.charge": "Respawn Anchor is charged",
"subtitles.block.respawn_anchor.deplete": "Respawn anchor depletes", "subtitles.block.respawn_anchor.deplete": "Respawn Anchor depletes",
"subtitles.block.respawn_anchor.set_spawn": "Respawn anchor sets spawn", "subtitles.block.respawn_anchor.set_spawn": "Respawn Anchor sets spawn",
"subtitles.block.smithing_table.use": "Smithing Table used", "subtitles.block.smithing_table.use": "Smithing Table used",
"subtitles.entity.boat.paddle_land": "Rowing", "subtitles.entity.boat.paddle_land": "Rowing",
"subtitles.entity.boat.paddle_water": "Rowing", "subtitles.entity.boat.paddle_water": "Rowing",
"subtitles.entity.cat.beg_for_food": "Cat begs", "subtitles.entity.cat.beg_for_food": "Cat begs",
"subtitles.entity.cat.eat": "Cat eats", "subtitles.entity.cat.eat": "Cat eats",
"subtitles.entity.cat.hiss": "Cat hisses", "subtitles.entity.cat.hiss": "Cat hisses",
"subtitles.entity.cat.purr": "Cat purrs",
"subtitles.entity.donkey.eat": "Donkey eats",
"subtitles.entity.drowned.ambient_water": "Drowned gurgles", "subtitles.entity.drowned.ambient_water": "Drowned gurgles",
"subtitles.entity.ender_eye.death": "Eye of Ender falls", "subtitles.entity.ender_eye.death": "Eye of Ender falls",
"subtitles.entity.fishing_bobber.retrieve": "Bobber retrieved", "subtitles.entity.fishing_bobber.retrieve": "Bobber retrieved",
"subtitles.entity.fox.teleport": "Fox teleports",
"subtitles.entity.hoglin.ambient": "Hoglin growls", "subtitles.entity.hoglin.ambient": "Hoglin growls",
"subtitles.entity.hoglin.angry": "Hoglin growls angrily", "subtitles.entity.hoglin.angry": "Hoglin growls angrily",
"subtitles.entity.hoglin.attack": "Hoglin attacks", "subtitles.entity.hoglin.attack": "Hoglin attacks",
@ -211,8 +235,12 @@
"subtitles.entity.hoglin.hurt": "Hoglin hurts", "subtitles.entity.hoglin.hurt": "Hoglin hurts",
"subtitles.entity.hoglin.retreat": "Hoglin retreats", "subtitles.entity.hoglin.retreat": "Hoglin retreats",
"subtitles.entity.hoglin.step": "Hoglin steps", "subtitles.entity.hoglin.step": "Hoglin steps",
"subtitles.entity.horse.land": "Horse lands", "subtitles.entity.mule.angry": "Mule neighs",
"subtitles.entity.mule.eat": "Mule eats",
"subtitles.entity.parrot.fly": "Parrot flutters", "subtitles.entity.parrot.fly": "Parrot flutters",
"subtitles.entity.parrot.imitate.hoglin": "Parrot growls",
"subtitles.entity.parrot.imitate.piglin": "Parrot snorts",
"subtitles.entity.parrot.imitate.zoglin": "Parrot growls",
"subtitles.entity.piglin.admiring_item": "Piglin admires item", "subtitles.entity.piglin.admiring_item": "Piglin admires item",
"subtitles.entity.piglin.ambient": "Piglin snorts", "subtitles.entity.piglin.ambient": "Piglin snorts",
"subtitles.entity.piglin.angry": "Piglin snorts angrily", "subtitles.entity.piglin.angry": "Piglin snorts angrily",
@ -249,6 +277,8 @@
"subtitles.entity.zoglin.death": "Zoglin dies", "subtitles.entity.zoglin.death": "Zoglin dies",
"subtitles.entity.zoglin.hurt": "Zoglin hurts", "subtitles.entity.zoglin.hurt": "Zoglin hurts",
"subtitles.entity.zoglin.step": "Zoglin steps", "subtitles.entity.zoglin.step": "Zoglin steps",
"subtitles.entity.zombie.attack_wooden_door": "Door shakes",
"subtitles.entity.zombie.break_wooden_door": "Door breaks",
"subtitles.entity.zombie.destroy_egg": "Turtle Egg stomped", "subtitles.entity.zombie.destroy_egg": "Turtle Egg stomped",
"subtitles.entity.zombified_piglin.ambient": "Zombified Piglin grunts", "subtitles.entity.zombified_piglin.ambient": "Zombified Piglin grunts",
"subtitles.entity.zombified_piglin.angry": "Zombified Piglin angers", "subtitles.entity.zombified_piglin.angry": "Zombified Piglin angers",
@ -259,6 +289,9 @@
"subtitles.item.bucket.fill_fish": "Fish captured", "subtitles.item.bucket.fill_fish": "Fish captured",
"subtitles.item.lodestone_compass.lock": "Lodestone Compass locks onto Lodestone", "subtitles.item.lodestone_compass.lock": "Lodestone Compass locks onto Lodestone",
"subtitles.particle.soul_escape": "Soul escapes", "subtitles.particle.soul_escape": "Soul escapes",
"subtitles.ui.cartography_table.take_result": "Map drawn",
"subtitles.ui.loom.take_result": "Loom used",
"subtitles.ui.stonecutter.take_result": "Stonecutter used",
"debug.gamemodes.help": "F3 + F4 = Open game mode switcher", "debug.gamemodes.help": "F3 + F4 = Open game mode switcher",
"debug.gamemodes.error": "Unable to open game mode switcher, no permission", "debug.gamemodes.error": "Unable to open game mode switcher, no permission",
"debug.gamemodes.press_f4": "F4", "debug.gamemodes.press_f4": "F4",