Welcome on MasterOf13FPS! MasterOf13FPS

Register today or sign up if you are already a member and never miss any cool content again :)

Source +1.9 Blocking with ViaMCP

Cosm0

New member
Joined
Sep 22, 2023
Messages
3
Reaction score
0
Points
1
I'm wondering how i can server-side block with ViaMCP while im on 1.8.9 version, is there anything that i need to patch on the client? Using packet wrapper, Protocol1_9To1_8 or smth like that?
 
Java:
@EventLink
public final Listener<EventMotion.Pre> preListener = event -> {
    if (mc.thePlayer.isBlocking() && mc.thePlayer.getHeldItem() != null && mc.thePlayer.getHeldItem().getItem() instanceof ItemSword) {
        PacketWrapper useItem = PacketWrapper.create(29, null, Via.getManager().getConnectionManager().getConnections().iterator().next());
        useItem.write(Type.VAR_INT, 1);
 
        PacketUtil.sendToServer(useItem, Protocol1_8To1_9.class, true, true);
 
        mc.getNetHandler().addToSendQueue(new C08PacketPlayerBlockPlacement(mc.thePlayer.inventory.getCurrentItem()));
    }
};
 
shape1
shape2
shape3
shape4
shape5
shape6
Back
Top