mirror of
https://github.com/GTNewHorizons/Angelica.git
synced 2026-11-26 07:03:02 +00:00
properly integrate mcpatcherforge connected textures + better grass (#745)
This commit is contained in:
1 parent
c353c83cf3
commit
5afb5d8f5a
28 files changed
+432
-266
No files matched your search
@@ -15,6 +15,7 @@ import com.gtnewhorizons.angelica.transform.compat.handlers.CompatHandlers;
|
||||
import cpw.mods.fml.relauncher.IFMLLoadingPlugin;
|
||||
import jss.notfine.asm.AsmTransformers;
|
||||
import jss.notfine.asm.mappings.Namer;
|
||||
import jss.notfine.config.MCPatcherForgeConfig;
|
||||
import org.apache.logging.log4j.Level;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
@@ -56,6 +57,7 @@ public class AngelicaTweaker implements IFMLLoadingPlugin, IEarlyMixinLoader {
|
||||
// Angelica Config
|
||||
ConfigurationManager.registerConfig(AngelicaConfig.class);
|
||||
ConfigurationManager.registerConfig(CompatConfig.class);
|
||||
MCPatcherForgeConfig.registerConfig();
|
||||
final LoggerContext ctx = (LoggerContext) LogManager.getContext(false);
|
||||
final Configuration config = ctx.getConfiguration();
|
||||
final LoggerConfig loggerConfig = config.getLoggerConfig(LogManager.ROOT_LOGGER_NAME);
|
||||
|
||||
@@ -307,7 +307,7 @@ public enum Mixins {
|
||||
),
|
||||
NOTFINE_NO_CUSTOM_ITEM_TEXTURES(new Builder("NotFine no Custom Item Textures")
|
||||
.setSide(Side.CLIENT).setPhase(Phase.EARLY)
|
||||
.setApplyIf(() -> !AngelicaConfig.enableMCPatcherForgeFeatures || !MCPatcherForgeConfig.instance().customItemTexturesEnabled)
|
||||
.setApplyIf(() -> !AngelicaConfig.enableMCPatcherForgeFeatures || !MCPatcherForgeConfig.CustomItemTextures.enabled)
|
||||
.addTargetedMod(TargetedMod.VANILLA)
|
||||
.addMixinClasses(addPrefix("notfine.glint.",
|
||||
"MixinItemRenderer",
|
||||
@@ -391,7 +391,7 @@ public enum Mixins {
|
||||
),
|
||||
MCPATCHER_FORGE_CUSTOM_COLORS(new Builder("MCP:F Custom Colors")
|
||||
.setSide(Mixins.Side.CLIENT).setPhase(Phase.EARLY)
|
||||
.setApplyIf(() -> AngelicaConfig.enableMCPatcherForgeFeatures && MCPatcherForgeConfig.instance().customColorsEnabled)
|
||||
.setApplyIf(() -> AngelicaConfig.enableMCPatcherForgeFeatures && MCPatcherForgeConfig.CustomColors.enabled)
|
||||
.addTargetedMod(TargetedMod.VANILLA)
|
||||
.addMixinClasses(addPrefix("mcpatcherforge.cc.",
|
||||
"block.material.MixinMapColor",
|
||||
@@ -447,7 +447,7 @@ public enum Mixins {
|
||||
),
|
||||
MCPATCHER_FORGE_CUSTOM_ITEM_TEXTURES(new Builder("MCP:F Custom Item Textures")
|
||||
.setSide(Side.CLIENT).setPhase(Phase.EARLY)
|
||||
.setApplyIf(() -> AngelicaConfig.enableMCPatcherForgeFeatures && MCPatcherForgeConfig.instance().customItemTexturesEnabled)
|
||||
.setApplyIf(() -> AngelicaConfig.enableMCPatcherForgeFeatures && MCPatcherForgeConfig.CustomItemTextures.enabled)
|
||||
.addTargetedMod(TargetedMod.VANILLA)
|
||||
.addMixinClasses(addPrefix("mcpatcherforge.cit.",
|
||||
"client.renderer.entity.MixinRenderBiped",
|
||||
@@ -466,13 +466,13 @@ public enum Mixins {
|
||||
),
|
||||
MCPATCHER_FORGE_CONNECTED_TEXTURES(new Builder("MCP:F Connected Textures")
|
||||
.setSide(Side.CLIENT).setPhase(Phase.EARLY)
|
||||
.setApplyIf(() -> AngelicaConfig.enableMCPatcherForgeFeatures && MCPatcherForgeConfig.instance().connectedTexturesEnabled)
|
||||
.setApplyIf(() -> AngelicaConfig.enableMCPatcherForgeFeatures && MCPatcherForgeConfig.ConnectedTextures.enabled)
|
||||
.addTargetedMod(TargetedMod.VANILLA)
|
||||
.addMixinClasses("mcpatcherforge.ctm.MixinRenderBlocks")
|
||||
),
|
||||
MCPATCHER_FORGE_EXTENDED_HD(new Builder("MCP:F Extended hd")
|
||||
.setSide(Side.CLIENT).setPhase(Phase.EARLY)
|
||||
.setApplyIf(() -> AngelicaConfig.enableMCPatcherForgeFeatures && MCPatcherForgeConfig.instance().extendedHDEnabled)
|
||||
.setApplyIf(() -> AngelicaConfig.enableMCPatcherForgeFeatures && MCPatcherForgeConfig.ExtendedHD.enabled)
|
||||
.addTargetedMod(TargetedMod.VANILLA)
|
||||
.addMixinClasses(addPrefix("mcpatcherforge.hd.",
|
||||
"MixinTextureClock",
|
||||
@@ -482,14 +482,14 @@ public enum Mixins {
|
||||
),
|
||||
MCPATCHER_FORGE_EXTENDED_HD_FONT(new Builder("MCP:F Extended HD Font")
|
||||
.setSide(Side.CLIENT).setPhase(Phase.EARLY)
|
||||
.setApplyIf(() -> (AngelicaConfig.enableMCPatcherForgeFeatures && MCPatcherForgeConfig.instance().extendedHDEnabled && MCPatcherForgeConfig.instance().hdFont))
|
||||
.setApplyIf(() -> (AngelicaConfig.enableMCPatcherForgeFeatures && MCPatcherForgeConfig.ExtendedHD.enabled && MCPatcherForgeConfig.ExtendedHD.hdFont))
|
||||
.addTargetedMod(TargetedMod.VANILLA)
|
||||
.addExcludedMod(TargetedMod.COFHCORE)
|
||||
.addMixinClasses("mcpatcherforge.hd.MixinFontRenderer")
|
||||
),
|
||||
MCPATCHER_FORGE_RANDOM_MOBS(new Builder("MCP:F Random Mobs")
|
||||
.setSide(Side.CLIENT).setPhase(Phase.EARLY)
|
||||
.setApplyIf(() -> AngelicaConfig.enableMCPatcherForgeFeatures && MCPatcherForgeConfig.instance().randomMobsEnabled)
|
||||
.setApplyIf(() -> AngelicaConfig.enableMCPatcherForgeFeatures && MCPatcherForgeConfig.RandomMobs.enabled)
|
||||
.addTargetedMod(TargetedMod.VANILLA)
|
||||
.addMixinClasses(addPrefix("mcpatcherforge.mob.",
|
||||
"MixinRender",
|
||||
@@ -506,7 +506,7 @@ public enum Mixins {
|
||||
),
|
||||
MCPATCHER_FORGE_SKY(new Builder("MCP:F Sky")
|
||||
.setSide(Side.CLIENT).setPhase(Phase.EARLY)
|
||||
.setApplyIf(() -> AngelicaConfig.enableMCPatcherForgeFeatures && MCPatcherForgeConfig.instance().betterSkiesEnabled)
|
||||
.setApplyIf(() -> AngelicaConfig.enableMCPatcherForgeFeatures && MCPatcherForgeConfig.BetterSkies.enabled)
|
||||
.addTargetedMod(TargetedMod.VANILLA)
|
||||
.addMixinClasses(addPrefix("mcpatcherforge.sky.",
|
||||
"MixinEffectRenderer",
|
||||
@@ -516,32 +516,32 @@ public enum Mixins {
|
||||
MCPATCHER_FORGE_CC_NO_CTM(new Builder("MCP:F Custom Colors, no Connected Textures")
|
||||
.setSide(Side.CLIENT).setPhase(Phase.EARLY)
|
||||
.setApplyIf(() -> AngelicaConfig.enableMCPatcherForgeFeatures
|
||||
&& !MCPatcherForgeConfig.instance().connectedTexturesEnabled
|
||||
&& MCPatcherForgeConfig.instance().customColorsEnabled)
|
||||
&& !MCPatcherForgeConfig.ConnectedTextures.enabled
|
||||
&& MCPatcherForgeConfig.CustomColors.enabled)
|
||||
.addTargetedMod(TargetedMod.VANILLA)
|
||||
.addMixinClasses("mcpatcherforge.cc_ctm.MixinRenderBlocksNoCTM")
|
||||
),
|
||||
MCPATCHER_FORGE_CTM_NO_CC(new Builder("MCP:F Connected Textures, no Custom Colours")
|
||||
.setSide(Side.CLIENT).setPhase(Phase.EARLY)
|
||||
.setApplyIf(() -> AngelicaConfig.enableMCPatcherForgeFeatures
|
||||
&& MCPatcherForgeConfig.instance().connectedTexturesEnabled
|
||||
&& !MCPatcherForgeConfig.instance().customColorsEnabled)
|
||||
&& MCPatcherForgeConfig.ConnectedTextures.enabled
|
||||
&& !MCPatcherForgeConfig.CustomColors.enabled)
|
||||
.addTargetedMod(TargetedMod.VANILLA)
|
||||
.addMixinClasses("mcpatcherforge.ctm_cc.MixinRenderBlocksNoCC")
|
||||
),
|
||||
MCPATCHER_FORGE_CTM_AND_CC(new Builder("MCP:F Connected Textures and Custom Colors")
|
||||
.setSide(Side.CLIENT).setPhase(Phase.EARLY)
|
||||
.setApplyIf(() -> AngelicaConfig.enableMCPatcherForgeFeatures
|
||||
&& MCPatcherForgeConfig.instance().connectedTexturesEnabled
|
||||
&& MCPatcherForgeConfig.instance().customColorsEnabled)
|
||||
&& MCPatcherForgeConfig.ConnectedTextures.enabled
|
||||
&& MCPatcherForgeConfig.CustomColors.enabled)
|
||||
.addTargetedMod(TargetedMod.VANILLA)
|
||||
.addMixinClasses("mcpatcherforge.ctm_cc.MixinRenderBlocks")
|
||||
),
|
||||
MCPATCHER_FORGE_CTM_OR_CC(new Builder("MCP:F Connected Textures or Custom Colors")
|
||||
.setSide(Side.CLIENT).setPhase(Phase.EARLY)
|
||||
.setApplyIf(() -> AngelicaConfig.enableMCPatcherForgeFeatures
|
||||
&& MCPatcherForgeConfig.instance().connectedTexturesEnabled
|
||||
|| MCPatcherForgeConfig.instance().customColorsEnabled)
|
||||
&& MCPatcherForgeConfig.ConnectedTextures.enabled
|
||||
|| MCPatcherForgeConfig.CustomColors.enabled)
|
||||
.addTargetedMod(TargetedMod.VANILLA)
|
||||
.addMixinClasses("mcpatcherforge.ctm_cc.MixinTextureMap")
|
||||
),
|
||||
@@ -584,7 +584,7 @@ public enum Mixins {
|
||||
NotFineConfig.loadSettings();
|
||||
//This may be possible to handle differently or fix.
|
||||
if(loadedCoreMods.contains("cofh.asm.LoadingPlugin")) {
|
||||
MCPatcherForgeConfig.instance().hdFont = false;
|
||||
MCPatcherForgeConfig.ExtendedHD.hdFont = false;
|
||||
}
|
||||
final List<String> mixins = new ArrayList<>();
|
||||
final List<String> notLoading = new ArrayList<>();
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.prupe.mcpatcher;
|
||||
|
||||
import jss.notfine.config.MCPatcherForgeConfig;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.logging.Formatter;
|
||||
@@ -8,10 +10,10 @@ import java.util.logging.Level;
|
||||
import java.util.logging.LogRecord;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import jss.notfine.config.MCPatcherForgeConfig;
|
||||
|
||||
public class MCLogger {
|
||||
|
||||
private static final org.apache.logging.log4j.Logger MAIN_LOGGER = org.apache.logging.log4j.LogManager.getLogger("MCPatcherForge");
|
||||
|
||||
private static final Map<String, MCLogger> allLoggers = new HashMap<>();
|
||||
|
||||
public static final Level ERROR = new ErrorLevel();
|
||||
@@ -44,16 +46,15 @@ public class MCLogger {
|
||||
private MCLogger(Category category, String logPrefix) {
|
||||
this.logPrefix = logPrefix;
|
||||
logger = Logger.getLogger(category.name);
|
||||
MCPatcherForgeConfig config = MCPatcherForgeConfig.instance();
|
||||
logger.setLevel(Level.parse(switch (category) {
|
||||
case CUSTOM_COLORS -> config.customColorsLoggingLevel;
|
||||
case CUSTOM_ITEM_TEXTURES -> config.customItemTexturesLoggingLevel;
|
||||
case CONNECTED_TEXTURES -> config.connectedTexturesLoggingLevel;
|
||||
case EXTENDED_HD -> config.extendedHDLoggingLevel;
|
||||
case RANDOM_MOBS -> config.randomMobsLoggingLevel;
|
||||
case BETTER_SKIES -> config.betterSkiesLoggingLevel;
|
||||
default -> Level.INFO.getName();
|
||||
}));
|
||||
logger.setLevel(switch (category) {
|
||||
case CUSTOM_COLORS -> MCPatcherForgeConfig.CustomColors.logging.level;
|
||||
case CUSTOM_ITEM_TEXTURES -> MCPatcherForgeConfig.CustomItemTextures.logging.level;
|
||||
case CONNECTED_TEXTURES -> MCPatcherForgeConfig.ConnectedTextures.logging.level;
|
||||
case EXTENDED_HD -> MCPatcherForgeConfig.ExtendedHD.logging.level;
|
||||
case RANDOM_MOBS -> MCPatcherForgeConfig.RandomMobs.logging.level;
|
||||
case BETTER_SKIES -> MCPatcherForgeConfig.BetterSkies.logging.level;
|
||||
default -> Level.INFO;
|
||||
});
|
||||
|
||||
logger.setUseParentHandlers(false);
|
||||
logger.addHandler(new Handler() {
|
||||
@@ -72,14 +73,14 @@ public class MCLogger {
|
||||
prefix.append("\n");
|
||||
message = message.substring(1);
|
||||
}
|
||||
return prefix + "[" + MCLogger.this.logPrefix + "] " + level.toString() + ": " + message;
|
||||
return prefix + "[" + MCLogger.this.logPrefix + "/" + level.toString() + "]: " + message;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@Override
|
||||
public void publish(LogRecord record) {
|
||||
System.out.println(formatter.format(record));
|
||||
MAIN_LOGGER.info(formatter.format(record));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -34,14 +34,14 @@ public class ColorizeBlock {
|
||||
|
||||
private static final MCLogger logger = MCLogger.getLogger(MCLogger.Category.CUSTOM_COLORS);
|
||||
|
||||
private static final boolean useWaterColors = MCPatcherForgeConfig.instance().ccWater;
|
||||
private static final boolean useTreeColors = MCPatcherForgeConfig.instance().ccTree;
|
||||
private static final boolean useRedstoneColors = MCPatcherForgeConfig.instance().ccRedstone;
|
||||
private static final boolean useStemColors = MCPatcherForgeConfig.instance().ccStem;
|
||||
private static final boolean useBlockColors = MCPatcherForgeConfig.instance().ccOtherBlocks;
|
||||
private static final boolean useWaterColors = MCPatcherForgeConfig.CustomColors.water;
|
||||
private static final boolean useTreeColors = MCPatcherForgeConfig.CustomColors.tree;
|
||||
private static final boolean useRedstoneColors = MCPatcherForgeConfig.CustomColors.redstone;
|
||||
private static final boolean useStemColors = MCPatcherForgeConfig.CustomColors.stem;
|
||||
private static final boolean useBlockColors = MCPatcherForgeConfig.CustomColors.otherBlocks;
|
||||
|
||||
private static final boolean enableSmoothBiomes = MCPatcherForgeConfig.instance().smoothBiomes;
|
||||
private static final boolean enableTestColorSmoothing = MCPatcherForgeConfig.instance().testColorSmoothing;
|
||||
private static final boolean enableSmoothBiomes = MCPatcherForgeConfig.CustomColors.smoothBiomes;
|
||||
private static final boolean enableTestColorSmoothing = MCPatcherForgeConfig.CustomColors.testColorSmoothing;
|
||||
|
||||
private static final ResourceLocation REDSTONE_COLORS = TexturePackAPI
|
||||
.newMCPatcherResourceLocation("colormap/redstone.png");
|
||||
@@ -73,7 +73,7 @@ public class ColorizeBlock {
|
||||
private static IColorMap waterColorMap;
|
||||
private static float[][] redstoneColor; // colormap/redstone.png
|
||||
|
||||
private static final int blockBlendRadius = MCPatcherForgeConfig.instance().blockBlendRadius;
|
||||
private static final int blockBlendRadius = MCPatcherForgeConfig.CustomColors.blockBlendRadius;
|
||||
|
||||
public static int blockColor;
|
||||
public static boolean isSmooth;
|
||||
|
||||
@@ -26,7 +26,7 @@ import jss.notfine.config.MCPatcherForgeConfig;
|
||||
|
||||
public class ColorizeWorld {
|
||||
|
||||
private static final int fogBlendRadius = MCPatcherForgeConfig.instance().fogBlendRadius;
|
||||
private static final int fogBlendRadius = MCPatcherForgeConfig.CustomColors.fogBlendRadius;
|
||||
|
||||
private static final ResourceLocation UNDERWATERCOLOR = TexturePackAPI
|
||||
.newMCPatcherResourceLocation("colormap/underwater.png");
|
||||
|
||||
@@ -20,15 +20,15 @@ public class Colorizer {
|
||||
static final ResourceLocation COLOR_PROPERTIES = TexturePackAPI.newMCPatcherResourceLocation("color.properties");
|
||||
private static PropertiesFile properties;
|
||||
|
||||
static final boolean usePotionColors = MCPatcherForgeConfig.instance().ccPotion;
|
||||
static final boolean useParticleColors = MCPatcherForgeConfig.instance().ccParticle;
|
||||
static final boolean useFogColors = MCPatcherForgeConfig.instance().ccFog;
|
||||
static final boolean useCloudType = MCPatcherForgeConfig.instance().ccClouds;
|
||||
static final boolean useMapColors = MCPatcherForgeConfig.instance().ccMap;
|
||||
static final boolean useDyeColors = MCPatcherForgeConfig.instance().ccDye;
|
||||
static final boolean useTextColors = MCPatcherForgeConfig.instance().ccText;
|
||||
static final boolean useXPOrbColors = MCPatcherForgeConfig.instance().ccXPOrb;
|
||||
static final boolean useEggColors = MCPatcherForgeConfig.instance().ccEgg;
|
||||
static final boolean usePotionColors = MCPatcherForgeConfig.CustomColors.potion;
|
||||
static final boolean useParticleColors = MCPatcherForgeConfig.CustomColors.particle;
|
||||
static final boolean useFogColors = MCPatcherForgeConfig.CustomColors.fog;
|
||||
static final boolean useCloudType = MCPatcherForgeConfig.CustomColors.clouds;
|
||||
static final boolean useMapColors = MCPatcherForgeConfig.CustomColors.map;
|
||||
static final boolean useDyeColors = MCPatcherForgeConfig.CustomColors.dye;
|
||||
static final boolean useTextColors = MCPatcherForgeConfig.CustomColors.text;
|
||||
static final boolean useXPOrbColors = MCPatcherForgeConfig.CustomColors.xporb;
|
||||
static final boolean useEggColors = MCPatcherForgeConfig.CustomColors.egg;
|
||||
|
||||
public static final float[] setColor = new float[3];
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ public final class Lightmap {
|
||||
private static final int HEIGHT_WITHOUT_NIGHTVISION = 2 * LIGHTMAP_SIZE;
|
||||
private static final int HEIGHT_WITH_NIGHTVISION = 4 * LIGHTMAP_SIZE;
|
||||
|
||||
private static final boolean useLightmaps = MCPatcherForgeConfig.instance().ccLightmaps;
|
||||
private static final boolean useLightmaps = MCPatcherForgeConfig.CustomColors.lightmaps;
|
||||
|
||||
private static final Map<Integer, Lightmap> lightmaps = new HashMap<>();
|
||||
|
||||
|
||||
@@ -46,9 +46,9 @@ public class CITUtils {
|
||||
static Item itemCompass;
|
||||
static Item itemClock;
|
||||
|
||||
static final boolean enableItems = MCPatcherForgeConfig.instance().citItems;
|
||||
static final boolean enableEnchantments = MCPatcherForgeConfig.instance().citEnchantments;
|
||||
static final boolean enableArmor = MCPatcherForgeConfig.instance().citArmor;
|
||||
static final boolean enableItems = MCPatcherForgeConfig.CustomItemTextures.items;
|
||||
static final boolean enableEnchantments = MCPatcherForgeConfig.CustomItemTextures.enchantments;
|
||||
static final boolean enableArmor = MCPatcherForgeConfig.CustomItemTextures.armor;
|
||||
|
||||
private static TileLoader tileLoader;
|
||||
private static final Map<Item, List<ItemOverride>> items = new IdentityHashMap<>();
|
||||
|
||||
@@ -9,7 +9,6 @@ import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
@@ -32,9 +31,6 @@ public class CTMUtils {
|
||||
|
||||
private static final MCLogger logger = MCLogger.getLogger(MCLogger.Category.CONNECTED_TEXTURES, "CTM");
|
||||
|
||||
private static final boolean enableStandard = MCPatcherForgeConfig.instance().ctmStandard;
|
||||
private static final boolean enableNonStandard = MCPatcherForgeConfig.instance().ctmNonStandard;
|
||||
|
||||
private static final List<TileOverride> allOverrides = new ArrayList<>();
|
||||
private static final Map<Block, List<BlockStateMatcher>> blockOverrides = new IdentityHashMap<>();
|
||||
private static final Map<String, List<TileOverride>> tileOverrides = new HashMap<>();
|
||||
@@ -81,7 +77,7 @@ public class CTMUtils {
|
||||
tileLoader = new TileLoader("textures/blocks", logger);
|
||||
RenderPassAPI.instance.refreshBlendingOptions();
|
||||
|
||||
if (enableStandard || enableNonStandard) {
|
||||
if (MCPatcherForgeConfig.ConnectedTextures.standard || MCPatcherForgeConfig.ConnectedTextures.nonStandard) {
|
||||
for (ResourceLocation resource : ResourceList.getInstance()
|
||||
.listResources(TexturePackAPI.MCPATCHER_SUBDIR + "ctm", ".properties", true)) {
|
||||
registerOverride(TileOverride.create(resource, tileLoader));
|
||||
@@ -160,7 +156,7 @@ public class CTMUtils {
|
||||
public static void reset() {}
|
||||
|
||||
private static boolean checkFace(int face) {
|
||||
return face < 0 ? enableNonStandard : enableStandard;
|
||||
return face < 0 ? MCPatcherForgeConfig.ConnectedTextures.nonStandard : MCPatcherForgeConfig.ConnectedTextures.standard;
|
||||
}
|
||||
|
||||
private static boolean checkRenderType(Block block) {
|
||||
|
||||
@@ -12,8 +12,6 @@ import jss.notfine.config.MCPatcherForgeConfig;
|
||||
|
||||
public class GlassPaneRenderer {
|
||||
|
||||
private static final boolean enable = MCPatcherForgeConfig.instance().ctmGlassPane;
|
||||
|
||||
public static boolean skipPaneRendering;
|
||||
public static boolean skipTopEdgeRendering;
|
||||
public static boolean skipBottomEdgeRendering;
|
||||
@@ -47,7 +45,7 @@ public class GlassPaneRenderer {
|
||||
|
||||
private static boolean setupIcons(RenderBlocks renderBlocks, Block blockPane, IIcon origIcon, int x, int y, int z) {
|
||||
skipPaneRendering = skipBottomEdgeRendering = skipTopEdgeRendering = false;
|
||||
if (!enable) {
|
||||
if (!MCPatcherForgeConfig.ConnectedTextures.glassPane) {
|
||||
return false;
|
||||
}
|
||||
for (int face = BlockOrientation.NORTH_FACE; face <= BlockOrientation.EAST_FACE; face++) {
|
||||
|
||||
@@ -15,8 +15,6 @@ import jss.notfine.config.MCPatcherForgeConfig;
|
||||
|
||||
abstract public class TileOverrideIterator implements Iterator<TileOverride> {
|
||||
|
||||
private static final int MAX_RECURSION = MCPatcherForgeConfig.instance().maxRecursion;
|
||||
|
||||
private final Map<Block, List<BlockStateMatcher>> allBlockOverrides;
|
||||
private final Map<String, List<TileOverride>> allTileOverrides;
|
||||
|
||||
@@ -118,7 +116,7 @@ abstract public class TileOverrideIterator implements Iterator<TileOverride> {
|
||||
lastMatchedOverride = null;
|
||||
skipOverrides.clear();
|
||||
|
||||
pass: for (int pass = 0; pass < MAX_RECURSION; pass++) {
|
||||
pass: for (int pass = 0; pass < MCPatcherForgeConfig.ConnectedTextures.maxRecursion; pass++) {
|
||||
while (hasNext()) {
|
||||
TileOverride override = next();
|
||||
IIcon newIcon = getTile(override, renderBlockState, origIcon);
|
||||
|
||||
@@ -28,7 +28,7 @@ public class CustomAnimation implements Comparable<CustomAnimation> {
|
||||
|
||||
private static final MCLogger logger = MCLogger.getLogger(MCLogger.Category.EXTENDED_HD, "Animation");
|
||||
|
||||
private static final boolean enable = MCPatcherForgeConfig.instance().animations;
|
||||
private static final boolean enable = MCPatcherForgeConfig.ExtendedHD.animations;
|
||||
private static final Set<PropertiesFile> pending = new HashSet<>();
|
||||
private static final List<CustomAnimation> animations = new ArrayList<>();
|
||||
|
||||
|
||||
@@ -48,10 +48,10 @@ public class FancyDial {
|
||||
|
||||
private static final boolean fboSupported = GLContext.getCapabilities().GL_EXT_framebuffer_object;
|
||||
private static final boolean gl13Supported = GLContext.getCapabilities().OpenGL13;
|
||||
private static final boolean enableCompass = MCPatcherForgeConfig.instance().fancyCompass;
|
||||
private static final boolean enableClock = MCPatcherForgeConfig.instance().fancyClock;
|
||||
private static final boolean useGL13 = gl13Supported && MCPatcherForgeConfig.instance().useGL13;
|
||||
private static final boolean useScratchTexture = MCPatcherForgeConfig.instance().useScratchTexture;
|
||||
private static final boolean enableCompass = MCPatcherForgeConfig.ExtendedHD.fancyCompass;
|
||||
private static final boolean enableClock = MCPatcherForgeConfig.ExtendedHD.fancyClock;
|
||||
private static final boolean useGL13 = gl13Supported && MCPatcherForgeConfig.ExtendedHD.useGL13;
|
||||
private static final boolean useScratchTexture = MCPatcherForgeConfig.ExtendedHD.useScratchTexture;
|
||||
private static final int glAttributes;
|
||||
private static boolean initialized;
|
||||
private static boolean active;
|
||||
|
||||
@@ -21,8 +21,8 @@ public class FontUtils {
|
||||
|
||||
private static final MCLogger logger = MCLogger.getLogger(MCLogger.Category.EXTENDED_HD);
|
||||
|
||||
private static final boolean enable = MCPatcherForgeConfig.instance().hdFont;
|
||||
private static final boolean enableNonHD = MCPatcherForgeConfig.instance().nonHDFontWidth;
|
||||
private static final boolean enable = MCPatcherForgeConfig.ExtendedHD.hdFont;
|
||||
private static final boolean enableNonHD = MCPatcherForgeConfig.ExtendedHD.nonHDFontWidth;
|
||||
|
||||
private static final int ROWS = 16;
|
||||
private static final int COLS = 16;
|
||||
|
||||
@@ -32,8 +32,8 @@ public class MipmapHelper {
|
||||
static final int TEX_DATA_TYPE = GL12.GL_UNSIGNED_INT_8_8_8_8_REV;
|
||||
|
||||
private static final boolean mipmapSupported;
|
||||
static final boolean mipmapEnabled = MCPatcherForgeConfig.instance().mipmap;
|
||||
static final int maxMipmapLevel = MCPatcherForgeConfig.instance().maxMipMapLevel;
|
||||
static final boolean mipmapEnabled = MCPatcherForgeConfig.ExtendedHD.mipmap;
|
||||
static final int maxMipmapLevel = MCPatcherForgeConfig.ExtendedHD.maxMipMapLevel;
|
||||
private static final boolean useMipmap;
|
||||
|
||||
private static final boolean anisoSupported;
|
||||
@@ -53,14 +53,14 @@ public class MipmapHelper {
|
||||
if (anisoSupported) {
|
||||
anisoMax = (int) GL11.glGetFloat(EXTTextureFilterAnisotropic.GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT);
|
||||
checkGLError("glGetFloat(GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT)");
|
||||
anisoLevel = Math.max(Math.min(MCPatcherForgeConfig.instance().anisotropicFiltering, anisoMax), 1);
|
||||
anisoLevel = Math.max(Math.min(MCPatcherForgeConfig.ExtendedHD.anisotropicFiltering, anisoMax), 1);
|
||||
} else {
|
||||
anisoMax = anisoLevel = 1;
|
||||
}
|
||||
|
||||
lodSupported = GLContext.getCapabilities().GL_EXT_texture_lod_bias;
|
||||
if (lodSupported) {
|
||||
lodBias = MCPatcherForgeConfig.instance().lodBias;
|
||||
lodBias = MCPatcherForgeConfig.ExtendedHD.lodBias;
|
||||
} else {
|
||||
lodBias = 0;
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ abstract public class ColorMap implements IColorMap {
|
||||
|
||||
private static final MCLogger logger = MCLogger.getLogger(MCLogger.Category.CUSTOM_COLORS);
|
||||
|
||||
public static final boolean useSwampColors = MCPatcherForgeConfig.instance().swampColors;
|
||||
public static final boolean useSwampColors = MCPatcherForgeConfig.CustomColors.swampColors;
|
||||
|
||||
private static final int FIXED = 0;
|
||||
private static final int TEMPERATURE_HUMIDITY = 1;
|
||||
@@ -165,7 +165,7 @@ abstract public class ColorMap implements IColorMap {
|
||||
unusedPNGs.clear();
|
||||
defaultColorMapFormat = TEMPERATURE_HUMIDITY;
|
||||
defaultFlipY = false;
|
||||
defaultYVariance = MCPatcherForgeConfig.instance().yVariance;
|
||||
defaultYVariance = MCPatcherForgeConfig.CustomColors.yVariance;
|
||||
}
|
||||
|
||||
public static void reloadColorMapSettings(PropertiesFile properties) {
|
||||
|
||||
@@ -11,8 +11,6 @@ import jss.notfine.config.MCPatcherForgeConfig;
|
||||
// Shared by both CTM and Custom Colors.
|
||||
public class RenderBlocksUtils {
|
||||
|
||||
public static final boolean enableBetterGrass = MCPatcherForgeConfig.instance().betterGrass;
|
||||
|
||||
private static final int COLOR = 0;
|
||||
private static final int NONCOLOR = 1;
|
||||
private static final int COLOR_AND_NONCOLOR = 2;
|
||||
@@ -35,7 +33,7 @@ public class RenderBlocksUtils {
|
||||
colorMultiplierType[5] = COLOR;
|
||||
} else if (block == Blocks.grass) {
|
||||
colorMultiplierType[0] = NONCOLOR;
|
||||
if (enableBetterGrass) {
|
||||
if (MCPatcherForgeConfig.ConnectedTextures.betterGrass) {
|
||||
if (isSnowCovered(blockAccess, x, y, z)) {
|
||||
colorMultiplierType[2] = NONCOLOR;
|
||||
colorMultiplierType[3] = NONCOLOR;
|
||||
@@ -135,7 +133,7 @@ public class RenderBlocksUtils {
|
||||
|
||||
public static IIcon getGrassTexture(Block block, IBlockAccess blockAccess, int x, int y, int z, int face,
|
||||
IIcon topIcon) {
|
||||
if (!enableBetterGrass || face < 2) {
|
||||
if (!MCPatcherForgeConfig.ConnectedTextures.betterGrass || face < 2) {
|
||||
return null;
|
||||
}
|
||||
boolean isSnow = isSnowCovered(blockAccess, x, y, z);
|
||||
|
||||
@@ -31,7 +31,6 @@ public class TileLoader {
|
||||
|
||||
private static final List<TileLoader> loaders = new ArrayList<>();
|
||||
|
||||
private static final boolean debugTextures = MCPatcherForgeConfig.instance().debugTextures;
|
||||
private static final Map<String, String> specialTextures = new HashMap<>();
|
||||
|
||||
private static final TexturePackChangeHandler changeHandler;
|
||||
@@ -220,7 +219,7 @@ public class TileLoader {
|
||||
return true;
|
||||
}
|
||||
BufferedImage image = null;
|
||||
if (!debugTextures) {
|
||||
if (!MCPatcherForgeConfig.ConnectedTextures.debugTextures) {
|
||||
image = TexturePackAPI.getImage(resource);
|
||||
if (image == null) {
|
||||
subLogger.warning("missing %s", resource);
|
||||
|
||||
@@ -20,7 +20,7 @@ public class LineRenderer {
|
||||
private static final double D_WIDTH = 1.0 / 1024.0;
|
||||
private static final double D_POS = 1.0 / 256.0;
|
||||
|
||||
private static final boolean enable = MCPatcherForgeConfig.instance().leashLine;
|
||||
private static final boolean enable = MCPatcherForgeConfig.RandomMobs.leashLine;
|
||||
private static final LineRenderer[] renderers = new LineRenderer[2];
|
||||
|
||||
private final ResourceLocation texture;
|
||||
|
||||
@@ -23,7 +23,7 @@ public class FireworksHelper {
|
||||
.newMCPatcherResourceLocation("particle.properties");
|
||||
|
||||
private static final MCLogger logger = MCLogger.getLogger(MCLogger.Category.BETTER_SKIES);
|
||||
private static final boolean enable = MCPatcherForgeConfig.instance().brightenFireworks;
|
||||
private static final boolean enable = MCPatcherForgeConfig.BetterSkies.brightenFireworks;
|
||||
private static BlendMethod blendMethod;
|
||||
|
||||
public static int getFXLayer(EntityFX entity) {
|
||||
|
||||
@@ -28,9 +28,9 @@ public class SkyRenderer {
|
||||
|
||||
private static final MCLogger logger = MCLogger.getLogger(MCLogger.Category.BETTER_SKIES);
|
||||
|
||||
private static final boolean enable = MCPatcherForgeConfig.instance().skybox;
|
||||
private static final boolean unloadTextures = MCPatcherForgeConfig.instance().unloadTextures;
|
||||
public static final double horizonHeight = MCPatcherForgeConfig.instance().horizon;
|
||||
private static final boolean enable = MCPatcherForgeConfig.BetterSkies.skybox;
|
||||
private static final boolean unloadTextures = MCPatcherForgeConfig.BetterSkies.unloadTextures;
|
||||
public static final double horizonHeight = MCPatcherForgeConfig.BetterSkies.horizon;
|
||||
|
||||
private static double worldTime;
|
||||
private static float celestialAngle;
|
||||
|
||||
@@ -7,6 +7,7 @@ import cpw.mods.fml.common.Mod;
|
||||
version = "1.0.0-alpha",
|
||||
name = "MCPatcherForge",
|
||||
acceptedMinecraftVersions = "[1.7.10]",
|
||||
acceptableRemoteVersions = "*")
|
||||
acceptableRemoteVersions = "*",
|
||||
guiFactory = "jss.notfine.config.MCPatcherForgeGuiConfigFactory")
|
||||
public class McPatcherForge {
|
||||
}
|
||||
@@ -18,7 +18,7 @@ import jss.notfine.config.NotFineConfig;
|
||||
public enum AsmTransformers {
|
||||
|
||||
RENDERBLOCKS("RenderBlocks transformer", () -> AngelicaConfig.enableMCPatcherForgeFeatures
|
||||
&& MCPatcherForgeConfig.instance().customColorsEnabled,
|
||||
&& MCPatcherForgeConfig.CustomColors.enabled,
|
||||
Side.CLIENT, "jss.notfine.asm.RenderBlocksTransformer"),
|
||||
WORLDRENDERER("WorldRenderer transformer", () -> NotFineConfig.renderPass, Side.CLIENT,
|
||||
"jss.notfine.asm.WorldRendererTransformer");
|
||||
|
||||
@@ -1,179 +1,296 @@
|
||||
package jss.notfine.config;
|
||||
|
||||
import java.io.File;
|
||||
import com.gtnewhorizon.gtnhlib.config.Config;
|
||||
import com.gtnewhorizon.gtnhlib.config.ConfigException;
|
||||
import com.gtnewhorizon.gtnhlib.config.ConfigurationManager;
|
||||
|
||||
import java.util.logging.Level;
|
||||
|
||||
import net.minecraft.launchwrapper.Launch;
|
||||
import net.minecraftforge.common.config.Configuration;
|
||||
|
||||
// Adapted from hodgepodge
|
||||
public class MCPatcherForgeConfig {
|
||||
|
||||
private static MCPatcherForgeConfig config;
|
||||
@Config(modid = "mcpatcherforge", category = "custom_colors")
|
||||
public static class CustomColors {
|
||||
@Config.Comment("Enable the custom colors module")
|
||||
@Config.DefaultBoolean(true)
|
||||
@Config.RequiresMcRestart
|
||||
public static boolean enabled;
|
||||
|
||||
// CUSTOM_COLORS
|
||||
public boolean customColorsEnabled;
|
||||
public String customColorsLoggingLevel;
|
||||
public int yVariance;
|
||||
public int blockBlendRadius;
|
||||
public int fogBlendRadius;
|
||||
public boolean swampColors;
|
||||
public boolean ccWater;
|
||||
public boolean ccTree;
|
||||
public boolean ccRedstone;
|
||||
public boolean ccStem;
|
||||
public boolean ccOtherBlocks;
|
||||
public boolean smoothBiomes;
|
||||
public boolean testColorSmoothing;
|
||||
public boolean ccPotion;
|
||||
public boolean ccParticle;
|
||||
public boolean ccFog;
|
||||
public boolean ccClouds;
|
||||
public boolean ccMap;
|
||||
public boolean ccDye;
|
||||
public boolean ccText;
|
||||
public boolean ccXPOrb;
|
||||
public boolean ccEgg;
|
||||
public boolean ccLightmaps;
|
||||
@Config.Comment("logging level")
|
||||
@Config.DefaultEnum("INFO")
|
||||
@Config.RequiresMcRestart
|
||||
public static LogLevel logging;
|
||||
|
||||
// CUSTOM_ITEM_TEXTURES
|
||||
public boolean customItemTexturesEnabled;
|
||||
public String customItemTexturesLoggingLevel;
|
||||
public boolean citItems;
|
||||
public boolean citEnchantments;
|
||||
public boolean citArmor;
|
||||
@Config.DefaultInt(0)
|
||||
@Config.RequiresMcRestart
|
||||
public static int yVariance;
|
||||
|
||||
// CONNECTED_TEXTURES
|
||||
public boolean connectedTexturesEnabled;
|
||||
public String connectedTexturesLoggingLevel;
|
||||
public int maxRecursion;
|
||||
public boolean debugTextures;
|
||||
public boolean betterGrass;
|
||||
public boolean ctmStandard;
|
||||
public boolean ctmNonStandard;
|
||||
public boolean ctmGlassPane;
|
||||
@Config.DefaultInt(4)
|
||||
@Config.RequiresMcRestart
|
||||
public static int blockBlendRadius;
|
||||
|
||||
// EXTENDED_HD
|
||||
public boolean extendedHDEnabled;
|
||||
public String extendedHDLoggingLevel;
|
||||
public int maxMipMapLevel;
|
||||
public int anisotropicFiltering;
|
||||
public int lodBias;
|
||||
public boolean animations;
|
||||
public boolean fancyCompass;
|
||||
public boolean fancyClock;
|
||||
public boolean useGL13;
|
||||
public boolean useScratchTexture;
|
||||
public boolean hdFont;
|
||||
public boolean nonHDFontWidth;
|
||||
public boolean mipmap;
|
||||
@Config.DefaultInt(7)
|
||||
@Config.RequiresMcRestart
|
||||
public static int fogBlendRadius;
|
||||
|
||||
// RANDOM_MOBS
|
||||
public boolean randomMobsEnabled;
|
||||
public String randomMobsLoggingLevel;
|
||||
public boolean leashLine;
|
||||
@Config.DefaultBoolean(true)
|
||||
@Config.RequiresMcRestart
|
||||
public static boolean swampColors;
|
||||
|
||||
// BETTER_SKIES
|
||||
public boolean betterSkiesEnabled;
|
||||
public String betterSkiesLoggingLevel;
|
||||
public int horizon;
|
||||
public boolean brightenFireworks;
|
||||
public boolean skybox;
|
||||
public boolean unloadTextures;
|
||||
@Config.DefaultBoolean(true)
|
||||
@Config.RequiresMcRestart
|
||||
public static boolean water;
|
||||
|
||||
public enum Category {
|
||||
@Config.DefaultBoolean(true)
|
||||
@Config.RequiresMcRestart
|
||||
public static boolean tree;
|
||||
|
||||
CUSTOM_COLORS,
|
||||
CUSTOM_ITEM_TEXTURES,
|
||||
CONNECTED_TEXTURES,
|
||||
EXTENDED_HD,
|
||||
RANDOM_MOBS,
|
||||
BETTER_SKIES;
|
||||
@Config.DefaultBoolean(true)
|
||||
@Config.RequiresMcRestart
|
||||
public static boolean redstone;
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return name().toLowerCase();
|
||||
}
|
||||
@Config.DefaultBoolean(true)
|
||||
@Config.RequiresMcRestart
|
||||
public static boolean stem;
|
||||
|
||||
@Config.DefaultBoolean(true)
|
||||
@Config.RequiresMcRestart
|
||||
public static boolean otherBlocks;
|
||||
|
||||
@Config.DefaultBoolean(true)
|
||||
@Config.RequiresMcRestart
|
||||
public static boolean smoothBiomes;
|
||||
|
||||
@Config.DefaultBoolean(false)
|
||||
@Config.RequiresMcRestart
|
||||
public static boolean testColorSmoothing;
|
||||
|
||||
@Config.DefaultBoolean(true)
|
||||
@Config.RequiresMcRestart
|
||||
public static boolean potion;
|
||||
|
||||
@Config.DefaultBoolean(true)
|
||||
@Config.RequiresMcRestart
|
||||
public static boolean particle;
|
||||
|
||||
@Config.DefaultBoolean(true)
|
||||
@Config.RequiresMcRestart
|
||||
public static boolean fog;
|
||||
|
||||
@Config.DefaultBoolean(true)
|
||||
@Config.RequiresMcRestart
|
||||
public static boolean clouds;
|
||||
|
||||
@Config.DefaultBoolean(true)
|
||||
@Config.RequiresMcRestart
|
||||
public static boolean map;
|
||||
|
||||
@Config.DefaultBoolean(true)
|
||||
@Config.RequiresMcRestart
|
||||
public static boolean dye;
|
||||
|
||||
@Config.DefaultBoolean(true)
|
||||
@Config.RequiresMcRestart
|
||||
public static boolean text;
|
||||
|
||||
@Config.DefaultBoolean(true)
|
||||
@Config.RequiresMcRestart
|
||||
public static boolean xporb;
|
||||
|
||||
@Config.DefaultBoolean(true)
|
||||
@Config.RequiresMcRestart
|
||||
public static boolean egg;
|
||||
|
||||
@Config.DefaultBoolean(true)
|
||||
@Config.RequiresMcRestart
|
||||
public static boolean lightmaps;
|
||||
}
|
||||
|
||||
public static MCPatcherForgeConfig instance() {
|
||||
if (config == null) {
|
||||
config = new MCPatcherForgeConfig(new File(Launch.minecraftHome, "config/mcpatcherforge.cfg"));
|
||||
}
|
||||
return config;
|
||||
@Config(modid = "mcpatcherforge", category = "custom_item_textures")
|
||||
public static class CustomItemTextures {
|
||||
@Config.Comment("Enable the custom item textures module")
|
||||
@Config.DefaultBoolean(true)
|
||||
@Config.RequiresMcRestart
|
||||
public static boolean enabled;
|
||||
|
||||
@Config.Comment("logging level")
|
||||
@Config.DefaultEnum("INFO")
|
||||
@Config.RequiresMcRestart
|
||||
public static LogLevel logging;
|
||||
|
||||
@Config.DefaultBoolean(true)
|
||||
@Config.RequiresMcRestart
|
||||
public static boolean items;
|
||||
|
||||
@Config.DefaultBoolean(true)
|
||||
@Config.RequiresMcRestart
|
||||
public static boolean enchantments;
|
||||
|
||||
@Config.DefaultBoolean(true)
|
||||
@Config.RequiresMcRestart
|
||||
public static boolean armor;
|
||||
}
|
||||
|
||||
public MCPatcherForgeConfig(File file) {
|
||||
Configuration config = new Configuration(file);
|
||||
@Config(modid = "mcpatcherforge", category = "connected_textures")
|
||||
public static class ConnectedTextures {
|
||||
@Config.Comment("Enable the connected textures module")
|
||||
@Config.DefaultBoolean(true)
|
||||
@Config.RequiresMcRestart
|
||||
public static boolean enabled;
|
||||
|
||||
// spotless:off
|
||||
@Config.Comment("logging level")
|
||||
@Config.DefaultEnum("INFO")
|
||||
@Config.RequiresMcRestart
|
||||
public static LogLevel logging;
|
||||
|
||||
customColorsEnabled = config.get(Category.CUSTOM_COLORS.toString(),"enabled",true,"Enable the custom colors module").getBoolean();
|
||||
customColorsLoggingLevel = config.get(Category.CUSTOM_COLORS.toString(),"logging",Level.INFO.getName(),"logging level").getString();
|
||||
yVariance = config.get(Category.CUSTOM_COLORS.toString(),"yVariance",0).getInt();
|
||||
blockBlendRadius = config.get(Category.CUSTOM_COLORS.toString(),"blockBlendRadius",4).getInt();
|
||||
fogBlendRadius = config.get(Category.CUSTOM_COLORS.toString(),"fogBlendRadius",7).getInt();
|
||||
swampColors = config.get(Category.CUSTOM_COLORS.toString(),"swampColors",true).getBoolean();
|
||||
ccWater = config.get(Category.CUSTOM_COLORS.toString(),"water",true).getBoolean();
|
||||
ccTree = config.get(Category.CUSTOM_COLORS.toString(),"tree",true).getBoolean();
|
||||
ccRedstone = config.get(Category.CUSTOM_COLORS.toString(),"redstone",true).getBoolean();
|
||||
ccStem = config.get(Category.CUSTOM_COLORS.toString(),"stem",true).getBoolean();
|
||||
ccOtherBlocks = config.get(Category.CUSTOM_COLORS.toString(),"otherBlocks",true).getBoolean();
|
||||
smoothBiomes = config.get(Category.CUSTOM_COLORS.toString(),"smoothBiomes",true).getBoolean();
|
||||
testColorSmoothing = config.get(Category.CUSTOM_COLORS.toString(),"testColorSmoothing",false).getBoolean();
|
||||
ccPotion = config.get(Category.CUSTOM_COLORS.toString(),"potion",true).getBoolean();
|
||||
ccParticle = config.get(Category.CUSTOM_COLORS.toString(),"particle",true).getBoolean();
|
||||
ccFog = config.get(Category.CUSTOM_COLORS.toString(),"fog",true).getBoolean();
|
||||
ccClouds = config.get(Category.CUSTOM_COLORS.toString(),"clouds",true).getBoolean();
|
||||
ccMap = config.get(Category.CUSTOM_COLORS.toString(),"map",true).getBoolean();
|
||||
ccDye = config.get(Category.CUSTOM_COLORS.toString(),"dye",true).getBoolean();
|
||||
ccText = config.get(Category.CUSTOM_COLORS.toString(),"text",true).getBoolean();
|
||||
ccXPOrb = config.get(Category.CUSTOM_COLORS.toString(),"xporb",true).getBoolean();
|
||||
ccEgg = config.get(Category.CUSTOM_COLORS.toString(),"egg",true).getBoolean();
|
||||
ccLightmaps = config.get(Category.CUSTOM_COLORS.toString(),"lightmaps",true).getBoolean();
|
||||
@Config.DefaultInt(4)
|
||||
public static int maxRecursion;
|
||||
|
||||
customItemTexturesEnabled = config.get(Category.CUSTOM_ITEM_TEXTURES.toString(),"enabled",true,"Enable the custom item textures module").getBoolean();
|
||||
customItemTexturesLoggingLevel = config.get(Category.CUSTOM_ITEM_TEXTURES.toString(),"logging",Level.INFO.getName(),"logging level").getString();
|
||||
citItems = config.get(Category.CUSTOM_ITEM_TEXTURES.toString(),"items",true).getBoolean();
|
||||
citEnchantments = config.get(Category.CUSTOM_ITEM_TEXTURES.toString(),"enchantments",true).getBoolean();
|
||||
citArmor = config.get(Category.CUSTOM_ITEM_TEXTURES.toString(),"armor",true).getBoolean();
|
||||
@Config.DefaultBoolean(false)
|
||||
public static boolean debugTextures;
|
||||
|
||||
connectedTexturesEnabled = config.get(Category.CONNECTED_TEXTURES.toString(),"enabled",true,"Enable the connected textures module").getBoolean();
|
||||
connectedTexturesLoggingLevel = config.get(Category.CONNECTED_TEXTURES.toString(),"logging",Level.INFO.getName(),"logging level").getString();
|
||||
maxRecursion = config.get(Category.CONNECTED_TEXTURES.toString(),"maxRecursion",4).getInt();
|
||||
debugTextures = config.get(Category.CONNECTED_TEXTURES.toString(),"debugTextures",false).getBoolean();
|
||||
betterGrass = config.get(Category.CONNECTED_TEXTURES.toString(),"betterGrass",false).getBoolean();
|
||||
ctmStandard = config.get(Category.CONNECTED_TEXTURES.toString(),"standard",true).getBoolean();
|
||||
ctmNonStandard = config.get(Category.CONNECTED_TEXTURES.toString(),"nonStandard",true).getBoolean();
|
||||
ctmGlassPane = config.get(Category.CONNECTED_TEXTURES.toString(),"glassPane",false).getBoolean();
|
||||
@Config.DefaultBoolean(false)
|
||||
public static boolean betterGrass;
|
||||
|
||||
extendedHDEnabled = config.get(Category.EXTENDED_HD.toString(),"enabled",true,"Enable the extended hd module").getBoolean();
|
||||
extendedHDLoggingLevel = config.get(Category.EXTENDED_HD.toString(),"logging",Level.INFO.getName(),"logging level").getString();
|
||||
maxMipMapLevel = config.get(Category.EXTENDED_HD.toString(),"maxMipMapLevel",3).getInt();
|
||||
anisotropicFiltering = config.get(Category.EXTENDED_HD.toString(),"anisotropicFiltering",1).getInt();
|
||||
lodBias = config.get(Category.EXTENDED_HD.toString(),"lod bias",0).getInt();
|
||||
@Config.DefaultBoolean(true)
|
||||
public static boolean standard;
|
||||
|
||||
animations = config.get(Category.EXTENDED_HD.toString(),"animations",true).getBoolean();
|
||||
fancyCompass = config.get(Category.EXTENDED_HD.toString(),"fancyCompass",true).getBoolean();
|
||||
fancyClock = config.get(Category.EXTENDED_HD.toString(),"fancyClock",true).getBoolean();
|
||||
useGL13 = config.get(Category.EXTENDED_HD.toString(),"useGL13",true).getBoolean();
|
||||
useScratchTexture = config.get(Category.EXTENDED_HD.toString(),"useScratchTexture",true).getBoolean();
|
||||
hdFont = config.get(Category.EXTENDED_HD.toString(),"HDFont",true).getBoolean();
|
||||
nonHDFontWidth = config.get(Category.EXTENDED_HD.toString(),"nonHDFontWidth",false).getBoolean();
|
||||
mipmap = config.get(Category.EXTENDED_HD.toString(),"mipmap",false).getBoolean();
|
||||
@Config.DefaultBoolean(true)
|
||||
public static boolean nonStandard;
|
||||
|
||||
randomMobsEnabled = config.get(Category.RANDOM_MOBS.toString(),"enabled",true,"Enable the random mobs module").getBoolean();
|
||||
randomMobsLoggingLevel = config.get(Category.RANDOM_MOBS.toString(),"logging",Level.INFO.getName(),"logging level").getString();
|
||||
leashLine = config.get(Category.RANDOM_MOBS.toString(),"leashLine",true).getBoolean();
|
||||
@Config.DefaultBoolean(false)
|
||||
public static boolean glassPane;
|
||||
}
|
||||
|
||||
betterSkiesEnabled = config.get(Category.BETTER_SKIES.toString(),"enabled",true,"Enable the better skies module").getBoolean();
|
||||
betterSkiesLoggingLevel = config.get(Category.BETTER_SKIES.toString(),"logging",Level.INFO.getName(),"logging level").getString();
|
||||
horizon = config.get(Category.BETTER_SKIES.toString(),"horizon",16).getInt();
|
||||
brightenFireworks = config.get(Category.BETTER_SKIES.toString(),"brightenFireworks",true).getBoolean();
|
||||
skybox = config.get(Category.BETTER_SKIES.toString(),"skybox",true).getBoolean();
|
||||
unloadTextures = config.get(Category.BETTER_SKIES.toString(),"unloadTextures",true).getBoolean();
|
||||
@Config(modid = "mcpatcherforge", category = "extended_hd")
|
||||
public static class ExtendedHD {
|
||||
@Config.Comment("Enable the extended hd module")
|
||||
@Config.DefaultBoolean(true)
|
||||
@Config.RequiresMcRestart
|
||||
public static boolean enabled;
|
||||
|
||||
// spotless:on
|
||||
if (config.hasChanged()) config.save();
|
||||
@Config.Comment("logging level")
|
||||
@Config.DefaultEnum("INFO")
|
||||
@Config.RequiresMcRestart
|
||||
public static LogLevel logging;
|
||||
|
||||
@Config.DefaultInt(3)
|
||||
@Config.RequiresMcRestart
|
||||
public static int maxMipMapLevel;
|
||||
|
||||
@Config.DefaultInt(1)
|
||||
@Config.RequiresMcRestart
|
||||
public static int anisotropicFiltering;
|
||||
|
||||
@Config.DefaultInt(0)
|
||||
@Config.RequiresMcRestart
|
||||
@Config.Name("lod bias")
|
||||
public static int lodBias;
|
||||
|
||||
@Config.DefaultBoolean(true)
|
||||
@Config.RequiresMcRestart
|
||||
public static boolean animations;
|
||||
|
||||
@Config.DefaultBoolean(true)
|
||||
@Config.RequiresMcRestart
|
||||
public static boolean fancyCompass;
|
||||
|
||||
@Config.DefaultBoolean(true)
|
||||
@Config.RequiresMcRestart
|
||||
public static boolean fancyClock;
|
||||
|
||||
@Config.DefaultBoolean(true)
|
||||
@Config.RequiresMcRestart
|
||||
public static boolean useGL13;
|
||||
|
||||
@Config.DefaultBoolean(true)
|
||||
@Config.RequiresMcRestart
|
||||
public static boolean useScratchTexture;
|
||||
|
||||
@Config.DefaultBoolean(true)
|
||||
@Config.RequiresMcRestart
|
||||
@Config.Name("HDFont")
|
||||
public static boolean hdFont;
|
||||
|
||||
@Config.DefaultBoolean(false)
|
||||
@Config.RequiresMcRestart
|
||||
public static boolean nonHDFontWidth;
|
||||
|
||||
@Config.DefaultBoolean(false)
|
||||
@Config.RequiresMcRestart
|
||||
public static boolean mipmap;
|
||||
}
|
||||
|
||||
@Config(modid = "mcpatcherforge", category = "random_mobs")
|
||||
public static class RandomMobs {
|
||||
@Config.Comment("Enable the random mobs module")
|
||||
@Config.DefaultBoolean(true)
|
||||
@Config.RequiresMcRestart
|
||||
public static boolean enabled;
|
||||
|
||||
@Config.Comment("logging level")
|
||||
@Config.DefaultEnum("INFO")
|
||||
@Config.RequiresMcRestart
|
||||
public static LogLevel logging;
|
||||
|
||||
@Config.DefaultBoolean(true)
|
||||
@Config.RequiresMcRestart
|
||||
public static boolean leashLine;
|
||||
}
|
||||
|
||||
@Config(modid = "mcpatcherforge", category = "better_skies")
|
||||
public static class BetterSkies {
|
||||
@Config.Comment("Enable the better skies module")
|
||||
@Config.DefaultBoolean(true)
|
||||
@Config.RequiresMcRestart
|
||||
public static boolean enabled;
|
||||
|
||||
@Config.Comment("logging level")
|
||||
@Config.DefaultEnum("INFO")
|
||||
@Config.RequiresMcRestart
|
||||
public static LogLevel logging;
|
||||
|
||||
@Config.DefaultInt(16)
|
||||
@Config.RequiresMcRestart
|
||||
public static int horizon;
|
||||
|
||||
@Config.DefaultBoolean(true)
|
||||
@Config.RequiresMcRestart
|
||||
public static boolean brightenFireworks;
|
||||
|
||||
@Config.DefaultBoolean(true)
|
||||
@Config.RequiresMcRestart
|
||||
public static boolean skybox;
|
||||
|
||||
@Config.DefaultBoolean(true)
|
||||
@Config.RequiresMcRestart
|
||||
public static boolean unloadTextures;
|
||||
}
|
||||
|
||||
public static void registerConfig() throws ConfigException {
|
||||
ConfigurationManager.registerConfig(CustomColors.class);
|
||||
ConfigurationManager.registerConfig(CustomItemTextures.class);
|
||||
ConfigurationManager.registerConfig(ConnectedTextures.class);
|
||||
ConfigurationManager.registerConfig(ExtendedHD.class);
|
||||
ConfigurationManager.registerConfig(RandomMobs.class);
|
||||
ConfigurationManager.registerConfig(BetterSkies.class);
|
||||
}
|
||||
|
||||
public enum LogLevel {
|
||||
OFF(Level.OFF),
|
||||
SEVERE(Level.SEVERE),
|
||||
WARNING(Level.WARNING),
|
||||
INFO(Level.INFO),
|
||||
CONFIG(Level.CONFIG),
|
||||
FINE(Level.FINE),
|
||||
FINER(Level.FINER),
|
||||
FINEST(Level.FINEST),
|
||||
ALL(Level.ALL);
|
||||
|
||||
@Config.Ignore
|
||||
public final Level level;
|
||||
|
||||
LogLevel(Level level) {
|
||||
this.level = level;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package jss.notfine.config;
|
||||
|
||||
import com.gtnewhorizon.gtnhlib.config.ConfigException;
|
||||
import com.gtnewhorizon.gtnhlib.config.SimpleGuiConfig;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
|
||||
public class MCPatcherForgeGuiConfig extends SimpleGuiConfig {
|
||||
public MCPatcherForgeGuiConfig(GuiScreen parent) throws ConfigException {
|
||||
super(parent, "mcpatcherforge", "MCPatcherForge", true,
|
||||
MCPatcherForgeConfig.CustomColors.class,
|
||||
MCPatcherForgeConfig.CustomItemTextures.class,
|
||||
MCPatcherForgeConfig.ConnectedTextures.class,
|
||||
MCPatcherForgeConfig.ExtendedHD.class,
|
||||
MCPatcherForgeConfig.RandomMobs.class,
|
||||
MCPatcherForgeConfig.BetterSkies.class
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package jss.notfine.config;
|
||||
|
||||
import com.gtnewhorizon.gtnhlib.config.SimpleGuiFactory;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
|
||||
public class MCPatcherForgeGuiConfigFactory implements SimpleGuiFactory {
|
||||
@Override
|
||||
public Class<? extends GuiScreen> mainConfigGuiClass() {
|
||||
return MCPatcherForgeGuiConfig.class;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user