hi I need help
-
So im trying to send a packet in scriptapi without triggering the packet event, but seems like there's no function to do this. Anyway to do this?
-
So im trying to send a packet in scriptapi without triggering the packet event, but seems like there's no function to do this. Anyway to do this?
-
So im trying to send a packet in scriptapi without triggering the packet event, but seems like there's no function to do this. Anyway to do this?
@chocopiexd said in hi I need help:
So im trying to send a packet in scriptapi without triggering the packet event, but seems like there's no function to do this. Anyway to do this?
why
-
@czechhek said in hi I need help:
@chocopiexd sendPacket() with Core
is there any other way cuz I don't really like using core
-
@czechhek said in hi I need help:
@chocopiexd sendPacket() with Core
is there any other way cuz I don't really like using core
-
@czechhek said in hi I need help:
@chocopiexd L
as if core wasn't open src
I guess skidding is the only way
-
@chocopiexd you can try to "mark" the packet
example:
NoEvent=true;
Send some Packets
NoEvent=false;
on Packet event
if (NoEvent) return; -
So im trying to send a packet in scriptapi without triggering the packet event, but seems like there's no function to do this. Anyway to do this?
@chocopiexd mc.thePlayer.sendQueue.addToSendQueue(epic packet);
-
@chocopiexd mc.thePlayer.sendQueue.addToSendQueue(epic packet);
@skiddermaster412 said in hi I need help:
@chocopiexd mc.thePlayer.sendQueue.addToSendQueue(epic packet);
this triggers packet event
-
@skiddermaster412 said in hi I need help:
@chocopiexd mc.thePlayer.sendQueue.addToSendQueue(epic packet);
this triggers packet event
@chocopiexd so you are trying to send a packet in packet event?
idk if this worksfunction sendPacket(packet) { var Class = Java.type("java.lang.Class"); Object.defineProperty(Array.prototype, "find", { value: function (func, returnIndex) { for (i in this) if (func(this[i], i, this)) return returnIndex ? +i : this[i]; return returnIndex ? -1 : null; } }); function getMethod(clazz, methodName) ((_method = Java.from((clazz instanceof Class ? clazz : clazz.class).getDeclaredMethods()).find(function (m) m.getName() == methodName)) && _method.setAccessible(true), _method); function getField(clazz, fieldName) ((_field = getFields(clazz instanceof Class ? clazz : clazz.class).find(function (f) f.getName() == fieldName)) && _field.setAccessible(true), _field); function getFields(clazz) {_fields = Java.from((clazz = clazz instanceof Class ? clazz : clazz.class).getDeclaredFields());while (clazz = clazz.superclass) _fields = _fields.concat(Java.from(clazz.getDeclaredFields()));return _fields;} var networkManager = mc.getNetHandler().getNetworkManager(); var flushOutboundQueueMethod = getMethod(NetworkManager, "func_150733_h") var dispatchPacketMethod = getMethod(NetworkManager, "func_150732_b"); var readWriteLockField = getField(NetworkManager, "field_181680_j"); var outboundPacketsQueueField = getField(NetworkManager, "field_150745_j"); if (networkManager.isChannelOpen()) { flushOutboundQueueMethod.invoke(networkManager); dispatchPacketMethod.invoke(networkManager, packet, null); } else { readWriteLockField.get(networkManager).writeLock().lock(); try { outboundPackets = outboundPacketsQueueField.get(networkManager); outboundPackets.add(new NetworkManager.InboundHandlerTuplePacketListener(packet, null)); outboundPacketsQueueField.set(networkManager, _outboundPackets); } finally { readWriteLockField.get(networkManager).writeLock().unlock(); } } }skidded from core
-
@chocopiexd so you are trying to send a packet in packet event?
idk if this worksfunction sendPacket(packet) { var Class = Java.type("java.lang.Class"); Object.defineProperty(Array.prototype, "find", { value: function (func, returnIndex) { for (i in this) if (func(this[i], i, this)) return returnIndex ? +i : this[i]; return returnIndex ? -1 : null; } }); function getMethod(clazz, methodName) ((_method = Java.from((clazz instanceof Class ? clazz : clazz.class).getDeclaredMethods()).find(function (m) m.getName() == methodName)) && _method.setAccessible(true), _method); function getField(clazz, fieldName) ((_field = getFields(clazz instanceof Class ? clazz : clazz.class).find(function (f) f.getName() == fieldName)) && _field.setAccessible(true), _field); function getFields(clazz) {_fields = Java.from((clazz = clazz instanceof Class ? clazz : clazz.class).getDeclaredFields());while (clazz = clazz.superclass) _fields = _fields.concat(Java.from(clazz.getDeclaredFields()));return _fields;} var networkManager = mc.getNetHandler().getNetworkManager(); var flushOutboundQueueMethod = getMethod(NetworkManager, "func_150733_h") var dispatchPacketMethod = getMethod(NetworkManager, "func_150732_b"); var readWriteLockField = getField(NetworkManager, "field_181680_j"); var outboundPacketsQueueField = getField(NetworkManager, "field_150745_j"); if (networkManager.isChannelOpen()) { flushOutboundQueueMethod.invoke(networkManager); dispatchPacketMethod.invoke(networkManager, packet, null); } else { readWriteLockField.get(networkManager).writeLock().lock(); try { outboundPackets = outboundPacketsQueueField.get(networkManager); outboundPackets.add(new NetworkManager.InboundHandlerTuplePacketListener(packet, null)); outboundPacketsQueueField.set(networkManager, _outboundPackets); } finally { readWriteLockField.get(networkManager).writeLock().unlock(); } } }skidded from core
@skiddermaster412 said in hi I need help:
@chocopiexd so you are trying to send a packet in packet event?
idk if this worksfunction sendPacket(packet) { var Class = Java.type("java.lang.Class"); Object.defineProperty(Array.prototype, "find", { value: function (func, returnIndex) { for (i in this) if (func(this[i], i, this)) return returnIndex ? +i : this[i]; return returnIndex ? -1 : null; } }); function getMethod(clazz, methodName) ((_method = Java.from((clazz instanceof Class ? clazz : clazz.class).getDeclaredMethods()).find(function (m) m.getName() == methodName)) && _method.setAccessible(true), _method); function getField(clazz, fieldName) ((_field = getFields(clazz instanceof Class ? clazz : clazz.class).find(function (f) f.getName() == fieldName)) && _field.setAccessible(true), _field); function getFields(clazz) {_fields = Java.from((clazz = clazz instanceof Class ? clazz : clazz.class).getDeclaredFields());while (clazz = clazz.superclass) _fields = _fields.concat(Java.from(clazz.getDeclaredFields()));return _fields;} var networkManager = mc.getNetHandler().getNetworkManager(); var flushOutboundQueueMethod = getMethod(NetworkManager, "func_150733_h") var dispatchPacketMethod = getMethod(NetworkManager, "func_150732_b"); var readWriteLockField = getField(NetworkManager, "field_181680_j"); var outboundPacketsQueueField = getField(NetworkManager, "field_150745_j"); if (networkManager.isChannelOpen()) { flushOutboundQueueMethod.invoke(networkManager); dispatchPacketMethod.invoke(networkManager, packet, null); } else { readWriteLockField.get(networkManager).writeLock().lock(); try { outboundPackets = outboundPacketsQueueField.get(networkManager); outboundPackets.add(new NetworkManager.InboundHandlerTuplePacketListener(packet, null)); outboundPacketsQueueField.set(networkManager, _outboundPackets); } finally { readWriteLockField.get(networkManager).writeLock().unlock(); } } }skidded from core
probably it should work since it's skidded from core
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better đź’—
Register Login