Mirror von
https://github.com/ViaVersion/ViaBackwards.git
synchronisiert 2024-12-27 08:30:10 +01:00
1.16 pre3
Dieser Commit ist enthalten in:
Ursprung
25220621e7
Commit
615cd40cae
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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() {
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren