Mirror von
https://github.com/ViaVersion/ViaBackwards.git
synchronisiert 2024-12-24 15:20:19 +01:00
And now there's mappings
Dieser Commit ist enthalten in:
Ursprung
8670d8105d
Commit
9807eece72
@ -19,8 +19,8 @@ package com.viaversion.viabackwards.protocol.protocol1_19_3to1_19_4;
|
||||
|
||||
import com.viaversion.viabackwards.api.BackwardsProtocol;
|
||||
import com.viaversion.viabackwards.api.data.BackwardsMappings;
|
||||
import com.viaversion.viabackwards.api.rewriters.ItemRewriter;
|
||||
import com.viaversion.viabackwards.api.rewriters.SoundRewriter;
|
||||
import com.viaversion.viabackwards.protocol.protocol1_19_3to1_19_4.packets.BlockItemPackets1_19_4;
|
||||
import com.viaversion.viabackwards.protocol.protocol1_19_3to1_19_4.packets.EntityPackets1_19_4;
|
||||
import com.viaversion.viaversion.api.connection.UserConnection;
|
||||
import com.viaversion.viaversion.api.minecraft.entities.Entity1_19_4Types;
|
||||
@ -40,9 +40,9 @@ import java.util.Base64;
|
||||
|
||||
public final class Protocol1_19_3To1_19_4 extends BackwardsProtocol<ClientboundPackets1_19_4, ClientboundPackets1_19_3, ServerboundPackets1_19_4, ServerboundPackets1_19_3> {
|
||||
|
||||
public static final BackwardsMappings MAPPINGS = new BackwardsMappings("1.19.4", "1.19.3", Protocol1_19_4To1_19_3.class);
|
||||
public static final BackwardsMappings MAPPINGS = new BackwardsMappings("1.19.4", "1.19.3", Protocol1_19_4To1_19_3.class, true);
|
||||
private final EntityPackets1_19_4 entityRewriter = new EntityPackets1_19_4(this);
|
||||
private final ItemRewriter<ClientboundPackets1_19_4, ServerboundPackets1_19_3, Protocol1_19_3To1_19_4> itemRewriter = new ItemRewriter<>(this);
|
||||
private final BlockItemPackets1_19_4 itemRewriter = new BlockItemPackets1_19_4(this);
|
||||
|
||||
public Protocol1_19_3To1_19_4() {
|
||||
super(ClientboundPackets1_19_4.class, ClientboundPackets1_19_3.class, ServerboundPackets1_19_4.class, ServerboundPackets1_19_3.class);
|
||||
@ -51,17 +51,19 @@ public final class Protocol1_19_3To1_19_4 extends BackwardsProtocol<ClientboundP
|
||||
@Override
|
||||
protected void registerPackets() {
|
||||
// TODO fallback field in components
|
||||
// TODO TranslationRewriter
|
||||
executeAsyncAfterLoaded(Protocol1_19_4To1_19_3.class, () -> {
|
||||
MAPPINGS.load();
|
||||
entityRewriter.onMappingDataLoaded();
|
||||
});
|
||||
|
||||
entityRewriter.register();
|
||||
itemRewriter.register();
|
||||
|
||||
final SoundRewriter<ClientboundPackets1_19_4> soundRewriter = new SoundRewriter<>(this);
|
||||
soundRewriter.registerStopSound(ClientboundPackets1_19_4.STOP_SOUND);
|
||||
soundRewriter.register1_19_3Sound(ClientboundPackets1_19_4.SOUND);
|
||||
soundRewriter.register1_19_3Sound(ClientboundPackets1_19_4.ENTITY_SOUND);
|
||||
soundRewriter.registerSound(ClientboundPackets1_19_4.ENTITY_SOUND);
|
||||
|
||||
new CommandRewriter<ClientboundPackets1_19_4>(this) {
|
||||
@Override
|
||||
@ -86,9 +88,9 @@ public final class Protocol1_19_3To1_19_4 extends BackwardsProtocol<ClientboundP
|
||||
final JsonElement element = wrapper.read(Type.COMPONENT);
|
||||
wrapper.write(Type.OPTIONAL_COMPONENT, element);
|
||||
|
||||
final byte[] iconBytes = wrapper.read(Type.BYTE_ARRAY_PRIMITIVE);
|
||||
final String iconBase64 = "data:image/png;base64," + new String(Base64.getEncoder().encode(iconBytes), StandardCharsets.UTF_8);
|
||||
wrapper.write(Type.STRING, iconBase64);
|
||||
final byte[] iconBytes = wrapper.read(Type.OPTIONAL_BYTE_ARRAY_PRIMITIVE);
|
||||
final String iconBase64 = iconBytes != null ? "data:image/png;base64," + new String(Base64.getEncoder().encode(iconBytes), StandardCharsets.UTF_8) : null;
|
||||
wrapper.write(Type.OPTIONAL_STRING, iconBase64);
|
||||
});
|
||||
|
||||
cancelClientbound(ClientboundPackets1_19_4.BUNDLE);
|
||||
@ -105,7 +107,7 @@ public final class Protocol1_19_3To1_19_4 extends BackwardsProtocol<ClientboundP
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemRewriter<ClientboundPackets1_19_4, ServerboundPackets1_19_3, Protocol1_19_3To1_19_4> getItemRewriter() {
|
||||
public BlockItemPackets1_19_4 getItemRewriter() {
|
||||
return itemRewriter;
|
||||
}
|
||||
|
||||
|
@ -81,7 +81,9 @@ public final class BlockItemPackets1_19_4 extends ItemRewriter<ClientboundPacket
|
||||
wrapper.read(Type.FLAT_VAR_INT_ITEM_ARRAY_VAR_INT); // Template
|
||||
wrapper.read(Type.FLAT_VAR_INT_ITEM_ARRAY_VAR_INT); // Base
|
||||
wrapper.read(Type.FLAT_VAR_INT_ITEM_ARRAY_VAR_INT); // Additions
|
||||
wrapper.read(Type.FLAT_VAR_INT_ITEM); // Result
|
||||
if (cutType.equals("smithing_transform")) {
|
||||
wrapper.read(Type.FLAT_VAR_INT_ITEM); // Result
|
||||
}
|
||||
continue;
|
||||
} else if (cutType.equals("crafting_decorated_pot")) {
|
||||
newSize--;
|
||||
|
@ -0,0 +1,276 @@
|
||||
{
|
||||
"blockstates": {
|
||||
"minecraft:cherry_planks": "minecraft:acacia_planks",
|
||||
"minecraft:cherry_sapling": "minecraft:acacia_sapling[",
|
||||
"minecraft:suspicious_sand": "minecraft:sand",
|
||||
"minecraft:cherry_log": "minecraft:acacia_log[",
|
||||
"minecraft:stripped_cherry_log": "minecraft:stripped_acacia_log[",
|
||||
"minecraft:cherry_wood": "minecraft:acacia_wood[",
|
||||
"minecraft:stripped_cherry_wood": "minecraft:stripped_acacia_wood[",
|
||||
"minecraft:cherry_leaves": "minecraft:acacia_leaves[",
|
||||
"minecraft:torchflower": "minecraft:red_tulip",
|
||||
"minecraft:cherry_sign": "minecraft:acacia_sign[",
|
||||
"minecraft:cherry_wall_sign": "minecraft:acacia_wall_sign[",
|
||||
"minecraft:cherry_hanging_sign": "minecraft:acacia_hanging_sign[",
|
||||
"minecraft:cherry_wall_hanging_sign": "minecraft:acacia_wall_hanging_sign[",
|
||||
"minecraft:cherry_pressure_plate": "minecraft:acacia_pressure_plate[",
|
||||
"minecraft:cherry_trapdoor": "minecraft:acacia_trapdoor[",
|
||||
"minecraft:potted_torchflower": "minecraft:potted_red_tulip",
|
||||
"minecraft:potted_cherry_sapling": "minecraft:potted_pink_tulip",
|
||||
"minecraft:cherry_button": "minecraft:acacia_button[",
|
||||
"minecraft:cherry_stairs": "minecraft:acacia_stairs[",
|
||||
"minecraft:cherry_slab": "minecraft:acacia_slab[",
|
||||
"minecraft:cherry_fence": "minecraft:acacia_fence[",
|
||||
"minecraft:cherry_fence_gate": "minecraft:acacia_fence_gate[",
|
||||
"minecraft:cherry_door": "minecraft:acacia_door[",
|
||||
"minecraft:torchflower_crop": "minecraft:melon_stem[",
|
||||
"minecraft:pink_petals": "minecraft:air",
|
||||
"minecraft:decorated_pot": "minecraft:bricks"
|
||||
},
|
||||
"blockentities": {
|
||||
"suspicious_sand": "",
|
||||
"decorated_pot": ""
|
||||
},
|
||||
"items": {
|
||||
"minecraft:cherry_planks": {
|
||||
"id": "minecraft:acacia_planks",
|
||||
"name": "1.19.4 Cherry Planks"
|
||||
},
|
||||
"minecraft:cherry_sapling": {
|
||||
"id": "minecraft:peony",
|
||||
"name": "1.19.4 Cherry Sapling"
|
||||
},
|
||||
"minecraft:suspicious_sand": {
|
||||
"id": "minecraft:sand",
|
||||
"name": "1.19.4 Suspicious Sand"
|
||||
},
|
||||
"minecraft:cherry_log": {
|
||||
"id": "minecraft:acacia_log",
|
||||
"name": "1.19.4 Cherry Log"
|
||||
},
|
||||
"minecraft:stripped_cherry_log": {
|
||||
"id": "minecraft:stripped_acacia_log",
|
||||
"name": "1.19.4 Stripped Cherry Log"
|
||||
},
|
||||
"minecraft:stripped_cherry_wood": {
|
||||
"id": "minecraft:stripped_acacia_wood",
|
||||
"name": "1.19.4 Stripped Cherry Wood"
|
||||
},
|
||||
"minecraft:cherry_wood": {
|
||||
"id": "minecraft:acacia_wood",
|
||||
"name": "1.19.4 Cherry Wood"
|
||||
},
|
||||
"minecraft:cherry_leaves": {
|
||||
"id": "minecraft:acacia_leaves",
|
||||
"name": "1.19.4 Cherry Leaves"
|
||||
},
|
||||
"minecraft:torchflower": {
|
||||
"id": "minecraft:red_tulip",
|
||||
"name": "1.19.4 Torchflower"
|
||||
},
|
||||
"minecraft:pink_petals": {
|
||||
"id": "minecraft:brain_coral_fan",
|
||||
"name": "1.19.4 Pink Petals"
|
||||
},
|
||||
"minecraft:cherry_slab": {
|
||||
"id": "minecraft:acacia_slab",
|
||||
"name": "1.19.4 Cherry Slab"
|
||||
},
|
||||
"minecraft:decorated_pot": {
|
||||
"id": "minecraft:flower_pot",
|
||||
"name": "1.19.4 Decorated Pot"
|
||||
},
|
||||
"minecraft:cherry_fence": {
|
||||
"id": "minecraft:acacia_fence",
|
||||
"name": "1.19.4 Cherry Fence"
|
||||
},
|
||||
"minecraft:cherry_stairs": {
|
||||
"id": "minecraft:acacia_stairs",
|
||||
"name": "1.19.4 Cherry Stairs"
|
||||
},
|
||||
"minecraft:cherry_button": {
|
||||
"id": "minecraft:acacia_button",
|
||||
"name": "1.19.4 Cherry Button"
|
||||
},
|
||||
"minecraft:cherry_pressure_plate": {
|
||||
"id": "minecraft:acacia_pressure_plate",
|
||||
"name": "1.19.4 Cherry Pressure Plate"
|
||||
},
|
||||
"minecraft:cherry_door": {
|
||||
"id": "minecraft:acacia_door",
|
||||
"name": "1.19.4 Cherry Door"
|
||||
},
|
||||
"minecraft:cherry_trapdoor": {
|
||||
"id": "minecraft:acacia_trapdoor",
|
||||
"name": "1.19.4 Cherry Trapdoor"
|
||||
},
|
||||
"minecraft:cherry_fence_gate": {
|
||||
"id": "minecraft:acacia_fence_gate",
|
||||
"name": "1.19.4 Cherry Fence Gate"
|
||||
},
|
||||
"minecraft:cherry_boat": {
|
||||
"id": "minecraft:acacia_boat",
|
||||
"name": "1.19.4 Cherry Boat"
|
||||
},
|
||||
"minecraft:cherry_chest_boat": {
|
||||
"id": "minecraft:acacia_chest_boat",
|
||||
"name": "1.19.4 Cherry Chest Boat"
|
||||
},
|
||||
"minecraft:cherry_sign": {
|
||||
"id": "minecraft:acacia_sign",
|
||||
"name": "1.19.4 Cherry Sign"
|
||||
},
|
||||
"minecraft:cherry_hanging_sign": {
|
||||
"id": "minecraft:acacia_hanging_sign",
|
||||
"name": "1.19.4 Cherry Hanging Sign"
|
||||
},
|
||||
"minecraft:sniffer_spawn_egg": {
|
||||
"id": "minecraft:strider_spawn_egg",
|
||||
"name": "1.19.4 Sniffer Spawn Egg"
|
||||
},
|
||||
"minecraft:torchflower_seeds": {
|
||||
"id": "minecraft:beetroot_seeds",
|
||||
"name": "1.19.4 Torchflower Seeds"
|
||||
},
|
||||
"minecraft:brush": {
|
||||
"id": "minecraft:shears",
|
||||
"name": "1.19.4 Brush"
|
||||
},
|
||||
"minecraft:netherite_upgrade_smithing_template": {
|
||||
"id": "minecraft:book",
|
||||
"name": "1.19.4 Netherite Upgrade Smithing Template"
|
||||
},
|
||||
"minecraft:sentry_armor_trim_smithing_template": {
|
||||
"id": "minecraft:book",
|
||||
"name": "1.19.4 Sentry Armor Trim Smithing Template"
|
||||
},
|
||||
"minecraft:dune_armor_trim_smithing_template": {
|
||||
"id": "minecraft:book",
|
||||
"name": "1.19.4 Dune Armor Trim Smithing Template"
|
||||
},
|
||||
"minecraft:coast_armor_trim_smithing_template": {
|
||||
"id": "minecraft:book",
|
||||
"name": "1.19.4 Coast Armor Trim Smithing Template"
|
||||
},
|
||||
"minecraft:wild_armor_trim_smithing_template": {
|
||||
"id": "minecraft:book",
|
||||
"name": "1.19.4 Wild Armor Trim Smithing Template"
|
||||
},
|
||||
"minecraft:ward_armor_trim_smithing_template": {
|
||||
"id": "minecraft:book",
|
||||
"name": "1.19.4 Ward Armor Trim Smithing Template"
|
||||
},
|
||||
"minecraft:eye_armor_trim_smithing_template": {
|
||||
"id": "minecraft:book",
|
||||
"name": "1.19.4 Eye Armor Trim Smithing Template"
|
||||
},
|
||||
"minecraft:vex_armor_trim_smithing_template": {
|
||||
"id": "minecraft:book",
|
||||
"name": "1.19.4 Vex Armor Trim Smithing Template"
|
||||
},
|
||||
"minecraft:tide_armor_trim_smithing_template": {
|
||||
"id": "minecraft:book",
|
||||
"name": "1.19.4 Tide Armor Trim Smithing Template"
|
||||
},
|
||||
"minecraft:snout_armor_trim_smithing_template": {
|
||||
"id": "minecraft:book",
|
||||
"name": "1.19.4 Snout Armor Trim Smithing Template"
|
||||
},
|
||||
"minecraft:rib_armor_trim_smithing_template": {
|
||||
"id": "minecraft:book",
|
||||
"name": "1.19.4 Rib Armor Trim Smithing Template"
|
||||
},
|
||||
"minecraft:spire_armor_trim_smithing_template": {
|
||||
"id": "minecraft:book",
|
||||
"name": "1.19.4 Spire Armor Trim Smithing Template"
|
||||
},
|
||||
"minecraft:pottery_shard_archer": {
|
||||
"id": "minecraft:brick",
|
||||
"name": "1.19.4 Pottery Shard Archer"
|
||||
},
|
||||
"minecraft:pottery_shard_prize": {
|
||||
"id": "minecraft:brick",
|
||||
"name": "1.19.4 Pottery Shard Prize"
|
||||
},
|
||||
"minecraft:pottery_shard_arms_up": {
|
||||
"id": "minecraft:brick",
|
||||
"name": "1.19.4 Pottery Shard Arms Up"
|
||||
},
|
||||
"minecraft:pottery_shard_skull": {
|
||||
"id": "minecraft:brick",
|
||||
"name": "1.19.4 Pottery Shard Skull"
|
||||
}
|
||||
},
|
||||
"sounds": {
|
||||
"item.brush.brushing": "",
|
||||
"item.brush.brush_sand_completed": "",
|
||||
"block.cherry_wood.break": "",
|
||||
"block.cherry_wood.fall": "",
|
||||
"block.cherry_wood.hit": "",
|
||||
"block.cherry_wood.place": "",
|
||||
"block.cherry_wood.step": "",
|
||||
"block.cherry_sapling.break": "",
|
||||
"block.cherry_sapling.fall": "",
|
||||
"block.cherry_sapling.hit": "",
|
||||
"block.cherry_sapling.place": "",
|
||||
"block.cherry_sapling.step": "",
|
||||
"block.cherry_leaves.break": "",
|
||||
"block.cherry_leaves.fall": "",
|
||||
"block.cherry_leaves.hit": "",
|
||||
"block.cherry_leaves.place": "",
|
||||
"block.cherry_leaves.step": "",
|
||||
"block.cherry_wood_hanging_sign.step": "",
|
||||
"block.cherry_wood_hanging_sign.break": "",
|
||||
"block.cherry_wood_hanging_sign.fall": "",
|
||||
"block.cherry_wood_hanging_sign.hit": "",
|
||||
"block.cherry_wood_hanging_sign.place": "",
|
||||
"block.cherry_wood_door.close": "",
|
||||
"block.cherry_wood_door.open": "",
|
||||
"block.cherry_wood_trapdoor.close": "",
|
||||
"block.cherry_wood_trapdoor.open": "",
|
||||
"block.cherry_wood_button.click_off": "",
|
||||
"block.cherry_wood_button.click_on": "",
|
||||
"block.cherry_wood_pressure_plate.click_off": "",
|
||||
"block.cherry_wood_pressure_plate.click_on": "",
|
||||
"block.cherry_wood_fence_gate.close": "",
|
||||
"block.cherry_wood_fence_gate.open": "",
|
||||
"block.decorated_pot.break": "",
|
||||
"block.decorated_pot.fall": "",
|
||||
"block.decorated_pot.hit": "",
|
||||
"block.decorated_pot.step": "",
|
||||
"block.decorated_pot.place": "",
|
||||
"block.decorated_pot.shatter": "",
|
||||
"block.suspicious_sand.break": "",
|
||||
"block.suspicious_sand.step": "",
|
||||
"block.suspicious_sand.place": "",
|
||||
"block.suspicious_sand.hit": "",
|
||||
"block.suspicious_sand.fall": "",
|
||||
"block.pink_petals.break": "",
|
||||
"block.pink_petals.fall": "",
|
||||
"block.pink_petals.hit": "",
|
||||
"block.pink_petals.place": "",
|
||||
"block.pink_petals.step": "",
|
||||
"music.overworld.cherry_grove": "",
|
||||
"intentionally_empty": "",
|
||||
"entity.sniffer.step": "",
|
||||
"entity.sniffer.eat": "",
|
||||
"entity.sniffer.idle": "",
|
||||
"entity.sniffer.hurt": "",
|
||||
"entity.sniffer.death": "",
|
||||
"entity.sniffer.drop_seed": "",
|
||||
"entity.sniffer.scenting": "",
|
||||
"entity.sniffer.sniffing": "",
|
||||
"entity.sniffer.searching": "",
|
||||
"entity.sniffer.digging": "",
|
||||
"entity.sniffer.digging_stop": "",
|
||||
"entity.sniffer.happy": ""
|
||||
},
|
||||
"particles": {
|
||||
"dripping_cherry_leaves": "dripping_honey",
|
||||
"falling_cherry_leaves": "falling_honey",
|
||||
"landing_cherry_leaves": "landing_honey"
|
||||
},
|
||||
"entitynames": {
|
||||
"sniffer": "Sniffer"
|
||||
}
|
||||
}
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren