Minecraft
This commit is contained in:
@@ -2,4 +2,5 @@ package org.saturnclient.common.provider;
|
|||||||
|
|
||||||
public class Providers {
|
public class Providers {
|
||||||
public static RefConstructorProvider refConstructor;
|
public static RefConstructorProvider refConstructor;
|
||||||
|
public static SaturnProvider saturn;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ package org.saturnclient.common.provider;
|
|||||||
|
|
||||||
import org.saturnclient.common.ref.asset.IdentifierRef;
|
import org.saturnclient.common.ref.asset.IdentifierRef;
|
||||||
|
|
||||||
public abstract class RefConstructorProvider {
|
public interface RefConstructorProvider {
|
||||||
public abstract IdentifierRef identifier(String namespace, String path);
|
public abstract IdentifierRef identifier(String namespace, String path);
|
||||||
public abstract IdentifierRef identifier(String fullPath);
|
public abstract IdentifierRef identifier(String fullPath);
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-17
@@ -1,28 +1,13 @@
|
|||||||
package org.saturnclient.common;
|
package org.saturnclient.common.provider;
|
||||||
|
|
||||||
import org.saturnclient.common.ref.asset.IdentifierRef;
|
import org.saturnclient.common.ref.asset.IdentifierRef;
|
||||||
import org.saturnclient.common.ref.game.MinecraftClientRef;
|
import org.saturnclient.common.ref.game.MinecraftClientRef;
|
||||||
import org.saturnclient.ui.SaturnScreen;
|
|
||||||
|
|
||||||
import java.awt.image.BufferedImage;
|
import java.awt.image.BufferedImage;
|
||||||
|
|
||||||
public abstract class MinecraftProvider {
|
public interface SaturnProvider {
|
||||||
public static MinecraftProvider PROVIDER;
|
|
||||||
|
|
||||||
public static enum MinecraftScreen {
|
|
||||||
SelectWorld,
|
|
||||||
Multiplayer,
|
|
||||||
Options
|
|
||||||
}
|
|
||||||
|
|
||||||
public abstract MinecraftClientRef getClient();
|
public abstract MinecraftClientRef getClient();
|
||||||
|
|
||||||
public abstract void setScreen(SaturnScreen screen);
|
|
||||||
|
|
||||||
public abstract void setScreen(MinecraftScreen screen);
|
|
||||||
|
|
||||||
public abstract Object createIdentifier(String namespace, String path);
|
|
||||||
|
|
||||||
public abstract boolean isKeyPressed(int key);
|
public abstract boolean isKeyPressed(int key);
|
||||||
|
|
||||||
public abstract int getWidth(String text, int font);
|
public abstract int getWidth(String text, int font);
|
||||||
@@ -5,12 +5,22 @@ import java.io.InputStream;
|
|||||||
|
|
||||||
import org.saturnclient.common.ref.asset.IdentifierRef;
|
import org.saturnclient.common.ref.asset.IdentifierRef;
|
||||||
import org.saturnclient.common.ref.render.WindowRef;
|
import org.saturnclient.common.ref.render.WindowRef;
|
||||||
|
import org.saturnclient.ui.SaturnScreen;
|
||||||
|
|
||||||
public interface MinecraftClientRef {
|
public interface MinecraftClientRef {
|
||||||
|
public static enum MinecraftScreen {
|
||||||
|
SelectWorld,
|
||||||
|
Multiplayer,
|
||||||
|
Options
|
||||||
|
}
|
||||||
|
|
||||||
public File getRunDirectory();
|
public File getRunDirectory();
|
||||||
|
|
||||||
public InputStream getResource(IdentifierRef identifier);
|
public InputStream getResource(IdentifierRef identifier);
|
||||||
|
|
||||||
public WindowRef getWindow();
|
public WindowRef getWindow();
|
||||||
|
|
||||||
|
public void setScreen(SaturnScreen screen);
|
||||||
|
|
||||||
|
public void setScreen(MinecraftScreen screen);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ package org.saturnclient.config;
|
|||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
|
||||||
import org.saturnclient.common.MinecraftProvider;
|
import org.saturnclient.common.provider.Providers;
|
||||||
import org.saturnclient.common.ref.asset.IdentifierRef;
|
import org.saturnclient.common.ref.asset.IdentifierRef;
|
||||||
import org.saturnclient.config.manager.ConfigManager;
|
import org.saturnclient.config.manager.ConfigManager;
|
||||||
import org.saturnclient.config.manager.Key;
|
import org.saturnclient.config.manager.Key;
|
||||||
@@ -23,7 +23,7 @@ public class Config {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void init() {
|
public static void init() {
|
||||||
File configFile = new File(MinecraftProvider.PROVIDER.getClient().getRunDirectory(), "saturn.json");
|
File configFile = new File(Providers.saturn.getClient().getRunDirectory(), "saturn.json");
|
||||||
config = new ConfigManager(configFile, "Saturn Client");
|
config = new ConfigManager(configFile, "Saturn Client");
|
||||||
|
|
||||||
config.property("Realistic logo", realisticLogo);
|
config.property("Realistic logo", realisticLogo);
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import com.fasterxml.jackson.databind.node.ObjectNode;
|
|||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import org.saturnclient.common.MinecraftProvider;
|
import org.saturnclient.common.provider.Providers;
|
||||||
|
|
||||||
public class Property<T> {
|
public class Property<T> {
|
||||||
|
|
||||||
@@ -275,7 +275,7 @@ public class Property<T> {
|
|||||||
public boolean isKeyPressed() {
|
public boolean isKeyPressed() {
|
||||||
|
|
||||||
return (Integer) value != -1 &&
|
return (Integer) value != -1 &&
|
||||||
MinecraftProvider.PROVIDER.isKeyPressed((Integer) value);
|
Providers.saturn.isKeyPressed((Integer) value);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean wasKeyPressed() {
|
public boolean wasKeyPressed() {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package org.saturnclient.ui.components;
|
package org.saturnclient.ui.components;
|
||||||
|
|
||||||
import org.saturnclient.modules.Module;
|
import org.saturnclient.modules.Module;
|
||||||
import org.saturnclient.common.MinecraftProvider;
|
import org.saturnclient.common.provider.Providers;
|
||||||
import org.saturnclient.config.Theme;
|
import org.saturnclient.config.Theme;
|
||||||
import org.saturnclient.ui.Element;
|
import org.saturnclient.ui.Element;
|
||||||
import org.saturnclient.ui.ElementContext;
|
import org.saturnclient.ui.ElementContext;
|
||||||
@@ -141,7 +141,7 @@ public class SaturnModule extends Element {
|
|||||||
1.0f);
|
1.0f);
|
||||||
|
|
||||||
if (settingsHover) {
|
if (settingsHover) {
|
||||||
MinecraftProvider.PROVIDER.setScreen(new ConfigEditor(mod.getConfig()));
|
Providers.saturn.getClient().setScreen(new ConfigEditor(mod.getConfig()));
|
||||||
} else {
|
} else {
|
||||||
mod.setEnabled(!mod.isEnabled());
|
mod.setEnabled(!mod.isEnabled());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package org.saturnclient.ui.components;
|
package org.saturnclient.ui.components;
|
||||||
|
|
||||||
import org.saturnclient.common.MinecraftProvider;
|
import org.saturnclient.common.provider.Providers;
|
||||||
import org.saturnclient.common.ref.asset.IdentifierRef;
|
import org.saturnclient.common.ref.asset.IdentifierRef;
|
||||||
import org.saturnclient.config.Config;
|
import org.saturnclient.config.Config;
|
||||||
import org.saturnclient.config.Theme;
|
import org.saturnclient.config.Theme;
|
||||||
@@ -30,14 +30,14 @@ public class Sidebar extends Element {
|
|||||||
Runnable onClose;
|
Runnable onClose;
|
||||||
SidebarComponent[] components = {
|
SidebarComponent[] components = {
|
||||||
new Sidebar.SidebarComponent(Textures.MODS_TAB, () -> {
|
new Sidebar.SidebarComponent(Textures.MODS_TAB, () -> {
|
||||||
MinecraftProvider.PROVIDER.setScreen(new ModMenu());
|
Providers.saturn.getClient().setScreen(new ModMenu());
|
||||||
}, false),
|
}, false),
|
||||||
new Sidebar.SidebarComponent(Textures.SETTINGS, () -> {
|
new Sidebar.SidebarComponent(Textures.SETTINGS, () -> {
|
||||||
MinecraftProvider.PROVIDER.setScreen(new ConfigEditor(Config.config));
|
Providers.saturn.getClient().setScreen(new ConfigEditor(Config.config));
|
||||||
}, false),
|
}, false),
|
||||||
|
|
||||||
new Sidebar.SidebarComponent(Textures.SHIRT, () -> {
|
new Sidebar.SidebarComponent(Textures.SHIRT, () -> {
|
||||||
MinecraftProvider.PROVIDER.setScreen(new CloakMenu());
|
Providers.saturn.getClient().setScreen(new CloakMenu());
|
||||||
}, false),
|
}, false),
|
||||||
|
|
||||||
new Sidebar.SidebarComponent(Textures.CLOSE, () -> {
|
new Sidebar.SidebarComponent(Textures.CLOSE, () -> {
|
||||||
@@ -45,7 +45,7 @@ public class Sidebar extends Element {
|
|||||||
}, true),
|
}, true),
|
||||||
|
|
||||||
new Sidebar.SidebarComponent(Textures.STORE, () -> {
|
new Sidebar.SidebarComponent(Textures.STORE, () -> {
|
||||||
MinecraftProvider.PROVIDER.setScreen(new CloakStore());
|
Providers.saturn.getClient().setScreen(new CloakStore());
|
||||||
}, true),
|
}, true),
|
||||||
};
|
};
|
||||||
int active = 0;
|
int active = 0;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package org.saturnclient.ui.components.inputs;
|
package org.saturnclient.ui.components.inputs;
|
||||||
|
|
||||||
import org.saturnclient.common.MinecraftProvider;
|
import org.saturnclient.common.provider.Providers;
|
||||||
import org.saturnclient.config.Theme;
|
import org.saturnclient.config.Theme;
|
||||||
import org.saturnclient.config.manager.Key;
|
import org.saturnclient.config.manager.Key;
|
||||||
import org.saturnclient.config.manager.Property;
|
import org.saturnclient.config.manager.Property;
|
||||||
@@ -22,7 +22,7 @@ public class KeybindingSelector extends Element {
|
|||||||
public void render(RenderScope renderScope, ElementContext ctx) {
|
public void render(RenderScope renderScope, ElementContext ctx) {
|
||||||
int textColor = focused ? 0xFFFFFF : 0xAAAAAA;
|
int textColor = focused ? 0xFFFFFF : 0xAAAAAA;
|
||||||
renderScope.drawRoundedRectangle(0, 0, width, height, 10, 0xFF000000);
|
renderScope.drawRoundedRectangle(0, 0, width, height, 10, 0xFF000000);
|
||||||
String name = MinecraftProvider.PROVIDER.getKeyName(prop.value);
|
String name = Providers.saturn.getKeyName(prop.value);
|
||||||
|
|
||||||
renderScope.drawText(0.6f,
|
renderScope.drawText(0.6f,
|
||||||
prop.value == -1 ? "<NONE>"
|
prop.value == -1 ? "<NONE>"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package org.saturnclient.ui.elements;
|
package org.saturnclient.ui.elements;
|
||||||
|
|
||||||
import org.saturnclient.common.MinecraftProvider;
|
import org.saturnclient.common.provider.Providers;
|
||||||
import org.saturnclient.common.ref.asset.IdentifierRef;
|
import org.saturnclient.common.ref.asset.IdentifierRef;
|
||||||
import org.saturnclient.common.ref.game.MinecraftClientRef;
|
import org.saturnclient.common.ref.game.MinecraftClientRef;
|
||||||
import org.saturnclient.ui.Element;
|
import org.saturnclient.ui.Element;
|
||||||
@@ -18,7 +18,7 @@ public class ImageTexture extends Element {
|
|||||||
@Override
|
@Override
|
||||||
public void render(RenderScope renderScope, ElementContext ctx) {
|
public void render(RenderScope renderScope, ElementContext ctx) {
|
||||||
if (sprite.toString().endsWith(".svg")) {
|
if (sprite.toString().endsWith(".svg")) {
|
||||||
MinecraftClientRef client = MinecraftProvider.PROVIDER.getClient();
|
MinecraftClientRef client = Providers.saturn.getClient();
|
||||||
|
|
||||||
int renderWidth = (int) (width * client.getWindow().getFramebufferWidth() / client.getWindow().getWidth());
|
int renderWidth = (int) (width * client.getWindow().getFramebufferWidth() / client.getWindow().getWidth());
|
||||||
int renderHeight = (int) (height * client.getWindow().getFramebufferHeight()
|
int renderHeight = (int) (height * client.getWindow().getFramebufferHeight()
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package org.saturnclient.ui.resources;
|
package org.saturnclient.ui.resources;
|
||||||
|
|
||||||
import org.saturnclient.common.MinecraftProvider;
|
import org.saturnclient.common.provider.Providers;
|
||||||
import org.saturnclient.common.ref.asset.IdentifierRef;
|
import org.saturnclient.common.ref.asset.IdentifierRef;
|
||||||
|
|
||||||
public class Fonts {
|
public class Fonts {
|
||||||
@@ -22,7 +22,7 @@ public class Fonts {
|
|||||||
public static int getWidth(String text, int font) {
|
public static int getWidth(String text, int font) {
|
||||||
int w = 0;
|
int w = 0;
|
||||||
for (String line : text.split("\n")) {
|
for (String line : text.split("\n")) {
|
||||||
w = Math.max(w, MinecraftProvider.PROVIDER.getWidth(line, font));
|
w = Math.max(w, Providers.saturn.getWidth(line, font));
|
||||||
}
|
}
|
||||||
if (font == 0) {
|
if (font == 0) {
|
||||||
return w * 2;
|
return w * 2;
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import java.util.List;
|
|||||||
import com.kitfox.svg.SVGDiagram;
|
import com.kitfox.svg.SVGDiagram;
|
||||||
import com.kitfox.svg.SVGUniverse;
|
import com.kitfox.svg.SVGUniverse;
|
||||||
|
|
||||||
import org.saturnclient.common.MinecraftProvider;
|
import org.saturnclient.common.provider.Providers;
|
||||||
import org.saturnclient.common.ref.asset.IdentifierRef;
|
import org.saturnclient.common.ref.asset.IdentifierRef;
|
||||||
import org.saturnclient.common.ref.game.MinecraftClientRef;
|
import org.saturnclient.common.ref.game.MinecraftClientRef;
|
||||||
|
|
||||||
@@ -62,7 +62,7 @@ public class SvgTexture {
|
|||||||
|
|
||||||
BufferedImage image = renderSvg(svgStream, width, height);
|
BufferedImage image = renderSvg(svgStream, width, height);
|
||||||
|
|
||||||
MinecraftProvider.PROVIDER.registerBufferedImageTexture(id, image);
|
Providers.saturn.registerBufferedImageTexture(id, image);
|
||||||
|
|
||||||
return id;
|
return id;
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package org.saturnclient.ui.screens;
|
package org.saturnclient.ui.screens;
|
||||||
|
|
||||||
import org.saturnclient.common.MinecraftProvider;
|
import org.saturnclient.common.provider.Providers;
|
||||||
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;
|
||||||
@@ -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, () -> {
|
||||||
MinecraftProvider.PROVIDER.setScreen(new HudEditor());
|
Providers.saturn.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", () -> {
|
||||||
MinecraftProvider.PROVIDER.setScreen(new ModMenu());
|
Providers.saturn.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, () -> {
|
||||||
MinecraftProvider.PROVIDER.setScreen(new CloakMenu());
|
Providers.saturn.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.MinecraftProvider;
|
import org.saturnclient.common.provider.Providers;
|
||||||
import org.saturnclient.common.MinecraftProvider.MinecraftScreen;
|
import org.saturnclient.common.provider.SaturnProvider.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,22 +33,22 @@ 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", () -> {
|
||||||
MinecraftProvider.PROVIDER.setScreen(MinecraftScreen.SelectWorld);
|
Providers.saturn.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", () -> {
|
||||||
MinecraftProvider.PROVIDER.setScreen(MinecraftScreen.Multiplayer);
|
Providers.saturn.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", () -> {
|
||||||
MinecraftProvider.PROVIDER.setScreen(MinecraftScreen.Options);
|
Providers.saturn.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)));
|
||||||
|
|
||||||
mainButtonStagger.draw(new Button("QUIT", () -> {
|
mainButtonStagger.draw(new Button("QUIT", () -> {
|
||||||
MinecraftProvider.PROVIDER.stop();
|
Providers.saturn.stop();
|
||||||
}).scale(0.69f).dimensions(206, 52).position(146, 80)
|
}).scale(0.69f).dimensions(206, 52).position(146, 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, () -> {
|
||||||
MinecraftProvider.PROVIDER.setScreen(new HudEditor());
|
Providers.saturn.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, () -> {
|
||||||
MinecraftProvider.PROVIDER.setScreen(new ModMenu());
|
Providers.saturn.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, () -> {
|
||||||
MinecraftProvider.PROVIDER.setScreen(new CloakMenu());
|
Providers.saturn.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)));
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package org.saturnclient.ui.screens.cosmetics;
|
package org.saturnclient.ui.screens.cosmetics;
|
||||||
|
|
||||||
import org.saturnclient.client.player.SaturnPlayer;
|
import org.saturnclient.client.player.SaturnPlayer;
|
||||||
import org.saturnclient.common.MinecraftProvider;
|
import org.saturnclient.common.provider.Providers;
|
||||||
import org.saturnclient.config.AnimationConfig;
|
import org.saturnclient.config.AnimationConfig;
|
||||||
import org.saturnclient.ui.SaturnScreen;
|
import org.saturnclient.ui.SaturnScreen;
|
||||||
import org.saturnclient.ui.anim.Fade;
|
import org.saturnclient.ui.anim.Fade;
|
||||||
@@ -74,7 +74,7 @@ public class CloakMenu extends SaturnScreen {
|
|||||||
new TabMenuComponent(Textures.CLOAK, () -> {
|
new TabMenuComponent(Textures.CLOAK, () -> {
|
||||||
}),
|
}),
|
||||||
new TabMenuComponent(Textures.HAT, () -> {
|
new TabMenuComponent(Textures.HAT, () -> {
|
||||||
MinecraftProvider.PROVIDER.setScreen(new HatMenu());
|
Providers.saturn.getClient().setScreen(new HatMenu());
|
||||||
}))
|
}))
|
||||||
.centerOffset(width, height, 0, -195));
|
.centerOffset(width, height, 0, -195));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package org.saturnclient.ui.screens.cosmetics;
|
package org.saturnclient.ui.screens.cosmetics;
|
||||||
|
|
||||||
import org.saturnclient.client.player.SaturnPlayer;
|
import org.saturnclient.client.player.SaturnPlayer;
|
||||||
import org.saturnclient.common.MinecraftProvider;
|
import org.saturnclient.common.provider.Providers;
|
||||||
import org.saturnclient.config.AnimationConfig;
|
import org.saturnclient.config.AnimationConfig;
|
||||||
import org.saturnclient.cosmetics.Hats;
|
import org.saturnclient.cosmetics.Hats;
|
||||||
import org.saturnclient.ui.SaturnScreen;
|
import org.saturnclient.ui.SaturnScreen;
|
||||||
@@ -73,7 +73,7 @@ public class HatMenu extends SaturnScreen {
|
|||||||
|
|
||||||
draw(new TabMenu(1,
|
draw(new TabMenu(1,
|
||||||
new TabMenuComponent(Textures.CLOAK, () -> {
|
new TabMenuComponent(Textures.CLOAK, () -> {
|
||||||
MinecraftProvider.PROVIDER.setScreen(new CloakMenu());
|
Providers.saturn.getClient().setScreen(new CloakMenu());
|
||||||
}),
|
}),
|
||||||
new TabMenuComponent(Textures.HAT, () -> {
|
new TabMenuComponent(Textures.HAT, () -> {
|
||||||
}))
|
}))
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package org.saturnclient.ui.screens.store;
|
|||||||
// import org.saturnclient.cosmetics.cloak.Cloaks;
|
// import org.saturnclient.cosmetics.cloak.Cloaks;
|
||||||
import org.saturnclient.client.ServiceClient;
|
import org.saturnclient.client.ServiceClient;
|
||||||
import org.saturnclient.client.player.SaturnPlayer;
|
import org.saturnclient.client.player.SaturnPlayer;
|
||||||
import org.saturnclient.common.MinecraftProvider;
|
import org.saturnclient.common.provider.Providers;
|
||||||
import org.saturnclient.config.AnimationConfig;
|
import org.saturnclient.config.AnimationConfig;
|
||||||
import org.saturnclient.config.Theme;
|
import org.saturnclient.config.Theme;
|
||||||
import org.saturnclient.ui.SaturnScreen;
|
import org.saturnclient.ui.SaturnScreen;
|
||||||
@@ -51,41 +51,41 @@ public class CloakStore extends SaturnScreen {
|
|||||||
|
|
||||||
if (player != null) {
|
if (player != null) {
|
||||||
// for (String cloak : Cloaks.ALL_CLOAKS) {
|
// for (String cloak : Cloaks.ALL_CLOAKS) {
|
||||||
// if (!Cloaks.availableCloaks.contains(cloak)) {
|
// if (!Cloaks.availableCloaks.contains(cloak)) {
|
||||||
|
|
||||||
// int x = (50 + gx) * col;
|
// int x = (50 + gx) * col;
|
||||||
// int y = (111 + gy) * row;
|
// int y = (111 + gy) * row;
|
||||||
|
|
||||||
// stagger.draw(
|
// stagger.draw(
|
||||||
// new CosmeticPreview(
|
// new CosmeticPreview(
|
||||||
// cloak == player.cloak,
|
// cloak == player.cloak,
|
||||||
// Textures.getCloakPreview(cloak),
|
// Textures.getCloakPreview(cloak),
|
||||||
// () -> handlePurchase(cloak))
|
// () -> handlePurchase(cloak))
|
||||||
// .position(x, y)
|
// .position(x, y)
|
||||||
// .animation(new SlideY(AnimationConfig.cosmeticsMenu, 16)));
|
// .animation(new SlideY(AnimationConfig.cosmeticsMenu, 16)));
|
||||||
|
|
||||||
// String t = "100";
|
// String t = "100";
|
||||||
|
|
||||||
// stagger.draw(
|
// stagger.draw(
|
||||||
// new Text(t)
|
// new Text(t)
|
||||||
// .position(x + Fonts.centerX(50, t, Theme.FONT.value), y + 113)
|
// .position(x + Fonts.centerX(50, t, Theme.FONT.value), y + 113)
|
||||||
// .scale(0.5f)
|
// .scale(0.5f)
|
||||||
// .animation(new Fade(400)));
|
// .animation(new Fade(400)));
|
||||||
|
|
||||||
// stagger.draw(
|
// stagger.draw(
|
||||||
// new ImageTexture(Textures.COINS)
|
// new ImageTexture(Textures.COINS)
|
||||||
// .dimensions(16, 16)
|
// .dimensions(16, 16)
|
||||||
// .position(x + Fonts.getWidth(t, Theme.FONT.value) - 1, y + 112)
|
// .position(x + Fonts.getWidth(t, Theme.FONT.value) - 1, y + 112)
|
||||||
// .scale(0.5f)
|
// .scale(0.5f)
|
||||||
// .animation(new Fade(400)));
|
// .animation(new Fade(400)));
|
||||||
|
|
||||||
// if (col == 8) {
|
// if (col == 8) {
|
||||||
// col = 0;
|
// col = 0;
|
||||||
// row++;
|
// row++;
|
||||||
// } else {
|
// } else {
|
||||||
// col++;
|
// col++;
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -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, () -> {
|
||||||
MinecraftProvider.PROVIDER.setScreen(new HatStore());
|
Providers.saturn.setScreen(new HatStore());
|
||||||
}))
|
}))
|
||||||
.centerOffset(width, height, 0, -195));
|
.centerOffset(width, height, 0, -195));
|
||||||
}
|
}
|
||||||
@@ -125,10 +125,10 @@ public class CloakStore extends SaturnScreen {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// RenderSystem.recordRenderCall(() -> {
|
// RenderSystem.recordRenderCall(() -> {
|
||||||
// MinecraftProvider.PROVIDER.setScreen(new CloakStore(now));
|
// MinecraftProvider.PROVIDER.setScreen(new CloakStore(now));
|
||||||
// // Utils.notify(NotificationKind.Success,
|
// // Utils.notify(NotificationKind.Success,
|
||||||
// // "Purchase complete",
|
// // "Purchase complete",
|
||||||
// // "Congrats, enjoy your new cloak!");
|
// // "Congrats, enjoy your new cloak!");
|
||||||
// });
|
// });
|
||||||
}).start();
|
}).start();
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ package org.saturnclient.ui.screens.store;
|
|||||||
|
|
||||||
import org.saturnclient.client.ServiceClient;
|
import org.saturnclient.client.ServiceClient;
|
||||||
import org.saturnclient.client.player.SaturnPlayer;
|
import org.saturnclient.client.player.SaturnPlayer;
|
||||||
import org.saturnclient.common.MinecraftProvider;
|
import org.saturnclient.common.provider.Providers;
|
||||||
import org.saturnclient.config.AnimationConfig;
|
import org.saturnclient.config.AnimationConfig;
|
||||||
import org.saturnclient.config.Theme;
|
import org.saturnclient.config.Theme;
|
||||||
import org.saturnclient.cosmetics.Hats;
|
import org.saturnclient.cosmetics.Hats;
|
||||||
@@ -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, () -> {
|
||||||
MinecraftProvider.PROVIDER.setScreen(new CloakStore());
|
Providers.saturn.setScreen(new CloakStore());
|
||||||
}),
|
}),
|
||||||
new TabMenuComponent(Textures.HAT, () -> {
|
new TabMenuComponent(Textures.HAT, () -> {
|
||||||
}))
|
}))
|
||||||
@@ -126,10 +126,10 @@ public class HatStore extends SaturnScreen {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// RenderSystem.recordRenderCall(() -> {
|
// RenderSystem.recordRenderCall(() -> {
|
||||||
// MinecraftProvider.PROVIDER.setScreen(new HatStore(now));
|
// MinecraftProvider.PROVIDER.setScreen(new HatStore(now));
|
||||||
// // Utils.notify(NotificationKind.Success,
|
// // Utils.notify(NotificationKind.Success,
|
||||||
// // "Purchase complete",
|
// // "Purchase complete",
|
||||||
// // "Congrats, enjoy your new hat!");
|
// // "Congrats, enjoy your new hat!");
|
||||||
// });
|
// });
|
||||||
}).start();
|
}).start();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user