CCBlueX Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    1. Home
    2. commandblock2
    C
    • Profile
    • Following 1
    • Followers 8
    • Topics 4
    • Posts 136
    • Best 52
    • Controversial 0
    • Groups 1

    commandblock2

    @commandblock2

    115
    Reputation
    601
    Profile views
    136
    Posts
    8
    Followers
    1
    Following
    Joined Last Online

    commandblock2 Unfollow Follow
    Supporter

    Best posts made by commandblock2

    • RE: [Request] Arrow avoidance script (like Enderman)

      @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)

      posted in Requests
      C
      commandblock2
    • RE: [Request] Arrow avoidance script (like Enderman)

      @asd-dsa
      Yes but the challenging part is to make it the blink 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 current setPosition 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 in horizontalSpeed mode). Also left/right variable in that part might not be really left/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.

      posted in Requests
      C
      commandblock2
    • 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

      posted in Requests
      C
      commandblock2
    • 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

      posted in Requests
      C
      commandblock2
    • RE: BlockBBEvent in scripts?

      @idk-my-name
      Indeed there is no onBlockBB 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 and Java.extend.
      Hint:

      Java.extend(Listenable, Consumer, {
          handleEvents: function() { return true},
          accept: function(e) {
      
          }
      })
      

      and this.

      posted in General
      C
      commandblock2
    • RE: How to tell a module is on or off?

      @chodeman
      What I have been trying to do is to change

      ScreenShotHelper.saveScreenshot(this.mcDataDir, this.displayWidth, this.displayHeight, this.framebufferMc)
      

      to js.

      Since it is in net/minecraft/client/Minecraft.java, the type of this is Minecraft (aka net.minecraft.client.Minecraft). And the instance of Minecraft is exposed as mc in scriptAPI.
      So we change all this to mc.
      But framebufferMc is not public so you cannot access it from a script.
      So we accessing a private variable using reflection.
      However the name of framebufferMc is not framebufferMc.
      See about obfuscation.
      You will have to use the Searge name(field_147124_at) to access variable and functions.
      The file mcp-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.

      posted in Scripts
      C
      commandblock2
    • 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.

      posted in Requests
      C
      commandblock2
    • RE: BlockBBEvent in scripts?

      @idk-my-name
      What Java.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 using Java.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 is Event.

      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, the Consumer here is a Consumer<?>, not Consumer<BlockBBEvent> which means the accepct() takes an java.lang.Object, and it will register a Listener that listens to any event that is an java.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
      
      posted in General
      C
      commandblock2
    • RE: mc.thePlayer is undefined

      @cancernameu
      Here on my machine

      mc.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

      posted in ScriptAPI
      C
      commandblock2
    • RE: [Help]TeleportAura.kt

      This is commandblock222 infiniteaura or rechaura.kt
      I want to use it But I won't use java to kotlin want to rewrite this crap and port to cross_version (also 1 more feature to phase through wall)
      Who can help me convert this KT file-_- refactor it
      [InfiniteAura or reachaura]https://wws.lanzous.com/iOk2wgm9l4h
      InfiniteAura or reachaura
      Hey ↑ Link

      xDDDDDDDD

      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)
      posted in Kotlin/Java
      C
      commandblock2

    Latest posts made by commandblock2

    • RE: how do i use lb on mccedntral without getting javaSOCKET RESET

      @mems necro and install gentoo idk

      posted in General Discussion
      C
      commandblock2
    • RE: Alipost meme

      @ali00035
      install gentoo lmao, as you wished

      posted in Off-Topic
      C
      commandblock2
    • 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

      posted in Scripts
      C
      commandblock2
    • 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 this

      case "C03 Cancel":
          if(e.getPacket() instanceof C02PacketUseEntity &&
              e.getPacket().getAction() == C02PacketUseEntity.Action.INTERACT_AT) {
      // INTERACT_AT or INTERACT or idk
      	    e.cancelEvent();
      
      posted in General Discussion
      C
      commandblock2
    • 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

      posted in General Discussion
      C
      commandblock2
    • 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

      posted in Scripts
      C
      commandblock2
    • 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

      posted in Off-Topic
      C
      commandblock2
    • RE: Config for Killaura

      @lol_-i_know_that_you_see_this
      No wonder, I guess the this.rotationYaw should be smt like RotationManager.currentRotation or RotationManager.serverRotation's yaw

      posted in Configs
      C
      commandblock2
    • RE: [Tutorial]How to debug your scripts in IntelliJ IDEA

      Intellij idea Ultimate only

      posted in Scripts
      C
      commandblock2
    • RE: Config for Killaura

      @lol_-i_know_that_you_see_this
      I was saying the Atom One Dark Theme. But yes, white theme sometimes hurt eyes.

      posted in Configs
      C
      commandblock2