Some changes
This commit is contained in:
@@ -1,4 +1,7 @@
|
|||||||
package org.saturnclient.common.ref.game;
|
package org.saturnclient.common.ref.game;
|
||||||
|
|
||||||
public interface ItemStackRef {
|
public interface ItemStackRef {
|
||||||
|
public boolean isEmpty();
|
||||||
|
public int getMaxDamage();
|
||||||
|
public int getDamage();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,10 +23,4 @@ public interface ArmorDisplayInterface {
|
|||||||
ItemStackRef getDummyLeggings();
|
ItemStackRef getDummyLeggings();
|
||||||
|
|
||||||
ItemStackRef getDummyBoots();
|
ItemStackRef getDummyBoots();
|
||||||
|
|
||||||
boolean isEmpty(ItemStackRef stack);
|
|
||||||
|
|
||||||
int getMaxDamage(ItemStackRef stack);
|
|
||||||
|
|
||||||
int getDamage(ItemStackRef stack);
|
|
||||||
}
|
}
|
||||||
@@ -38,33 +38,33 @@ public class ArmorDisplay extends Module implements HudMod {
|
|||||||
|
|
||||||
int row = 0;
|
int row = 0;
|
||||||
|
|
||||||
if (useMainHand.value && !minecraft.isEmpty(mainHand)) {
|
if (useMainHand.value && !mainHand.isEmpty()) {
|
||||||
scope.drawItem(mainHand, 0, 15 * row);
|
scope.drawItem(mainHand, 0, 15 * row);
|
||||||
renderHealth(scope, row, minecraft.getMaxDamage(mainHand), minecraft.getDamage(mainHand));
|
renderHealth(scope, row, mainHand.getMaxDamage(), mainHand.getDamage());
|
||||||
row++;
|
row++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!minecraft.isEmpty(helmet)) {
|
if (!helmet.isEmpty()) {
|
||||||
scope.drawItem(helmet, 0, 15 * row);
|
scope.drawItem(helmet, 0, 15 * row);
|
||||||
renderHealth(scope, row, minecraft.getMaxDamage(helmet), minecraft.getDamage(helmet));
|
renderHealth(scope, row, helmet.getMaxDamage(), helmet.getDamage());
|
||||||
row++;
|
row++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!minecraft.isEmpty(chestplate)) {
|
if (!chestplate.isEmpty()) {
|
||||||
scope.drawItem(chestplate, 0, 15 * row);
|
scope.drawItem(chestplate, 0, 15 * row);
|
||||||
renderHealth(scope, row, minecraft.getMaxDamage(chestplate), minecraft.getDamage(chestplate));
|
renderHealth(scope, row, chestplate.getMaxDamage(), chestplate.getDamage());
|
||||||
row++;
|
row++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!minecraft.isEmpty(leggings)) {
|
if (!leggings.isEmpty()) {
|
||||||
scope.drawItem(leggings, 0, 15 * row);
|
scope.drawItem(leggings, 0, 15 * row);
|
||||||
renderHealth(scope, row, minecraft.getMaxDamage(leggings), minecraft.getDamage(leggings));
|
renderHealth(scope, row, leggings.getMaxDamage(), leggings.getDamage());
|
||||||
row++;
|
row++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!minecraft.isEmpty(boots)) {
|
if (!boots.isEmpty()) {
|
||||||
scope.drawItem(boots, 0, 15 * row);
|
scope.drawItem(boots, 0, 15 * row);
|
||||||
renderHealth(scope, row, minecraft.getMaxDamage(boots), minecraft.getDamage(boots));
|
renderHealth(scope, row, boots.getMaxDamage(), boots.getDamage());
|
||||||
row++;
|
row++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,17 +41,17 @@ public class ShiftMenu extends SaturnScreen {
|
|||||||
AnimationStagger stagger = new AnimationStagger(AnimationConfig.shiftMenu.stagger.value);
|
AnimationStagger stagger = new AnimationStagger(AnimationConfig.shiftMenu.stagger.value);
|
||||||
|
|
||||||
stagger.draw(new TextureButton(Textures.HUD_ICON, () -> {
|
stagger.draw(new TextureButton(Textures.HUD_ICON, () -> {
|
||||||
Providers.saturn.setScreen(new HudEditor());
|
Providers.saturn.getClient().setScreen(new HudEditor());
|
||||||
}).dimensions(btnHeight, btnHeight).position(0, 0)
|
}).dimensions(btnHeight, btnHeight).position(0, 0)
|
||||||
.animation(new Fade(AnimationConfig.shiftMenu)));
|
.animation(new Fade(AnimationConfig.shiftMenu)));
|
||||||
|
|
||||||
stagger.draw(new Button("Settings", () -> {
|
stagger.draw(new Button("Settings", () -> {
|
||||||
Providers.saturn.setScreen(new ModMenu());
|
Providers.saturn.getClient().setScreen(new ModMenu());
|
||||||
}).dimensions(btnWidth, btnHeight).position(btnHeight + spacing, 0)
|
}).dimensions(btnWidth, btnHeight).position(btnHeight + spacing, 0)
|
||||||
.animation(new Fade(AnimationConfig.shiftMenu)));
|
.animation(new Fade(AnimationConfig.shiftMenu)));
|
||||||
|
|
||||||
stagger.draw(new TextureButton(Textures.COSMETICS, () -> {
|
stagger.draw(new TextureButton(Textures.COSMETICS, () -> {
|
||||||
Providers.saturn.setScreen(new CloakMenu());
|
Providers.saturn.getClient().setScreen(new CloakMenu());
|
||||||
}).dimensions(btnHeight, btnHeight).position(btnWidth + btnHeight + (spacing * 2), 0)
|
}).dimensions(btnHeight, btnHeight).position(btnWidth + btnHeight + (spacing * 2), 0)
|
||||||
.animation(new Fade(AnimationConfig.shiftMenu)));
|
.animation(new Fade(AnimationConfig.shiftMenu)));
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package org.saturnclient.ui.screens;
|
package org.saturnclient.ui.screens;
|
||||||
|
|
||||||
import org.saturnclient.common.provider.Providers;
|
import org.saturnclient.common.provider.Providers;
|
||||||
import org.saturnclient.common.provider.SaturnProvider.MinecraftScreen;
|
import org.saturnclient.common.ref.game.MinecraftClientRef.MinecraftScreen;
|
||||||
import org.saturnclient.config.AnimationConfig;
|
import org.saturnclient.config.AnimationConfig;
|
||||||
import org.saturnclient.config.Config;
|
import org.saturnclient.config.Config;
|
||||||
import org.saturnclient.ui.SaturnScreen;
|
import org.saturnclient.ui.SaturnScreen;
|
||||||
@@ -33,17 +33,17 @@ public class TitleMenu extends SaturnScreen {
|
|||||||
AnimationStagger mainButtonStagger = new AnimationStagger(AnimationConfig.mainMenu);
|
AnimationStagger mainButtonStagger = new AnimationStagger(AnimationConfig.mainMenu);
|
||||||
|
|
||||||
mainButtonStagger.draw(new Button("SINGLEPLAYER", () -> {
|
mainButtonStagger.draw(new Button("SINGLEPLAYER", () -> {
|
||||||
Providers.saturn.setScreen(MinecraftScreen.SelectWorld);
|
Providers.saturn.getClient().setScreen(MinecraftScreen.SelectWorld);
|
||||||
}).scale(0.69f).dimensions(420, 52).position(0, 0)
|
}).scale(0.69f).dimensions(420, 52).position(0, 0)
|
||||||
.animation(new SlideFade(AnimationConfig.mainMenu, -10)));
|
.animation(new SlideFade(AnimationConfig.mainMenu, -10)));
|
||||||
|
|
||||||
mainButtonStagger.draw(new Button("MULTIPLAYER", () -> {
|
mainButtonStagger.draw(new Button("MULTIPLAYER", () -> {
|
||||||
Providers.saturn.setScreen(MinecraftScreen.Multiplayer);
|
Providers.saturn.getClient().setScreen(MinecraftScreen.Multiplayer);
|
||||||
}).scale(0.69f).dimensions(420, 52).position(0, 40)
|
}).scale(0.69f).dimensions(420, 52).position(0, 40)
|
||||||
.animation(new SlideFade(AnimationConfig.mainMenu, -10)));
|
.animation(new SlideFade(AnimationConfig.mainMenu, -10)));
|
||||||
|
|
||||||
mainButtonStagger.draw(new Button("OPTIONS", () -> {
|
mainButtonStagger.draw(new Button("OPTIONS", () -> {
|
||||||
Providers.saturn.setScreen(MinecraftScreen.Options);
|
Providers.saturn.getClient().setScreen(MinecraftScreen.Options);
|
||||||
}).scale(0.69f).dimensions(206, 52).position(0, 80)
|
}).scale(0.69f).dimensions(206, 52).position(0, 80)
|
||||||
.animation(new SlideFade(AnimationConfig.mainMenu, -10)));
|
.animation(new SlideFade(AnimationConfig.mainMenu, -10)));
|
||||||
|
|
||||||
@@ -59,16 +59,16 @@ public class TitleMenu extends SaturnScreen {
|
|||||||
AnimationStagger saturnStagger = new AnimationStagger(AnimationConfig.mainMenu.stagger.value);
|
AnimationStagger saturnStagger = new AnimationStagger(AnimationConfig.mainMenu.stagger.value);
|
||||||
|
|
||||||
saturnStagger.draw(new TextureButton(Textures.HUD_ICON, () -> {
|
saturnStagger.draw(new TextureButton(Textures.HUD_ICON, () -> {
|
||||||
Providers.saturn.setScreen(new HudEditor());
|
Providers.saturn.getClient().setScreen(new HudEditor());
|
||||||
}).dimensions(s, s).position(0, 0).animation(new SlideFade(AnimationConfig.mainMenu, s + 8)));
|
}).dimensions(s, s).position(0, 0).animation(new SlideFade(AnimationConfig.mainMenu, s + 8)));
|
||||||
|
|
||||||
saturnStagger.draw(new TextureButton(Textures.SETTINGS, () -> {
|
saturnStagger.draw(new TextureButton(Textures.SETTINGS, () -> {
|
||||||
Providers.saturn.setScreen(new ModMenu());
|
Providers.saturn.getClient().setScreen(new ModMenu());
|
||||||
}).dimensions(s, s).position(s + 2, 0)
|
}).dimensions(s, s).position(s + 2, 0)
|
||||||
.animation(new SlideFade(AnimationConfig.mainMenu, s + 8)));
|
.animation(new SlideFade(AnimationConfig.mainMenu, s + 8)));
|
||||||
|
|
||||||
saturnStagger.draw(new TextureButton(Textures.CLOAK, () -> {
|
saturnStagger.draw(new TextureButton(Textures.CLOAK, () -> {
|
||||||
Providers.saturn.setScreen(new CloakMenu());
|
Providers.saturn.getClient().setScreen(new CloakMenu());
|
||||||
}).dimensions(s, s).position((s + 2) * 2, 0)
|
}).dimensions(s, s).position((s + 2) * 2, 0)
|
||||||
.animation(new SlideFade(AnimationConfig.mainMenu, s + 8)));
|
.animation(new SlideFade(AnimationConfig.mainMenu, s + 8)));
|
||||||
|
|
||||||
|
|||||||
@@ -104,7 +104,7 @@ public class CloakStore extends SaturnScreen {
|
|||||||
new TabMenuComponent(Textures.CLOAK, () -> {
|
new TabMenuComponent(Textures.CLOAK, () -> {
|
||||||
}),
|
}),
|
||||||
new TabMenuComponent(Textures.HAT, () -> {
|
new TabMenuComponent(Textures.HAT, () -> {
|
||||||
Providers.saturn.setScreen(new HatStore());
|
Providers.saturn.getClient().setScreen(new HatStore());
|
||||||
}))
|
}))
|
||||||
.centerOffset(width, height, 0, -195));
|
.centerOffset(width, height, 0, -195));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ public class HatStore extends SaturnScreen {
|
|||||||
|
|
||||||
draw(new TabMenu(1,
|
draw(new TabMenu(1,
|
||||||
new TabMenuComponent(Textures.CLOAK, () -> {
|
new TabMenuComponent(Textures.CLOAK, () -> {
|
||||||
Providers.saturn.setScreen(new CloakStore());
|
Providers.saturn.getClient().setScreen(new CloakStore());
|
||||||
}),
|
}),
|
||||||
new TabMenuComponent(Textures.HAT, () -> {
|
new TabMenuComponent(Textures.HAT, () -> {
|
||||||
}))
|
}))
|
||||||
|
|||||||
Reference in New Issue
Block a user