Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse

LiquidBounce Forum

  1. Home
  2. Kotlin/Java
  3. Porting HighJump DAC to script

Porting HighJump DAC to script

Scheduled Pinned Locked Moved Kotlin/Java
3 Posts 2 Posters 384 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • dntdbtD Offline
    dntdbtD Offline
    dntdbt
    wrote on last edited by dntdbt
    #1

    Main code:

    package net.ccbluex.liquidbounce.features.module.modules.movement;
    
    import kotlin.Metadata;
    import kotlin.TypeCastException;
    import kotlin.jvm.internal.Intrinsics;
    import net.ccbluex.liquidbounce.api.IClassProvider;
    import net.ccbluex.liquidbounce.api.minecraft.client.IMinecraft;
    import net.ccbluex.liquidbounce.api.minecraft.client.block.IBlock;
    import net.ccbluex.liquidbounce.api.minecraft.client.entity.IEntityPlayerSP;
    import net.ccbluex.liquidbounce.api.minecraft.util.WBlockPos;
    import net.ccbluex.liquidbounce.event.EventTarget;
    import net.ccbluex.liquidbounce.event.JumpEvent;
    import net.ccbluex.liquidbounce.event.MoveEvent;
    import net.ccbluex.liquidbounce.event.UpdateEvent;
    import net.ccbluex.liquidbounce.features.module.Module;
    import net.ccbluex.liquidbounce.features.module.ModuleCategory;
    import net.ccbluex.liquidbounce.features.module.ModuleInfo;
    import net.ccbluex.liquidbounce.utils.MinecraftInstance;
    import net.ccbluex.liquidbounce.utils.MovementUtils;
    import net.ccbluex.liquidbounce.utils.block.BlockUtils;
    import net.ccbluex.liquidbounce.value.BoolValue;
    import net.ccbluex.liquidbounce.value.FloatValue;
    import net.ccbluex.liquidbounce.value.ListValue;
    import org.jetbrains.annotations.NotNull;
    import org.jetbrains.annotations.Nullable;
    
    @ModuleInfo(name = "HighJump", description = "Allows you to jump higher.", category = ModuleCategory.MOVEMENT)
    @Metadata(mv = {1, 1, 16}, bv = {1, 0, 3}, k = 1, d1 = {"\000>\n\002\030\002\n\002\030\002\n\002\b\002\n\002\030\002\n\000\n\002\030\002\n\000\n\002\030\002\n\000\n\002\020\016\n\002\b\003\n\002\020\002\n\000\n\002\030\002\n\000\n\002\030\002\n\000\n\002\030\002\n\000\b\007\030\0002\0020\001B\005\006\002\020\002J\020\020\r\032\0020\0162\006\020\017\032\0020\020H\007J\022\020\021\032\0020\0162\b\020\017\032\004\030\0010\022H\007J\022\020\023\032\0020\0162\b\020\017\032\004\030\0010\024H\007R\016\020\003\032\0020\004X\004\006\002\n\000R\016\020\005\032\0020\006X\004\006\002\n\000R\016\020\007\032\0020\bX\004\006\002\n\000R\024\020\t\032\0020\n8VX\004\006\006\032\004\b\013\020\f\006\025"}, d2 = {"Lnet/ccbluex/liquidbounce/features/module/modules/movement/HighJump;", "Lnet/ccbluex/liquidbounce/features/module/Module;", "()V", "glassValue", "Lnet/ccbluex/liquidbounce/value/BoolValue;", "heightValue", "Lnet/ccbluex/liquidbounce/value/FloatValue;", "modeValue", "Lnet/ccbluex/liquidbounce/value/ListValue;", "tag", "", "getTag", "()Ljava/lang/String;", "onJump", "", "event", "Lnet/ccbluex/liquidbounce/event/JumpEvent;", "onMove", "Lnet/ccbluex/liquidbounce/event/MoveEvent;", "onUpdate", "Lnet/ccbluex/liquidbounce/event/UpdateEvent;", "LiquidBounce"})
    public final class HighJump extends Module {
      private final FloatValue heightValue = new FloatValue("Height", 2.0F, 1.1F, 5.0F);
      
      private final ListValue modeValue = new ListValue("Mode", new String[] { "Vanilla", "Damage", "AACv3", "DAC", "Mineplex" }, "Vanilla");
      
      private final BoolValue glassValue = new BoolValue("OnlyGlassPane", false);
      
      @EventTarget
      public final void onUpdate(@Nullable UpdateEvent event) {
        if (access$getMc$p$s1046033730().getThePlayer() == null)
          Intrinsics.throwNpe(); 
        IEntityPlayerSP thePlayer = access$getMc$p$s1046033730().getThePlayer();
        if (((Boolean)this.glassValue.get()).booleanValue()) {
          WBlockPos wBlockPos = new WBlockPos(thePlayer.getPosX(), thePlayer.getPosY(), thePlayer.getPosZ());
          IClassProvider iClassProvider = access$getClassProvider$p$s1046033730();
          int $i$f$getBlock = 0;
          BlockUtils.access$getMc$p$s1046033730().getTheWorld().getBlockState(wBlockPos);
          IBlock iBlock = (BlockUtils.access$getMc$p$s1046033730().getTheWorld() != null && BlockUtils.access$getMc$p$s1046033730().getTheWorld().getBlockState(wBlockPos) != null) ? BlockUtils.access$getMc$p$s1046033730().getTheWorld().getBlockState(wBlockPos).getBlock() : null;
          if (!iClassProvider.isBlockPane(iBlock))
            return; 
        } 
        String str = (String)this.modeValue.get();
        boolean bool = false;
        if (str == null)
          throw new TypeCastException("null cannot be cast to non-null type java.lang.String"); 
        Intrinsics.checkExpressionValueIsNotNull(str.toLowerCase(), "(this as java.lang.String).toLowerCase()");
        str = str.toLowerCase();
        switch (str.hashCode()) {
          case -1339126929:
            if (str.equals("damage") && thePlayer.getHurtTime() > 0 && thePlayer.getOnGround())
              thePlayer.setMotionY(thePlayer.getMotionY() + (0.42F * ((Number)this.heightValue.get()).floatValue())); 
            break;
          case 92570112:
            if (str.equals("aacv3") && !thePlayer.getOnGround())
              thePlayer.setMotionY(thePlayer.getMotionY() + 0.059D); 
            break;
          case -1362669950:
            if (str.equals("mineplex") && !thePlayer.getOnGround())
              MovementUtils.strafe(0.35F); 
            break;
          case 99206:
            if (str.equals("dac") && !thePlayer.getOnGround())
              thePlayer.setMotionY(thePlayer.getMotionY() + 0.049999D); 
            break;
        } 
      }
      
      @EventTarget
      public final void onMove(@Nullable MoveEvent event) {
        if (access$getMc$p$s1046033730().getThePlayer() != null) {
          IEntityPlayerSP thePlayer = access$getMc$p$s1046033730().getThePlayer();
          if (((Boolean)this.glassValue.get()).booleanValue()) {
            WBlockPos wBlockPos = new WBlockPos(thePlayer.getPosX(), thePlayer.getPosY(), thePlayer.getPosZ());
            IClassProvider iClassProvider = access$getClassProvider$p$s1046033730();
            int $i$f$getBlock = 0;
            BlockUtils.access$getMc$p$s1046033730().getTheWorld().getBlockState(wBlockPos);
            IBlock iBlock = (BlockUtils.access$getMc$p$s1046033730().getTheWorld() != null && BlockUtils.access$getMc$p$s1046033730().getTheWorld().getBlockState(wBlockPos) != null) ? BlockUtils.access$getMc$p$s1046033730().getTheWorld().getBlockState(wBlockPos).getBlock() : null;
            if (!iClassProvider.isBlockPane(iBlock))
              return; 
          } 
          if (!thePlayer.getOnGround()) {
            String str1 = (String)this.modeValue.get(), str2 = "mineplex";
            boolean bool = false;
            if (str1 == null)
              throw new TypeCastException("null cannot be cast to non-null type java.lang.String"); 
            Intrinsics.checkExpressionValueIsNotNull(str1.toLowerCase(), "(this as java.lang.String).toLowerCase()");
            String str3 = str1.toLowerCase();
            if (Intrinsics.areEqual(str2, str3))
              thePlayer.setMotionY(thePlayer.getMotionY() + ((thePlayer.getFallDistance() == 0.0F) ? 0.0499D : 0.05D)); 
          } 
          return;
        } 
        access$getMc$p$s1046033730().getThePlayer();
      }
      
      @EventTarget
      public final void onJump(@NotNull JumpEvent event) {
        Intrinsics.checkParameterIsNotNull(event, "event");
        if (access$getMc$p$s1046033730().getThePlayer() != null) {
          IEntityPlayerSP thePlayer = access$getMc$p$s1046033730().getThePlayer();
          if (((Boolean)this.glassValue.get()).booleanValue()) {
            WBlockPos wBlockPos = new WBlockPos(thePlayer.getPosX(), thePlayer.getPosY(), thePlayer.getPosZ());
            IClassProvider iClassProvider = access$getClassProvider$p$s1046033730();
            int $i$f$getBlock = 0;
            BlockUtils.access$getMc$p$s1046033730().getTheWorld().getBlockState(wBlockPos);
            IBlock iBlock = (BlockUtils.access$getMc$p$s1046033730().getTheWorld() != null && BlockUtils.access$getMc$p$s1046033730().getTheWorld().getBlockState(wBlockPos) != null) ? BlockUtils.access$getMc$p$s1046033730().getTheWorld().getBlockState(wBlockPos).getBlock() : null;
            if (!iClassProvider.isBlockPane(iBlock))
              return; 
          } 
          String str = (String)this.modeValue.get();
          boolean bool = false;
          if (str == null)
            throw new TypeCastException("null cannot be cast to non-null type java.lang.String"); 
          Intrinsics.checkExpressionValueIsNotNull(str.toLowerCase(), "(this as java.lang.String).toLowerCase()");
          str = str.toLowerCase();
          switch (str.hashCode()) {
            case -1362669950:
              if (str.equals("mineplex"))
                event.setMotion(0.47F); 
              break;
            case 233102203:
              if (str.equals("vanilla"))
                event.setMotion(event.getMotion() * ((Number)this.heightValue.get()).floatValue()); 
              break;
          } 
          return;
        } 
        access$getMc$p$s1046033730().getThePlayer();
      }
      
      @NotNull
      public String getTag() {
        return (String)this.modeValue.get();
      }
    }
    

    Hello everyone!
    So, the main thing I need is:

          case 99206:
            if (str.equals("dac") && !thePlayer.getOnGround())
              thePlayer.setMotionY(thePlayer.getMotionY() + 0.049999D); 
            break;
    

    I want to recrypt this into .js script

    1 Reply Last reply
    0
    • I Offline
      I Offline
      idk my name
      wrote on last edited by
      #2

      Why did you decompile LB?

      1 Reply Last reply
      0
      • I Offline
        I Offline
        idk my name
        wrote on last edited by
        #3

        Wrote this script from memory using QuickEdit on phone (i mean scriptapi's technology)
        RMB on downloadme -> save link as
        downloadme.js

        1 Reply Last reply
        1
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        About
        • Terms of Service
        • Privacy Policy
        • Status
        • Contact Us
        Downloads
        • Releases
        • Source code
        • License
        Docs
        • Tutorials
        • CustomHUD
        • AutoSettings
        • ScriptAPI
        Community
        • Forum
        • Guilded
        • YouTube
        • Twitter
        • D.Tube
        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups