Left hand
This commit is contained in:
parent
35ae850a9e
commit
1824fdd15b
|
@ -268,6 +268,7 @@ public class GameSettings {
|
||||||
public boolean ofCustomColors = true;
|
public boolean ofCustomColors = true;
|
||||||
public boolean hidePassword = true;
|
public boolean hidePassword = true;
|
||||||
public boolean fullBright = false;
|
public boolean fullBright = false;
|
||||||
|
public boolean leftHand = false;
|
||||||
|
|
||||||
public boolean enableFNAWSkins = true;
|
public boolean enableFNAWSkins = true;
|
||||||
public int voiceListenRadius = 16;
|
public int voiceListenRadius = 16;
|
||||||
|
@ -919,6 +920,10 @@ public class GameSettings {
|
||||||
this.fullBright = !this.fullBright;
|
this.fullBright = !this.fullBright;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(parOptions == GameSettings.Options.LEFT_HAND) {
|
||||||
|
this.leftHand = !this.leftHand;
|
||||||
|
}
|
||||||
|
|
||||||
this.saveOptions();
|
this.saveOptions();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1047,6 +1052,8 @@ public class GameSettings {
|
||||||
return this.enableVsync;
|
return this.enableVsync;
|
||||||
case FULLBRIGHT:
|
case FULLBRIGHT:
|
||||||
return this.fullBright;
|
return this.fullBright;
|
||||||
|
case LEFT_HAND:
|
||||||
|
return this.leftHand;
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -1103,6 +1110,8 @@ public class GameSettings {
|
||||||
: (parOptions == GameSettings.Options.AF_LEVEL ? (this.ofAfLevel == 1 ? s + Lang.getOff() : s + this.ofAfLevel)
|
: (parOptions == GameSettings.Options.AF_LEVEL ? (this.ofAfLevel == 1 ? s + Lang.getOff() : s + this.ofAfLevel)
|
||||||
: (parOptions == GameSettings.Options.AA_LEVEL ? s + this.getAntialiasingString()
|
: (parOptions == GameSettings.Options.AA_LEVEL ? s + this.getAntialiasingString()
|
||||||
: "yee")))))))))))))))));
|
: "yee")))))))))))))))));
|
||||||
|
} else if (parOptions == GameSettings.Options.LEFT_HAND) {
|
||||||
|
return this.leftHand ? s + "Left" : s + "Right";
|
||||||
} else if (parOptions.getEnumBoolean()) {
|
} else if (parOptions.getEnumBoolean()) {
|
||||||
boolean flag = this.getOptionOrdinalValue(parOptions);
|
boolean flag = this.getOptionOrdinalValue(parOptions);
|
||||||
return flag ? s + I18n.format("options.on", new Object[0]) : s + I18n.format("options.off", new Object[0]);
|
return flag ? s + I18n.format("options.on", new Object[0]) : s + I18n.format("options.off", new Object[0]);
|
||||||
|
@ -1919,6 +1928,10 @@ public class GameSettings {
|
||||||
fullBright = Boolean.valueOf(astring[1]).booleanValue();
|
fullBright = Boolean.valueOf(astring[1]).booleanValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (astring[0].equals("leftHand") && astring.length >= 2) {
|
||||||
|
leftHand = Boolean.valueOf(astring[1]).booleanValue();
|
||||||
|
}
|
||||||
|
|
||||||
for (SoundCategory soundcategory : SoundCategory._VALUES) {
|
for (SoundCategory soundcategory : SoundCategory._VALUES) {
|
||||||
if (astring[0].equals("soundCategory_" + soundcategory.getCategoryName())) {
|
if (astring[0].equals("soundCategory_" + soundcategory.getCategoryName())) {
|
||||||
this.mapSoundLevels.put(soundcategory, Float.valueOf(this.parseFloat(astring[1])));
|
this.mapSoundLevels.put(soundcategory, Float.valueOf(this.parseFloat(astring[1])));
|
||||||
|
@ -2113,6 +2126,7 @@ public class GameSettings {
|
||||||
printwriter.println("voicePTTKey:" + this.voicePTTKey);
|
printwriter.println("voicePTTKey:" + this.voicePTTKey);
|
||||||
printwriter.println("enableFNAWSkins:" + this.enableFNAWSkins);
|
printwriter.println("enableFNAWSkins:" + this.enableFNAWSkins);
|
||||||
printwriter.println("fullbright:" + this.fullBright);
|
printwriter.println("fullbright:" + this.fullBright);
|
||||||
|
printwriter.println("leftHand:" + this.leftHand);
|
||||||
|
|
||||||
for (KeyBinding keybinding : this.keyBindings) {
|
for (KeyBinding keybinding : this.keyBindings) {
|
||||||
printwriter.println("key_" + keybinding.getKeyDescription() + ":" + keybinding.getKeyCode());
|
printwriter.println("key_" + keybinding.getKeyDescription() + ":" + keybinding.getKeyCode());
|
||||||
|
@ -2325,7 +2339,8 @@ public class GameSettings {
|
||||||
HIDE_PASSWORD("Hide Password", false, false),
|
HIDE_PASSWORD("Hide Password", false, false),
|
||||||
FNAW_SKINS("options.skinCustomisation.enableFNAWSkins", false, true),
|
FNAW_SKINS("options.skinCustomisation.enableFNAWSkins", false, true),
|
||||||
EAGLER_VSYNC("options.vsync", false, true),
|
EAGLER_VSYNC("options.vsync", false, true),
|
||||||
FULLBRIGHT("Fullbright", false, true);
|
FULLBRIGHT("Fullbright", false, true),
|
||||||
|
LEFT_HAND("Main Hand", false, true);
|
||||||
|
|
||||||
private final boolean enumFloat;
|
private final boolean enumFloat;
|
||||||
private final boolean enumBoolean;
|
private final boolean enumBoolean;
|
||||||
|
|
|
@ -9,7 +9,7 @@ import net.minecraft.client.settings.GameSettings;
|
||||||
|
|
||||||
public class GuiShadow extends GuiScreen {
|
public class GuiShadow extends GuiScreen {
|
||||||
|
|
||||||
private static GameSettings.Options[] enumOptions = new GameSettings.Options[] {GameSettings.Options.TOGGLE_SPRINT, GameSettings.Options.CHUNK_BORDERS, GameSettings.Options.HIDE_PASSWORD, GameSettings.Options.FULLBRIGHT};
|
private static GameSettings.Options[] enumOptions = new GameSettings.Options[] {GameSettings.Options.TOGGLE_SPRINT, GameSettings.Options.CHUNK_BORDERS, GameSettings.Options.HIDE_PASSWORD, GameSettings.Options.FULLBRIGHT, GameSettings.Options.LEFT_HAND};
|
||||||
|
|
||||||
private GuiScreen parentScreen;
|
private GuiScreen parentScreen;
|
||||||
protected String title;
|
protected String title;
|
||||||
|
|
|
@ -173,6 +173,10 @@ public class ItemRenderer {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void renderItemMap(AbstractClientPlayer clientPlayer, float parFloat1, float parFloat2, float parFloat3) {
|
private void renderItemMap(AbstractClientPlayer clientPlayer, float parFloat1, float parFloat2, float parFloat3) {
|
||||||
|
if(this.mc.gameSettings.leftHand) {
|
||||||
|
GlStateManager.cullFace(GL_BACK);
|
||||||
|
GlStateManager.scale(-1, 1, 1);
|
||||||
|
}
|
||||||
float f = -0.4F * MathHelper.sin(MathHelper.sqrt_float(parFloat3) * 3.1415927F);
|
float f = -0.4F * MathHelper.sin(MathHelper.sqrt_float(parFloat3) * 3.1415927F);
|
||||||
float f1 = 0.2F * MathHelper.sin(MathHelper.sqrt_float(parFloat3) * 3.1415927F * 2.0F);
|
float f1 = 0.2F * MathHelper.sin(MathHelper.sqrt_float(parFloat3) * 3.1415927F * 2.0F);
|
||||||
float f2 = -0.2F * MathHelper.sin(parFloat3 * 3.1415927F);
|
float f2 = -0.2F * MathHelper.sin(parFloat3 * 3.1415927F);
|
||||||
|
@ -267,6 +271,12 @@ public class ItemRenderer {
|
||||||
* item in first person.
|
* item in first person.
|
||||||
*/
|
*/
|
||||||
private void transformFirstPersonItem(float equipProgress, float swingProgress) {
|
private void transformFirstPersonItem(float equipProgress, float swingProgress) {
|
||||||
|
if(this.mc.gameSettings.leftHand && ((this.itemToRender.getItem() == Items.compass) || (this.itemToRender.getItem() == Items.clock))){
|
||||||
|
GlStateManager.cullFace(GL_BACK);
|
||||||
|
GlStateManager.translate(0.05, -0.63, -1.35);
|
||||||
|
GlStateManager.rotate(-50, 1, 0, 0);
|
||||||
|
GlStateManager.scale(1, 1, -1);
|
||||||
|
}
|
||||||
GlStateManager.translate(0.56F, -0.52F, -0.71999997F);
|
GlStateManager.translate(0.56F, -0.52F, -0.71999997F);
|
||||||
GlStateManager.translate(0.0F, equipProgress * -0.6F, 0.0F);
|
GlStateManager.translate(0.0F, equipProgress * -0.6F, 0.0F);
|
||||||
GlStateManager.rotate(45.0F, 0.0F, 1.0F, 0.0F);
|
GlStateManager.rotate(45.0F, 0.0F, 1.0F, 0.0F);
|
||||||
|
@ -314,8 +324,15 @@ public class ItemRenderer {
|
||||||
* person mode. Args: partialTickTime
|
* person mode. Args: partialTickTime
|
||||||
*/
|
*/
|
||||||
public void renderItemInFirstPerson(float partialTicks) {
|
public void renderItemInFirstPerson(float partialTicks) {
|
||||||
float f = 1.0F
|
if(this.mc.gameSettings.leftHand) {
|
||||||
- (this.prevEquippedProgress + (this.equippedProgress - this.prevEquippedProgress) * partialTicks);
|
GlStateManager.scale(-1, 1, 1);
|
||||||
|
if(itemToRender != null) {
|
||||||
|
GlStateManager.cullFace(GL_FRONT);
|
||||||
|
} else {
|
||||||
|
GlStateManager.cullFace(GL_BACK);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
float f = 1.0F - (this.prevEquippedProgress + (this.equippedProgress - this.prevEquippedProgress) * partialTicks);
|
||||||
EntityPlayerSP entityplayersp = this.mc.thePlayer;
|
EntityPlayerSP entityplayersp = this.mc.thePlayer;
|
||||||
float f1 = entityplayersp.getSwingProgress(partialTicks);
|
float f1 = entityplayersp.getSwingProgress(partialTicks);
|
||||||
float f2 = entityplayersp.prevRotationPitch
|
float f2 = entityplayersp.prevRotationPitch
|
||||||
|
|
|
@ -271,6 +271,7 @@ public class GameSettings extends ModData {
|
||||||
public boolean hidePassword = true;
|
public boolean hidePassword = true;
|
||||||
public boolean enableFNAWSkins = true;
|
public boolean enableFNAWSkins = true;
|
||||||
public boolean fullBright = false;
|
public boolean fullBright = false;
|
||||||
|
public boolean leftHand = false;
|
||||||
|
|
||||||
public int voiceListenRadius = 16;
|
public int voiceListenRadius = 16;
|
||||||
public float voiceListenVolume = 0.5f;
|
public float voiceListenVolume = 0.5f;
|
||||||
|
@ -1083,6 +1084,10 @@ public class GameSettings extends ModData {
|
||||||
this.fullBright = !this.fullBright;
|
this.fullBright = !this.fullBright;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(parOptions == GameSettings.Options.LEFT_HAND) {
|
||||||
|
this.leftHand = !this.leftHand;
|
||||||
|
}
|
||||||
|
|
||||||
this.saveOptions();
|
this.saveOptions();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1209,6 +1214,8 @@ public class GameSettings extends ModData {
|
||||||
return this.enableVsync;
|
return this.enableVsync;
|
||||||
case FULLBRIGHT:
|
case FULLBRIGHT:
|
||||||
return this.fullBright;
|
return this.fullBright;
|
||||||
|
case LEFT_HAND:
|
||||||
|
return this.leftHand;
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -1265,6 +1272,8 @@ public class GameSettings extends ModData {
|
||||||
: (parOptions == GameSettings.Options.AF_LEVEL ? (this.ofAfLevel == 1 ? s + Lang.getOff() : s + this.ofAfLevel)
|
: (parOptions == GameSettings.Options.AF_LEVEL ? (this.ofAfLevel == 1 ? s + Lang.getOff() : s + this.ofAfLevel)
|
||||||
: (parOptions == GameSettings.Options.AA_LEVEL ? s + this.getAntialiasingString()
|
: (parOptions == GameSettings.Options.AA_LEVEL ? s + this.getAntialiasingString()
|
||||||
: "yee")))))))))))))))));
|
: "yee")))))))))))))))));
|
||||||
|
} else if (parOptions == GameSettings.Options.LEFT_HAND) {
|
||||||
|
return this.leftHand ? s + "Left" : s + "Right";
|
||||||
} else if (parOptions.getEnumBoolean()) {
|
} else if (parOptions.getEnumBoolean()) {
|
||||||
boolean flag = this.getOptionOrdinalValue(parOptions);
|
boolean flag = this.getOptionOrdinalValue(parOptions);
|
||||||
return flag ? s + I18n.format("options.on", new Object[0]) : s + I18n.format("options.off", new Object[0]);
|
return flag ? s + I18n.format("options.on", new Object[0]) : s + I18n.format("options.off", new Object[0]);
|
||||||
|
@ -2081,6 +2090,10 @@ public class GameSettings extends ModData {
|
||||||
fullBright = Boolean.valueOf(astring[1]).booleanValue();
|
fullBright = Boolean.valueOf(astring[1]).booleanValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (astring[0].equals("leftHand") && astring.length >= 2) {
|
||||||
|
leftHand = Boolean.valueOf(astring[1]).booleanValue();
|
||||||
|
}
|
||||||
|
|
||||||
for (SoundCategory soundcategory : SoundCategory._VALUES) {
|
for (SoundCategory soundcategory : SoundCategory._VALUES) {
|
||||||
if (astring[0].equals("soundCategory_" + soundcategory.getCategoryName())) {
|
if (astring[0].equals("soundCategory_" + soundcategory.getCategoryName())) {
|
||||||
this.mapSoundLevels.put(soundcategory, Float.valueOf(this.parseFloat(astring[1])));
|
this.mapSoundLevels.put(soundcategory, Float.valueOf(this.parseFloat(astring[1])));
|
||||||
|
@ -2275,6 +2288,7 @@ public class GameSettings extends ModData {
|
||||||
printwriter.println("voicePTTKey:" + this.voicePTTKey);
|
printwriter.println("voicePTTKey:" + this.voicePTTKey);
|
||||||
printwriter.println("enableFNAWSkins:" + this.enableFNAWSkins);
|
printwriter.println("enableFNAWSkins:" + this.enableFNAWSkins);
|
||||||
printwriter.println("fullbright:" + this.fullBright);
|
printwriter.println("fullbright:" + this.fullBright);
|
||||||
|
printwriter.println("leftHand:" + this.leftHand);
|
||||||
|
|
||||||
for (KeyBinding keybinding : this.keyBindings) {
|
for (KeyBinding keybinding : this.keyBindings) {
|
||||||
printwriter.println("key_" + keybinding.getKeyDescription() + ":" + keybinding.getKeyCode());
|
printwriter.println("key_" + keybinding.getKeyDescription() + ":" + keybinding.getKeyCode());
|
||||||
|
@ -2487,7 +2501,8 @@ public class GameSettings extends ModData {
|
||||||
HIDE_PASSWORD("Hide Password", false, false),
|
HIDE_PASSWORD("Hide Password", false, false),
|
||||||
FNAW_SKINS("options.skinCustomisation.enableFNAWSkins", false, true),
|
FNAW_SKINS("options.skinCustomisation.enableFNAWSkins", false, true),
|
||||||
EAGLER_VSYNC("options.vsync", false, true),
|
EAGLER_VSYNC("options.vsync", false, true),
|
||||||
FULLBRIGHT("Fullbright", false, true);
|
FULLBRIGHT("Fullbright", false, true),
|
||||||
|
LEFT_HAND("Main Hand", false, true);
|
||||||
|
|
||||||
private final boolean enumFloat;
|
private final boolean enumFloat;
|
||||||
private final boolean enumBoolean;
|
private final boolean enumBoolean;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user