Skip to content

Commit

Permalink
Animation/Texture Mixins moved to Angelica (#487)
Browse files Browse the repository at this point in the history
  • Loading branch information
Caedis authored Feb 11, 2025
1 parent 12133b4 commit 68cca10
Show file tree
Hide file tree
Showing 15 changed files with 1 addition and 492 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import org.lwjgl.opengl.GL11;

import com.mitchej123.hodgepodge.config.DebugConfig;
import com.mitchej123.hodgepodge.config.FixesConfig;

import cpw.mods.fml.common.eventhandler.SubscribeEvent;

Expand Down Expand Up @@ -47,11 +46,8 @@ public void onRenderGameOverlayTextEvent(RenderGameOverlayEvent.Text event) {
event.right.add(4 + offset, "CPU Cores: " + Runtime.getRuntime().availableProcessors());
event.right.add(5 + offset, "OS: " + this.osName + " (" + this.osVersion + ", " + this.osArch + ")");

if (FixesConfig.speedupAnimations || DebugConfig.renderDebug) {
if (DebugConfig.renderDebug) {
event.right.add(6 + offset, null); // Empty Line
if (FixesConfig.speedupAnimations) {
event.right.add(7 + offset, "animationsMode: " + HodgepodgeClient.animationsMode);
}
if (DebugConfig.renderDebug) {
event.right.add(8 + offset, "renderDebugMode: " + HodgepodgeClient.renderDebugMode);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
package com.mitchej123.hodgepodge.client.handlers;

import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.client.settings.KeyBinding;
import net.minecraft.util.StatCollector;

import org.lwjgl.input.Keyboard;

import com.gtnewhorizon.gtnhlib.util.AboveHotbarHUD;
import com.mitchej123.hodgepodge.client.HodgepodgeClient;
import com.mitchej123.hodgepodge.config.DebugConfig;
import com.mitchej123.hodgepodge.config.FixesConfig;
import com.mitchej123.hodgepodge.config.TweaksConfig;

import cpw.mods.fml.client.registry.ClientRegistry;
Expand Down Expand Up @@ -46,19 +41,5 @@ public void keyPressed(InputEvent.KeyInputEvent event) {
false);
return;
}
if (FixesConfig.speedupAnimations) {
int key = Keyboard.getEventKey();
boolean released = !Keyboard.getEventKeyState();
if (released) {
if (Minecraft.getMinecraft().gameSettings.showDebugInfo && GuiScreen.isShiftKeyDown()
&& GuiScreen.isCtrlKeyDown()) {
if (key == Keyboard.KEY_N) {
HodgepodgeClient.animationsMode.next();
} else if (key == Keyboard.KEY_D && DebugConfig.renderDebug) {
HodgepodgeClient.renderDebugMode.next();
}
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -251,10 +251,6 @@ public class FixesConfig {
@Config.DefaultBoolean(true)
public static boolean removeCreativeSearchTab;

@Config.Comment("Drastically speedup animated textures (Basically the same as with optifine animations off but animations are working)")
@Config.DefaultBoolean(true)
public static boolean speedupAnimations;

@Config.Comment("Stop \"You can only sleep at night\" message filling the chat")
@Config.DefaultBoolean(true)
public static boolean squashBedErrorMessage;
Expand Down
19 changes: 0 additions & 19 deletions src/main/java/com/mitchej123/hodgepodge/mixins/Mixins.java
Original file line number Diff line number Diff line change
Expand Up @@ -252,22 +252,6 @@ public enum Mixins {
ADD_TOGGLE_DEBUG_MESSAGE(new Builder("Toggle Debug Message").setPhase(Phase.EARLY)
.addMixinClasses("minecraft.MixinMinecraft_ToggleDebugMessage").setSide(Side.CLIENT)
.setApplyIf(() -> TweaksConfig.addToggleDebugMessage).addTargetedMod(TargetedMod.VANILLA)),
SPEEDUP_VANILLA_ANIMATIONS(new Builder("Speedup Vanilla Animations").setPhase(Phase.EARLY)
.setApplyIf(() -> FixesConfig.speedupAnimations).setSide(Side.CLIENT).addTargetedMod(TargetedMod.VANILLA)
.addExcludedMod(TargetedMod.ANGELICA).addMixinClasses(
"minecraft.textures.client.MixinTextureAtlasSprite",
"minecraft.textures.client.MixinTextureMap",
"minecraft.textures.client.MixinBlockFire",
"minecraft.textures.client.MixinMinecraftForgeClient",
"minecraft.textures.client.MixinChunkCache",
"minecraft.textures.client.MixinRenderBlocks",
"minecraft.textures.client.MixinRenderBlockFluid",
"minecraft.textures.client.MixinWorldRenderer",
"minecraft.textures.client.MixinRenderItem")),
SPEEDUP_VANILLA_ANIMATIONS_FC(new Builder("Speedup Vanilla Animations - Fastcraft").setPhase(Phase.EARLY)
.addMixinClasses("minecraft.textures.client.fastcraft.MixinTextureMap").setSide(Side.CLIENT)
.setApplyIf(() -> FixesConfig.speedupAnimations).addTargetedMod(TargetedMod.VANILLA)
.addTargetedMod(TargetedMod.FASTCRAFT).addExcludedMod(TargetedMod.OPTIFINE)),
OPTIMIZE_TEXTURE_LOADING(new Builder("Optimize Texture Loading").setPhase(Phase.EARLY)
.addMixinClasses("minecraft.textures.client.MixinTextureUtil").addTargetedMod(TargetedMod.VANILLA)
.addExcludedMod(TargetedMod.ANGELICA).setApplyIf(() -> SpeedupsConfig.optimizeTextureLoading)
Expand Down Expand Up @@ -551,9 +535,6 @@ public enum Mixins {
IC2_FLUID_CONTAINER_TOOLTIP(new Builder("IC2 Fluid Container Tooltip Fix").setPhase(Phase.EARLY).setSide(Side.BOTH)
.addMixinClasses("ic2.MixinItemIC2FluidContainer")
.setApplyIf(() -> TweaksConfig.displayIc2FluidLocalizedName).addTargetedMod(TargetedMod.IC2)),
IC2_FLUID_RENDER_FIX(new Builder("IC2 Fluid Render Fix").setPhase(Phase.EARLY).setSide(Side.BOTH)
.addMixinClasses("ic2.textures.MixinRenderLiquidCell").setApplyIf(() -> FixesConfig.speedupAnimations)
.addTargetedMod(TargetedMod.IC2).addExcludedMod(TargetedMod.ANGELICA)),
IC2_HOVER_MODE_FIX(new Builder("IC2 Hover Mode Fix").setPhase(Phase.LATE).setSide(Side.BOTH)
.addMixinClasses("ic2.MixinIc2QuantumSuitHoverMode").setApplyIf(() -> FixesConfig.fixIc2HoverMode)
.addTargetedMod(TargetedMod.IC2)),
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 68cca10

Please sign in to comment.