Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
tanishisherewithhh committed Apr 20, 2024
1 parent 0da7287 commit 2f05df5
Show file tree
Hide file tree
Showing 15 changed files with 280 additions and 458 deletions.
15 changes: 8 additions & 7 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ repositories {
// See https://docs.gradle.org/current/userguide/declaring_repositories.html
maven { url "https://maven.shedaniel.me/" }
maven { url "https://maven.terraformersmc.com/releases/" }
maven {
name 'Xander Maven'
url 'https://maven.isxander.dev/releases'
}
}
allprojects {
repositories {
Expand All @@ -31,16 +35,13 @@ dependencies {
minecraft "com.mojang:minecraft:${project.minecraft_version}"
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
modApi("me.shedaniel.cloth:cloth-config-fabric:11.0.99") {
exclude(group: "net.fabricmc.fabric-api")
}
modApi "me.shedaniel.cloth:cloth-config-fabric:13.0.121"

//DynamicHUD
modImplementation 'com.github.V-Fast:DynamicHUD:1.2.0-1'


modImplementation "dev.isxander.yacl:yet-another-config-lib-fabric:3.3.2+1.20.4"
modApi 'com.github.V-Fast:DynamicHUD:2.0.0'
// Mod Menu
modApi "com.terraformersmc:modmenu:7.0.1"
modApi "com.terraformersmc:modmenu:9.0.0"

// Fabric API. This is technically optional, but you probably want it anyway.
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
Expand Down
14 changes: 7 additions & 7 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
# Done to increase the memory available to gradle.
org.gradle.jvmargs=-Xmx1G
org.gradle.jvmargs=-Xmx3G
org.gradle.parallel=true

# Fabric Properties
# check these on https://fabricmc.net/develop
minecraft_version=1.20.1
yarn_mappings=1.20.1+build.1
loader_version=0.14.21
# check these on https://fabricmc.net/develop
minecraft_version=1.20.4
yarn_mappings=1.20.4+build.1
loader_version=0.15.0

# Mod Properties
mod_version = 2.5.2
mod_version = 2.6
maven_group = net.smphack
archives_base_name = smp-hack

# Dependencies
fabric_version=0.83.0+1.20.1
fabric_version=0.91.1+1.20.4
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
zipStorePath=wrapper/dists
2 changes: 1 addition & 1 deletion src/main/java/net/fabricmc/smphack/HUDoverlay.java
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ public void onHudRender(DrawContext drawContext, float tickDelta) {


//To stop rendering if debug screen or F3 menu is enabled
if (mc.options.debugEnabled) {return;}
if (mc.getDebugHud().shouldShowDebugHud()) {return;}
//To avoid null crashes
if (Formatting.RED.getColorValue() == null || Formatting.BLUE.getColorValue() == null || Formatting.WHITE.getColorValue() == null || Formatting.GREEN.getColorValue() == null)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public void spawn(PlayerEntity player) {
this.setPose(player.getPose());
this.getInventory().clone(player.getInventory());
assert mc.world != null;
mc.world.addEntity(getId(), this);
mc.world.addEntity(this);
System.out.println("FakePlayer Spawned Instance: " + this);
}
public void clear() {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/net/fabricmc/smphack/MainGui.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

public abstract class MainGui {

// i dont know why am i Using this. Yes i am bad at OOP
// i dont know why am i using this. Yes i am bad at OOP
public boolean enabled=false;
public void toggled(){
enabled=!enabled;
Expand Down
41 changes: 2 additions & 39 deletions src/main/java/net/fabricmc/smphack/RGBtext/CharacterMode.java
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public static void init() {
//font
TextRenderer font = mc.textRenderer;
if (font == null || mc.player == null) return;
if (mc.options.debugEnabled) return;
if (mc.getDebugHud().shouldShowDebugHud()) return;
PlayerEntity player = MinecraftClient.getInstance().player;
if (GeneralConfig.getConfig() == null) {
return;
Expand All @@ -64,13 +64,11 @@ public static void init() {

//Start of variables
TextShadow = GeneralConfig.getConfig().getTextshadow();
String CoordSide = String.valueOf(config.Coordside);
coordinates(player);
displayposandcolour(font);
int x_offset = 0;
//End of initializing variables;
String text = "XYZ " + xp + " " + yp + " " + zp;
String LOGO = "SMP-Hack v2-5-0";
String LOGO = "SMP-Hack v2-6";

int stringWidth = font.getWidth(LOGO);
for (int i = 0; i < LOGO.length(); i++) {
Expand All @@ -82,42 +80,7 @@ public static void init() {
x_offset += charWidth;
}

// Calculate text width and colors
int textWidth = font.getWidth(text);
Color[] colors = new Color[text.length()];
for (int i = 0; i < text.length(); i++) {
float hueOffset = i / (float) text.length();
colors[i] = Color.getHSBColor(hue + hueOffset, 1, 1);
}

// Draw coordinate text
for (int i = 0; i < text.length(); i++) {
char c = text.charAt(i);
int width = font.getWidth(String.valueOf(c));
switch (CoordSide) {
case "TopRight" -> {
tsw = screenWidth - textWidth - 20 + i * width;
y = 16;
}
case "BottomRight" -> {
tsw = screenWidth - textWidth - 20 + i * width;
y = windowHeight - font.fontHeight - 10;
}
case "BottomLeft" -> {
tsw = (tw + i * width);
y = windowHeight - font.fontHeight - 23;
}
case "Top" -> {
tsw = (((screenWidth - textWidth) / 2) + i * width) - 2;
y = 5;
}

}
rendertext(drawContext, font, String.valueOf(c), tsw, y, colors[i].getRGB());
}

}

});
}
}
Expand Down
88 changes: 0 additions & 88 deletions src/main/java/net/fabricmc/smphack/hud/ArmorWidgetExtension.java

This file was deleted.

Loading

0 comments on commit 2f05df5

Please sign in to comment.