Updated Gradle version to 8.13
Updated Architectury.loom to 1.10 Added Client#getPosImp to get some pre-processing of the position \ Planes to replace the Client#getPos method Updated to 6.2.3 This version is mostly needed for NeoForged due to changes of how the ClientReloadListenerEvent is added see changes in SpeedometerNeoForge.EventHandler#onResourceReload version 6.2.2 is no longer marked as 1.21.4 compatible
This commit is contained in:
@@ -145,8 +145,8 @@ public class Client {
|
||||
default -> 0;
|
||||
};
|
||||
|
||||
int yPos = getPos(graphics, width, Config.getYPosition(), false);
|
||||
int xPos = getPos(graphics, width, Config.getXPosition(), true);
|
||||
int yPos = getPosImp(graphics, width, Config.getYPosition(), false);
|
||||
int xPos = getPosImp(graphics, width, Config.getXPosition(), true);
|
||||
|
||||
int lineHeight = Minecraft.getInstance().font.lineHeight;
|
||||
|
||||
@@ -223,6 +223,22 @@ public class Client {
|
||||
);
|
||||
}
|
||||
|
||||
private static int getPosImp(GuiGraphics event, int width, String input, boolean isXPosition){
|
||||
input = input.trim();
|
||||
input = input
|
||||
.replaceAll("(W+)|(H+)", String.valueOf(isXPosition?event.guiWidth():event.guiHeight()))
|
||||
.replaceAll("(w+)|(h+)", String.valueOf(isXPosition?event.guiWidth()/2:event.guiHeight()/2))
|
||||
.replaceAll("(S+)|(s+)", String.valueOf(width));
|
||||
if((Config.isDebug()) && Config.getCounter() < 2) {
|
||||
//String speedDisplayType = SpeedTypes.getName(Config.getSpeedType()).getString();
|
||||
//String splitRawSpeedPosition = Arrays.toString(passerPose.toArray());
|
||||
//String rawSpeedPosition = isXPosition ? Config.getXPosition() : Config.getYPosition();
|
||||
LOGGER.info("Selected speed type(DEBUG): {}\n{}\n\n\n", isXPosition, input);
|
||||
Config.addCounter();
|
||||
}
|
||||
return getPos(event, width, input, isXPosition);
|
||||
}
|
||||
|
||||
private static int getPos(GuiGraphics event, int width, String input, boolean isXPosition) {
|
||||
ArrayList<String> passerPose = new ArrayList<>();
|
||||
final char[] s = input.toCharArray();
|
||||
|
||||
Reference in New Issue
Block a user