Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Skins
  • Light
  • Brite
  • 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. Custom Cape Module

Custom Cape Module

Scheduled Pinned Locked Moved Kotlin/Java
7 Posts 4 Posters 2.3k 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.
  • KoitoyuuK Offline
    KoitoyuuK Offline
    Koitoyuu
    wrote on last edited by
    #1

    中文: 首先把Custom Cape模块抄到你的Custom LiquidBounce并注册.
    English: First copy the Custom Cape module into your Custom LiquidBounce and register.

    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.ListValue;
    
    /**
     * @author koitoyuu
     */
    @ModuleInfo(name = "CustomCape",fakeName = "Custom Cape",array = false,description = "",category = ModuleCategory.RENDER)
    public class CustomCape extends Module {
        public final ListValue cape = new ListValue("Cape",new String[] {"Cape1","Cape2"},"Cape1");
    }
    

    中文: 然后找到MixinNetworkPlayerInfo并映射locationCape;
    English: Then find MixinNetworkPlayerInfo and map locationCape.

        @Shadow
        private ResourceLocation locationCape;
    

    中文: 最后Mixin注入getLocationCape
    English: Finally Mixin injects getLocationCape

        /**
         * @author koitoyuu
         */
        @Inject(method = "getLocationCape", cancellable = true, at = @At("HEAD"))
        public void injectCustomCape(CallbackInfoReturnable<ResourceLocation> cir) {
            CustomCape customCape = (CustomCape) LiquidBounce.moduleManager.getModule(CustomCape.class);
    
            if (customCape.getState()) {
                if (gameProfile.getId().equals(Minecraft.getMinecraft().getSession().getProfile().getId())) {
                    ResourceLocation resourceLocation = new ResourceLocation("liquidbounce/capes/"+customCape.cape.get()+".png");
                    cir.setReturnValue(resourceLocation);
                    cir.cancel();
                }
            }
        }
    

    别忘记在assets.minecraft.liquidbounce.capes放入cape文件
    Don't forget to put cape file in assets.minecraft.liquidbounce.capes

    kumri owoK Ali00035A LarissaL 3 Replies Last reply
    1
    • KoitoyuuK Koitoyuu

      中文: 首先把Custom Cape模块抄到你的Custom LiquidBounce并注册.
      English: First copy the Custom Cape module into your Custom LiquidBounce and register.

      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.ListValue;
      
      /**
       * @author koitoyuu
       */
      @ModuleInfo(name = "CustomCape",fakeName = "Custom Cape",array = false,description = "",category = ModuleCategory.RENDER)
      public class CustomCape extends Module {
          public final ListValue cape = new ListValue("Cape",new String[] {"Cape1","Cape2"},"Cape1");
      }
      

      中文: 然后找到MixinNetworkPlayerInfo并映射locationCape;
      English: Then find MixinNetworkPlayerInfo and map locationCape.

          @Shadow
          private ResourceLocation locationCape;
      

      中文: 最后Mixin注入getLocationCape
      English: Finally Mixin injects getLocationCape

          /**
           * @author koitoyuu
           */
          @Inject(method = "getLocationCape", cancellable = true, at = @At("HEAD"))
          public void injectCustomCape(CallbackInfoReturnable<ResourceLocation> cir) {
              CustomCape customCape = (CustomCape) LiquidBounce.moduleManager.getModule(CustomCape.class);
      
              if (customCape.getState()) {
                  if (gameProfile.getId().equals(Minecraft.getMinecraft().getSession().getProfile().getId())) {
                      ResourceLocation resourceLocation = new ResourceLocation("liquidbounce/capes/"+customCape.cape.get()+".png");
                      cir.setReturnValue(resourceLocation);
                      cir.cancel();
                  }
              }
          }
      

      别忘记在assets.minecraft.liquidbounce.capes放入cape文件
      Don't forget to put cape file in assets.minecraft.liquidbounce.capes

      kumri owoK Offline
      kumri owoK Offline
      kumri owo
      wrote on last edited by
      #2

      @koitoyuu very nice

      KoitoyuuK 1 Reply Last reply
      0
      • kumri owoK kumri owo

        @koitoyuu very nice

        KoitoyuuK Offline
        KoitoyuuK Offline
        Koitoyuu
        wrote on last edited by
        #3

        @r-i-s-e

        thanksundefined

        1 Reply Last reply
        0
        • KoitoyuuK Koitoyuu

          中文: 首先把Custom Cape模块抄到你的Custom LiquidBounce并注册.
          English: First copy the Custom Cape module into your Custom LiquidBounce and register.

          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.ListValue;
          
          /**
           * @author koitoyuu
           */
          @ModuleInfo(name = "CustomCape",fakeName = "Custom Cape",array = false,description = "",category = ModuleCategory.RENDER)
          public class CustomCape extends Module {
              public final ListValue cape = new ListValue("Cape",new String[] {"Cape1","Cape2"},"Cape1");
          }
          

          中文: 然后找到MixinNetworkPlayerInfo并映射locationCape;
          English: Then find MixinNetworkPlayerInfo and map locationCape.

              @Shadow
              private ResourceLocation locationCape;
          

          中文: 最后Mixin注入getLocationCape
          English: Finally Mixin injects getLocationCape

              /**
               * @author koitoyuu
               */
              @Inject(method = "getLocationCape", cancellable = true, at = @At("HEAD"))
              public void injectCustomCape(CallbackInfoReturnable<ResourceLocation> cir) {
                  CustomCape customCape = (CustomCape) LiquidBounce.moduleManager.getModule(CustomCape.class);
          
                  if (customCape.getState()) {
                      if (gameProfile.getId().equals(Minecraft.getMinecraft().getSession().getProfile().getId())) {
                          ResourceLocation resourceLocation = new ResourceLocation("liquidbounce/capes/"+customCape.cape.get()+".png");
                          cir.setReturnValue(resourceLocation);
                          cir.cancel();
                      }
                  }
              }
          

          别忘记在assets.minecraft.liquidbounce.capes放入cape文件
          Don't forget to put cape file in assets.minecraft.liquidbounce.capes

          Ali00035A Offline
          Ali00035A Offline
          Ali00035
          wrote on last edited by
          #4

          @koitoyuu nice

          KoitoyuuK 1 Reply Last reply
          0
          • Ali00035A Ali00035

            @koitoyuu nice

            KoitoyuuK Offline
            KoitoyuuK Offline
            Koitoyuu
            wrote on last edited by
            #5

            @ali00035

            thxundefined

            Ali00035A 1 Reply Last reply
            0
            • KoitoyuuK Koitoyuu

              @ali00035

              thxundefined

              Ali00035A Offline
              Ali00035A Offline
              Ali00035
              wrote on last edited by
              #6

              @koitoyuu No problem 😄

              1 Reply Last reply
              0
              • KoitoyuuK Koitoyuu

                中文: 首先把Custom Cape模块抄到你的Custom LiquidBounce并注册.
                English: First copy the Custom Cape module into your Custom LiquidBounce and register.

                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.ListValue;
                
                /**
                 * @author koitoyuu
                 */
                @ModuleInfo(name = "CustomCape",fakeName = "Custom Cape",array = false,description = "",category = ModuleCategory.RENDER)
                public class CustomCape extends Module {
                    public final ListValue cape = new ListValue("Cape",new String[] {"Cape1","Cape2"},"Cape1");
                }
                

                中文: 然后找到MixinNetworkPlayerInfo并映射locationCape;
                English: Then find MixinNetworkPlayerInfo and map locationCape.

                    @Shadow
                    private ResourceLocation locationCape;
                

                中文: 最后Mixin注入getLocationCape
                English: Finally Mixin injects getLocationCape

                    /**
                     * @author koitoyuu
                     */
                    @Inject(method = "getLocationCape", cancellable = true, at = @At("HEAD"))
                    public void injectCustomCape(CallbackInfoReturnable<ResourceLocation> cir) {
                        CustomCape customCape = (CustomCape) LiquidBounce.moduleManager.getModule(CustomCape.class);
                
                        if (customCape.getState()) {
                            if (gameProfile.getId().equals(Minecraft.getMinecraft().getSession().getProfile().getId())) {
                                ResourceLocation resourceLocation = new ResourceLocation("liquidbounce/capes/"+customCape.cape.get()+".png");
                                cir.setReturnValue(resourceLocation);
                                cir.cancel();
                            }
                        }
                    }
                

                别忘记在assets.minecraft.liquidbounce.capes放入cape文件
                Don't forget to put cape file in assets.minecraft.liquidbounce.capes

                LarissaL Offline
                LarissaL Offline
                Larissa
                wrote on last edited by
                #7

                @Koitoyuu 奶思

                1 Reply Last reply
                0

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