Skip to content

Commit

Permalink
FoamFix 0.6.0-beta3
Browse files Browse the repository at this point in the history
  • Loading branch information
asiekierka committed Feb 21, 2017
1 parent 5d6c0bf commit 6a2bf8d
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ buildscript {
apply plugin: 'net.minecraftforge.gradle.forge'
apply plugin: 'com.github.johnrengelman.shadow'

version = "0.6.0-beta2"
version = "0.6.0-beta3"
group= "pl.asie.foamfix" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "foamfix"

Expand Down
14 changes: 14 additions & 0 deletions src/main/java/pl/asie/foamfix/coremod/FoamFixCore.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import java.io.File;
import java.util.Map;

import net.minecraft.launchwrapper.LaunchClassLoader;
import net.minecraftforge.fml.relauncher.IFMLLoadingPlugin;
import pl.asie.foamfix.shared.FoamFixShared;

Expand All @@ -51,6 +52,19 @@ public String getSetupClass() {
public void injectData(final Map<String, Object> data) {
FoamFixShared.coremodEnabled = true;
FoamFixShared.config.init(new File(new File("config"), "foamfix.cfg"), true);

if (FoamFixShared.config.geBlacklistLibraryTransformers) {
LaunchClassLoader classLoader = (LaunchClassLoader) getClass().getClassLoader();
classLoader.addTransformerExclusion("com.ibm.icu.");
classLoader.addTransformerExclusion("com.sun.");
classLoader.addTransformerExclusion("gnu.trove.");
classLoader.addTransformerExclusion("io.netty.");
classLoader.addTransformerExclusion("it.unimi.dsi.fastutil.");
classLoader.addTransformerExclusion("joptsimple.");
classLoader.addTransformerExclusion("org.apache.");
classLoader.addTransformerExclusion("oshi.");
classLoader.addTransformerExclusion("scala.");
}
}

public String getAccessTransformerClass() {
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/pl/asie/foamfix/shared/FoamFixConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public class FoamFixConfig {
public boolean lwWeakenResourceCache, lwDummyPackageManifestMap;
public boolean clDeduplicate, clCleanRedundantModelRegistry, clDynamicItemModels;
public boolean clFasterResourceLoading;
public boolean geBlacklistLibraryTransformers;
public boolean geBlockPosPatch, clBlockInfoPatch, clTextureDoubleBuffering;
public boolean geDynamicRegistrySizeScaling;
public boolean geSmallPropertyStorage;
Expand Down Expand Up @@ -77,6 +78,7 @@ public void init(File file, boolean isCoremod) {

if (isCoremod) {
// clTextureDoubleBuffering = getBoolean("textureDoubleBuffering", "experimental", true, "Makes texture animations double-buffered, letting the GPU process them independently of scene rendering.");
geBlacklistLibraryTransformers = getBoolean("blacklistLibraryTransformers", "coremod", true, "Stops certain non-Minecraft-related libraries from being ASM transformed. You shouldn't be transforming those anyway.");
geSmallPropertyStorage = getBoolean("smallPropertyStorage", "experimental", true, "Replaces the default BlockState/ExtendedBlockState implementations with a far more memory-efficient variant.");
geBlockPosPatch = getBoolean("optimizedBlockPos", "coremod", true, "Optimizes BlockPos mutable/immutable getters to run on the same variables, letting them be inlined and thus theoretically increasing performance.");
clBlockInfoPatch = getBoolean("optimizedBlockInfo", "coremod", true, "Prevents BlockInfo from generating as many BlockPos objects; also, fixes a lighting bug.");
Expand Down

0 comments on commit 6a2bf8d

Please sign in to comment.