Flat cloak
This commit is contained in:
@@ -12,7 +12,7 @@ public class Config {
|
|||||||
|
|
||||||
public static Property<Boolean> realisticLogo = Property.bool(false);
|
public static Property<Boolean> realisticLogo = Property.bool(false);
|
||||||
public static Property<Boolean> saturnTitleScreen = Property.bool(true);
|
public static Property<Boolean> saturnTitleScreen = Property.bool(true);
|
||||||
public static Property<Boolean> bendyCloaks = Property.bool(true);
|
public static Property<Boolean> cloakPhysics = Property.bool(true);
|
||||||
public static Property<Integer> openEmoteWheel = Property.keybinding(GLFW.GLFW_KEY_B);
|
public static Property<Integer> openEmoteWheel = Property.keybinding(GLFW.GLFW_KEY_B);
|
||||||
public static Property<Boolean> stagger = Property.bool(true);
|
public static Property<Boolean> stagger = Property.bool(true);
|
||||||
|
|
||||||
@@ -25,7 +25,7 @@ public class Config {
|
|||||||
config.property("Realistic logo", realisticLogo);
|
config.property("Realistic logo", realisticLogo);
|
||||||
config.property("Saturn client title screen", saturnTitleScreen);
|
config.property("Saturn client title screen", saturnTitleScreen);
|
||||||
config.property("Open Emote Wheel", openEmoteWheel);
|
config.property("Open Emote Wheel", openEmoteWheel);
|
||||||
config.property("Bendy Cloaks", bendyCloaks);
|
config.property("Cloak Physics", cloakPhysics);
|
||||||
config.property("Stagger Animations", stagger);
|
config.property("Stagger Animations", stagger);
|
||||||
|
|
||||||
// Initialize a sub namespace for theme
|
// Initialize a sub namespace for theme
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package org.saturnclient.saturnclient.cosmetics;
|
|||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
||||||
import org.saturnclient.saturnclient.client.player.SaturnPlayer;
|
import org.saturnclient.saturnclient.client.player.SaturnPlayer;
|
||||||
|
import org.saturnclient.saturnclient.config.Config;
|
||||||
import org.saturnclient.saturnclient.cosmetics.cloaks.Cloaks;
|
import org.saturnclient.saturnclient.cosmetics.cloaks.Cloaks;
|
||||||
|
|
||||||
import net.minecraft.client.render.OverlayTexture;
|
import net.minecraft.client.render.OverlayTexture;
|
||||||
@@ -282,8 +283,8 @@ public class CloakFeatureRenderer extends FeatureRenderer<PlayerEntityRenderStat
|
|||||||
}
|
}
|
||||||
|
|
||||||
Identifier customCape = Cloaks.getCurrentCloakTexture(player.uuid);
|
Identifier customCape = Cloaks.getCurrentCloakTexture(player.uuid);
|
||||||
if (customCape == null || this.hasCustomModelForLayer(playerEntityRenderState.equippedChestStack,
|
if (customCape == null
|
||||||
LayerType.WINGS)) {
|
|| this.hasCustomModelForLayer(playerEntityRenderState.equippedChestStack, LayerType.WINGS)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -308,7 +309,20 @@ public class CloakFeatureRenderer extends FeatureRenderer<PlayerEntityRenderStat
|
|||||||
long now = System.currentTimeMillis();
|
long now = System.currentTimeMillis();
|
||||||
if (now - lastUpdate >= 20) {
|
if (now - lastUpdate >= 20) {
|
||||||
float value = playerEntityRenderState.field_53537 / 108.0f;
|
float value = playerEntityRenderState.field_53537 / 108.0f;
|
||||||
updateSegmentValues(value);
|
if (Config.cloakPhysics.value) {
|
||||||
|
updateSegmentValues(value);
|
||||||
|
} else {
|
||||||
|
float last = segmentValues[0];
|
||||||
|
float maxStep = 0.02f;
|
||||||
|
float next = value;
|
||||||
|
|
||||||
|
if (next > last)
|
||||||
|
next = Math.min(next, last + maxStep);
|
||||||
|
else if (next < last)
|
||||||
|
next = Math.max(next, last - maxStep);
|
||||||
|
|
||||||
|
Arrays.fill(segmentValues, next);
|
||||||
|
}
|
||||||
lastUpdate = now;
|
lastUpdate = now;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user