Custom Cape Module
-
中文: 首先把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