@asd-dsa
hmm actually in some cases (when the arrow is heading to the player's head/foot) it has a big possibility of not triggering it (should be able to fix it by checking intersection between 2 bbox).
Iirc it should have a horizontal speed mode, but it is annoying to lock the view.
The code is spaghetti, but I would try to improve it when I have time. (Probably in a few days)
Best posts made by commandblock2
-
RE: [Request] Arrow avoidance script (like Enderman)
-
RE: [Request] Arrow avoidance script (like Enderman)
@asd-dsa
Yes but the challenging part is to make it theblink
way. This is definitely fine and good work.blink
teleport is kind of holding the movement packets and sending them in a instant, but the currentsetPosition
is more like the clip thing (some ac may flag you for speed).
If you want to have it this way you might have to calculate the positions of the position packets in advance (and probably lower the timer(< 1) after dodging the arrow in case the ac flags you for timer).btw we can make the tp direction perpendicular to the velocity of the incoming arrow, and see left/right is closer. (This would be easier than
blink
and already inhorizontalSpeed
mode). Alsoleft
/right
variable in that part might not be reallyleft
/right
, it could be opposite.Anyway the scripts was originally for trolling only, never thought someone would need it but I am happy to see someone actually used it.
Also +1 for the effort. -
RE: [Request] Arrow avoidance script (like Enderman)
@asd-dsa
I see, the version you used is the cross version. The script was designed for none cross version 1.8. Quite surprising it was still working with other mode. If you want to use that you might need to have extra modification since the cross version has some changes in scriptAPI.
Edit: But according to this exception, it seemed to be the one in render3D which should cause the whole script (anymode and the prediction) to break
Edit: nvm I was dumb this exception shouldn't affect might be other exception -
RE: [Request] Arrow avoidance script (like Enderman)
@asd-dsa
it doesn't sound like some problem with your version, I think it's very much probably my fault. Will later look into it -
RE: BlockBBEvent in scripts?
@idk-my-name
Indeed there is noonBlockBB
provided.
Before this someone showed me the matrix fly (rewinside + jump, patched) made by aftery in scriptapi(obf), it would be almost impossible to implement without blockBB. I didn't figure out back then
It took me a long time to finally figured out a way to subscribe to arbitrary event in scriptAPI with reflection andJava.extend
.
Hint:Java.extend(Listenable, Consumer, { handleEvents: function() { return true}, accept: function(e) { } })
and this.
-
RE: How to tell a module is on or off?
@chodeman
What I have been trying to do is to changeScreenShotHelper.saveScreenshot(this.mcDataDir, this.displayWidth, this.displayHeight, this.framebufferMc)
to js.
Since it is in
net/minecraft/client/Minecraft.java
, the type ofthis
isMinecraft
(akanet.minecraft.client.Minecraft
). And the instance ofMinecraft
is exposed asmc
in scriptAPI.
So we change allthis
tomc
.
ButframebufferMc
is not public so you cannot access it from a script.
So we accessing a private variable using reflection.
However the name offramebufferMc
is notframebufferMc
.
See about obfuscation.
You will have to use the Searge name(field_147124_at
) to access variable and functions.
The filemcp-stable_22.srg
have the mappings from MCP name to Searge name.
The reason you can use MCP name to in normal scriptAPI is because they did this.But with Core.lib you don't have to do that anymore.
@CzechHek
THANK YOU BASED HEK. Don't have to look for srg name anymore.
And that should even solved the problem of using script in development environment, going to try it later. -
RE: [Request] Arrow avoidance script (like Enderman)
@asd-dsa
quite weird, works on my machine. But usually in this case you can look into the logs to see if the script is spamming exception. The log should be at .minecraft/logs/latest.log
Idk if it only works on my build.
Edit: the snippet I posted in the last post was only to tell you what the new code is for, still recommended to pull the full script from github. This what has been changed actually. -
RE: BlockBBEvent in scripts?
@idk-my-name
WhatJava.extend()
returns is something that behaves like a type (Forgot what it really is, probably a JSAdaptor or something).
Similar to what you will get from usingJava.type()
.ArrayList = Java.type("java.util.ArrayList") arrayList = new ArrayList()
BBConsumer = Java.extend(Listenable, Consumer, { handleEvents: function() { return true}, accept: function(e) { // onBlockBB here } }) consumer = new BBConsumer() registerListener(consumer) // not registerListener(BBConsumer) /* I am sure there would be a better name for BBConsumer And if you want to use it like a anonymous class in Java you could just read the BlockAnimations.js or better, nashorn document https://github.com/CzechHek/Core/blob/879f36d7e41ccc7868285b0a808866b360f30822/Scripts/BlockAnimations.js#L35 */
Not sure if the type from
Java.extend
would have other unexpected methods that only takes 1 parameters, you might want to check if the parameter's super class isEvent
.Or you could just explicitly specify the
accept
method in it.
method = consumer.class.getMethod("accept", java.lang.Object.class)
Edit:
Nvm, I forgot that this was scriptAPI, theConsumer
here is aConsumer<?>
, notConsumer<BlockBBEvent>
which means theaccepct()
takes anjava.lang.Object
, and it will register a Listener that listens to any event that is anjava.lang.Object
, which probably means all events.'Here is what I did
registry = getField(LiquidBounce.eventManager, "registry").get(LiquidBounce.eventManager) BBs = registry.getOrDefault(BlockBBEvent.class, new ArrayList()) BBs.add(new EventHook(consumer, consumer.class.getMethod("accept", java.lang.Object.class), LiquidBounce.moduleManager.class .getDeclaredMethod("onKey", KeyEvent.class) .getAnnotation(EventTarget.class))) registry[BlockBBEvent.class] = BBs
-
RE: mc.thePlayer is undefined
@cancernameu
Here on my machinemc.thePlayer EntityPlayerSP['commandblock2'/100, l='MpServer', x=539.17, y=4.00, z=-585.11]
If you want to get the class of
mc.thePlayer
mc.thePlayer.class class net.minecraft.client.entity.EntityPlayerSP mc.thePlayer.class.getSimpleName() EntityPlayerSP mc.thePlayer.class.getSimpleName() == "EntityPlayerSP" true typeof mc.thePlayer object
That's probably what you want
EntityPlayerSP = Java.type("net.minecraft.client.entity.EntityPlayerSP") [JavaClass net.minecraft.client.entity.EntityPlayerSP] mc.thePlayer instanceof EntityPlayerSP true
instanceof
can be used for java types, this is basically a nashorn thing.
https://www.oracle.com/technical-resources/articles/java/jf14-nashorn.html -
RE: [Help]TeleportAura.kt
This is commandblock2
22infiniteaura or rechaura.kt
I want to use it But Iwon't use java to kotlinwant to rewrite this crap and port to cross_version (also 1 more feature to phase through wall)
Who can help meconvert this KT file-_-refactor it
[InfiniteAura or reachaura]https://wws.lanzous.com/iOk2wgm9l4h
InfiniteAura or reachaura
Hey ↑ LinkxDDDDDDDD
Jokes aside, I do plan to rewrite this when I have time, but won't rewrite in js. However there are some problems.
- the code is completely shit
- I want to add a customizable pathfinding thing, not only for reachaura, but also for scripting, and the rule of pathfinding could be customized (for example ground only or fly or phase-able ),
- improve the packet counter option. (simply adjust cps when sending too much)
Latest posts made by commandblock2
-
RE: how do i use lb on mccedntral without getting javaSOCKET RESET
@mems necro and install gentoo idk
-
RE: [JS]TeleportAura 0.7(By Mumy)(updated)
@yorik100 is it capable of doing hclip? like the mineplex phase lmao, that would require you to cancel the S08 if you know where exactly the server would send you the S08
-
RE: Verus hitbox
@batata said in Verus hitbox:
case "C03 Cancel":
if(e.getPacket() instanceof C02PacketUseEntity) {
if(mc.thePlayer.ticksExisted % 3 != 0) {
e.cancelEvent();
idk, try thiscase "C03 Cancel": if(e.getPacket() instanceof C02PacketUseEntity && e.getPacket().getAction() == C02PacketUseEntity.Action.INTERACT_AT) { // INTERACT_AT or INTERACT or idk e.cancelEvent();
-
RE: Verus hitbox
@batata
idk if verus will detect if you just cancel the C02 interact packet but not the C08/C07 packet. you won't even need to disable hitbox if that works -
RE: Please help meeee i need a script
@max-0
indeed there is a possibility, but it is likely no one will look into it, but if you can it would be too much to do in the scriptapi and very much likely would have a worse performance, if you just modify the src instead it would be much easier in this case -
RE: please stop using random liquidbounce forks. (also fact of the day 6)
@aftery I can't tell if this is a bait, because I don't know anything specific about it. But I still wonder what it has
-
RE: Config for Killaura
@lol_-i_know_that_you_see_this
No wonder, I guess thethis.rotationYaw
should be smt likeRotationManager.currentRotation
orRotationManager.serverRotation
's yaw -
RE: [Tutorial]How to debug your scripts in IntelliJ IDEA
Intellij idea
Ultimate
only -
RE: Config for Killaura
@lol_-i_know_that_you_see_this
I was saying theAtom One Dark Theme
. But yes, white theme sometimes hurt eyes.