3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-11-04 23:30:24 +01:00
Dieser Commit ist enthalten in:
KennyTV 2020-04-15 17:53:02 +02:00
Ursprung 47e50d035f
Commit b03dfa9951
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 6BE3B555EBC5982B
5 geänderte Dateien mit 13660 neuen und 13629 gelöschten Zeilen

Datei anzeigen

@ -80,7 +80,7 @@ public class ProtocolVersion {
register(v1_15 = new ProtocolVersion(573, "1.15"));
register(v1_15_1 = new ProtocolVersion(575, "1.15.1"));
register(v1_15_2 = new ProtocolVersion(578, "1.15.2"));
register(v1_16 = new ProtocolVersion(711, "1.16"));
register(v1_16 = new ProtocolVersion(712, "1.16"));
register(unknown = new ProtocolVersion(-1, "UNKNOWN"));
}

Datei anzeigen

@ -1,5 +1,6 @@
package us.myles.ViaVersion.protocols.protocol1_16to1_15_2;
import us.myles.ViaVersion.api.PacketWrapper;
import us.myles.ViaVersion.api.Via;
import us.myles.ViaVersion.api.data.UserConnection;
import us.myles.ViaVersion.api.protocol.Protocol;
@ -126,6 +127,40 @@ public class Protocol1_16To1_15_2 extends Protocol {
registerOutgoing(State.PLAY, 0x4C, 0x4D);
registerOutgoing(State.PLAY, 0x4D, 0x4E);
registerOutgoing(State.PLAY, 0x4E, 0x43);
cancelIncoming(State.PLAY, 0x0F); // Generate jisaw
cancelIncoming(State.PLAY, 0x28); // Jigsaw update
registerIncoming(State.PLAY, 0x0F, 0x10);
registerIncoming(State.PLAY, 0x10, 0x11);
registerIncoming(State.PLAY, 0x11, 0x12);
registerIncoming(State.PLAY, 0x12, 0x13);
registerIncoming(State.PLAY, 0x13, 0x14);
registerIncoming(State.PLAY, 0x14, 0x15);
registerIncoming(State.PLAY, 0x15, 0x16);
registerIncoming(State.PLAY, 0x16, 0x17);
registerIncoming(State.PLAY, 0x17, 0x18);
registerIncoming(State.PLAY, 0x18, 0x19);
registerIncoming(State.PLAY, 0x19, 0x1A);
registerIncoming(State.PLAY, 0x1A, 0x1B);
registerIncoming(State.PLAY, 0x1B, 0x1C);
registerIncoming(State.PLAY, 0x1C, 0x1D);
registerIncoming(State.PLAY, 0x1D, 0x1E);
registerIncoming(State.PLAY, 0x1E, 0x1F);
registerIncoming(State.PLAY, 0x1F, 0x20);
registerIncoming(State.PLAY, 0x20, 0x21);
registerIncoming(State.PLAY, 0x21, 0x22);
registerIncoming(State.PLAY, 0x22, 0x23);
registerIncoming(State.PLAY, 0x23, 0x24);
registerIncoming(State.PLAY, 0x24, 0x25);
registerIncoming(State.PLAY, 0x28, 0x29);
registerIncoming(State.PLAY, 0x29, 0x2A);
registerIncoming(State.PLAY, 0x2A, 0x2B);
registerIncoming(State.PLAY, 0x2B, 0x2C);
registerIncoming(State.PLAY, 0x2C, 0x2D);
registerIncoming(State.PLAY, 0x2D, 0x2E);
}
@Override

Datei anzeigen

@ -132,7 +132,7 @@ public class InventoryPackets {
itemRewriter.registerClickWindow(Type.FLAT_VAR_INT_ITEM, 0x09, 0x09);
// Creative Inventory Action
itemRewriter.registerCreativeInvAction(Type.FLAT_VAR_INT_ITEM, 0x26, 0x26);
itemRewriter.registerCreativeInvAction(Type.FLAT_VAR_INT_ITEM, 0x26, 0x27);
}
public static void toClient(Item item) {

Datei anzeigen

@ -4,7 +4,6 @@ import com.github.steveice10.opennbt.tag.builtin.CompoundTag;
import com.github.steveice10.opennbt.tag.builtin.IntArrayTag;
import com.github.steveice10.opennbt.tag.builtin.StringTag;
import com.github.steveice10.opennbt.tag.builtin.Tag;
import us.myles.ViaVersion.api.PacketWrapper;
import us.myles.ViaVersion.api.minecraft.chunks.Chunk;
import us.myles.ViaVersion.api.minecraft.chunks.ChunkSection;
import us.myles.ViaVersion.api.protocol.Protocol;
@ -92,14 +91,6 @@ public class WorldPackets {
// Spawn Particle
blockRewriter.registerSpawnParticle(Type.DOUBLE, 0x24, 0x24, 3, 23, 32,
WorldPackets::getNewParticleId, InventoryPackets::toClient, Type.FLAT_VAR_INT_ITEM);
// Jigsaw
protocol.registerIncoming(State.PLAY, 0x27, 0x27, new PacketRemapper() {
@Override
public void registerMap() {
handler(PacketWrapper::cancel); //TODO possible to translate?
}
});
}
public static int getNewParticleId(int id) {