-
@gking said in [JAVA]EnchantEffect:
To celebrate my coming back I give out a EnchantEffect!
package net.ccbluex.liquidbounce.injection.forge.mixins.render; import net.ccbluex.liquidbounce.LiquidBounce; import net.ccbluex.liquidbounce.features.module.modules.render.EnchantEffect; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.entity.RenderItem; import net.minecraft.client.renderer.texture.TextureManager; import net.minecraft.client.renderer.texture.TextureMap; import net.minecraft.client.resources.model.IBakedModel; import net.minecraft.util.ResourceLocation; import org.spongepowered.asm.mixin.Final; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Shadow; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; import java.awt.*; @Mixin(RenderItem.class) public abstract class MixinRenderItem { @Final @Shadow private TextureManager textureManager; @Final @Shadow private static ResourceLocation RES_ITEM_GLINT; @Shadow public abstract void renderModel(IBakedModel model, int color); @Inject(method = "renderEffect", at = @At("HEAD")) private void renderEffect(IBakedModel model, CallbackInfo callbackInfo) { EnchantEffect enchantEffect = (EnchantEffect) LiquidBounce.moduleManager.getModule(EnchantEffect.class); GlStateManager.depthMask(false); GlStateManager.depthFunc(514); GlStateManager.disableLighting(); GlStateManager.blendFunc(768, 1); this.textureManager.bindTexture(RES_ITEM_GLINT); GlStateManager.matrixMode(5890); GlStateManager.pushMatrix(); GlStateManager.scale(8.0f, 8.0f, 8.0f); float f = (float)(Minecraft.getSystemTime() % 3000L) / 3000.0f / 8.0f; GlStateManager.translate(f, 0.0f, 0.0f); GlStateManager.rotate(-50.0f, 0.0f, 0.0f, 1.0f); if(enchantEffect.getState()) { switch(enchantEffect.modeValue.get().toLowerCase()) { case "custom": this.renderModel(model, enchantEffect.currentColor); break; case "rainbow": this.renderModel(model, Color.getHSBColor(enchantEffect.hue / 255.0f, 0.75f, 0.9f).getRGB()); break; } } else { this.renderModel(model, -8372020); } GlStateManager.popMatrix(); GlStateManager.pushMatrix(); GlStateManager.scale(8.0f, 8.0f, 8.0f); float f1 = (float)(Minecraft.getSystemTime() % 4873L) / 4873.0f / 8.0f; GlStateManager.translate(-f1, 0.0f, 0.0f); GlStateManager.rotate(10.0f, 0.0f, 0.0f, 1.0f); if(enchantEffect.getState()) { switch(enchantEffect.modeValue.get().toLowerCase()) { case "custom": this.renderModel(model, enchantEffect.currentColor); break; case "rainbow": this.renderModel(model, Color.getHSBColor(enchantEffect.hue / 255.0f, 0.75f, 0.9f).getRGB()); break; } } else { this.renderModel(model, -8372020); } GlStateManager.popMatrix(); GlStateManager.matrixMode(5888); GlStateManager.blendFunc(770, 771); GlStateManager.enableLighting(); GlStateManager.depthFunc(515); GlStateManager.depthMask(true); this.textureManager.bindTexture(TextureMap.locationBlocksTexture); } }
package net.ccbluex.liquidbounce.features.module.modules.render; import net.ccbluex.liquidbounce.event.EventTarget; import net.ccbluex.liquidbounce.event.Render2DEvent; 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.ui.client.hud.Palette; import net.ccbluex.liquidbounce.value.IntegerValue; import net.ccbluex.liquidbounce.value.ListValue; import java.awt.*; import java.util.Random; @ModuleInfo(name = "EnchantEffect", description = "qwq", category = ModuleCategory.RENDER) public class EnchantEffect extends Module { public IntegerValue redValue = new IntegerValue("Red", 255, 0, 255); public IntegerValue greenValue = new IntegerValue("Green", 0, 0, 255); public IntegerValue blueValue = new IntegerValue("Blue", 0, 0, 255); public ListValue modeValue = new ListValue("Mode", new String[]{"Rainbow","Custom"}, "Custom"); public float hue = 0.0F; public int currentColor = new Color(redValue.get(),greenValue.get(),blueValue.get()).getRGB(); @EventTarget public void Render2d(final Render2DEvent e) { hue += 1f / 5.0f; if (hue > 255.0f) { hue = 0.0f; } } }
first you need to add a module,then add a mixin in net.ccbluex.liquidbounce.injection.forge.mixins.render and auth it
Not easy to implement since it's in Java and can be done with a texture pack
-
-
@божественная-кара adding it into modulemanager
-
@____ module or
-
This post is deleted!
-
basically you copy paste
-
true
-
How do you use this script? lol
-
@mysticcheats this isn't a script, this is a code.
-
@mysticcheats this isnt a script