-
Notifications
You must be signed in to change notification settings - Fork 0
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
70beaa0
commit 9b9a20f
Showing
36 changed files
with
213 additions
and
213 deletions.
There are no files selected for viewing
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
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 was deleted.
Oops, something went wrong.
111 changes: 0 additions & 111 deletions
111
src/main/java/com/kotmatross/fixer/asm/OptimizedMixinPlugin.java
This file was deleted.
Oops, something went wrong.
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
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,11 @@ | ||
package com.kotmatross.shadersfixer; | ||
|
||
public class Tags { | ||
|
||
public static final String MODID = "shadersfixer"; | ||
public static final String MODNAME = "Shaders Fixer"; | ||
public static final String VERSION = "1.1"; | ||
public static final String MCVERSION = "1.7.10"; | ||
public static final String CLIENTPROXY = "com.kotmatross.shadersfixer.proxy.ClientProxy"; | ||
public static final String SERVERPROXY = "com.kotmatross.shadersfixer.proxy.CommonProxy"; | ||
} |
88 changes: 88 additions & 0 deletions
88
src/main/java/com/kotmatross/shadersfixer/asm/OptimizedMixinPlugin.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,88 @@ | ||
package com.kotmatross.shadersfixer.asm; | ||
|
||
import com.kotmatross.shadersfixer.ShadersFixer; | ||
import com.kotmatross.shadersfixer.Tags; | ||
import com.kotmatross.shadersfixer.config.ShaderFixerConfig; | ||
import net.minecraft.launchwrapper.Launch; | ||
import org.spongepowered.asm.lib.tree.ClassNode; | ||
import org.spongepowered.asm.mixin.MixinEnvironment; | ||
import org.spongepowered.asm.mixin.extensibility.IMixinConfigPlugin; | ||
import org.spongepowered.asm.mixin.extensibility.IMixinInfo; | ||
|
||
import java.io.File; | ||
import java.util.ArrayList; | ||
import java.util.List; | ||
import java.util.Set; | ||
|
||
public class OptimizedMixinPlugin implements IMixinConfigPlugin { | ||
|
||
public static final MixinEnvironment.Side side = MixinEnvironment.getCurrentEnvironment().getSide(); | ||
@Override | ||
public void onLoad(String mixinPackage) { | ||
} | ||
|
||
@Override | ||
public String getRefMapperConfig() { | ||
return null; | ||
} | ||
|
||
@Override | ||
public boolean shouldApplyMixin(String targetClassName, String mixinClassName) { | ||
return true; | ||
} | ||
|
||
@Override | ||
public void acceptTargets(Set<String> myTargets, Set<String> otherTargets) { | ||
} | ||
|
||
@Override | ||
public List<String> getMixins() { | ||
List<String> mixins = new ArrayList<>(); | ||
|
||
String configFolder = "config" + File.separator + Tags.MODID + File.separator; | ||
ShaderFixerConfig.loadMixinConfig(new File(Launch.minecraftHome, configFolder + "mixins.cfg")); | ||
|
||
if (side == MixinEnvironment.Side.CLIENT) { | ||
ShadersFixer.logger.info("Integrating Shader-fixer client mixins..."); | ||
try { | ||
if(ShaderFixerConfig.FixFisksuperheroesShaders) { | ||
//FISK HEROES MIXINS START | ||
ShadersFixer.logger.info("Trying to integrate fiskheroes mixins"); | ||
mixins.add("client.FiskHeroes.client.pack.json.beam.MixinBeamRendererLightning"); | ||
mixins.add("client.FiskHeroes.client.pack.json.beam.MixinBeamRendererLine"); | ||
mixins.add("client.FiskHeroes.client.pack.json.shape.MixinShapeFormatCircles"); | ||
mixins.add("client.FiskHeroes.client.pack.json.shape.MixinShapeFormatLines"); | ||
mixins.add("client.FiskHeroes.client.pack.json.shape.MixinShapeFormatWireframe"); | ||
mixins.add("client.FiskHeroes.client.particle.MixinEntitySHSpellWaveFX"); | ||
mixins.add("client.FiskHeroes.client.render.effect.MixinEffectTentacles"); | ||
mixins.add("client.FiskHeroes.client.render.entity.effect.MixinRenderEarthCrack"); | ||
mixins.add("client.FiskHeroes.client.render.entity.effect.MixinRenderGravityWave"); | ||
mixins.add("client.FiskHeroes.client.render.entity.projectile.MixinRenderEnergyBolt"); | ||
mixins.add("client.FiskHeroes.client.render.entity.projectile.MixinRenderGrapplingHook"); | ||
mixins.add("client.FiskHeroes.client.render.entity.projectile.MixinRenderSonicWave"); | ||
mixins.add("client.FiskHeroes.client.render.entity.projectile.MixinRenderSpellWhip"); | ||
mixins.add("client.FiskHeroes.client.render.entity.MixinRenderGrappleRope"); | ||
mixins.add("client.FiskHeroes.client.render.projectile.MixinBulletProjectileRenderer"); | ||
mixins.add("client.FiskHeroes.client.render.projectile.MixinProjectileRenderHandler"); | ||
mixins.add("client.FiskHeroes.client.render.tile.MixinRenderSuitFabricator"); | ||
mixins.add("client.FiskHeroes.client.MixinSHRenderHooks"); | ||
//FISK HEROES MIXINS END | ||
} | ||
} catch (Exception e) { | ||
ShadersFixer.logger.error("Error loading mixins: " + e.getMessage()); | ||
e.printStackTrace(); | ||
} | ||
} | ||
|
||
return mixins; | ||
} | ||
|
||
@Override | ||
public void preApply(String targetClassName, ClassNode targetClass, String mixinClassName, IMixinInfo mixinInfo) { | ||
} | ||
|
||
@Override | ||
public void postApply(String targetClassName, ClassNode targetClass, String mixinClassName, IMixinInfo mixinInfo) { | ||
} | ||
|
||
} |
26 changes: 26 additions & 0 deletions
26
src/main/java/com/kotmatross/shadersfixer/config/ShaderFixerConfig.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,26 @@ | ||
package com.kotmatross.shadersfixer.config; | ||
|
||
import java.io.File; | ||
|
||
import net.minecraftforge.common.config.Configuration; | ||
|
||
public class ShaderFixerConfig { | ||
// Definitely does NOT look like a BugTorch config | ||
|
||
//Base things | ||
public static boolean FixFisksuperheroesShaders; | ||
|
||
//Category | ||
static final String categoryShadersfixes = "Shaders fixes"; | ||
|
||
public static void loadMixinConfig(File configFile) { | ||
Configuration config = new Configuration(configFile); | ||
|
||
FixFisksuperheroesShaders = config.getBoolean("FixFisksuperheroesShaders", categoryShadersfixes, true, "Fixes rendering errors in Fisk's Superheroes mod when using shaders."); | ||
|
||
if(config.hasChanged()) { | ||
config.save(); | ||
} | ||
} | ||
|
||
} |
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
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.