Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix hotbar turning dark in third-person when Project Red is installed #60

Merged
merged 1 commit into from
Apr 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ dependencies {
compile("com.github.GTNewHorizons:StructureLib:1.0.15:dev")
compile("net.industrial-craft:industrialcraft-2:2.2.828-experimental:dev")
compile("com.github.GTNewHorizons:AppleCore:3.1.9:dev")
compile("mrtjp:MrTJPCore:1.7.10-1.1.0.33:dev")

compileOnly("com.github.GTNewHorizons:Railcraft:9.13.6:dev") {
// RC Depends on BuildCraft & Baubles and a few others, use transitive to pull those in for `runClient`
Expand Down
8 changes: 8 additions & 0 deletions repositories.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,12 @@ repositories {
name = "jitpack"
url("https://jitpack.io")
}
maven {
name "mvnmrtjp"
url "http://files.projectredwiki.com/maven"
metadataSources {
mavenPom()
artifact()
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ public class LoadingConfig {
public boolean deduplicateForestryCompatInBOP;
public boolean speedupBOPFogHandling;
public boolean makeBigFirsPlantable;
public boolean fixHudLightingGlitch;

// ASM
public boolean pollutionAsm;
Expand Down Expand Up @@ -110,6 +111,7 @@ public LoadingConfig(File file) {
addCVSupportToWandPedestal = config.get("tweaks", "addCVSupportToWandPedestal", true, "Add CV support to Thaumcraft wand recharge pedestal").getBoolean();
makeBigFirsPlantable = config.get("tweaks", "makeBigFirsPlantable", true, "Allow 5 Fir Sapling planted together ('+' shape) to grow to a big fir tree").getBoolean();
ic2SeedMaxStackSize = config.get("tweaks", "ic2SeedMaxStackSize", 64, "IC2 seed max stack size").getInt();
fixHudLightingGlitch = config.get("tweaks", "fixHudLightingGlitch", true, "Fix hotbars being dark when Project Red is installed").getBoolean();

speedupChunkCoordinatesHashCode = config.get("speedups", "speedupChunkCoordinatesHashCode", true, "Speedup ChunkCoordinates hashCode").getBoolean();
speedupVanillaFurnace = config.get("speedups", "speedupVanillaFurnace", true, "Speedup Vanilla Furnace recipe lookup").getBoolean();
Expand Down
5 changes: 4 additions & 1 deletion src/main/java/com/mitchej123/hodgepodge/mixins/Mixins.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,10 @@ public enum Mixins {
// BOP
DEDUPLICATE_FORESTRY_COMPAT_IN_BOP("biomesoplenty.MixinForestryIntegration", () -> Hodgepodge.config.deduplicateForestryCompatInBOP, TargetedMod.BOP),
SPEEDUP_BOP_BIOME_FOG("biomesoplenty.MixinFogHandler", Side.CLIENT, () -> Hodgepodge.config.speedupBOPFogHandling, TargetedMod.BOP),
BIG_FIR_TREES("biomesoplenty.MixinBlockBOPSapling", () -> Hodgepodge.config.makeBigFirsPlantable, TargetedMod.BOP)
BIG_FIR_TREES("biomesoplenty.MixinBlockBOPSapling", () -> Hodgepodge.config.makeBigFirsPlantable, TargetedMod.BOP),

// MrTJPCore (Project Red)
FIX_HUD_LIGHTING_GLITCH("mrtjpcore.MixinFXEngine", () -> Hodgepodge.config.fixHudLightingGlitch, TargetedMod.MRTJPCORE)
;

public final String mixinClass;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ public enum TargetedMod {
RAILCRAFT("Railcraft", "Railcraft"),
THAUMCRAFT("Thaumcraft", "Thaumcraft-1.7.10"),
COFH_CORE("CoFHCore", "CoFHCore", "cofh-core"),
BOP("BiomesOPlenty", "BiomesOPlenty-1.7.10")
BOP("BiomesOPlenty", "BiomesOPlenty-1.7.10"),
MRTJPCORE("MrTJPCore", "MrTJPCore")
;

public final String modName;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package com.mitchej123.hodgepodge.mixins.mrtjpcore;

import mrtjp.core.fx.FXEngine$;
import org.lwjgl.opengl.GL11;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;

@Mixin(FXEngine$.class)
public class MixinFXEngine {
/**
* @reason Lighting should be kept disabled at the end of RenderWorldLastEvent in 1.7.
*/
@Inject(method = "renderParticles", at = @At("TAIL"), remap = false)
private void keepLightingDisabled(int dim, float frame, CallbackInfo ci) {
GL11.glDisable(GL11.GL_LIGHTING);
}
}