3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-12-25 15:50:10 +01:00

Add some needed tags

Dieser Commit ist enthalten in:
creeper123123321 2019-05-01 16:37:17 -03:00
Ursprung a4ed1644f3
Commit e1b06d3872
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 0AC57D54786721D1

Datei anzeigen

@ -148,7 +148,7 @@ public class Protocol1_14To1_13_2 extends Protocol {
@Override
public void handle(PacketWrapper wrapper) throws Exception {
int blockTagsSize = wrapper.read(Type.VAR_INT);
wrapper.write(Type.VAR_INT, blockTagsSize + 3); // block tags
wrapper.write(Type.VAR_INT, blockTagsSize + 5); // block tags
for (int i = 0; i < blockTagsSize; i++) {
wrapper.passthrough(Type.STRING);
Integer[] blockIds = wrapper.passthrough(Type.VAR_INT_ARRAY);
@ -169,8 +169,36 @@ public class Protocol1_14To1_13_2 extends Protocol {
wrapper.write(Type.VAR_INT_ARRAY, new Integer[]{
getNewBlockId(150)
});
// Fences and walls tags - used for block connections
wrapper.write(Type.STRING, "minecraft:fences");
wrapper.write(Type.VAR_INT_ARRAY, new Integer[]{
216,
217,
218,
219,
220,
221,
227
});
wrapper.write(Type.STRING, "minecraft:walls");
wrapper.write(Type.VAR_INT_ARRAY, new Integer[]{
245,
246,
247,
248,
249,
250,
251,
252,
253,
254,
255,
256,
257,
258
});
int itemTagsSize = wrapper.read(Type.VAR_INT);
wrapper.write(Type.VAR_INT, itemTagsSize + 1); // item tags
wrapper.write(Type.VAR_INT, itemTagsSize + 2); // item tags
for (int i = 0; i < itemTagsSize; i++) {
wrapper.passthrough(Type.STRING);
Integer[] itemIds = wrapper.passthrough(Type.VAR_INT_ARRAY);
@ -183,6 +211,11 @@ public class Protocol1_14To1_13_2 extends Protocol {
wrapper.write(Type.VAR_INT_ARRAY, new Integer[]{
InventoryPackets.getNewItemId(541)
});
// Arrows tag (used by bow)
wrapper.write(Type.STRING, "minecraft:arrows");
wrapper.write(Type.VAR_INT_ARRAY, new Integer[]{
526, 825, 826
});
int fluidTagsSize = wrapper.passthrough(Type.VAR_INT); // fluid tags
for (int i = 0; i < fluidTagsSize; i++) {
wrapper.passthrough(Type.STRING);