Mipmap Types
This commit is contained in:
parent
a87779e7ee
commit
33485ed22a
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
47805
javascript/classes.js
47805
javascript/classes.js
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -203,6 +203,25 @@ public class Config {
|
|||
return Minecraft.getMinecraft().gameSettings.ofDynamicFov;
|
||||
}
|
||||
|
||||
public static int getMipmapType() {
|
||||
switch (Minecraft.getMinecraft().gameSettings.ofMipmapType) {
|
||||
case 0:
|
||||
return 9986;
|
||||
|
||||
case 1:
|
||||
return 9986;
|
||||
|
||||
case 2:
|
||||
return 9986;
|
||||
|
||||
case 3:
|
||||
return 9986;
|
||||
|
||||
default:
|
||||
return 9986;
|
||||
}
|
||||
}
|
||||
|
||||
public static int limit(int p_limit_0_, int p_limit_1_, int p_limit_2_) {
|
||||
return p_limit_0_ < p_limit_1_ ? p_limit_1_ : (p_limit_0_ > p_limit_2_ ? p_limit_2_ : p_limit_0_);
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ public class GuiQuality extends GuiScreen {
|
|||
protected String title;
|
||||
private GameSettings settings;
|
||||
//private static GameSettings.Options[] enumOptions = new GameSettings.Options[] {GameSettings.Options.MIPMAP_LEVELS, GameSettings.Options.MIPMAP_TYPE, GameSettings.Options.AF_LEVEL, GameSettings.Options.AA_LEVEL, GameSettings.Options.CLEAR_WATER, GameSettings.Options.RANDOM_MOBS, GameSettings.Options.BETTER_GRASS, GameSettings.Options.BETTER_SNOW, GameSettings.Options.CUSTOM_FONTS, GameSettings.Options.CUSTOM_COLORS, GameSettings.Options.SWAMP_COLORS, GameSettings.Options.SMOOTH_BIOMES, GameSettings.Options.CONNECTED_TEXTURES, GameSettings.Options.NATURAL_TEXTURES, GameSettings.Options.CUSTOM_SKY, GameSettings.Options.CUSTOM_ITEMS, GameSettings.Options.DYNAMIC_LIGHTS};
|
||||
private static GameSettings.Options[] enumOptions = new GameSettings.Options[] {GameSettings.Options.CLEAR_WATER, GameSettings.Options.BETTER_GRASS, GameSettings.Options.CUSTOM_SKY, GameSettings.Options.DYNAMIC_LIGHTS};
|
||||
private static GameSettings.Options[] enumOptions = new GameSettings.Options[] {GameSettings.Options.MIPMAP_LEVELS, GameSettings.Options.MIPMAP_TYPE, GameSettings.Options.CLEAR_WATER, GameSettings.Options.BETTER_GRASS, GameSettings.Options.CUSTOM_SKY, GameSettings.Options.DYNAMIC_LIGHTS};
|
||||
|
||||
public GuiQuality(GuiScreen p_i53_1_) {
|
||||
this.prevScreen = p_i53_1_;
|
||||
|
|
|
@ -17,6 +17,8 @@ import net.minecraft.client.renderer.GLAllocation;
|
|||
import net.minecraft.client.resources.IResourceManager;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import net.PeytonPlayz585.shadow.Config;
|
||||
|
||||
/**+
|
||||
* This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code.
|
||||
*
|
||||
|
@ -247,7 +249,8 @@ public class TextureUtil {
|
|||
EaglercraftGPU.glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, parFlag2 ? 9987 : 9729);
|
||||
EaglercraftGPU.glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
|
||||
} else {
|
||||
EaglercraftGPU.glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, parFlag2 ? 9986 : 9728);
|
||||
int i = Config.getMipmapType();
|
||||
EaglercraftGPU.glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, parFlag2 ? i : 9728);
|
||||
EaglercraftGPU.glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
|
||||
}
|
||||
|
||||
|
|
|
@ -191,6 +191,7 @@ public class GameSettings {
|
|||
public float ofFogStart = 0.8F;
|
||||
|
||||
//Quality Settings
|
||||
public int ofMipmapType = 0;
|
||||
public boolean ofCustomSky = true;
|
||||
public boolean ofClearWater = false;
|
||||
public int ofBetterGrass = 3;
|
||||
|
@ -373,6 +374,12 @@ public class GameSettings {
|
|||
this.ofCloudsHeight = parFloat1;
|
||||
this.mc.renderGlobal.resetClouds();
|
||||
}
|
||||
|
||||
if (parOptions == GameSettings.Options.MIPMAP_TYPE) {
|
||||
int l = (int)parFloat1;
|
||||
this.ofMipmapType = Config.limit(l, 0, 3);
|
||||
this.mc.refreshResources();
|
||||
}
|
||||
}
|
||||
|
||||
/**+
|
||||
|
@ -764,7 +771,8 @@ public class GameSettings {
|
|||
: (parOptions == GameSettings.Options.RENDER_DISTANCE ? (float) this.renderDistanceChunks
|
||||
: (parOptions == GameSettings.Options.AO_LEVEL ? this.ofAoLevel
|
||||
: (parOptions == GameSettings.Options.CLOUD_HEIGHT ? this.ofCloudsHeight
|
||||
: 0.0F)))))))))))));
|
||||
: (parOptions == GameSettings.Options.MIPMAP_TYPE ? this.ofMipmapType
|
||||
: 0.0F))))))))))))));
|
||||
}
|
||||
|
||||
public boolean getOptionOrdinalValue(GameSettings.Options parOptions) {
|
||||
|
@ -872,7 +880,8 @@ public class GameSettings {
|
|||
: (parOptions == GameSettings.Options.MIPMAP_LEVELS ? (f == 0.0F ? s + I18n.format("options.off", new Object[0]) : s + (int) (f * 100.0F) + "%")
|
||||
: (parOptions == GameSettings.Options.AO_LEVEL ? (f == 0.0F ? s + I18n.format("options.off", new Object[0]) : s + (int) (f * 100.0F) + "%")
|
||||
: (parOptions == GameSettings.Options.CLOUD_HEIGHT ? (f == 0.0F ? s + I18n.format("options.off", new Object[0]) : s + (int) (f * 100.0F) + "%")
|
||||
: "yee")))))))))))));
|
||||
: (parOptions == GameSettings.Options.MIPMAP_TYPE ? (ofMipmapType == 0 ? s + "Nearest" : ofMipmapType == 1 ? s + "Linear" : ofMipmapType == 2 ? s + "Bilinear" : ofMipmapType == 3 ? s + "Trilinear": s)
|
||||
: "yee"))))))))))))));
|
||||
} else if (parOptions.getEnumBoolean()) {
|
||||
boolean flag = this.getOptionOrdinalValue(parOptions);
|
||||
return flag ? s + I18n.format("options.on", new Object[0]) : s + I18n.format("options.off", new Object[0]);
|
||||
|
@ -1556,6 +1565,11 @@ public class GameSettings {
|
|||
this.ofDynamicFov = Boolean.valueOf(astring[1]).booleanValue();
|
||||
}
|
||||
|
||||
if (astring[0].equals("ofMipmapType") && astring.length >= 2) {
|
||||
this.ofMipmapType = Integer.valueOf(astring[1]).intValue();
|
||||
this.ofMipmapType = Config.limit(this.ofMipmapType, 0, 3);
|
||||
}
|
||||
|
||||
Keyboard.setFunctionKeyModifier(keyBindFunction.getKeyCode());
|
||||
|
||||
for (SoundCategory soundcategory : SoundCategory.values()) {
|
||||
|
@ -1704,6 +1718,7 @@ public class GameSettings {
|
|||
printwriter.println("ofDroppedItems:" + this.ofDroppedItems);
|
||||
printwriter.println("ofVignette:" + this.ofVignette);
|
||||
printwriter.println("ofDynamicFov:" + this.ofDynamicFov);
|
||||
printwriter.println("ofMipmapType:" + this.ofMipmapType);
|
||||
|
||||
for (KeyBinding keybinding : this.keyBindings) {
|
||||
printwriter.println("key_" + keybinding.getKeyDescription() + ":" + keybinding.getKeyCode());
|
||||
|
@ -1889,7 +1904,8 @@ public class GameSettings {
|
|||
HELD_ITEM_TOOLTIPS("Held Item Tooltips", false, false),
|
||||
DROPPED_ITEMS("Dropped Items", false, false),
|
||||
VIGNETTE("Vignette", false, false),
|
||||
DYNAMIC_FOV("Dynamic FOV", false, false);
|
||||
DYNAMIC_FOV("Dynamic FOV", false, false),
|
||||
MIPMAP_TYPE("Mipmap Type", true, false, 0.0F, 3.0F, 1.0F);
|
||||
|
||||
private final boolean enumFloat;
|
||||
private final boolean enumBoolean;
|
||||
|
|
Loading…
Reference in New Issue
Block a user