3
0
Mirror von https://github.com/ViaVersion/ViaBackwards.git synchronisiert 2024-12-27 08:30:10 +01:00
Dieser Commit ist enthalten in:
KennyTV 2020-06-10 18:36:00 +02:00
Ursprung 25220621e7
Commit 615cd40cae
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 6BE3B555EBC5982B
2 geänderte Dateien mit 32 neuen und 0 gelöschten Zeilen

Datei anzeigen

@ -162,6 +162,29 @@ public class Protocol1_15_2To1_16 extends BackwardsProtocol<ClientboundPackets1_
new TagRewriter(this, id -> BackwardsMappings.blockMappings.getNewId(id), id -> new TagRewriter(this, id -> BackwardsMappings.blockMappings.getNewId(id), id ->
MappingData.oldToNewItems.inverse().get(id), entityPackets::getOldEntityId).register(ClientboundPackets1_16.TAGS); MappingData.oldToNewItems.inverse().get(id), entityPackets::getOldEntityId).register(ClientboundPackets1_16.TAGS);
registerIncoming(ServerboundPackets1_14.INTERACT_ENTITY, new PacketRemapper() {
@Override
public void registerMap() {
handler(wrapper -> {
wrapper.passthrough(Type.VAR_INT); // Entity Id
int action = wrapper.passthrough(Type.VAR_INT);
if (action == 0 || action == 2) {
if (action == 2) {
// Location
wrapper.passthrough(Type.FLOAT);
wrapper.passthrough(Type.FLOAT);
wrapper.passthrough(Type.FLOAT);
}
wrapper.passthrough(Type.VAR_INT); // Hand
// New boolean: Whether the client is sneaking/pressing shift
wrapper.write(Type.BOOLEAN, false);
}
});
}
});
cancelIncoming(ServerboundPackets1_14.UPDATE_JIGSAW_BLOCK); cancelIncoming(ServerboundPackets1_14.UPDATE_JIGSAW_BLOCK);
} }

Datei anzeigen

@ -91,6 +91,15 @@ public class BlockItemPackets1_16 extends nl.matsv.viabackwards.api.rewriters.It
blockRewriter.registerBlockChange(ClientboundPackets1_16.BLOCK_CHANGE); blockRewriter.registerBlockChange(ClientboundPackets1_16.BLOCK_CHANGE);
blockRewriter.registerMultiBlockChange(ClientboundPackets1_16.MULTI_BLOCK_CHANGE); blockRewriter.registerMultiBlockChange(ClientboundPackets1_16.MULTI_BLOCK_CHANGE);
protocol.registerOutgoing(ClientboundPackets1_16.UPDATE_LIGHT, new PacketRemapper() {
@Override
public void registerMap() {
map(Type.VAR_INT); // x
map(Type.VAR_INT); // y
map(Type.BOOLEAN, Type.NOTHING);
}
});
protocol.registerOutgoing(ClientboundPackets1_16.CHUNK_DATA, new PacketRemapper() { protocol.registerOutgoing(ClientboundPackets1_16.CHUNK_DATA, new PacketRemapper() {
@Override @Override
public void registerMap() { public void registerMap() {