mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2024-11-25 13:57:59 +01:00
Added an option to flap pegasus wings when gliding with elytras. Closes #204
This commit is contained in:
parent
c5aab0ea00
commit
cd29726076
4 changed files with 16 additions and 1 deletions
|
@ -1,12 +1,15 @@
|
||||||
package com.minelittlepony.api.model;
|
package com.minelittlepony.api.model;
|
||||||
|
|
||||||
|
import com.minelittlepony.client.MineLittlePony;
|
||||||
|
|
||||||
public interface IPegasus extends IModel {
|
public interface IPegasus extends IModel {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns true if the wings are spread.
|
* Returns true if the wings are spread.
|
||||||
*/
|
*/
|
||||||
default boolean wingsAreOpen() {
|
default boolean wingsAreOpen() {
|
||||||
return (getAttributes().isSwimming || isFlying() || getAttributes().isCrouching) && !getAttributes().isGliding;
|
return (getAttributes().isSwimming || isFlying() || getAttributes().isCrouching)
|
||||||
|
&& (MineLittlePony.getInstance().getConfig().flappyElytras.get() || !getAttributes().isGliding);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -117,6 +117,15 @@ public class GuiPonySettings extends GameGui {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (hiddenOptions) {
|
||||||
|
for (Setting<?> i : config.getByCategory("customisation")) {
|
||||||
|
Button button = content
|
||||||
|
.addButton(new Toggle(LEFT, row += 20, ((Setting<Boolean>)i).get()))
|
||||||
|
.onChange((Setting<Boolean>)i);
|
||||||
|
button.getStyle().setText(OPTIONS_PREFIX + i.name().toLowerCase());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
content.addButton(new Label(LEFT, row += 20)).getStyle().setText(OPTIONS_PREFIX + "button");
|
content.addButton(new Label(LEFT, row += 20)).getStyle().setText(OPTIONS_PREFIX + "button");
|
||||||
content.addButton(new EnumSlider<>(LEFT, row += 20, config.horseButton.get())
|
content.addButton(new EnumSlider<>(LEFT, row += 20, config.horseButton.get())
|
||||||
.onChange(config.horseButton::set)
|
.onChange(config.horseButton::set)
|
||||||
|
|
|
@ -32,6 +32,8 @@ public class PonyConfig extends JsonConfig {
|
||||||
*/
|
*/
|
||||||
public final Setting<Sizes> sizeOverride = value("sizeOverride", Sizes.UNSET);
|
public final Setting<Sizes> sizeOverride = value("sizeOverride", Sizes.UNSET);
|
||||||
|
|
||||||
|
public final Setting<Boolean> flappyElytras = value("customisation", "flappyElytras", false);
|
||||||
|
|
||||||
public PonyConfig(Path path) {
|
public PonyConfig(Path path) {
|
||||||
super(path);
|
super(path);
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
"minelp.options.tpsmagic": "Magic in third-person",
|
"minelp.options.tpsmagic": "Magic in third-person",
|
||||||
"minelp.options.ponyskulls": "Pony Skulls",
|
"minelp.options.ponyskulls": "Pony Skulls",
|
||||||
"minelp.options.frustrum": "Frustum checks",
|
"minelp.options.frustrum": "Frustum checks",
|
||||||
|
"minelp.options.flappyelytras": "Flap Wings whilst Gliding",
|
||||||
"minelp.options.passivenetworking": "Passive Networking [Beta]",
|
"minelp.options.passivenetworking": "Passive Networking [Beta]",
|
||||||
"minelp.options.button": "Display On Title Screen",
|
"minelp.options.button": "Display On Title Screen",
|
||||||
"minelp.options.button.on": "Always Display\n\nBoth the pony button and HD Skins button are visible (if installed)",
|
"minelp.options.button.on": "Always Display\n\nBoth the pony button and HD Skins button are visible (if installed)",
|
||||||
|
|
Loading…
Reference in a new issue