diff --git a/bukkit/src/main/java/nl/matsv/viabackwards/BukkitPlugin.java b/bukkit/src/main/java/nl/matsv/viabackwards/BukkitPlugin.java index 9895cb2d..778e2dde 100644 --- a/bukkit/src/main/java/nl/matsv/viabackwards/BukkitPlugin.java +++ b/bukkit/src/main/java/nl/matsv/viabackwards/BukkitPlugin.java @@ -11,6 +11,7 @@ package nl.matsv.viabackwards; import nl.matsv.viabackwards.api.ViaBackwardsPlatform; +import nl.matsv.viabackwards.listener.FireDamageListener; import nl.matsv.viabackwards.listener.FireExtinguishListener; import nl.matsv.viabackwards.listener.LecternInteractListener; import org.bukkit.plugin.java.JavaPlugin; @@ -35,6 +36,9 @@ public class BukkitPlugin extends JavaPlugin implements ViaBackwardsPlatform { if (ProtocolRegistry.SERVER_PROTOCOL >= ProtocolVersion.v1_14.getVersion()) { loader.storeListener(new LecternInteractListener(this)).register(); } + if (ProtocolRegistry.SERVER_PROTOCOL >= ProtocolVersion.v1_12.getVersion()) { + loader.storeListener(new FireDamageListener(this)).register(); + } } @Override diff --git a/bukkit/src/main/java/nl/matsv/viabackwards/listener/FireDamageListener.java b/bukkit/src/main/java/nl/matsv/viabackwards/listener/FireDamageListener.java new file mode 100644 index 00000000..cd0ed684 --- /dev/null +++ b/bukkit/src/main/java/nl/matsv/viabackwards/listener/FireDamageListener.java @@ -0,0 +1,34 @@ +package nl.matsv.viabackwards.listener; + +import nl.matsv.viabackwards.BukkitPlugin; +import nl.matsv.viabackwards.protocol.protocol1_11_1to1_12.Protocol1_11_1To1_12; +import org.bukkit.Sound; +import org.bukkit.SoundCategory; +import org.bukkit.entity.EntityType; +import org.bukkit.entity.Player; +import org.bukkit.event.EventHandler; +import org.bukkit.event.EventPriority; +import org.bukkit.event.entity.EntityDamageEvent; +import us.myles.ViaVersion.bukkit.listeners.ViaBukkitListener; + +public class FireDamageListener extends ViaBukkitListener { + + public FireDamageListener(BukkitPlugin plugin) { + super(plugin, Protocol1_11_1To1_12.class); + } + + @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true) + public void onFireDamage(EntityDamageEvent event) { + if (event.getEntityType() != EntityType.PLAYER) return; + if (event.getCause() != EntityDamageEvent.DamageCause.FIRE + && event.getCause() != EntityDamageEvent.DamageCause.FIRE_TICK + && event.getCause() != EntityDamageEvent.DamageCause.LAVA) { + return; + } + + Player player = (Player) event.getEntity(); + if (isOnPipe(player)) { + player.playSound(player.getLocation(), Sound.ENTITY_PLAYER_HURT, SoundCategory.PLAYERS, 1, 1); + } + } +} diff --git a/core/src/main/java/nl/matsv/viabackwards/api/data/BackwardsMappings.java b/core/src/main/java/nl/matsv/viabackwards/api/data/BackwardsMappings.java index ed077a55..b88ff900 100644 --- a/core/src/main/java/nl/matsv/viabackwards/api/data/BackwardsMappings.java +++ b/core/src/main/java/nl/matsv/viabackwards/api/data/BackwardsMappings.java @@ -24,7 +24,7 @@ public class BackwardsMappings extends MappingData { public BackwardsMappings(String oldVersion, String newVersion, @Nullable Class vvProtocolClass, boolean hasDiffFile) { super(oldVersion, newVersion, hasDiffFile); - Preconditions.checkArgument(!vvProtocolClass.isAssignableFrom(BackwardsProtocol.class)); + Preconditions.checkArgument(vvProtocolClass == null || !vvProtocolClass.isAssignableFrom(BackwardsProtocol.class)); this.vvProtocolClass = vvProtocolClass; // Just re-use ViaVersion's item id map loadItems = false; diff --git a/core/src/main/java/nl/matsv/viabackwards/api/rewriters/ItemRewriterBase.java b/core/src/main/java/nl/matsv/viabackwards/api/rewriters/ItemRewriterBase.java index ef19c2db..8761c355 100644 --- a/core/src/main/java/nl/matsv/viabackwards/api/rewriters/ItemRewriterBase.java +++ b/core/src/main/java/nl/matsv/viabackwards/api/rewriters/ItemRewriterBase.java @@ -24,7 +24,7 @@ public abstract class ItemRewriterBase extends Rewr @Nullable public Item handleItemToClient(Item item) { if (item == null) return null; - if (protocol.getMappingData() != null) { + if (protocol.getMappingData() != null && protocol.getMappingData().getItemMappings() != null) { item.setIdentifier(protocol.getMappingData().getNewItemId(item.getIdentifier())); } return item; @@ -33,7 +33,7 @@ public abstract class ItemRewriterBase extends Rewr @Nullable public Item handleItemToServer(Item item) { if (item == null) return null; - if (protocol.getMappingData() != null) { + if (protocol.getMappingData() != null && protocol.getMappingData().getItemMappings() != null) { item.setIdentifier(protocol.getMappingData().getOldItemId(item.getIdentifier())); } restoreDisplayTag(item); diff --git a/core/src/main/java/nl/matsv/viabackwards/api/rewriters/LegacySoundRewriter.java b/core/src/main/java/nl/matsv/viabackwards/api/rewriters/LegacySoundRewriter.java index 157d03c8..a27bbc05 100644 --- a/core/src/main/java/nl/matsv/viabackwards/api/rewriters/LegacySoundRewriter.java +++ b/core/src/main/java/nl/matsv/viabackwards/api/rewriters/LegacySoundRewriter.java @@ -14,6 +14,7 @@ import nl.matsv.viabackwards.api.BackwardsProtocol; import us.myles.viaversion.libs.fastutil.ints.Int2ObjectMap; import us.myles.viaversion.libs.fastutil.ints.Int2ObjectOpenHashMap; +@Deprecated public abstract class LegacySoundRewriter extends Rewriter { protected final Int2ObjectMap soundRewrites = new Int2ObjectOpenHashMap<>(64); diff --git a/core/src/main/java/nl/matsv/viabackwards/api/rewriters/SoundRewriter.java b/core/src/main/java/nl/matsv/viabackwards/api/rewriters/SoundRewriter.java index 3f60949f..badb80ba 100644 --- a/core/src/main/java/nl/matsv/viabackwards/api/rewriters/SoundRewriter.java +++ b/core/src/main/java/nl/matsv/viabackwards/api/rewriters/SoundRewriter.java @@ -2,6 +2,7 @@ package nl.matsv.viabackwards.api.rewriters; import nl.matsv.viabackwards.api.BackwardsProtocol; import us.myles.ViaVersion.api.protocol.ClientboundPacketType; +import us.myles.ViaVersion.api.remapper.PacketHandler; import us.myles.ViaVersion.api.remapper.PacketRemapper; import us.myles.ViaVersion.api.type.Type; @@ -19,20 +20,7 @@ public class SoundRewriter extends us.myles.ViaVersion.api.rewriters.SoundRewrit @Override public void registerMap() { map(Type.STRING); // Sound identifier - handler(wrapper -> { - String soundId = wrapper.get(Type.STRING, 0); - if (soundId.startsWith("minecraft:")) { - soundId = soundId.substring(10); - } - - String mappedId = protocol.getMappingData().getMappedNamedSound(soundId); - if (mappedId == null) return; - if (!mappedId.isEmpty()) { - wrapper.set(Type.STRING, 0, mappedId); - } else { - wrapper.cancel(); - } - }); + handler(getNamedSoundHandler()); } }); } @@ -41,34 +29,55 @@ public class SoundRewriter extends us.myles.ViaVersion.api.rewriters.SoundRewrit protocol.registerOutgoing(packetType, new PacketRemapper() { @Override public void registerMap() { - handler(wrapper -> { - byte flags = wrapper.passthrough(Type.BYTE); - if ((flags & 0x02) == 0) return; // No sound specified - - if ((flags & 0x01) != 0) { - wrapper.passthrough(Type.VAR_INT); // Source - } - - String soundId = wrapper.read(Type.STRING); - if (soundId.startsWith("minecraft:")) { - soundId = soundId.substring(10); - } - - String mappedId = protocol.getMappingData().getMappedNamedSound(soundId); - if (mappedId == null) { - // No mapping found - wrapper.write(Type.STRING, soundId); - return; - } - - if (!mappedId.isEmpty()) { - wrapper.write(Type.STRING, mappedId); - } else { - // Cancel if set to empty - wrapper.cancel(); - } - }); + handler(getStopSoundHandler()); } }); } + + public PacketHandler getNamedSoundHandler() { + return wrapper -> { + String soundId = wrapper.get(Type.STRING, 0); + if (soundId.startsWith("minecraft:")) { + soundId = soundId.substring(10); + } + + String mappedId = protocol.getMappingData().getMappedNamedSound(soundId); + if (mappedId == null) return; + if (!mappedId.isEmpty()) { + wrapper.set(Type.STRING, 0, mappedId); + } else { + wrapper.cancel(); + } + }; + } + + public PacketHandler getStopSoundHandler() { + return wrapper -> { + byte flags = wrapper.passthrough(Type.BYTE); + if ((flags & 0x02) == 0) return; // No sound specified + + if ((flags & 0x01) != 0) { + wrapper.passthrough(Type.VAR_INT); // Source + } + + String soundId = wrapper.read(Type.STRING); + if (soundId.startsWith("minecraft:")) { + soundId = soundId.substring(10); + } + + String mappedId = protocol.getMappingData().getMappedNamedSound(soundId); + if (mappedId == null) { + // No mapping found + wrapper.write(Type.STRING, soundId); + return; + } + + if (!mappedId.isEmpty()) { + wrapper.write(Type.STRING, mappedId); + } else { + // Cancel if set to empty + wrapper.cancel(); + } + }; + } } diff --git a/core/src/main/java/nl/matsv/viabackwards/protocol/protocol1_10to1_11/Protocol1_10To1_11.java b/core/src/main/java/nl/matsv/viabackwards/protocol/protocol1_10to1_11/Protocol1_10To1_11.java index 673dfe2e..ae348a4f 100644 --- a/core/src/main/java/nl/matsv/viabackwards/protocol/protocol1_10to1_11/Protocol1_10To1_11.java +++ b/core/src/main/java/nl/matsv/viabackwards/protocol/protocol1_10to1_11/Protocol1_10To1_11.java @@ -11,11 +11,12 @@ package nl.matsv.viabackwards.protocol.protocol1_10to1_11; 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.protocol.protocol1_10to1_11.packets.BlockItemPackets1_11; import nl.matsv.viabackwards.protocol.protocol1_10to1_11.packets.EntityPackets1_11; import nl.matsv.viabackwards.protocol.protocol1_10to1_11.packets.PlayerPackets1_11; -import nl.matsv.viabackwards.protocol.protocol1_10to1_11.packets.SoundPackets1_11; import nl.matsv.viabackwards.protocol.protocol1_10to1_11.storage.WindowTracker; import us.myles.ViaVersion.api.data.UserConnection; import us.myles.ViaVersion.protocols.protocol1_9_3to1_9_1_2.ClientboundPackets1_9_3; @@ -24,6 +25,7 @@ import us.myles.ViaVersion.protocols.protocol1_9_3to1_9_1_2.storage.ClientWorld; public class Protocol1_10To1_11 extends BackwardsProtocol { + public static final BackwardsMappings MAPPINGS = new BackwardsMappings("1.11", "1.10", null, true); private EntityPackets1_11 entityPackets; // Required for the item rewriter private BlockItemPackets1_11 blockItemPackets; @@ -36,7 +38,10 @@ public class Protocol1_10To1_11 extends BackwardsProtocol { - - public SoundPackets1_11(Protocol1_10To1_11 protocol) { - super(protocol); - } - - @Override - protected void registerPackets() { - protocol.registerOutgoing(ClientboundPackets1_9_3.NAMED_SOUND, new PacketRemapper() { - @Override - public void registerMap() { - map(Type.STRING); // 0 - Sound name - map(Type.VAR_INT); // 1 - Sound Category - map(Type.INT); // 2 - x - map(Type.INT); // 3 - y - map(Type.INT); // 4 - z - map(Type.FLOAT); // 5 - Volume - map(Type.FLOAT); // 6 - Pitch - } - }); - - protocol.registerOutgoing(ClientboundPackets1_9_3.SOUND, new PacketRemapper() { - @Override - public void registerMap() { - map(Type.VAR_INT); // 0 - Sound name - map(Type.VAR_INT); // 1 - Sound Category - map(Type.INT); // 2 - x - map(Type.INT); // 3 - y - map(Type.INT); // 4 - z - map(Type.FLOAT); // 5 - Volume - map(Type.FLOAT); // 6 - Pitch - - handler(new PacketHandler() { - @Override - public void handle(PacketWrapper wrapper) throws Exception { - int oldId = wrapper.get(Type.VAR_INT, 0); - int newId = handleSounds(oldId); - if (newId == -1) - wrapper.cancel(); - else { - if (hasPitch(oldId)) - wrapper.set(Type.FLOAT, 1, handlePitch(oldId)); - wrapper.set(Type.VAR_INT, 0, newId); - } - } - }); - } - }); - } - - @Override - protected void registerRewrites() { - // Sound replacements, suggestions are always welcome - // Automatically generated from PAaaS - added(85, 121, 0.5f); // block.shulker_box.close -> block.wooden_trapdoor.close - added(86, 122, 0.5f); // block.shulker_box.open -> block.wooden_trapdoor.open - - added(176, 227); // entity.elder_guardian.flop -> entity.guardian.flop - - // 1.10 entity.experience_orb.touch was removed; subtract id and properly map ender pearl sound on that id - soundRewrites.put(196, new SoundData(193, false, -1, false)); - - added(197, 402, 1.8f); // entity.evocation_fangs.attack -> entity.zombie.attack_iron_door - added(198, 370, 0.4f); // entity.evocation_illager.ambient -> entity.villager.ambient - added(199, 255, 1.3f); // entity.evocation_illager.cast_spell -> entity.irongolem.hurt - added(200, 418, 1.3f); // entity.evocation_illager.death -> entity.zombie_villager.death - added(201, 372, 1.3f); // entity.evocation_illager.hurt -> entity.villager.hurt - added(202, 137, 0.8f); // entity.evocation_illager.prepare_attack -> entity.elder_guardian.curse - added(203, 78, 2f); // entity.evocation_illager.prepare_summon -> block.portal.trigger - added(204, 376, 0.6f); // entity.evocation_illager.prepare_wololo -> entity.witch.ambient - - added(279, 230, 1.5f); // entity.llama.ambient -> entity.horse.ambient - added(280, 231, 1.6f); // entity.llama.angry -> entity.horse.angry - added(281, 164); // entity.llama.chest -> entity.donkey.chest - added(282, 165, 1.2f); // entity.llama.death -> entity.donkey.death - added(283, 235, 1.1f); // entity.llama.eat -> entity.horse.eat - added(284, 166); // entity.llama.hurt -> entity.donkey.hurt - added(285, 323, 1.7f); // entity.llama.spit -> entity.shulker.shoot - added(286, 241, 0.8f); // entity.llama.step -> entity.horse.step - added(287, 423, 0.5f); // entity.llama.swag -> item.armor.equip_generic - added(296, 164); // entity.mule.chest -> entity.donkey.chest - - added(390, 233, 0.1f); // entity.vex.ambient -> entity.horse.breathe - added(391, 168, 2f); // entity.vex.charge -> entity.elder_guardian.ambient - added(392, 144, 0.5f); // entity.vex.death -> entity.cat.death - added(393, 146, 2f); // entity.vex.hurt -> entity.cat.hurt - - added(400, 370, 0.7f); // entity.vindication_illager.ambient -> entity.villager.ambient - added(401, 371, 0.8f); // entity.vindication_illager.death -> entity.villager.death - added(402, 372, 0.7f); // entity.vindication_illager.hurt -> entity.villager.hurt - - added(450, 423, 1.1f); // item.armor.equip_elytra -> item.armor.equip_generic - added(455, 427, 1.1f); // item.bottle.empty -> item.bottle.fill - added(470, 2, 0.5f); // item.totem.use -> block.anvil.destroy - } -} diff --git a/core/src/main/java/nl/matsv/viabackwards/protocol/protocol1_11_1to1_12/packets/SoundPackets1_12.java b/core/src/main/java/nl/matsv/viabackwards/protocol/protocol1_11_1to1_12/packets/SoundPackets1_12.java index 38b88355..8ad4b46a 100644 --- a/core/src/main/java/nl/matsv/viabackwards/protocol/protocol1_11_1to1_12/packets/SoundPackets1_12.java +++ b/core/src/main/java/nl/matsv/viabackwards/protocol/protocol1_11_1to1_12/packets/SoundPackets1_12.java @@ -73,6 +73,9 @@ public class SoundPackets1_12 extends LegacySoundRewriter @Override protected void registerRewrites() { + //TODO use the diff file to also have named sound remaps + // (there were *A LOT* of refactored names) + // Replacement sounds, suggestions are always welcome // Automatically generated from PAaaS added(26, 277, 1.4f); // block.end_portal.spawn -> entity.lightning.thunder diff --git a/core/src/main/java/nl/matsv/viabackwards/protocol/protocol1_9_4to1_10/Protocol1_9_4To1_10.java b/core/src/main/java/nl/matsv/viabackwards/protocol/protocol1_9_4to1_10/Protocol1_9_4To1_10.java index 16ab0481..d999951e 100644 --- a/core/src/main/java/nl/matsv/viabackwards/protocol/protocol1_9_4to1_10/Protocol1_9_4To1_10.java +++ b/core/src/main/java/nl/matsv/viabackwards/protocol/protocol1_9_4to1_10/Protocol1_9_4To1_10.java @@ -11,12 +11,15 @@ package nl.matsv.viabackwards.protocol.protocol1_9_4to1_10; 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.protocol.protocol1_9_4to1_10.packets.BlockItemPackets1_10; import nl.matsv.viabackwards.protocol.protocol1_9_4to1_10.packets.EntityPackets1_10; -import nl.matsv.viabackwards.protocol.protocol1_9_4to1_10.packets.SoundPackets1_10; +import us.myles.ViaVersion.api.PacketWrapper; import us.myles.ViaVersion.api.data.UserConnection; 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.protocols.protocol1_9_3to1_9_1_2.ClientboundPackets1_9_3; import us.myles.ViaVersion.protocols.protocol1_9_3to1_9_1_2.ServerboundPackets1_9_3; @@ -24,6 +27,12 @@ import us.myles.ViaVersion.protocols.protocol1_9_3to1_9_1_2.storage.ClientWorld; public class Protocol1_9_4To1_10 extends BackwardsProtocol { + public static final BackwardsMappings MAPPINGS = new BackwardsMappings("1.10", "1.9.4", null, true); + private static final ValueTransformer TO_OLD_PITCH = new ValueTransformer(Type.UNSIGNED_BYTE) { + public Short transform(PacketWrapper packetWrapper, Float inputValue) throws Exception { + return (short) Math.round(inputValue * 63.5F); + } + }; private EntityPackets1_10 entityPackets; // Required for the item rewriter private BlockItemPackets1_10 blockItemPackets; @@ -32,10 +41,37 @@ public class Protocol1_9_4To1_10 extends BackwardsProtocol { - protected static ValueTransformer toOldPitch = new ValueTransformer(Type.UNSIGNED_BYTE) { - public Short transform(PacketWrapper packetWrapper, Float inputValue) throws Exception { - return (short) Math.round(inputValue * 63.5F); - } - }; - - public SoundPackets1_10(Protocol1_9_4To1_10 protocol) { - super(protocol); - } - - @Override - protected void registerPackets() { - protocol.registerOutgoing(ClientboundPackets1_9_3.NAMED_SOUND, new PacketRemapper() { - @Override - public void registerMap() { - map(Type.STRING); // 0 - Sound name - map(Type.VAR_INT); // 1 - Sound Category - map(Type.INT); // 2 - x - map(Type.INT); // 3 - y - map(Type.INT); // 4 - z - map(Type.FLOAT); // 5 - Volume - map(Type.FLOAT, toOldPitch); // 6 - Pitch - } - }); - - protocol.registerOutgoing(ClientboundPackets1_9_3.SOUND, new PacketRemapper() { - @Override - public void registerMap() { - map(Type.VAR_INT); // 0 - Sound name - map(Type.VAR_INT); // 1 - Sound Category - map(Type.INT); // 2 - x - map(Type.INT); // 3 - y - map(Type.INT); // 4 - z - map(Type.FLOAT); // 5 - Volume - map(Type.FLOAT, toOldPitch); // 6 - Pitch - - handler(new PacketHandler() { - @Override - public void handle(PacketWrapper wrapper) throws Exception { - int oldId = wrapper.get(Type.VAR_INT, 0); - int newId = handleSounds(oldId); - if (newId == -1) { - wrapper.cancel(); - return; - } - - if (hasPitch(oldId)) { - wrapper.set(Type.UNSIGNED_BYTE, 0, (short) Math.round(handlePitch(oldId) * 63.5F)); - } - wrapper.set(Type.VAR_INT, 0, newId); - } - }); - } - }); - } - - @Override - protected void registerRewrites() { - added(24, -1); // Enchantment table sound - - // Husk - added(249, 381); // Husk -> Zombie ambient - added(250, 385); // Husk -> Zombie death - added(251, 386); // Husk -> Zombie hurt - added(252, 388); // Husk -> Zombie step - - // Polar bear - added(301, 381, .6F); // Polar bear ambient -> Zombie ambient - added(302, 381, 1.9F); // Polar baby bear ambient -> Zombie ambient - added(303, 385, .7F); // Polar bear death -> Zombie death - added(304, 309, .6F); // Polar bear hurt -> Shulker hurt - added(305, 240, .6F); // Polar bear step -> Horse step - added(306, 374, 1.2F); // Polar bear warning -> Wolf growl - - // Stray - added(365, 320); // Stray -> Skeleton ambient - added(366, 321); // Stray -> Skeleton death - added(367, 322); // Stray -> Skeleton hurt - added(368, 324); // Stray -> Skeleton step - - // Wither skeleton - added(387, 320); // Wither skeleton -> Skeleton ambient - added(388, 321); // Wither skeleton -> Skeleton death - added(389, 322); // Wither skeleton -> Skeleton hurt - added(390, 324); // Wither skeleton -> Skeleton step - } - -} diff --git a/core/src/main/resources/assets/viabackwards/data/mapping-1.10to1.11.json b/core/src/main/resources/assets/viabackwards/data/mapping-1.10to1.11.json new file mode 100644 index 00000000..c2782028 --- /dev/null +++ b/core/src/main/resources/assets/viabackwards/data/mapping-1.10to1.11.json @@ -0,0 +1,35 @@ +{ + "sounds": { + "block.shulker_box.close": "block.wooden_trapdoor.close", + "block.shulker_box.open": "block.wooden_trapdoor.open", + "entity.elder_guardian.flop": "entity.guardian.flop", + "entity.evocation_fangs.attack": "entity.zombie.attack_iron_door", + "entity.evocation_illager.ambient": "entity.villager.ambient", + "entity.evocation_illager.cast_spell": "entity.irongolem.hurt", + "entity.evocation_illager.death": "entity.zombie_villager.death", + "entity.evocation_illager.hurt": "entity.villager.hurt", + "entity.evocation_illager.prepare_attack": "entity.elder_guardian.curse", + "entity.evocation_illager.prepare_summon": "block.portal.trigger", + "entity.evocation_illager.prepare_wololo": "entity.witch.ambient", + "entity.llama.ambient": "entity.horse.ambient", + "entity.llama.angry": "entity.horse.angry", + "entity.llama.chest": "entity.donkey.chest", + "entity.llama.death": "entity.donkey.death", + "entity.llama.eat": "entity.horse.eat", + "entity.llama.hurt": "entity.donkey.hurt", + "entity.llama.spit": "entity.shulker.shoot", + "entity.llama.step": "entity.horse.step", + "entity.llama.swag": "item.armor.equip_generic", + "entity.mule.chest": "entity.donkey.chest", + "entity.vex.ambient": "entity.horse.breathe", + "entity.vex.charge": "entity.elder_guardian.ambient", + "entity.vex.death": "entity.cat.death", + "entity.vex.hurt": "entity.cat.hurt", + "entity.vindication_illager.ambient": "entity.villager.ambient", + "entity.vindication_illager.death": "entity.villager.death", + "entity.vindication_illager.hurt": "entity.villager.hurt", + "item.armor.equip_elytra": "item.armor.equip_generic", + "item.bottle.empty": "item.bottle.fill", + "item.totem.use": "block.anvil.destroy" + } +} \ No newline at end of file diff --git a/core/src/main/resources/assets/viabackwards/data/mapping-1.11to1.12.json b/core/src/main/resources/assets/viabackwards/data/mapping-1.11to1.12.json new file mode 100644 index 00000000..feeeeabe --- /dev/null +++ b/core/src/main/resources/assets/viabackwards/data/mapping-1.11to1.12.json @@ -0,0 +1,52 @@ +{ + "sounds": { + "block.end_portal.spawn": "entity.lightning.thunder", + "block.note.bell": "block.note.harp", + "block.note.chime": "block.note.harp", + "block.note.flute": "block.note.harp", + "block.note.guitar": "block.note.harp", + "block.note.xylophone": "block.note.harp", + "entity.illusion_illager.ambient": "entity.evocation_illager.ambient", + "entity.illusion_illager.cast_spell": "entity.evocation_illager.cast_spell", + "entity.illusion_illager.death": "entity.evocation_illager.death", + "entity.illusion_illager.hurt": "entity.evocation_illager.hurt", + "entity.illusion_illager.mirror_move": "entity.endermen.teleport", + "entity.illusion_illager.prepare_blindness": "entity.evocation_illager.prepare_summon", + "entity.illusion_illager.prepare_mirror": "entity.evocation_illager.prepare_attack", + "entity.parrot.ambient": "entity.bat.ambient", + "entity.parrot.death": "entity.bat.death", + "entity.parrot.eat": "entity.generic.eat", + "entity.parrot.fly": "entity.bat.loop", + "entity.parrot.hurt": "entity.bat.hurt", + "entity.parrot.imitate.blaze": "entity.blaze.ambient", + "entity.parrot.imitate.creeper": "entity.creeper.primed", + "entity.parrot.imitate.elder_guardian": "entity.elder_guardian.ambient", + "entity.parrot.imitate.enderdragon": "entity.enderdragon.ambient", + "entity.parrot.imitate.enderman": "entity.endermen.ambient", + "entity.parrot.imitate.endermite": "entity.endermite.ambient", + "entity.parrot.imitate.evocation_illager": "entity.evocation_illager.ambient", + "entity.parrot.imitate.ghast": "entity.ghast.ambient", + "entity.parrot.imitate.husk": "entity.husk.ambient", + "entity.parrot.imitate.illusion_illager": "entity.evocation_illager.ambient", + "entity.parrot.imitate.magmacube": "entity.magmacube.squish", + "entity.parrot.imitate.polar_bear": "entity.polar_bear.ambient", + "entity.parrot.imitate.shulker": "entity.shulker.ambient", + "entity.parrot.imitate.silverfish": "entity.silverfish.ambient", + "entity.parrot.imitate.skeleton": "entity.skeleton.ambient", + "entity.parrot.imitate.slime": "entity.slime.squish", + "entity.parrot.imitate.spider": "entity.spider.ambient", + "entity.parrot.imitate.stray": "entity.stray.ambient", + "entity.parrot.imitate.vex": "entity.vex.ambient", + "entity.parrot.imitate.vindication_illager": "entity.vindication_illager.ambient", + "entity.parrot.imitate.witch": "entity.witch.ambient", + "entity.parrot.imitate.wither": "entity.wither.ambient", + "entity.parrot.imitate.wither_skeleton": "entity.wither_skeleton.ambient", + "entity.parrot.imitate.wolf": "entity.wolf.ambient", + "entity.parrot.imitate.zombie": "entity.zombie.ambient", + "entity.parrot.imitate.zombie_pigman": "entity.zombie_pig.ambient", + "entity.parrot.imitate.zombie_villager": "entity.zombie_villager.ambient", + "entity.parrot.step": "entity.chicken.step", + "entity.player.hurt_drown": "entity.player.hurt", + "entity.player.hurt_on_fire": "entity.player.hurt" + } +} \ No newline at end of file diff --git a/core/src/main/resources/assets/viabackwards/data/mapping-1.9.4to1.10.json b/core/src/main/resources/assets/viabackwards/data/mapping-1.9.4to1.10.json new file mode 100644 index 00000000..d4483904 --- /dev/null +++ b/core/src/main/resources/assets/viabackwards/data/mapping-1.9.4to1.10.json @@ -0,0 +1,23 @@ +{ + "sounds": { + "block.enchantment_table.use": "", + "entity.husk.ambient": "entity.zombie.ambient", + "entity.husk.death": "entity.zombie.death", + "entity.husk.hurt": "entity.zombie.hurt", + "entity.husk.step": "entity.zombie.step", + "entity.polar_bear.ambient": "entity.zombie.ambient", + "entity.polar_bear.baby_ambient": "entity.zombie.ambient", + "entity.polar_bear.death": "entity.zombie.death", + "entity.polar_bear.hurt": "entity.shulker.hurt", + "entity.polar_bear.step": "entity.horse.step", + "entity.polar_bear.warning": "entity.wolf.growl", + "entity.stray.ambient": "entity.skeleton.ambient", + "entity.stray.death": "entity.skeleton.death", + "entity.stray.hurt": "entity.skeleton.hurt", + "entity.stray.step": "entity.skeleton.step", + "entity.wither_skeleton.ambient": "entity.skeleton.ambient", + "entity.wither_skeleton.death": "entity.skeleton.death", + "entity.wither_skeleton.hurt": "entity.skeleton.hurt", + "entity.wither_skeleton.step": "entity.skeleton.step" + } +} \ No newline at end of file