3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-11-20 06:50:08 +01:00

Merge branch 'master' into dev

Dieser Commit ist enthalten in:
Myles 2019-04-06 13:31:44 +01:00
Commit 421a5e8141
7 geänderte Dateien mit 32 neuen und 14 gelöschten Zeilen

Datei anzeigen

@ -14,7 +14,6 @@ On Bukkit you may also use ProtocolSupport, but ensure you have the right build
**User Docs:** https://docs.viaversion.com/display/VIAVERSION/
**Contributor Chat:** https://gitter.im/MylesIsCool/ViaVersion
@ -51,4 +50,4 @@ License:
MIT License, see LICENSE for more details.
Special thanks to all our [Contributors](https://github.com/MylesIsCool/ViaVersion/graphs/contributors)
Special thanks to all our [Contributors](https://github.com/ViaVersion/ViaVersion/graphs/contributors)

Datei anzeigen

@ -18,7 +18,7 @@ import us.myles.ViaVersion.protocols.protocol1_9to1_8.storage.EntityTracker;
import java.util.Collections;
/*
* This patches https://github.com/MylesIsCool/ViaVersion/issues/555
* This patches https://github.com/ViaVersion/ViaVersion/issues/555
*/
public class ElytraPatch implements Listener {

Datei anzeigen

@ -31,7 +31,7 @@ public class InformativeException extends Exception {
@Override
public String getMessage() {
StringBuilder builder = new StringBuilder();
builder.append("Please post this error to http://github.com/MylesIsCool/ViaVersion/issues\n{");
builder.append("Please post this error to http://github.com/ViaVersion/ViaVersion/issues\n{");
int i = 0;
for (Map.Entry<String, Object> entry : info.entrySet()) {
builder.append((i == 0 ? "" : ", ") + entry.getKey() + ": " + entry.getValue().toString());

Datei anzeigen

@ -497,11 +497,13 @@ public class InventoryPackets {
case "WDL|INIT":
return "wdl:init";
case "WDL|CONTROL":
return "wdl:init";
return "wdl:control";
case "WDL|REQUEST":
return "wdl:request";
case "bungeecord:main":
return null;
default:
return old.matches("([0-9a-z_-]*:)?[0-9a-z_/.-]*") // Identifier regex
return old.matches("([0-9a-z_.-]*:)?[0-9a-z_/.-]*") // Identifier regex
? old : null;
}
}
@ -706,7 +708,22 @@ public class InventoryPackets {
}
public static String getOldPluginChannelId(String newId) {
if (!newId.matches("([0-9a-z_.-]*:)?[0-9a-z_/.-]*")) {
return null; // Not valid
}
int separatorIndex = newId.indexOf(':');
if (separatorIndex == -1 || separatorIndex == 0) { // Vanilla parses ``:`` and ```` as ``minecraft:``
newId = "minecraft:" + newId;
}
switch (newId) {
case "minecraft:trader_list":
return "MC|TrList";
case "minecraft:book_open":
return "MC|BOpen";
case "minecraft:debug/paths":
return "MC|DebugPath";
case "minecraft:debug/neighbors_update":
return "MC|DebugNeighborsUpdate";
case "minecraft:register":
return "REGISTER";
case "minecraft:unregister":
@ -722,8 +739,7 @@ public class InventoryPackets {
case "wdl:request":
return "WDL|REQUEST";
default:
return newId.matches("([0-9a-z_-]*:)?[0-9a-z_/.-]*") // Identifier regex
? newId : null;
return newId;
}
}

Datei anzeigen

@ -1,12 +1,10 @@
package us.myles.ViaVersion.protocols.protocol1_13to1_12_2.providers.blockentities;
import com.github.steveice10.opennbt.tag.builtin.CompoundTag;
import com.github.steveice10.opennbt.tag.builtin.IntTag;
import com.github.steveice10.opennbt.tag.builtin.ListTag;
import com.github.steveice10.opennbt.tag.builtin.Tag;
import com.github.steveice10.opennbt.tag.builtin.*;
import us.myles.ViaVersion.api.Via;
import us.myles.ViaVersion.api.data.UserConnection;
import us.myles.ViaVersion.api.minecraft.Position;
import us.myles.ViaVersion.protocols.protocol1_13to1_12_2.ChatRewriter;
import us.myles.ViaVersion.protocols.protocol1_13to1_12_2.providers.BlockEntityProvider;
import us.myles.ViaVersion.protocols.protocol1_13to1_12_2.storage.BlockStorage;
@ -55,6 +53,11 @@ public class BannerHandler implements BlockEntityProvider.BlockEntityHandler {
}
}
Tag name = tag.get("CustomName");
if (name instanceof StringTag) {
((StringTag) name).setValue(ChatRewriter.legacyTextToJson(((StringTag) name).getValue()));
}
return blockId;
}

Datei anzeigen

@ -1,8 +1,8 @@
# Thanks for downloading ViaVersion
# Ensure you look through all these options
# If you need help:
# Discord - https://viaversion.com/discord
# viaversion.com - Discussion tab
# IRC - https://elmer.spi.gt/iris/?nick=&channels=viaversion #viaversion on irc.spi.gt
# Docs - https://docs.viaversion.com/display/VIAVERSION/Configuration
#
#----------------------------------------------------------#

Datei anzeigen

@ -17,7 +17,7 @@ import us.myles.ViaVersion.protocols.protocol1_9to1_8.storage.EntityTracker;
import java.util.Collections;
/*
* This patches https://github.com/MylesIsCool/ViaVersion/issues/555
* This patches https://github.com/ViaVersion/ViaVersion/issues/555
*/
public class ElytraPatch {