mirror of
https://github.com/refactorinqq/SLC-1.8.9.git
synced 2024-11-10 07:51:32 +01:00
(feature) shaking intensity
This commit is contained in:
parent
8ae19788e0
commit
edbd40c970
@ -155,6 +155,16 @@ public abstract class EntityRendererMixin implements EntityRendererExt {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Redirect(method = "hurtCameraEffect", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/renderer/GlStateManager;rotate(FFFF)V", ordinal = 2))
|
||||||
|
public void changeIntensity(float angle, float x, float y, float z) {
|
||||||
|
if(!Client.getInstance().getModInstances().getOldAnimationsMod().isEnabled() || Client.getInstance().getSettingsManager().getSettingByClass(AnimationsMod.class, "No Shaking").getValBoolean()) {
|
||||||
|
GlStateManager.rotate(angle, x, y, z);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
float intensity = Client.getInstance().getSettingsManager().getSettingByClass(AnimationsMod.class, "Shaking Intensity").getValFloat();
|
||||||
|
GlStateManager.rotate(angle * (intensity / 14), x, y, z);
|
||||||
|
}
|
||||||
|
|
||||||
@Redirect(method = "setupCameraTransform", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/renderer/EntityRenderer;setupViewBobbing(F)V"))
|
@Redirect(method = "setupCameraTransform", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/renderer/EntityRenderer;setupViewBobbing(F)V"))
|
||||||
public void modelBobbing(EntityRenderer instance, float f) {
|
public void modelBobbing(EntityRenderer instance, float f) {
|
||||||
if(!Client.getInstance().getSettingsManager().getSettingByClass(RenderMod.class, "Model Bobbing Only").getValBoolean()) {
|
if(!Client.getInstance().getSettingsManager().getSettingByClass(RenderMod.class, "Model Bobbing Only").getValBoolean()) {
|
||||||
|
@ -20,8 +20,9 @@ public class AnimationsMod extends Mod {
|
|||||||
this.addBooleanSetting("1.7 Throwing", this, true);
|
this.addBooleanSetting("1.7 Throwing", this, true);
|
||||||
this.addBooleanSetting("1.7 Enchant Glint", this, true);
|
this.addBooleanSetting("1.7 Enchant Glint", this, true);
|
||||||
this.addBooleanSetting("1.7 Skins", this, false);
|
this.addBooleanSetting("1.7 Skins", this, false);
|
||||||
this.addBooleanSetting("Smooth Sneaking", this, true);
|
|
||||||
this.addBooleanSetting("No Shaking", this, true);
|
this.addBooleanSetting("No Shaking", this, true);
|
||||||
|
this.addSliderSetting("Shaking Intensity", this, 14, 0, 100, true);
|
||||||
|
this.addBooleanSetting("Smooth Sneaking", this, true);
|
||||||
this.addBooleanSetting("Consume Animation", this, true);
|
this.addBooleanSetting("Consume Animation", this, true);
|
||||||
this.addBooleanSetting("Block-Hitting Animation", this, true);
|
this.addBooleanSetting("Block-Hitting Animation", this, true);
|
||||||
this.addBooleanSetting("Red Armor", this, true);
|
this.addBooleanSetting("Red Armor", this, true);
|
||||||
|
Loading…
Reference in New Issue
Block a user