diff --git a/bukkit/pom.xml b/bukkit/pom.xml
index 871235881..ddecc1bc9 100644
--- a/bukkit/pom.xml
+++ b/bukkit/pom.xml
@@ -61,4 +61,4 @@
-
\ No newline at end of file
+
diff --git a/bungee/pom.xml b/bungee/pom.xml
index cf8463198..ac539806b 100644
--- a/bungee/pom.xml
+++ b/bungee/pom.xml
@@ -40,4 +40,4 @@
${project.parent.version}
-
\ No newline at end of file
+
diff --git a/common/pom.xml b/common/pom.xml
index 7ee44a761..4874d16c3 100644
--- a/common/pom.xml
+++ b/common/pom.xml
@@ -20,4 +20,4 @@
compile
-
\ No newline at end of file
+
diff --git a/common/src/main/java/us/myles/ViaVersion/api/protocol/ProtocolVersion.java b/common/src/main/java/us/myles/ViaVersion/api/protocol/ProtocolVersion.java
index 4e156c956..370a243b1 100644
--- a/common/src/main/java/us/myles/ViaVersion/api/protocol/ProtocolVersion.java
+++ b/common/src/main/java/us/myles/ViaVersion/api/protocol/ProtocolVersion.java
@@ -77,7 +77,7 @@ public class ProtocolVersion {
register(v1_14_2 = new ProtocolVersion(485, "1.14.2"));
register(v1_14_3 = new ProtocolVersion(490, "1.14.3"));
register(v1_14_4 = new ProtocolVersion(498, "1.14.4"));
- register(v1_15 = new ProtocolVersion(556, "1.15"));
+ register(v1_15 = new ProtocolVersion(560, "1.15"));
register(unknown = new ProtocolVersion(-1, "UNKNOWN"));
}
diff --git a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_12to1_11_1/ChatItemRewriter.java b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_12to1_11_1/ChatItemRewriter.java
index 2d315a65f..422976c97 100644
--- a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_12to1_11_1/ChatItemRewriter.java
+++ b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_12to1_11_1/ChatItemRewriter.java
@@ -3,6 +3,7 @@ package us.myles.ViaVersion.protocols.protocol1_12to1_11_1;
import com.google.gson.JsonArray;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
+import com.google.gson.JsonPrimitive;
import us.myles.ViaVersion.api.data.UserConnection;
import java.util.regex.Pattern;
@@ -20,23 +21,30 @@ public class ChatItemRewriter {
if (hoverEvent.has("action") && hoverEvent.has("value")) {
String type = hoverEvent.get("action").getAsString();
if (type.equals("show_item") || type.equals("show_entity")) {
- if (hoverEvent.get("value").isJsonPrimitive()) {
- if (hoverEvent.get("value").getAsJsonPrimitive().isString()) {
- String value = hoverEvent.get("value").getAsString();
- value = indexRemoval.matcher(value).replaceAll("");
- hoverEvent.addProperty("value", value);
+ JsonElement value = hoverEvent.get("value");
+
+ if (value.isJsonPrimitive() && value.getAsJsonPrimitive().isString()) {
+ String newValue = indexRemoval.matcher(value.getAsString()).replaceAll("");
+ hoverEvent.addProperty("value", newValue);
+ } else if (value.isJsonArray()) {
+ JsonArray newArray = new JsonArray();
+
+ for (JsonElement valueElement : value.getAsJsonArray()) {
+ if (valueElement.isJsonPrimitive() && valueElement.getAsJsonPrimitive().isString()) {
+ String newValue = indexRemoval.matcher(valueElement.getAsString()).replaceAll("");
+ newArray.add(new JsonPrimitive(newValue));
+ }
}
+
+ hoverEvent.add("value", newArray);
}
}
}
}
- } else {
- if (obj.has("extra")) {
- toClient(obj.get("extra"), user);
- }
+ } else if (obj.has("extra")) {
+ toClient(obj.get("extra"), user);
}
- }
- if (element instanceof JsonArray) {
+ } else if (element instanceof JsonArray) {
JsonArray array = (JsonArray) element;
for (JsonElement value : array) {
toClient(value, user);
diff --git a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_13to1_12_2/Protocol1_13To1_12_2.java b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_13to1_12_2/Protocol1_13To1_12_2.java
index cca497ea8..86a9866c1 100644
--- a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_13to1_12_2/Protocol1_13To1_12_2.java
+++ b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_13to1_12_2/Protocol1_13To1_12_2.java
@@ -105,7 +105,7 @@ public class Protocol1_13To1_12_2 extends Protocol {
};
// These are arbitrary rewrite values, it just needs an invalid color code character.
- protected final static EnumMap SCOREBOARD_TEAM_NAME_REWRITE = new EnumMap<>(ChatColor.class);
+ protected static final EnumMap SCOREBOARD_TEAM_NAME_REWRITE = new EnumMap<>(ChatColor.class);
static {
SCOREBOARD_TEAM_NAME_REWRITE.put(ChatColor.BLACK, 'g');
@@ -124,6 +124,13 @@ public class Protocol1_13To1_12_2 extends Protocol {
SCOREBOARD_TEAM_NAME_REWRITE.put(ChatColor.LIGHT_PURPLE, 'z');
SCOREBOARD_TEAM_NAME_REWRITE.put(ChatColor.YELLOW, '!');
SCOREBOARD_TEAM_NAME_REWRITE.put(ChatColor.WHITE, '?');
+ SCOREBOARD_TEAM_NAME_REWRITE.put(ChatColor.MAGIC, '#');
+ SCOREBOARD_TEAM_NAME_REWRITE.put(ChatColor.BOLD, '(');
+ SCOREBOARD_TEAM_NAME_REWRITE.put(ChatColor.STRIKETHROUGH, ')');
+ SCOREBOARD_TEAM_NAME_REWRITE.put(ChatColor.UNDERLINE, ':');
+ SCOREBOARD_TEAM_NAME_REWRITE.put(ChatColor.ITALIC, ';');
+ SCOREBOARD_TEAM_NAME_REWRITE.put(ChatColor.RESET, '/');
+
MappingData.init();
ConnectionData.init();
RecipeData.init();
diff --git a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_15to1_14_4/packets/EntityPackets.java b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_15to1_14_4/packets/EntityPackets.java
index 0d545c849..3c20fc1a4 100644
--- a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_15to1_14_4/packets/EntityPackets.java
+++ b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_15to1_14_4/packets/EntityPackets.java
@@ -61,27 +61,28 @@ public class EntityPackets {
protocol.registerOutgoing(State.PLAY, 0x03, 0x03, new PacketRemapper() {
@Override
public void registerMap() {
+ map(Type.VAR_INT); // 0 - Entity ID
+ map(Type.UUID); // 1 - Entity UUID
+ map(Type.VAR_INT); // 2 - Entity Type
+ map(Type.DOUBLE); // 3 - X
+ map(Type.DOUBLE); // 4 - Y
+ map(Type.DOUBLE); // 5 - Z
+ map(Type.BYTE); // 6 - Yaw
+ map(Type.BYTE); // 7 - Pitch
+ map(Type.BYTE); // 8 - Head Pitch
+ map(Type.SHORT); // 9 - Velocity X
+ map(Type.SHORT); // 10 - Velocity Y
+ map(Type.SHORT); // 11 - Velocity Z
+ map(Types1_14.METADATA_LIST, Type.NOTHING); // removed - probably sent in an update packet?
+
handler(new PacketHandler() {
@Override
public void handle(PacketWrapper wrapper) throws Exception {
- int entityId = wrapper.passthrough(Type.VAR_INT);
- wrapper.passthrough(Type.UUID);
-
- int typeId = wrapper.read(Type.VAR_INT);
+ int entityId = wrapper.get(Type.VAR_INT, 0);
+ int typeId = wrapper.get(Type.VAR_INT, 1);
Entity1_15Types.EntityType entityType = Entity1_15Types.getTypeFromId(getNewEntityId(typeId));
wrapper.user().get(EntityTracker1_15.class).addEntity(entityId, entityType);
- wrapper.write(Type.VAR_INT, entityType.getId());
-
- wrapper.passthrough(Type.DOUBLE);
- wrapper.passthrough(Type.DOUBLE);
- wrapper.passthrough(Type.DOUBLE);
- wrapper.passthrough(Type.BYTE);
- wrapper.passthrough(Type.BYTE);
- wrapper.passthrough(Type.BYTE);
- wrapper.passthrough(Type.SHORT);
- wrapper.passthrough(Type.SHORT);
- wrapper.passthrough(Type.SHORT);
- wrapper.read(Types1_14.METADATA_LIST); // removed - probably sent in an update packet?
+ wrapper.set(Type.VAR_INT, 1, entityType.getId());
}
});
}
@@ -91,12 +92,21 @@ public class EntityPackets {
protocol.registerOutgoing(State.PLAY, 0x05, 0x05, new PacketRemapper() {
@Override
public void registerMap() {
+ map(Type.VAR_INT); // 0 - Entity ID
+ map(Type.UUID); // 1 - Player UUID
+ map(Type.DOUBLE); // 2 - X
+ map(Type.DOUBLE); // 3 - Y
+ map(Type.DOUBLE); // 4 - Z
+ map(Type.BYTE); // 5 - Yaw
+ map(Type.BYTE); // 6 - Pitch
+ map(Types1_14.METADATA_LIST, Type.NOTHING); // removed - probably sent in an update packet?
+
handler(new PacketHandler() {
@Override
public void handle(PacketWrapper wrapper) throws Exception {
- int entityId = wrapper.passthrough(Type.VAR_INT);
- wrapper.passthrough(Type.UUID);
+ int entityId = wrapper.get(Type.VAR_INT, 0);
+<<<<<<< HEAD
int typeId = wrapper.read(Type.VAR_INT);
Entity1_15Types.EntityType entityType = Entity1_15Types.getTypeFromId(getNewEntityId(typeId));
wrapper.user().get(EntityTracker1_15.class).addEntity(entityId, entityType);
@@ -108,6 +118,10 @@ public class EntityPackets {
wrapper.passthrough(Type.BYTE);
wrapper.passthrough(Type.BYTE);
wrapper.read(Types1_14.METADATA); // removed - probably sent in an update packet?
+=======
+ Entity1_15Types.EntityType entityType = Entity1_15Types.EntityType.PLAYER;
+ wrapper.user().get(EntityTracker.class).addEntity(entityId, entityType);
+>>>>>>> upstream/dev
}
});
}
diff --git a/common/src/main/resources/assets/viaversion/data/mapping-1.15.json b/common/src/main/resources/assets/viaversion/data/mapping-1.15.json
index 53765b42a..9e8c7f399 100644
--- a/common/src/main/resources/assets/viaversion/data/mapping-1.15.json
+++ b/common/src/main/resources/assets/viaversion/data/mapping-1.15.json
@@ -11311,30 +11311,32 @@
"11308": "minecraft:bee_nest[facing=east,honey_level=3]",
"11309": "minecraft:bee_nest[facing=east,honey_level=4]",
"11310": "minecraft:bee_nest[facing=east,honey_level=5]",
- "11311": "minecraft:bee_hive[facing=north,honey_level=0]",
- "11312": "minecraft:bee_hive[facing=north,honey_level=1]",
- "11313": "minecraft:bee_hive[facing=north,honey_level=2]",
- "11314": "minecraft:bee_hive[facing=north,honey_level=3]",
- "11315": "minecraft:bee_hive[facing=north,honey_level=4]",
- "11316": "minecraft:bee_hive[facing=north,honey_level=5]",
- "11317": "minecraft:bee_hive[facing=south,honey_level=0]",
- "11318": "minecraft:bee_hive[facing=south,honey_level=1]",
- "11319": "minecraft:bee_hive[facing=south,honey_level=2]",
- "11320": "minecraft:bee_hive[facing=south,honey_level=3]",
- "11321": "minecraft:bee_hive[facing=south,honey_level=4]",
- "11322": "minecraft:bee_hive[facing=south,honey_level=5]",
- "11323": "minecraft:bee_hive[facing=west,honey_level=0]",
- "11324": "minecraft:bee_hive[facing=west,honey_level=1]",
- "11325": "minecraft:bee_hive[facing=west,honey_level=2]",
- "11326": "minecraft:bee_hive[facing=west,honey_level=3]",
- "11327": "minecraft:bee_hive[facing=west,honey_level=4]",
- "11328": "minecraft:bee_hive[facing=west,honey_level=5]",
- "11329": "minecraft:bee_hive[facing=east,honey_level=0]",
- "11330": "minecraft:bee_hive[facing=east,honey_level=1]",
- "11331": "minecraft:bee_hive[facing=east,honey_level=2]",
- "11332": "minecraft:bee_hive[facing=east,honey_level=3]",
- "11333": "minecraft:bee_hive[facing=east,honey_level=4]",
- "11334": "minecraft:bee_hive[facing=east,honey_level=5]"
+ "11311": "minecraft:beehive[facing=north,honey_level=0]",
+ "11312": "minecraft:beehive[facing=north,honey_level=1]",
+ "11313": "minecraft:beehive[facing=north,honey_level=2]",
+ "11314": "minecraft:beehive[facing=north,honey_level=3]",
+ "11315": "minecraft:beehive[facing=north,honey_level=4]",
+ "11316": "minecraft:beehive[facing=north,honey_level=5]",
+ "11317": "minecraft:beehive[facing=south,honey_level=0]",
+ "11318": "minecraft:beehive[facing=south,honey_level=1]",
+ "11319": "minecraft:beehive[facing=south,honey_level=2]",
+ "11320": "minecraft:beehive[facing=south,honey_level=3]",
+ "11321": "minecraft:beehive[facing=south,honey_level=4]",
+ "11322": "minecraft:beehive[facing=south,honey_level=5]",
+ "11323": "minecraft:beehive[facing=west,honey_level=0]",
+ "11324": "minecraft:beehive[facing=west,honey_level=1]",
+ "11325": "minecraft:beehive[facing=west,honey_level=2]",
+ "11326": "minecraft:beehive[facing=west,honey_level=3]",
+ "11327": "minecraft:beehive[facing=west,honey_level=4]",
+ "11328": "minecraft:beehive[facing=west,honey_level=5]",
+ "11329": "minecraft:beehive[facing=east,honey_level=0]",
+ "11330": "minecraft:beehive[facing=east,honey_level=1]",
+ "11331": "minecraft:beehive[facing=east,honey_level=2]",
+ "11332": "minecraft:beehive[facing=east,honey_level=3]",
+ "11333": "minecraft:beehive[facing=east,honey_level=4]",
+ "11334": "minecraft:beehive[facing=east,honey_level=5]",
+ "11335": "minecraft:honey_block",
+ "11336": "minecraft:honeycomb_block"
},
"blocks": {
"0": "air",
@@ -12014,7 +12016,9 @@
"674": "jigsaw",
"675": "composter",
"676": "bee_nest",
- "677": "bee_hive"
+ "677": "beehive",
+ "678": "honey_block",
+ "679": "honeycomb_block"
},
"items": {
"0": "minecraft:air",
@@ -12897,8 +12901,10 @@
"877": "minecraft:campfire",
"878": "minecraft:honeycomb",
"879": "minecraft:bee_nest",
- "880": "minecraft:bee_hive",
- "881": "minecraft:honey_bottle"
+ "880": "minecraft:beehive",
+ "881": "minecraft:honey_bottle",
+ "882": "minecraft:honey_block",
+ "883": "minecraft:honeycomb_block"
},
"sounds": [
"ambient.cave",
@@ -13202,6 +13208,12 @@
"entity.guardian.hurt",
"entity.guardian.hurt_land",
"item.hoe.till",
+ "block.honey_block.break",
+ "block.honey_block.fall",
+ "block.honey_block.hit",
+ "block.honey_block.place",
+ "block.honey_block.slide",
+ "block.honey_block.step",
"item.honey_bottle.drink",
"entity.horse.ambient",
"entity.horse.angry",
@@ -13245,8 +13257,10 @@
"block.iron_door.close",
"block.iron_door.open",
"entity.iron_golem.attack",
+ "entity.iron_golem.damage",
"entity.iron_golem.death",
"entity.iron_golem.hurt",
+ "entity.iron_golem.repair",
"entity.iron_golem.step",
"block.iron_trapdoor.close",
"block.iron_trapdoor.open",
@@ -13367,10 +13381,8 @@
"entity.parrot.imitate.husk",
"entity.parrot.imitate.illusioner",
"entity.parrot.imitate.magma_cube",
- "entity.parrot.imitate.panda",
"entity.parrot.imitate.phantom",
"entity.parrot.imitate.pillager",
- "entity.parrot.imitate.polar_bear",
"entity.parrot.imitate.ravager",
"entity.parrot.imitate.shulker",
"entity.parrot.imitate.silverfish",
@@ -13383,9 +13395,7 @@
"entity.parrot.imitate.witch",
"entity.parrot.imitate.wither",
"entity.parrot.imitate.wither_skeleton",
- "entity.parrot.imitate.wolf",
"entity.parrot.imitate.zombie",
- "entity.parrot.imitate.zombie_pigman",
"entity.parrot.imitate.zombie_villager",
"entity.parrot.step",
"entity.phantom.ambient",
diff --git a/jar/pom.xml b/jar/pom.xml
index e87c34399..2312c1a69 100644
--- a/jar/pom.xml
+++ b/jar/pom.xml
@@ -113,4 +113,4 @@
-
\ No newline at end of file
+
diff --git a/sponge-legacy/pom.xml b/sponge-legacy/pom.xml
index 1610c2034..3415c5d33 100644
--- a/sponge-legacy/pom.xml
+++ b/sponge-legacy/pom.xml
@@ -50,4 +50,4 @@
-
\ No newline at end of file
+
diff --git a/sponge/pom.xml b/sponge/pom.xml
index 15385221a..4653db40a 100644
--- a/sponge/pom.xml
+++ b/sponge/pom.xml
@@ -84,4 +84,4 @@
-
\ No newline at end of file
+
diff --git a/velocity/pom.xml b/velocity/pom.xml
index 2d6f90903..6dc467fa3 100644
--- a/velocity/pom.xml
+++ b/velocity/pom.xml
@@ -54,4 +54,4 @@
-
\ No newline at end of file
+