-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
eb59914
commit 2b5c3df
Showing
15 changed files
with
227 additions
and
135 deletions.
There are no files selected for viewing
91 changes: 84 additions & 7 deletions
91
src/main/java/useless/legacyui/Helper/InventoryHelper.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
src/main/java/useless/legacyui/Mixins/Components/ArmorBarComponentMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package useless.legacyui.Mixins.Components; | ||
|
||
import net.minecraft.client.gui.hud.ArmorBarComponent; | ||
import org.lwjgl.opengl.GL11; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.Redirect; | ||
import useless.legacyui.Gui.GuiScreens.UtilGui; | ||
|
||
@Mixin(ArmorBarComponent.class) | ||
public class ArmorBarComponentMixin { | ||
@Redirect(method = "render(Lnet/minecraft/client/Minecraft;Lnet/minecraft/client/gui/GuiIngame;IIF)V", at = @At(value = "INVOKE", target = "Lorg/lwjgl/opengl/GL11;glColor4f(FFFF)V")) | ||
private void hotbarFadeout(float red, float green, float blue, float alpha){ | ||
GL11.glEnable(GL11.GL_BLEND); | ||
GL11.glBlendFunc(770, 771); | ||
GL11.glColor4f(red, green, blue, UtilGui.getHotbarAlpha()); | ||
} | ||
@Redirect(method = "render(Lnet/minecraft/client/Minecraft;Lnet/minecraft/client/gui/GuiIngame;IIF)V", at = @At(value = "INVOKE", target = "Lorg/lwjgl/opengl/GL11;glDisable(I)V")) | ||
private void disableDisable(int cap){} | ||
} |
20 changes: 20 additions & 0 deletions
20
src/main/java/useless/legacyui/Mixins/Components/FireBarComponentMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package useless.legacyui.Mixins.Components; | ||
|
||
import net.minecraft.client.gui.hud.FireBarComponent; | ||
import org.lwjgl.opengl.GL11; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.Redirect; | ||
import useless.legacyui.Gui.GuiScreens.UtilGui; | ||
|
||
@Mixin(FireBarComponent.class) | ||
public class FireBarComponentMixin { | ||
@Redirect(method = "render(Lnet/minecraft/client/Minecraft;Lnet/minecraft/client/gui/GuiIngame;IIF)V", at = @At(value = "INVOKE", target = "Lorg/lwjgl/opengl/GL11;glColor4f(FFFF)V")) | ||
private void hotbarFadeout(float red, float green, float blue, float alpha){ | ||
GL11.glEnable(GL11.GL_BLEND); | ||
GL11.glBlendFunc(770, 771); | ||
GL11.glColor4f(red, green, blue, UtilGui.getHotbarAlpha()); | ||
} | ||
@Redirect(method = "render(Lnet/minecraft/client/Minecraft;Lnet/minecraft/client/gui/GuiIngame;IIF)V", at = @At(value = "INVOKE", target = "Lorg/lwjgl/opengl/GL11;glDisable(I)V")) | ||
private void disableDisable(int cap){} | ||
} |
20 changes: 20 additions & 0 deletions
20
src/main/java/useless/legacyui/Mixins/Components/HealthBarComponentMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package useless.legacyui.Mixins.Components; | ||
|
||
import net.minecraft.client.gui.hud.HealthBarComponent; | ||
import org.lwjgl.opengl.GL11; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.Redirect; | ||
import useless.legacyui.Gui.GuiScreens.UtilGui; | ||
|
||
@Mixin(value = HealthBarComponent.class, remap = false) | ||
public class HealthBarComponentMixin { | ||
@Redirect(method = "render(Lnet/minecraft/client/Minecraft;Lnet/minecraft/client/gui/GuiIngame;IIF)V", at = @At(value = "INVOKE", target = "Lorg/lwjgl/opengl/GL11;glColor4f(FFFF)V")) | ||
private void hotbarFadeout(float red, float green, float blue, float alpha){ | ||
GL11.glEnable(GL11.GL_BLEND); | ||
GL11.glBlendFunc(770, 771); | ||
GL11.glColor4f(red, green, blue, UtilGui.getHotbarAlpha()); | ||
} | ||
@Redirect(method = "render(Lnet/minecraft/client/Minecraft;Lnet/minecraft/client/gui/GuiIngame;IIF)V", at = @At(value = "INVOKE", target = "Lorg/lwjgl/opengl/GL11;glDisable(I)V")) | ||
private void disableDisable(int cap){} | ||
} |
30 changes: 30 additions & 0 deletions
30
src/main/java/useless/legacyui/Mixins/Components/HotbarComponentMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package useless.legacyui.Mixins.Components; | ||
|
||
import net.minecraft.client.gui.hud.HotbarComponent; | ||
import net.minecraft.client.render.FontRenderer; | ||
import net.minecraft.client.render.RenderEngine; | ||
import net.minecraft.client.render.entity.ItemEntityRenderer; | ||
import net.minecraft.core.item.ItemStack; | ||
import org.lwjgl.opengl.GL11; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.Redirect; | ||
import useless.legacyui.Gui.GuiScreens.UtilGui; | ||
|
||
@Mixin(value = HotbarComponent.class, remap = false) | ||
public class HotbarComponentMixin { | ||
@Redirect(method = "render(Lnet/minecraft/client/Minecraft;Lnet/minecraft/client/gui/GuiIngame;IIF)V", at = @At(value = "INVOKE", target = "Lorg/lwjgl/opengl/GL11;glColor4f(FFFF)V")) | ||
private void hotbarFadeout(float red, float green, float blue, float alpha){ | ||
GL11.glEnable(GL11.GL_BLEND); | ||
GL11.glBlendFunc(770, 771); | ||
GL11.glColor4f(red, green, blue, UtilGui.getHotbarAlpha()); | ||
} | ||
@Redirect(method = "renderInventorySlot(Lnet/minecraft/client/Minecraft;IIIF)V", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/entity/ItemEntityRenderer;renderItemIntoGUI(Lnet/minecraft/client/render/FontRenderer;Lnet/minecraft/client/render/RenderEngine;Lnet/minecraft/core/item/ItemStack;IIF)V")) | ||
private void fadeIntoGUI(ItemEntityRenderer instance, FontRenderer fontrenderer, RenderEngine renderengine, ItemStack itemstack, int i, int j, float alpha){ | ||
instance.renderItemIntoGUI(fontrenderer, renderengine, itemstack, i, j, UtilGui.getHotbarAlpha()); | ||
} | ||
@Redirect(method = "renderInventorySlot(Lnet/minecraft/client/Minecraft;IIIF)V", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/entity/ItemEntityRenderer;renderItemOverlayIntoGUI(Lnet/minecraft/client/render/FontRenderer;Lnet/minecraft/client/render/RenderEngine;Lnet/minecraft/core/item/ItemStack;IIF)V")) | ||
private void fadeIntoGUIOverlay(ItemEntityRenderer instance, FontRenderer fontrenderer, RenderEngine renderengine, ItemStack itemstack, int i, int j, float alpha){ | ||
instance.renderItemOverlayIntoGUI(fontrenderer, renderengine, itemstack, i, j, UtilGui.getHotbarAlpha()); | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
src/main/java/useless/legacyui/Mixins/Components/OxygenBarComponentMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package useless.legacyui.Mixins.Components; | ||
|
||
import net.minecraft.client.gui.hud.OxygenBarComponent; | ||
import org.lwjgl.opengl.GL11; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.Redirect; | ||
import useless.legacyui.Gui.GuiScreens.UtilGui; | ||
|
||
@Mixin(OxygenBarComponent.class) | ||
public class OxygenBarComponentMixin { | ||
@Redirect(method = "render(Lnet/minecraft/client/Minecraft;Lnet/minecraft/client/gui/GuiIngame;IIF)V", at = @At(value = "INVOKE", target = "Lorg/lwjgl/opengl/GL11;glColor4f(FFFF)V")) | ||
private void hotbarFadeout(float red, float green, float blue, float alpha){ | ||
GL11.glEnable(GL11.GL_BLEND); | ||
GL11.glBlendFunc(770, 771); | ||
GL11.glColor4f(red, green, blue, UtilGui.getHotbarAlpha()); | ||
} | ||
@Redirect(method = "render(Lnet/minecraft/client/Minecraft;Lnet/minecraft/client/gui/GuiIngame;IIF)V", at = @At(value = "INVOKE", target = "Lorg/lwjgl/opengl/GL11;glDisable(I)V")) | ||
private void disableDisable(int cap){} | ||
} |
27 changes: 0 additions & 27 deletions
27
src/main/java/useless/legacyui/Mixins/Gui/GuiGuidebookMixin.djava
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.