Add config option to disable player animations
This commit is contained in:
@@ -334,6 +334,8 @@ public final class Settings {
|
|||||||
public boolean screenShake = true;
|
public boolean screenShake = true;
|
||||||
/** <b>[Client-only]</b> Whether to use the screen blink effect for teleportation spells. */
|
/** <b>[Client-only]</b> Whether to use the screen blink effect for teleportation spells. */
|
||||||
public boolean blinkEffect = true;
|
public boolean blinkEffect = true;
|
||||||
|
/** <b>[Client-only]</b> Whether to use spellcasting animations for players. */
|
||||||
|
public boolean spellcastingAnimations = true;
|
||||||
/** <b>[Client-only]</b> The position of the spell HUD. */
|
/** <b>[Client-only]</b> The position of the spell HUD. */
|
||||||
public GuiPosition spellHUDPosition = GuiPosition.BOTTOM_LEFT;
|
public GuiPosition spellHUDPosition = GuiPosition.BOTTOM_LEFT;
|
||||||
|
|
||||||
@@ -1002,6 +1004,13 @@ public final class Settings {
|
|||||||
blinkEffect = property.getBoolean();
|
blinkEffect = property.getBoolean();
|
||||||
propOrder.add(property.getName());
|
propOrder.add(property.getName());
|
||||||
|
|
||||||
|
property = config.get(CLIENT_CATEGORY, "spellcastingAnimations", true, "Whether to use custom animations for players casting spells. Disable this option if it conflicts with other mods that add player animations.");
|
||||||
|
property.setLanguageKey("config." + Wizardry.MODID + ".spellcasting_animations");
|
||||||
|
property.setRequiresMcRestart(true);
|
||||||
|
Wizardry.proxy.setToNamedBooleanEntry(property);
|
||||||
|
spellcastingAnimations = property.getBoolean();
|
||||||
|
propOrder.add(property.getName());
|
||||||
|
|
||||||
config.setCategoryPropertyOrder(CLIENT_CATEGORY, propOrder);
|
config.setCategoryPropertyOrder(CLIENT_CATEGORY, propOrder);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -77,6 +77,8 @@ public class PlayerAnimator {
|
|||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
public static void init(){
|
public static void init(){
|
||||||
|
|
||||||
|
if(!Wizardry.settings.spellcastingAnimations) return;
|
||||||
|
|
||||||
for(RenderPlayer renderer : Minecraft.getMinecraft().getRenderManager().getSkinMap().values()){
|
for(RenderPlayer renderer : Minecraft.getMinecraft().getRenderManager().getSkinMap().values()){
|
||||||
|
|
||||||
List<ModelBiped> models = new ArrayList<>();
|
List<ModelBiped> models = new ArrayList<>();
|
||||||
@@ -182,6 +184,8 @@ public class PlayerAnimator {
|
|||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public static void onRenderHandEvent(RenderSpecificHandEvent event){
|
public static void onRenderHandEvent(RenderSpecificHandEvent event){
|
||||||
|
|
||||||
|
if(!Wizardry.settings.spellcastingAnimations) return;
|
||||||
|
|
||||||
AbstractClientPlayer player = Minecraft.getMinecraft().player;
|
AbstractClientPlayer player = Minecraft.getMinecraft().player;
|
||||||
|
|
||||||
EnumAction action = event.getItemStack().getItemUseAction();
|
EnumAction action = event.getItemStack().getItemUseAction();
|
||||||
@@ -199,6 +203,8 @@ public class PlayerAnimator {
|
|||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public static void onRenderPlayerPreEvent(RenderPlayerEvent.Pre event){
|
public static void onRenderPlayerPreEvent(RenderPlayerEvent.Pre event){
|
||||||
|
|
||||||
|
if(!Wizardry.settings.spellcastingAnimations) return;
|
||||||
|
|
||||||
// boolean firstPerson = event.getEntityPlayer() == Minecraft.getMinecraft().player
|
// boolean firstPerson = event.getEntityPlayer() == Minecraft.getMinecraft().player
|
||||||
// && Minecraft.getMinecraft().gameSettings.thirdPersonView == 0;
|
// && Minecraft.getMinecraft().gameSettings.thirdPersonView == 0;
|
||||||
|
|
||||||
|
|||||||
@@ -1465,6 +1465,8 @@ config.ebwizardry.screen_shake=Screen Shake
|
|||||||
config.ebwizardry.screen_shake.tooltip=Whether to use the screen shake effect for certain spells.
|
config.ebwizardry.screen_shake.tooltip=Whether to use the screen shake effect for certain spells.
|
||||||
config.ebwizardry.blink_effect=Blink Effect
|
config.ebwizardry.blink_effect=Blink Effect
|
||||||
config.ebwizardry.blink_effect.tooltip=Whether to use the screen blink effect for teleportation spells.
|
config.ebwizardry.blink_effect.tooltip=Whether to use the screen blink effect for teleportation spells.
|
||||||
|
config.ebwizardry.spellcasting_animations=Spellcasting Animations
|
||||||
|
config.ebwizardry.spellcasting_animations.tooltip=Whether to use custom animations for players casting spells. Disable this option if it conflicts with other mods that add player animations.
|
||||||
|
|
||||||
config.ebwizardry.category.commands=Command Settings
|
config.ebwizardry.category.commands=Command Settings
|
||||||
config.ebwizardry.category.commands.tooltip=Configure wizardry's commands
|
config.ebwizardry.category.commands.tooltip=Configure wizardry's commands
|
||||||
|
|||||||
@@ -1465,6 +1465,8 @@ config.ebwizardry.screen_shake=Screen Shake
|
|||||||
config.ebwizardry.screen_shake.tooltip=Whether to use the screen shake effect for certain spells.
|
config.ebwizardry.screen_shake.tooltip=Whether to use the screen shake effect for certain spells.
|
||||||
config.ebwizardry.blink_effect=Blink Effect
|
config.ebwizardry.blink_effect=Blink Effect
|
||||||
config.ebwizardry.blink_effect.tooltip=Whether to use the screen blink effect for teleportation spells.
|
config.ebwizardry.blink_effect.tooltip=Whether to use the screen blink effect for teleportation spells.
|
||||||
|
config.ebwizardry.spellcasting_animations=Spellcasting Animations
|
||||||
|
config.ebwizardry.spellcasting_animations.tooltip=Whether to use custom animations for players casting spells. Disable this option if it conflicts with other mods that add player animations.
|
||||||
|
|
||||||
config.ebwizardry.category.commands=Command Settings
|
config.ebwizardry.category.commands=Command Settings
|
||||||
config.ebwizardry.category.commands.tooltip=Configure wizardry's commands
|
config.ebwizardry.category.commands.tooltip=Configure wizardry's commands
|
||||||
|
|||||||
Reference in New Issue
Block a user