Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| cda526d41d | |||
|
|
1321bb3cca | ||
| 47e475cecb |
@@ -67,14 +67,8 @@ public class Client {
|
|||||||
|
|
||||||
ClientGuiEvent.RENDER_HUD.register(Client::render);
|
ClientGuiEvent.RENDER_HUD.register(Client::render);
|
||||||
|
|
||||||
try {
|
LOGGER.info("Loading speedometer ");
|
||||||
img = ImageIO.read(Objects.requireNonNull(Speedometer.class.getResourceAsStream("/assets/speedometer/meter/meter-19.png")));
|
if(!MeterImages.LARGE.initiate()){
|
||||||
}catch (NullPointerException | IOException e){
|
|
||||||
LOGGER.warn("Can't load speedometer icon. speedometer visual display is disabled");
|
|
||||||
speedometerVisualDisplayFailed = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(img == null){
|
|
||||||
speedometerVisualDisplayFailed = true;
|
speedometerVisualDisplayFailed = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -143,26 +137,25 @@ public class Client {
|
|||||||
|
|
||||||
//double v = speedTypeSpeed / speedType.gatMaxVisual();
|
//double v = speedTypeSpeed / speedType.gatMaxVisual();
|
||||||
|
|
||||||
MeterImages meterImage = null;
|
img = ImageHandler.clone(MeterImages.LARGE.getImage());
|
||||||
int minDiff = 10000;
|
|
||||||
|
|
||||||
for(MeterImages meterImage1 : MeterImages.values()){
|
Graphics2D g2d = img.createGraphics();
|
||||||
int diff = Math.abs(meterImage1.getSize()-Config.getImageSize());
|
|
||||||
if(minDiff > diff && meterImage1.getImage() != null){
|
g2d.setColor(new Color(138, 0, 0));
|
||||||
minDiff = diff;
|
g2d.setFont(new Font(g2d.getFont().getName(), Font.PLAIN, 15));
|
||||||
meterImage = meterImage1;
|
|
||||||
}
|
if(Config.getShowVisualSpeedType()) {
|
||||||
|
g2d.drawString(SpeedTypes.getName(speedType).getString(), img.getWidth() / 2 - 27, img.getHeight() / 2 + 25);
|
||||||
}
|
}
|
||||||
|
|
||||||
img = meterImage.getImage();
|
|
||||||
|
|
||||||
int radius = Config.getImageSize()/2-4;
|
|
||||||
|
|
||||||
int x3 = (int) Math.round(radius*Math.cos(Math.toRadians(i+90)))+(Config.getImageSize()/2);
|
|
||||||
int y3 = (int) Math.round(radius*Math.sin(Math.toRadians(i+90)))+(Config.getImageSize()/2);
|
|
||||||
|
|
||||||
BufferedImage img = ImageHandler.scale(Client.img, Config.getImageSize(), Config.getImageSize());
|
BufferedImage img = ImageHandler.scale(Client.img, Config.getImageSize(), Config.getImageSize());
|
||||||
Graphics2D g2d = img.createGraphics();
|
|
||||||
|
int radius = img.getWidth()/2-4;
|
||||||
|
|
||||||
|
int x3 = (int) Math.round(radius*Math.cos(Math.toRadians(i+90)))+(img.getWidth()/2);
|
||||||
|
int y3 = (int) Math.round(radius*Math.sin(Math.toRadians(i+90)))+(img.getHeight()/2);
|
||||||
|
|
||||||
|
g2d = img.createGraphics();
|
||||||
|
|
||||||
g2d.setColor(new Color(138, 0, 0));
|
g2d.setColor(new Color(138, 0, 0));
|
||||||
|
|
||||||
@@ -170,8 +163,8 @@ public class Client {
|
|||||||
|
|
||||||
g2d.drawLine(x3,y3,img.getWidth()/2,img.getHeight()/2);
|
g2d.drawLine(x3,y3,img.getWidth()/2,img.getHeight()/2);
|
||||||
|
|
||||||
int xPos = getPos(graphics, Config.getXPosition(), 0, false);
|
int xPos = getPos(graphics, Config.getXPosition(), 0);
|
||||||
int yPos = getPos(graphics, Config.getYPosition(), 1, true);
|
int yPos = getPos(graphics, Config.getYPosition(), 1);
|
||||||
|
|
||||||
for(int x1 = 0; x1 < img.getWidth(); x1++){
|
for(int x1 = 0; x1 < img.getWidth(); x1++){
|
||||||
for(int y1 = 0; y1 < img.getHeight(); y1++){
|
for(int y1 = 0; y1 < img.getHeight(); y1++){
|
||||||
@@ -207,8 +200,8 @@ public class Client {
|
|||||||
graphics.drawString(
|
graphics.drawString(
|
||||||
Minecraft.getInstance().font,
|
Minecraft.getInstance().font,
|
||||||
speedString,
|
speedString,
|
||||||
getPos(graphics, Config.getXPosition(), 0, false) - width,
|
getPos(graphics, Config.getXPosition(), 0) - width,
|
||||||
getPos(graphics, Config.getYPosition(), 1, true) - lineHeight,
|
getPos(graphics, Config.getYPosition(), 1) - lineHeight,
|
||||||
Config.getColor().getColor()
|
Config.getColor().getColor()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -231,7 +224,8 @@ public class Client {
|
|||||||
"Velocity total average: " + speed + "\n" +
|
"Velocity total average: " + speed + "\n" +
|
||||||
"Velocity total in " + speedType.name() + ": " + speedTypeSpeed + "\n" +
|
"Velocity total in " + speedType.name() + ": " + speedTypeSpeed + "\n" +
|
||||||
"Percentage point of visual speedometer: " + v + "\n" +
|
"Percentage point of visual speedometer: " + v + "\n" +
|
||||||
"Degree end point: " + (i+45);
|
"Degree end point: " + (i+45) +"\n" +
|
||||||
|
(Config.getVisualSpeedometer()?"Visual Size: ":"Textual display") + Config.getImageSize();
|
||||||
|
|
||||||
Color color = new Color(255, 255, 255);
|
Color color = new Color(255, 255, 255);
|
||||||
|
|
||||||
@@ -253,9 +247,7 @@ public class Client {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
static boolean flag = true;
|
private static int getPos(GuiGraphics event, String input, int type) {
|
||||||
|
|
||||||
private static int getPos(GuiGraphics event, String input, int type, boolean changeFlag) {
|
|
||||||
ArrayList<String> passerPose = new ArrayList<>();
|
ArrayList<String> passerPose = new ArrayList<>();
|
||||||
final char[] s = input.toCharArray();
|
final char[] s = input.toCharArray();
|
||||||
try{
|
try{
|
||||||
@@ -274,7 +266,7 @@ public class Client {
|
|||||||
passerPose.add("/");
|
passerPose.add("/");
|
||||||
}else if(s[i] == '/'){
|
}else if(s[i] == '/'){
|
||||||
passerPose.add("/");
|
passerPose.add("/");
|
||||||
}else if(testIfInt(s[i])){
|
}else if(Character.isDigit(s[i])){
|
||||||
try{
|
try{
|
||||||
Integer.parseInt(passerPose.get(i-1));
|
Integer.parseInt(passerPose.get(i-1));
|
||||||
passerPose.add(i-1,passerPose.get(i-1)+s[i]);
|
passerPose.add(i-1,passerPose.get(i-1)+s[i]);
|
||||||
@@ -290,7 +282,7 @@ public class Client {
|
|||||||
defaultValues(event, type, passerPose);
|
defaultValues(event, type, passerPose);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
|
||||||
int xPos;
|
int xPos;
|
||||||
try{
|
try{
|
||||||
@@ -320,11 +312,12 @@ public class Client {
|
|||||||
xPos /= Integer.parseInt(s2);
|
xPos /= Integer.parseInt(s2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if((Platform.isDevelopmentEnvironment() || Config.isDebug()) && flag) {
|
if((Config.isDebug()) && Config.getCounter() < 2) {
|
||||||
LOGGER.info("Selected speed type: "+SpeedTypes.getName(Config.getSpeedType()).getString()+"\n"+
|
LOGGER.info("Selected speed type: "+SpeedTypes.getName(Config.getSpeedType()).getString()+"\n"+
|
||||||
Arrays.toString(passerPose.toArray())+"\n\n"+
|
Arrays.toString(passerPose.toArray())+"\n\n"+
|
||||||
xPos);
|
xPos+"\n\n"+
|
||||||
flag = !changeFlag;
|
(type==0?Config.getXPosition():Config.getYPosition()));
|
||||||
|
Config.addCounter();
|
||||||
}
|
}
|
||||||
return xPos;
|
return xPos;
|
||||||
}
|
}
|
||||||
@@ -333,19 +326,11 @@ public class Client {
|
|||||||
if(type == 0){
|
if(type == 0){
|
||||||
passerPose.add(String.valueOf(event.guiWidth()));
|
passerPose.add(String.valueOf(event.guiWidth()));
|
||||||
passerPose.add("-");
|
passerPose.add("-");
|
||||||
passerPose.add("70");
|
passerPose.add("3");
|
||||||
}else if(type == 1){
|
}else if(type == 1){
|
||||||
passerPose.add(String.valueOf(event.guiHeight()));
|
passerPose.add(String.valueOf(event.guiHeight()));
|
||||||
passerPose.add("-");
|
passerPose.add("-");
|
||||||
passerPose.add("15");
|
passerPose.add("3");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static boolean testIfInt(char c) {
|
|
||||||
int i = Integer.parseInt(Character.toString(c));
|
|
||||||
return (i == 0 || i == 1 || i == 2 ||
|
|
||||||
i == 3 || i == 4 || i == 5 ||
|
|
||||||
i == 6 || i == 7 || i == 8 ||
|
|
||||||
i == 9);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import static me.zacharias.speedometer.Speedometer.MOD_ID;
|
|||||||
public class Config {
|
public class Config {
|
||||||
private static JSONObject Config;
|
private static JSONObject Config;
|
||||||
public static final float configVersion = 3f;
|
public static final float configVersion = 3f;
|
||||||
|
private static int counter = 0;
|
||||||
|
|
||||||
public static void initialize(){
|
public static void initialize(){
|
||||||
if(Config != null) throw new RuntimeException("Already Initialized");
|
if(Config != null) throw new RuntimeException("Already Initialized");
|
||||||
@@ -108,6 +109,10 @@ public class Config {
|
|||||||
if(!Config.has("version")) {
|
if(!Config.has("version")) {
|
||||||
Config.put("version", configVersion);
|
Config.put("version", configVersion);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!Config.has("showVisualSpeedType")){
|
||||||
|
Config.put("showVisualSpeedType", false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void save(){
|
public static void save(){
|
||||||
@@ -128,6 +133,7 @@ public class Config {
|
|||||||
}catch (Exception e){
|
}catch (Exception e){
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
|
counter=0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static SpeedTypes getSpeedType(){
|
public static SpeedTypes getSpeedType(){
|
||||||
@@ -175,6 +181,13 @@ public class Config {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static int getCounter(){
|
||||||
|
return counter;
|
||||||
|
}
|
||||||
|
public static void addCounter(){
|
||||||
|
counter++;
|
||||||
|
}
|
||||||
|
|
||||||
/*public static String getXPositionVisual(){
|
/*public static String getXPositionVisual(){
|
||||||
if(Config.has("xPositionVisual")) {
|
if(Config.has("xPositionVisual")) {
|
||||||
return Config.getString("xPositionVisual");
|
return Config.getString("xPositionVisual");
|
||||||
@@ -210,7 +223,7 @@ public class Config {
|
|||||||
if(Config.has("yPosition")) {
|
if(Config.has("yPosition")) {
|
||||||
return Config.getString("yPosition");
|
return Config.getString("yPosition");
|
||||||
}else{
|
}else{
|
||||||
return "H-15";
|
return "H-3";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -218,7 +231,7 @@ public class Config {
|
|||||||
if(Config.has("xPosition")) {
|
if(Config.has("xPosition")) {
|
||||||
return Config.getString("xPosition");
|
return Config.getString("xPosition");
|
||||||
}else{
|
}else{
|
||||||
return "W-70";
|
return "W-3";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -230,6 +243,14 @@ public class Config {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static boolean getShowVisualSpeedType() {
|
||||||
|
if(Config.has("showVisualSpeedType")){
|
||||||
|
return Config.getBoolean("showVisualSpeedType");
|
||||||
|
}else{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static void setColor(Color color){
|
public static void setColor(Color color){
|
||||||
Config.put("color", new JSONObject()
|
Config.put("color", new JSONObject()
|
||||||
.put("r", color.getRed())
|
.put("r", color.getRed())
|
||||||
@@ -282,4 +303,8 @@ public class Config {
|
|||||||
public static void setImageSize(int imageSize){
|
public static void setImageSize(int imageSize){
|
||||||
Config.put("imageSize", imageSize);
|
Config.put("imageSize", imageSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void setShowVisualSpeedType(boolean showVisualSpeedType){
|
||||||
|
Config.put("showVisualSpeedType", showVisualSpeedType);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -167,6 +167,16 @@ public class ConfigMenu {
|
|||||||
.build()
|
.build()
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Show visual speed type
|
||||||
|
|
||||||
|
category.addEntry(entryBuilder.startBooleanToggle(Component.translatable("speedometer.config.showVisualSpeedType"), Config.getShowVisualSpeedType())
|
||||||
|
.setSaveConsumer(Config::setShowVisualSpeedType)
|
||||||
|
.setYesNoTextSupplier(showVisualSpeedType -> Component.translatable("speedometer."+(Config.getShowVisualSpeedType()?"show":"hide")))
|
||||||
|
.setTooltip(Component.translatable("speedometer.config.tooltip.showVisualSpeedType.line1"),
|
||||||
|
Component.translatable("speedometer.config.tooltip.showVisualSpeedType.line2"))
|
||||||
|
.build()
|
||||||
|
);
|
||||||
|
|
||||||
builder.setSavingRunnable(me.zacharias.speedometer.Config::save);
|
builder.setSavingRunnable(me.zacharias.speedometer.Config::save);
|
||||||
|
|
||||||
return builder;
|
return builder;
|
||||||
|
|||||||
@@ -11,4 +11,16 @@ public class ImageHandler {
|
|||||||
g2d.drawImage(img1,0,0,null);
|
g2d.drawImage(img1,0,0,null);
|
||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static BufferedImage clone(BufferedImage image) {
|
||||||
|
BufferedImage out = new BufferedImage(image.getWidth(), image.getHeight(), BufferedImage.TYPE_INT_ARGB);
|
||||||
|
Graphics2D g2d = out.createGraphics();
|
||||||
|
for(int x = 0; x < image.getWidth(); x++){
|
||||||
|
for(int y = 0; y < image.getWidth(); y++){
|
||||||
|
g2d.setColor(new Color(image.getRGB(x,y)));
|
||||||
|
g2d.fillRect(x,y,1,1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return out;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -4,44 +4,49 @@ import net.minecraft.network.chat.Component;
|
|||||||
|
|
||||||
import javax.imageio.ImageIO;
|
import javax.imageio.ImageIO;
|
||||||
import java.awt.image.BufferedImage;
|
import java.awt.image.BufferedImage;
|
||||||
|
import java.io.IOException;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
|
import static me.zacharias.speedometer.Speedometer.LOGGER;
|
||||||
|
|
||||||
public enum MeterImages {
|
public enum MeterImages {
|
||||||
LARGE(Component.translatable("speedometer.meter.large"), () -> {
|
LARGE(Component.translatable("speedometer.meter.large"), "/assets/speedometer/meter/meter-115.png", 115),
|
||||||
try {
|
SMALL(Component.translatable("speedometer.meter.small"), "/assets/speedometer/meter/meter-19.png", 19),
|
||||||
return ImageIO.read(Objects.requireNonNull(Speedometer.class.getResourceAsStream("/assets/speedometer/meter/meter-115.png")));
|
MEDIUM(Component.translatable("speedometer.meter.small"), "/assets/speedometer/meter/meter-67.png", 67)
|
||||||
} catch (Exception e) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}, 115),
|
|
||||||
SMALL(Component.translatable("speedometer.meter.small"), () -> {
|
|
||||||
try {
|
|
||||||
return ImageIO.read(Objects.requireNonNull(Speedometer.class.getResourceAsStream("/assets/speedometer/meter/meter-19.png")));
|
|
||||||
} catch (Exception e) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}, 19),
|
|
||||||
MEDIUM(Component.translatable("speedometer.meter.small"), () -> {
|
|
||||||
try {
|
|
||||||
return ImageIO.read(Objects.requireNonNull(Speedometer.class.getResourceAsStream("/assets/speedometer/meter/meter-67.png")));
|
|
||||||
} catch (Exception e) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}, 67)
|
|
||||||
|
|
||||||
;
|
;
|
||||||
|
|
||||||
private final Component name;
|
private final Component name;
|
||||||
private final BufferedImage image;
|
private final String meterIcon;
|
||||||
|
private BufferedImage image;
|
||||||
private final int size;
|
private final int size;
|
||||||
|
|
||||||
MeterImages(Component name, Loader icon, int size) {
|
MeterImages(Component name, String meterIcon, int size) {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.image = icon.load();
|
|
||||||
this.size = size;
|
this.size = size;
|
||||||
|
this.meterIcon = meterIcon;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean initiate(){
|
||||||
|
if(image != null){
|
||||||
|
LOGGER.warn("Already loaded \""+meterIcon+"\"");
|
||||||
|
}
|
||||||
|
try{
|
||||||
|
LOGGER.info("Loading speedometer \""+meterIcon+"\"");
|
||||||
|
image = ImageIO.read(Objects.requireNonNull(Speedometer.class.getResourceAsStream(meterIcon)));
|
||||||
|
LOGGER.info("Loaded speedometer \""+meterIcon+"\"");
|
||||||
|
return true;
|
||||||
|
} catch (IOException e) {
|
||||||
|
image = new BufferedImage(0,0, BufferedImage.TYPE_INT_ARGB);
|
||||||
|
LOGGER.warn("Failed to load speedometer \""+meterIcon+"\"");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public BufferedImage getImage() {
|
public BufferedImage getImage() {
|
||||||
|
if(image == null){
|
||||||
|
LOGGER.warn("\""+meterIcon+"\" has not ben loaded yet!");
|
||||||
|
}
|
||||||
return image;
|
return image;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -52,8 +57,4 @@ public enum MeterImages {
|
|||||||
public Component getName() {
|
public Component getName() {
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
private interface Loader{
|
|
||||||
BufferedImage load();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
"speedometer.config.yPosition": "Y Position for Meters",
|
"speedometer.config.yPosition": "Y Position for Meters",
|
||||||
"speedometer.config.debug": "Debug",
|
"speedometer.config.debug": "Debug",
|
||||||
"speedometer.config.imageSize": "Image Size",
|
"speedometer.config.imageSize": "Image Size",
|
||||||
|
"speedometer.config.showVisualSpeedType": "Show Visual Speed Type",
|
||||||
|
|
||||||
"speedometer.key.configKey": "Config Key",
|
"speedometer.key.configKey": "Config Key",
|
||||||
"speedometer.key.debugKey": "Debug Key",
|
"speedometer.key.debugKey": "Debug Key",
|
||||||
@@ -38,6 +39,9 @@
|
|||||||
"speedometer.debug.true": "\u00A74Yes",
|
"speedometer.debug.true": "\u00A74Yes",
|
||||||
"speedometer.debug.false": "\u00A74No",
|
"speedometer.debug.false": "\u00A74No",
|
||||||
|
|
||||||
|
"speedometer.show": "Show",
|
||||||
|
"speedometer.hide": "Hide",
|
||||||
|
|
||||||
"speedometer.config.tooltip.xPosition.line1": "W = the width of the screen",
|
"speedometer.config.tooltip.xPosition.line1": "W = the width of the screen",
|
||||||
"speedometer.config.tooltip.xPosition.line2": "w = half the width of the screen",
|
"speedometer.config.tooltip.xPosition.line2": "w = half the width of the screen",
|
||||||
"speedometer.config.tooltip.xPosition.line3": "s = the width of the text or image",
|
"speedometer.config.tooltip.xPosition.line3": "s = the width of the text or image",
|
||||||
@@ -50,5 +54,8 @@
|
|||||||
|
|
||||||
"speedometer.config.tooltip.imageSize": "Size of the image. This sets both the height and width",
|
"speedometer.config.tooltip.imageSize": "Size of the image. This sets both the height and width",
|
||||||
|
|
||||||
|
"speedometer.config.tooltip.showVisualSpeedType.line1": "This setting doesn't work fully.",
|
||||||
|
"speedometer.config.tooltip.showVisualSpeedType.line2": "I(the developer) discourages the use of this setting since it doesn't work on smaller sises and the fps breaks at larger",
|
||||||
|
|
||||||
"speedometer.invalid": "Invalid String"
|
"speedometer.invalid": "Invalid String"
|
||||||
}
|
}
|
||||||
@@ -3,7 +3,7 @@ org.gradle.jvmargs=-Xmx8G
|
|||||||
minecraft_version=1.20.1
|
minecraft_version=1.20.1
|
||||||
|
|
||||||
archives_base_name=speedometer
|
archives_base_name=speedometer
|
||||||
mod_version=4
|
mod_version=5
|
||||||
maven_group=me.zacharias
|
maven_group=me.zacharias
|
||||||
|
|
||||||
architectury_version=9.1.10
|
architectury_version=9.1.10
|
||||||
|
|||||||
16
readme.md
16
readme.md
@@ -1,8 +1,20 @@
|
|||||||
# Speedometer
|
# Speedometer
|
||||||
This is a simple mod for forge and fabric that displays your current speed
|
This is a simple mod for forge and fabric that displays your current speed
|
||||||
|
|
||||||
This mod is a newer version of [speedometer-forge](https://github.com/zaze06/speedometer-forge)
|
## Compile your own version?
|
||||||
|
1. Download source code
|
||||||
|
* Run `git clone https://github.com/zaze06/Speedometer`
|
||||||
|
* Download the source code from github page [master.zip](https://github.com/zaze06/Speedometer/archive/refs/heads/master.zip)
|
||||||
|
* unzip the folder
|
||||||
|
2. Open the folder
|
||||||
|
3. Run `gradlew build`(Windows cmd) or `./gradlew build`(Linux, MacOS, Windows powershell)
|
||||||
|
4. the compiled version will be in
|
||||||
|
* Fabic: `fabric/build/libs`
|
||||||
|
* Forge: `forge/build/libs`
|
||||||
|
|
||||||
|
|
||||||
|
# This mod is a newer version of [speedometer-forge](https://github.com/zaze06/speedometer-forge)
|
||||||
|
|
||||||
## Changes from old forge version?
|
## Changes from old forge version?
|
||||||
This was just a project I choose for trying the Architectury API for abstraction.
|
This was just a project I choose for trying the Architectury API for abstraction.
|
||||||
So changes are that now Architectury APi is required for this mod to work
|
So changes are that now Architectury APi is required for this mod to work
|
||||||
|
|||||||
Reference in New Issue
Block a user