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. BlockAnimation(also can make sword float)

BlockAnimation(also can make sword float)

Scheduled Pinned Locked Moved Kotlin/Java
35 Posts 12 Posters 7.6k 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.
  • RafayR Rafay

    @qwq-liulihaocai and how the hell am i suppose to use this as it doesnt come in lb

    qwq LiulihaocaiQ Offline
    qwq LiulihaocaiQ Offline
    qwq Liulihaocai
    wrote on last edited by
    #19

    @rafay just make a custom lb

    1 Reply Last reply
    0
    • qwq LiulihaocaiQ qwq Liulihaocai

      @wangtian297 如果你是国人就说中文awa
      i cant understand your english 😞

      W Offline
      W Offline
      wangtian297
      wrote on last edited by
      #20

      @qwq-liulihaocai said in BlockAnimation(also can make sword float):

      i cant understand your english 😞

      额,我是国人,不过你确定你给的码子是可以让拿在手中的物品浮在空中的?

      qwq LiulihaocaiQ 1 Reply Last reply
      0
      • W wangtian297

        @qwq-liulihaocai said in BlockAnimation(also can make sword float):

        i cant understand your english 😞

        额,我是国人,不过你确定你给的码子是可以让拿在手中的物品浮在空中的?

        qwq LiulihaocaiQ Offline
        qwq LiulihaocaiQ Offline
        qwq Liulihaocai
        wrote on last edited by qwq Liulihaocai
        #21

        @wangtian297 我确定,我的魔改水影FDPClient用的是一样的码子

        W 4 Replies Last reply
        0
        • qwq LiulihaocaiQ qwq Liulihaocai

          @wangtian297 我确定,我的魔改水影FDPClient用的是一样的码子

          W Offline
          W Offline
          wangtian297
          wrote on last edited by
          #22

          @qwq-liulihaocai 我的MixinItemRender里面就有这个码子,你这是格挡的pos把

          1 Reply Last reply
          0
          • qwq LiulihaocaiQ qwq Liulihaocai

            @wangtian297 我确定,我的魔改水影FDPClient用的是一样的码子

            W Offline
            W Offline
            wangtian297
            wrote on last edited by
            #23

            @qwq-liulihaocai 你是把这个码子加在哪里的?

            1 Reply Last reply
            0
            • qwq LiulihaocaiQ qwq Liulihaocai

              @wangtian297 我确定,我的魔改水影FDPClient用的是一样的码子

              W Offline
              W Offline
              wangtian297
              wrote on last edited by
              #24

              @qwq-liulihaocai 1

              1 Reply Last reply
              0
              • qwq LiulihaocaiQ qwq Liulihaocai

                @wangtian297 我确定,我的魔改水影FDPClient用的是一样的码子

                W Offline
                W Offline
                wangtian297
                wrote on last edited by
                #25

                @qwq-liulihaocai 话说,你知道怎么让手中的物品浮空,但是 thePlayer的手不浮空吗,那样看着好怪,

                qwq LiulihaocaiQ 1 Reply Last reply
                0
                • qwq LiulihaocaiQ qwq Liulihaocai

                  You can use freely in your custom lb xd
                  by Liulihaocai (Method17)
                  skid some animations from Animation-No-Cross(a custom LB)
                  Code
                  module

                  package net.ccbluex.liquidbounce.features.module.modules.render
                  
                  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.value.FloatValue
                  import net.ccbluex.liquidbounce.value.ListValue
                  
                  @ModuleInfo(name = "Animations", description = "Render sword while blocking", category = ModuleCategory.RENDER)
                  class Animations : Module() {
                      val presetValue = ListValue(
                          "Preset", arrayOf(
                              "Akrien", "Avatar", "ETB", "Exhibition", "Push", "Reverse",
                              "Shield", "SigmaNew", "SigmaOld", "Slide", "SlideDown", "Swong", "VisionFX"
                          ),
                          "SlideDown"
                      )
                  
                      var translateX = FloatValue("TranslateX", 0.0f, 0.0f, 1.5f)
                      var translateY = FloatValue("TranslateY", 0.0f, 0.0f, 0.5f)
                      var translateZ = FloatValue("TranslateZ", 0.0f, 0.0f, -2.0f)
                      val itemPosX = FloatValue("ItemPosX", 0.56F, -1.0F, 1.0F)
                      val itemPosY = FloatValue("ItemPosY", -0.52F, -1.0F, 1.0F)
                      val itemPosZ = FloatValue("ItemPosZ", -0.71999997F, -1.0F, 1.0F)
                      var itemScale = FloatValue("ItemScale", 0.4f, 0.0f, 2.0f)
                  
                      override val tag: String
                          get() = presetValue.get()
                  }
                  

                  mixin(MixinItemRenderer)

                  
                      private Animations animations;
                  
                      @Overwrite
                      private void transformFirstPersonItem(float equipProgress, float swingProgress) {
                          doItemRenderGLTranslate();
                          GlStateManager.translate(0.0F, equipProgress * -0.6F, 0.0F);
                          GlStateManager.rotate(45.0F, 0.0F, 1.0F, 0.0F);
                          float f = MathHelper.sin(swingProgress * swingProgress * 3.1415927F);
                          float f1 = MathHelper.sin(MathHelper.sqrt_float(swingProgress) * 3.1415927F);
                          GlStateManager.rotate(f * -20.0F, 0.0F, 1.0F, 0.0F);
                          GlStateManager.rotate(f1 * -20.0F, 0.0F, 0.0F, 1.0F);
                          GlStateManager.rotate(f1 * -80.0F, 1.0F, 0.0F, 0.0F);
                          doItemRenderGLScale();
                      }
                  
                      @Overwrite
                      public void renderItemInFirstPerson(float partialTicks) {
                          if(animations==null){
                              animations = (Animations) LiquidBounce.moduleManager.getModule(Animations.class);
                          }
                  
                          float f = 1.0F - (this.prevEquippedProgress + (this.equippedProgress - this.prevEquippedProgress) * partialTicks);
                          AbstractClientPlayer abstractclientplayer = this.mc.thePlayer;
                          float f1 = abstractclientplayer.getSwingProgress(partialTicks);
                          float f2 = abstractclientplayer.prevRotationPitch + (abstractclientplayer.rotationPitch - abstractclientplayer.prevRotationPitch) * partialTicks;
                          float f3 = abstractclientplayer.prevRotationYaw + (abstractclientplayer.rotationYaw - abstractclientplayer.prevRotationYaw) * partialTicks;
                          this.rotateArroundXAndY(f2, f3);
                          this.setLightMapFromPlayer(abstractclientplayer);
                          this.rotateWithPlayerRotations((EntityPlayerSP) abstractclientplayer, partialTicks);
                          GlStateManager.enableRescaleNormal();
                          GlStateManager.pushMatrix();
                  
                          if(this.itemToRender != null) {
                              final KillAura killAura = (KillAura) LiquidBounce.moduleManager.getModule(KillAura.class);
                  
                              if(this.itemToRender.getItem() instanceof net.minecraft.item.ItemMap) {
                                  this.renderItemMap(abstractclientplayer, f2, f, f1);
                              } else if (abstractclientplayer.getItemInUseCount() > 0 || (itemToRender.getItem() instanceof ItemSword && killAura.getBlockingStatus())) {
                                  EnumAction enumaction = killAura.getBlockingStatus() ? EnumAction.BLOCK : this.itemToRender.getItemUseAction();
                                  switch(enumaction) {
                                      case NONE:
                                          this.transformFirstPersonItem(f, 0.0F);
                                          break;
                                      case EAT:
                                      case DRINK:
                                          this.performDrinking(abstractclientplayer, partialTicks);
                                          this.transformFirstPersonItem(f, f1);
                                          break;
                                      case BLOCK:
                                          if(animations.getState()){
                                              GL11.glTranslated(animations.getTranslateX().get(), animations.getTranslateY().get(), animations.getTranslateZ().get());
                                              switch (animations.getPresetValue().get()) {
                                                  case "Akrien": {
                                                      transformFirstPersonItem(f1, 0.0F);
                                                      doBlockTransformations();
                                                      break;
                                                  }
                                                  case "Avatar": {
                                                      avatar(f1);
                                                      doBlockTransformations();
                                                      break;
                                                  }
                                                  case "ETB": {
                                                      etb(f, f1);
                                                      doBlockTransformations();
                                                      break;
                                                  }
                                                  case "Exhibition": {
                                                      transformFirstPersonItem(f, 0.83F);
                                                      float f4 = MathHelper.sin(MathHelper.sqrt_float(f1) * 3.83F);
                                                      GlStateManager.translate(-0.5F, 0.2F, 0.2F);
                                                      GlStateManager.rotate(-f4 * 0.0F, 0.0F, 0.0F, 0.0F);
                                                      GlStateManager.rotate(-f4 * 43.0F, 58.0F, 23.0F, 45.0F);
                                                      doBlockTransformations();
                                                      break;
                                                  }
                                                  case "Push": {
                                                      push(f1);
                                                      doBlockTransformations();
                                                      break;
                                                  }
                                                  case "Reverse": {
                                                      transformFirstPersonItem(f1, f1);
                                                      doBlockTransformations();
                                                      GlStateManager.rotate(0.0F, 1.0F, 0.0F, 0.0F);
                                                      break;
                                                  }
                                                  case "Shield": {
                                                      jello(f1);
                                                      doBlockTransformations();
                                                      break;
                                                  }
                                                  case "SigmaNew": {
                                                      sigmaNew(0.2F, f1);
                                                      doBlockTransformations();
                                                      break;
                                                  }
                                                  case "SigmaOld": {
                                                      sigmaOld(f);
                                                      float var15 = MathHelper.sin(MathHelper.sqrt_float(f1) * 3.1415927F);
                                                      GlStateManager.rotate(-var15 * 55.0F / 2.0F, -8.0F, -0.0F, 9.0F);
                                                      GlStateManager.rotate(-var15 * 45.0F, 1.0F, var15 / 2.0F, -0.0F);
                                                      doBlockTransformations();
                                                      GL11.glTranslated(1.2D, 0.3D, 0.5D);
                                                      GL11.glTranslatef(-1.0F, mc.thePlayer.isSneaking() ? -0.1F : -0.2F, 0.2F);
                                                      GlStateManager.scale(1.2F, 1.2F, 1.2F);
                                                      break;
                                                  }
                                                  case "Slide": {
                                                      slide(f1);
                                                      doBlockTransformations();
                                                      break;
                                                  }
                                                  case "SlideDown": {
                                                      transformFirstPersonItem(0.2F, f1);
                                                      doBlockTransformations();
                                                      break;
                                                  }
                                                  case "Swong": {
                                                      transformFirstPersonItem(f / 2.0F, 0.0F);
                                                      GlStateManager.rotate(-MathHelper.sin(MathHelper.sqrt_float(mc.thePlayer.getSwingProgress(partialTicks)) * 3.1415927F) * 40.0F / 2.0F, MathHelper.sqrt_float(mc.thePlayer.getSwingProgress(partialTicks)) / 2.0F, -0.0F, 9.0F);
                                                      GlStateManager.rotate(-MathHelper.sqrt_float(mc.thePlayer.getSwingProgress(partialTicks)) * 30.0F, 1.0F, MathHelper.sqrt_float(mc.thePlayer.getSwingProgress(partialTicks)) / 2.0F, -0.0F);
                                                      doBlockTransformations();
                                                      break;
                                                  }
                                                  case "VisionFX": {
                                                      continuity(f1);
                                                      doBlockTransformations();
                                                      break;
                                                  }
                                              }
                                          }else{
                                              this.transformFirstPersonItem(f + 0.1F, f1);
                                              this.doBlockTransformations();
                                              GlStateManager.translate(-0.5F, 0.2F, 0.0F);
                                          }
                                          break;
                                      case BOW:
                                          this.transformFirstPersonItem(f, f1);
                                          this.doBowTransformations(partialTicks, abstractclientplayer);
                                  }
                              }else{
                                  if (!LiquidBounce.moduleManager.getModule(SwingAnimation.class).getState())
                                      this.doItemUsedTransformations(f1);
                                  this.transformFirstPersonItem(f, f1);
                              }
                              this.renderItem(abstractclientplayer, this.itemToRender, ItemCameraTransforms.TransformType.FIRST_PERSON);
                          }else if(!abstractclientplayer.isInvisible()) {
                              this.renderPlayerArm(abstractclientplayer, f, f1);
                          }
                  
                          GlStateManager.popMatrix();
                          GlStateManager.disableRescaleNormal();
                          RenderHelper.disableStandardItemLighting();
                      }
                  
                      private void doItemRenderGLTranslate(){
                          if(animations.getState()) {
                              GlStateManager.translate(animations.getItemPosX().get(), animations.getItemPosY().get(), animations.getItemPosZ().get());
                          }else{
                              GlStateManager.translate(0.56F, -0.52F, -0.71999997F);
                          }
                      }
                  
                      private void doItemRenderGLScale(){
                          if(animations.getState()) {
                              GlStateManager.scale(animations.getItemScale().get(), animations.getItemScale().get(), animations.getItemScale().get());
                          }else{
                              GlStateManager.scale(0.4F, 0.4F, 0.4F);
                          }
                      }
                  
                      private void sigmaOld(float f) {
                          doItemRenderGLTranslate();
                          GlStateManager.translate(0.0F, f * -0.6F, 0.0F);
                          GlStateManager.rotate(45.0F, 0.0F, 1.0F, 0.0F);
                          GlStateManager.rotate(0F, 0.0F, 1.0F, 0.2F);
                          GlStateManager.rotate(0F, 0.2F, 0.1F, 1.0F);
                          GlStateManager.rotate(0F, 1.3F, 0.1F, 0.2F);
                          doItemRenderGLScale();
                      }
                  
                      //methods in LiquidBounce b73 Animation-No-Cross
                      private void avatar(float swingProgress) {
                          doItemRenderGLTranslate();
                          GlStateManager.translate(0.0F, 0.0F, 0.0F);
                          GlStateManager.rotate(45.0F, 0.0F, 1.0F, 0.0F);
                          float f = MathHelper.sin(swingProgress * swingProgress * 3.1415927F);
                          float f2 = MathHelper.sin(MathHelper.sqrt_float(swingProgress) * 3.1415927F);
                          GlStateManager.rotate(f * -20.0F, 0.0F, 1.0F, 0.0F);
                          GlStateManager.rotate(f2 * -20.0F, 0.0F, 0.0F, 1.0F);
                          GlStateManager.rotate(f2 * -40.0F, 1.0F, 0.0F, 0.0F);
                          doItemRenderGLScale();
                      }
                  
                      private void slide(float var9) {
                          doItemRenderGLTranslate();
                          GlStateManager.translate(0.0F, 0.0F, 0.0F);
                          GlStateManager.rotate(45.0F, 0.0F, 1.0F, 0.0F);
                          float var11 = MathHelper.sin(var9 * var9 * 3.1415927F);
                          float var12 = MathHelper.sin(MathHelper.sqrt_float(var9) * 3.1415927F);
                          GlStateManager.rotate(var11 * 0.0F, 0.0F, 1.0F, 0.0F);
                          GlStateManager.rotate(var12 * 0.0F, 0.0F, 0.0F, 1.0F);
                          GlStateManager.rotate(var12 * -40.0F, 1.0F, 0.0F, 0.0F);
                          doItemRenderGLScale();
                      }
                  
                      private void jello(float var12) {
                          doItemRenderGLTranslate();
                          GlStateManager.rotate(48.57F, 0.0F, 0.24F, 0.14F);
                          float var13 = MathHelper.sin(var12 * var12 * 3.1415927F);
                          float var14 = MathHelper.sin(MathHelper.sqrt_float(var12) * 3.1415927F);
                          GlStateManager.rotate(var13 * -35.0F, 0.0F, 0.0F, 0.0F);
                          GlStateManager.rotate(var14 * 0.0F, 0.0F, 0.0F, 0.0F);
                          GlStateManager.rotate(var14 * 20.0F, 1.0F, 1.0F, 1.0F);
                          doItemRenderGLScale();
                      }
                  
                      private void continuity(float var10) {
                          doItemRenderGLTranslate();
                          GlStateManager.translate(0.0F, 0.0F, 0.0F);
                          GlStateManager.rotate(45.0F, 0.0F, 1.0F, 0.0F);
                          float var12 = -MathHelper.sin(var10 * var10 * 3.1415927F);
                          float var13 = MathHelper.cos(MathHelper.sqrt_float(var10) * 3.1415927F);
                          float var14 = MathHelper.abs(MathHelper.sqrt_float((float) 0.1) * 3.1415927F);
                          GlStateManager.rotate(var12 * var14 * 30.0F, 0.0F, 1.0F, 0.0F);
                          GlStateManager.rotate(var13 * 0.0F, 0.0F, 0.0F, 1.0F);
                          GlStateManager.rotate(var13 * 20.0F, 1.0F, 0.0F, 0.0F);
                          doItemRenderGLScale();
                      }
                  
                      public void sigmaNew(float var22, float var23) {
                          doItemRenderGLTranslate();
                          GlStateManager.rotate(45.0F, 0.0F, 1.0F, 0.0F);
                          float var24 = MathHelper.sin(var23 * MathHelper.sqrt_float(var22) * 3.1415927F);
                          float var25 = MathHelper.abs(MathHelper.sqrt_double(var22) * 3.1415927F);
                          GlStateManager.rotate(var24 * 20.0F * var25, 0.0F, 1.0F, 1.0F);
                          doItemRenderGLScale();
                      }
                  
                      private void etb(float equipProgress, float swingProgress) {
                          doItemRenderGLTranslate();
                          GlStateManager.translate(0.0F, equipProgress * -0.6F, 0.0F);
                          GlStateManager.rotate(45.0F, 0.0F, 1.0F, 0.0F);
                          float var3 = MathHelper.sin(swingProgress * swingProgress * 3.1415927F);
                          float var4 = MathHelper.sin(MathHelper.sqrt_float(swingProgress) * 3.1415927F);
                          GlStateManager.rotate(var3 * -34.0F, 0.0F, 1.0F, 0.2F);
                          GlStateManager.rotate(var4 * -20.7F, 0.2F, 0.1F, 1.0F);
                          GlStateManager.rotate(var4 * -68.6F, 1.3F, 0.1F, 0.2F);
                          doItemRenderGLScale();
                      }
                  
                      private void push(float idc) {
                          doItemRenderGLTranslate();
                          GlStateManager.translate(0.0F, (float) 0.1 * -0.6F, 0.0F);
                          GlStateManager.rotate(45.0F, 0.0F, 1.0F, 0.0F);
                          float var3 = MathHelper.sin(idc * idc * 3.1415927F);
                          float var4 = MathHelper.sin(MathHelper.sqrt_float(idc) * 3.1415927F);
                          GlStateManager.rotate(var3 * -10.0F, 1.0F, 1.0F, 1.0F);
                          GlStateManager.rotate(var4 * -10.0F, 1.0F, 1.0F, 1.0F);
                          GlStateManager.rotate(var4 * -10.0F, 1.0F, 1.0F, 1.0F);
                          doItemRenderGLScale();
                      }
                  
                  WaterFlexW Offline
                  WaterFlexW Offline
                  WaterFlex
                  wrote on last edited by
                  #26

                  @qwq-liulihaocai How to install this

                  exit scammedE 1 Reply Last reply
                  0
                  • WaterFlexW WaterFlex

                    @qwq-liulihaocai How to install this

                    exit scammedE Offline
                    exit scammedE Offline
                    exit scammed
                    wrote on last edited by exit scammed
                    #27

                    @waterflex first get an lb src (not the nextgen)
                    then add a module and register that mixin
                    finally build it

                    1

                    WaterFlexW 1 Reply Last reply
                    0
                    • exit scammedE exit scammed

                      @waterflex first get an lb src (not the nextgen)
                      then add a module and register that mixin
                      finally build it

                      1

                      WaterFlexW Offline
                      WaterFlexW Offline
                      WaterFlex
                      wrote on last edited by
                      #28

                      @asutoboki Let's go to the discord, show me how to do it

                      1 Reply Last reply
                      0
                      • W wangtian297

                        @qwq-liulihaocai 话说,你知道怎么让手中的物品浮空,但是 thePlayer的手不浮空吗,那样看着好怪,

                        qwq LiulihaocaiQ Offline
                        qwq LiulihaocaiQ Offline
                        qwq Liulihaocai
                        wrote on last edited by
                        #29

                        @wangtian297 判断下手里的东西是不是空的就行

                        W 3 Replies Last reply
                        0
                        • qwq LiulihaocaiQ qwq Liulihaocai

                          @wangtian297 判断下手里的东西是不是空的就行

                          W Offline
                          W Offline
                          wangtian297
                          wrote on last edited by
                          #30

                          @qwq-liulihaocai Az,给个码子呗

                          1 Reply Last reply
                          0
                          • qwq LiulihaocaiQ qwq Liulihaocai

                            @wangtian297 判断下手里的东西是不是空的就行

                            W Offline
                            W Offline
                            wangtian297
                            wrote on last edited by
                            #31

                            @qwq-liulihaocai
                            判断下手里的东西是不是空 的码子awa

                            1 Reply Last reply
                            0
                            • qwq LiulihaocaiQ qwq Liulihaocai

                              @wangtian297 判断下手里的东西是不是空的就行

                              W Offline
                              W Offline
                              wangtian297
                              wrote on last edited by
                              #32

                              @qwq-liulihaocai 算了,不麻烦腻了,我估计你给的renderer里面也有。我慢慢研究得了

                              1 Reply Last reply
                              0
                              • Y4NDEXY Offline
                                Y4NDEXY Offline
                                Y4NDEX
                                wrote on last edited by
                                #33

                                What line do we paste the mixin code

                                XanderX 1 Reply Last reply
                                0
                                • Y4NDEXY Y4NDEX

                                  What line do we paste the mixin code

                                  XanderX Offline
                                  XanderX Offline
                                  Xander
                                  wrote on last edited by
                                  #34

                                  where do I download the script?

                                  exit scammedE 1 Reply Last reply
                                  0
                                  • XanderX Xander

                                    where do I download the script?

                                    exit scammedE Offline
                                    exit scammedE Offline
                                    exit scammed
                                    wrote on last edited by
                                    #35

                                    @xander 61db2dea-0893-4867-b310-385582a1b591-image.png
                                    Click here for more info

                                    1 Reply Last reply
                                    0
                                    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