Skip to content

Commit

Permalink
Another day, another patch
Browse files Browse the repository at this point in the history
  • Loading branch information
kotmatross28729 committed Feb 20, 2025
1 parent c1d8d04 commit ed652a5
Show file tree
Hide file tree
Showing 21 changed files with 55 additions and 63 deletions.
13 changes: 10 additions & 3 deletions CHANGELOG.MD
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# 3.3 hot-fix-patch-2

* **[Hbm's NTM]** (Finally) fixed antimatter explosion not rendered with Complementary Shaders
* **[Hbm's NTM]** Fixed mirror rays (for solar boiler) not rendered with angelica shaders (may flicker a little - this is normal)
* **[Hbm's NTM]** Fixed Cherenkov radiation not rendered on the research reactor with angelica shaders
* **[Hbm's NTM]** Fixed Cherenkov radiation not rendered on the demon lamp with Complementary Shaders
* **[Hbm's NTM]** Fixed DFC explosion rendering with angelica shaders

# 3.3 hot-fix-patch-1

* **[Hbm's NTM:Space]** Fixed white square near the sun with angelica shaders
Expand Down Expand Up @@ -37,12 +45,12 @@
# 3.1

* Complete HBM's NTM fix
* also improve some visuals with shaders
* Also improve some visuals with shaders

# 3.0

* Fix lighting bug in NEI
- It also made it much brighter (side effect? actually using vanilla render so it looks like vanilla (and in vanilla it very bright))
- It also made it much brighter (side effect? actually using vanilla render, so it looks like vanilla (and in vanilla it very bright))
- Also optimize `renderMobSpawnOverlay` fix when using the original NEI


Expand All @@ -53,7 +61,6 @@
- For example: world tooltips, neat, schematica, etc.



* Fixed almost all bugs in HBM's NTM
- some things related to weapons unfixed (since a rework is planned soon)
- the hardest part is just ahead...
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ A mod that adds more compatibility with shaders.
+ **15) HBM's NTM**
+ **16) Dynamic Surroundings**
+ **17) Hardcore Ender Expansion**
+ **18) CustomNPC**

* And also some QOL changes (can be found in the configs)

# Credits:

Expand Down
2 changes: 1 addition & 1 deletion dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ dependencies {
compileOnly name: 'LittleMaidMobEnhanced-1.7.10-1.4.4'
compileOnly name: 'HardcoreEnderExpansion-1.11.3-GTNH'
compileOnly name: 'rple-mc1.7.10-1.3.5-dev'
compileOnly name: 'angelica-1.0.0-beta26-dev'
compileOnly name: 'angelica-1.0.0-beta35-dev'
compileOnly name: 'CustomNPC-Plus-1.9.3-dev'

compileOnly fileTree(dir: 'libs', include: '*.jar')
Expand Down
Binary file removed libs/angelica-1.0.0-beta26-dev.jar
Binary file not shown.
Binary file added libs/angelica-1.0.0-beta35-dev.jar
Binary file not shown.
5 changes: 4 additions & 1 deletion src/main/java/com/kotmatross/shadersfixer/AngelicaUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

public class AngelicaUtils {
public static boolean isShaderEnabled() {
return IrisApi.getInstance().isShaderPackInUse();
if(ShadersFixer.IS_ANGELICA_PRESENT) {
return IrisApi.getInstance().isShaderPackInUse();
}
return false;
}
}
3 changes: 1 addition & 2 deletions src/main/java/com/kotmatross/shadersfixer/ShadersFixer.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,11 @@ public class ShadersFixer {

public static Configuration config;
public static final Logger logger = LogManager.getLogger();

public static boolean IS_ANGELICA_PRESENT = false;

@Mod.EventHandler
public static void preInit(FMLPreInitializationEvent event) {
if(Loader.isModLoaded("angelica")){
if(Loader.isModLoaded("angelica")) {
IS_ANGELICA_PRESENT = true;
}
}
Expand Down
11 changes: 8 additions & 3 deletions src/main/java/com/kotmatross/shadersfixer/Utils.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.kotmatross.shadersfixer;

import net.coderbot.iris.gl.program.Program;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.OpenGlHelper;
import net.minecraft.util.ResourceLocation;
Expand Down Expand Up @@ -76,12 +77,16 @@ public static void EnableFullBrightness() {
* }
*/
public static int GLGetCurrentProgram() {
return GL11.glGetInteger(GL20.GL_CURRENT_PROGRAM);
return GL11.glGetInteger(GL20.GL_CURRENT_PROGRAM);
}
public static void GLUseDefaultProgram() {
GL20.glUseProgram(0);
if(ShadersFixer.IS_ANGELICA_PRESENT) {
Program.unbind(); //For angelica, same glUseProgram(0), but also clears uniforms and samplers
} else {
GL20.glUseProgram(0); //For optifine
}
}
public static void GLUseProgram(int program) {
GL20.glUseProgram(program);
GL20.glUseProgram(program);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import com.kotmatross.shadersfixer.Tags;
import com.kotmatross.shadersfixer.asm.ShadersFixerLateMixins;
import com.kotmatross.shadersfixer.shrimp.nonsense.FuckingCursed;
import com.kotmatross.shadersfixer.shrimp.nonsense.FuckingShit;
import cpw.mods.fml.client.FMLClientHandler;
import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
Expand All @@ -21,7 +20,6 @@

import java.io.File;

import static com.kotmatross.shadersfixer.config.ShaderFixerConfig.enableNotifications;
import static com.kotmatross.shadersfixer.config.ShaderFixerConfig.startTicksOffset;
import static com.kotmatross.shadersfixer.config.ShaderFixerConfig.ticksInterval;

Expand Down Expand Up @@ -61,7 +59,6 @@ public class ClientHandler {
@SubscribeEvent
@SideOnly(Side.CLIENT)
public void onClientTick(TickEvent.ClientTickEvent event) {
if(enableNotifications) {
//My
if (Loader.isModLoaded("lightsabers")) {if (!Loader.instance().getIndexedModList().get("lightsabers").getVersion().contains("kotmatross edition")) {Lightsabers = false;}}
if (Loader.isModLoaded("Neat")) {if (!Loader.instance().getIndexedModList().get("Neat").getVersion().contains("kotmatross edition")) {Neat = false;}}
Expand Down Expand Up @@ -248,7 +245,6 @@ public void onClientTick(TickEvent.ClientTickEvent event) {
WasLoadedEndMSG = true;
}
}
}
WasLoadedEndMSG = false;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -96,15 +96,15 @@ private static void renderChunkBounds(Entity entity, int intOffsetX, int intOffs
method = "renderMobSpawnOverlay",
at = @At(value = "INVOKE", target = "Lorg/lwjgl/opengl/GL11;glEnable(I)V", ordinal = 1), remap = false
)
private static boolean enableLightingM(GL11 instance, int cap) {
private static boolean enableLightingM(int cap) {
return shaders_fixer$lightingM;
}

@WrapWithCondition(
method = "renderMobSpawnOverlay",
at = @At(value = "INVOKE", target = "Lorg/lwjgl/opengl/GL11;glDisable(I)V", ordinal = 2), remap = false
)
private static boolean disableBlendingM(GL11 instance, int cap) {
private static boolean disableBlendingM(int cap) {
return !shaders_fixer$blendingM;
}

Expand All @@ -113,15 +113,15 @@ private static boolean disableBlendingM(GL11 instance, int cap) {
method = "renderChunkBounds",
at = @At(value = "INVOKE", target = "Lorg/lwjgl/opengl/GL11;glEnable(I)V", ordinal = 1), remap = false
)
private static boolean enableLightingC(GL11 instance, int cap) {
private static boolean enableLightingC(int cap) {
return shaders_fixer$lightingC;
}

@WrapWithCondition(
method = "renderChunkBounds",
at = @At(value = "INVOKE", target = "Lorg/lwjgl/opengl/GL11;glDisable(I)V", ordinal = 2), remap = false
)
private static boolean disableBlendingC(GL11 instance, int cap) {
private static boolean disableBlendingC(int cap) {
return !shaders_fixer$blendingC;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -94,15 +94,15 @@ private static void renderChunkBounds(Entity entity, CallbackInfo ci) {
method = "renderMobSpawnOverlay",
at = @At(value = "INVOKE", target = "Lorg/lwjgl/opengl/GL11;glEnable(I)V", ordinal = 1), remap = false
)
private static boolean enableLightingM(GL11 instance, int cap) {
private static boolean enableLightingM(int cap) {
return shaders_fixer$lightingM;
}

@WrapWithCondition(
method = "renderMobSpawnOverlay",
at = @At(value = "INVOKE", target = "Lorg/lwjgl/opengl/GL11;glDisable(I)V", ordinal = 2), remap = false
)
private static boolean disableBlendingM(GL11 instance, int cap) {
private static boolean disableBlendingM(int cap) {
return !shaders_fixer$blendingM;
}

Expand All @@ -111,15 +111,15 @@ private static boolean disableBlendingM(GL11 instance, int cap) {
method = "renderChunkBounds",
at = @At(value = "INVOKE", target = "Lorg/lwjgl/opengl/GL11;glEnable(I)V", ordinal = 1), remap = false
)
private static boolean enableLightingC(GL11 instance, int cap) {
private static boolean enableLightingC(int cap) {
return shaders_fixer$lightingC;
}

@WrapWithCondition(
method = "renderChunkBounds",
at = @At(value = "INVOKE", target = "Lorg/lwjgl/opengl/GL11;glDisable(I)V", ordinal = 2), remap = false
)
private static boolean disableBlendingC(GL11 instance, int cap) {
private static boolean disableBlendingC(int cap) {
return !shaders_fixer$blendingC;
}
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ public class MixinHandRenderer {


@Inject(method = "setupGlState", at = @At(value = "HEAD"), remap = false)
public void HandleInterp(RenderGlobal gameRenderer, Camera camera, float tickDelta, CallbackInfo ci)
{
public void HandleInterp(RenderGlobal gameRenderer, Camera camera, float tickDelta, CallbackInfo ci) {
if(shaders_fixer$checkVibe()) {
try {ShadersFixerLateMixins.handleInterpolation(tickDelta);} catch (NoClassDefFoundError ignored){} //INTERPOLATE FOV (SCOPE)
}
Expand All @@ -48,7 +47,5 @@ private boolean FOVConfigApply(boolean useFOVSetting) {
}
return false;
}




}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

@Mixin(value = CosmicItemRenderer.class, priority = 999)
public class MixinCosmicItemRenderer {
//!Not working with angelica

@Unique
public int shaders_fixer$program; // Делей программ

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@

@Mixin(value = ModelArmorInfinity.class, priority = 999)
public class MixinModelArmorInfinity {
//!Not working with angelica

@Unique
public int shaders_fixer$program;
@Unique
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@

@Mixin(value = RenderHeavenArrow.class, priority = 999)
public class MixinRenderHeavenArrow {
//!Not working with angelica

@Unique
public float shaders_fixer$lbx;
@Unique
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,6 @@
@Mixin(value = ParticleAmatFlash.class, priority = 999)
public class MixinParticleAmatFlash {

//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
//TODO: find out why not rendered with complementary (although flare (which is the same???) rendered)
//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

@Inject(method = "func_70539_a",
at = @At(value = "INVOKE",
target = "Lorg/lwjgl/opengl/GL11;glDepthMask(Z)V", shift = At.Shift.AFTER), remap = false)
Expand All @@ -32,7 +24,7 @@ private void func_70539_a(Tessellator tess, float interp, float x, float y, floa

@Inject(method = "func_70539_a",
at = @At(value = "INVOKE",
target = "Lnet/minecraft/client/renderer/Tessellator;startDrawing(I)V"))
target = "Lnet/minecraft/client/renderer/Tessellator;startDrawing(I)V", shift = At.Shift.BEFORE))
public void func_70539_aPR(Tessellator tess, float interp, float x, float y, float z, float tx, float tz, CallbackInfo ci) {
shaders_fixer$program = Utils.GLGetCurrentProgram();
Utils.GLUseDefaultProgram();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public void renderOrb(TileEntityCore tile, double x, double y, double z, Callbac
Utils.Fix();
}

//TODO: check if need program fix
@Inject(method = "renderFlare",
at = @At(value = "HEAD"), remap = false)
public void renderFlare(TileEntityCore core, CallbackInfo ci) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@

@Mixin(value = ScreenRenderer$.class, priority = 999)
public class MixinScreenRenderer {
//!Not working with angelica

//THE FUCK SCALA ADDS THIS FUCKING "$" - JUST TO BREAK ALL THE METHODS ACCESS???
@Inject(method = "draw", at = @At(value = "INVOKE", target = "Lorg/lwjgl/opengl/GL11;glTranslated(DDD)V", shift = At.Shift.AFTER), remap = false)
private void draw(CallbackInfo ci) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,16 @@
import cpw.mods.fml.common.FMLCommonHandler;
import net.minecraftforge.common.MinecraftForge;

import static com.kotmatross.shadersfixer.config.ShaderFixerConfig.enableNotifications;

public class ClientProxy extends CommonProxy {
@Override
public void registerEvents() {
super.registerEvents();
FMLCommonHandler.instance().bus().register(ClientHandler.INSTANCE);
MinecraftForge.EVENT_BUS.register(ClientHandler.INSTANCE);
if(enableNotifications) {
FMLCommonHandler.instance().bus().register(ClientHandler.INSTANCE);
MinecraftForge.EVENT_BUS.register(ClientHandler.INSTANCE);
}
}
@Override
public void init(ShadersFixer Tmod)
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/assets/shadersfixer/lang/ru_RU.lang
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
kotmatross.SF=[Shader fixer]:

kotmatross.depr0=Обнаружена старая версия
kotmatross.depr1= рекомендуем обновится до
kotmatross.depr1= ,рекомендуем обновится до
kotmatross.fork= последней версии его форка

kotmatross.Lightsabers=Advanced Lightsabers
Expand All @@ -26,7 +26,7 @@ kotmatross.endMSG4S=\shadersfixer
kotmatross.endMSG4X=\mixinsEarly.cfg
kotmatross.endMSG4E= | enableNotifications=false.

kotmatross.endMSG5= (нажмите чтобы открыть файл, требует перезапуск)
kotmatross.endMSG5= (нажмите чтобы открыть файл, требуется перезапуск)

# HbmExtendedHazardDescriptions
info.template__seconds=секунд(ы)
Expand Down

0 comments on commit ed652a5

Please sign in to comment.