Skip to content

Commit

Permalink
CSGOWatermark module added and version rename
Browse files Browse the repository at this point in the history
  • Loading branch information
addressnopping committed Oct 23, 2021
1 parent 7e68ff0 commit 9963d12
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 8 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
org.gradle.jvmargs=-Xmx3G
modGroup=me.earth
modVersion=2.0.2
modVersion=2.0.3
modBaseName=NsmPhobos
forgeVersion=1.12.2-14.23.5.2768
mcpVersion=stable_39
6 changes: 3 additions & 3 deletions src/main/java/me/earth/phobos/Phobos.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@
import java.awt.datatransfer.StringSelection;
import java.io.IOException;

@Mod(modid = "nsm", name = "Nsm Phobos", version = "2.0.2")
@Mod(modid = "nsm", name = "Nsm Phobos", version = Phobos.MODVER)
public class Phobos {
public static final String MODID = "nsm";
public static final String MODNAME = "Nsm Phobos";
public static final String MODVER = "2.0.2";
public static final String MODVER = "2.0.3";
public static final String NAME_UNICODE = "3\u1d00\u0280\u1d1b\u029c\u029c4\u1d04\u1d0b";
public static final String PHOBOS_UNICODE = "Nsm \u1d18\u029c\u1d0f\u0299\u1d0f\ua731";
public static final String CHAT_SUFFIX = " \u23d0 3\u1d00\u0280\u1d1b\u029c\u029c4\u1d04\u1d0b";
Expand Down Expand Up @@ -195,7 +195,7 @@ public void init(FMLInitializationEvent event) {
if (moduleManager.getModuleByClass(CustomMainScreen.class).isEnabled()) {
customMainScreen = new GuiCustomMainScreen();
}
Display.setTitle("Nsm Phobos - v2.0.2");
Display.setTitle("Nsm Phobos - v" + Phobos.MODVER);
Phobos.load();
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
package me.earth.phobos.features.modules.client;

import me.earth.phobos.Phobos;
import me.earth.phobos.event.events.Render2DEvent;
import me.earth.phobos.features.modules.Module;
import me.earth.phobos.features.setting.Setting;
import me.earth.phobos.util.ColorUtil;
import me.earth.phobos.util.ColorUtil1;
import me.earth.phobos.util.RenderUtil;
import me.earth.phobos.util.Timer;

public class CSGOWatermark extends Module {
Timer delayTimer = new Timer();
public Setting<Integer> X = this.register(new Setting("WatermarkX", 0, 0, 300));
public Setting<Integer> Y = this.register(new Setting("WatermarkY", 0, 0, 300));
public Setting<Integer> delay = this.register(new Setting<Object>("Delay", 240, 0, 600));
public Setting<Integer> saturation = this.register(new Setting<Object>("Saturation", 127, 1, 255));
public Setting<Integer> brightness = this.register(new Setting<Object>("Brightness", 100, 0, 255));
public float hue;
public int red = 1;
public int green = 1;
public int blue = 1;

private String message = "";

public CSGOWatermark() {
super("CSGOWatermark", "noat em cee actually makes something", Module.Category.CLIENT, true, false, false);
}

@Override
public void onRender2D(Render2DEvent event) {
drawCsgoWatermark();
}

public void drawCsgoWatermark() {
int padding = 5;
message = "Nsm Phobos v" + Phobos.MODVER + " | " + mc.player.getName() + " | " + Phobos.serverManager.getPing() + "ms";
Integer textWidth = mc.fontRenderer.getStringWidth(message); // taken from wurst+ 3
Integer textHeight = mc.fontRenderer.FONT_HEIGHT; // taken from wurst+ 3
RenderUtil.drawRectangleCorrectly(X.getValue() - 4, Y.getValue() - 4, textWidth + 16, textHeight + 12, ColorUtil.toRGBA(22, 22, 22, 255));
RenderUtil.drawRectangleCorrectly(X.getValue(), Y.getValue(), textWidth + 4, textHeight + 4, ColorUtil.toRGBA(0, 0, 0, 255));
RenderUtil.drawRectangleCorrectly(X.getValue(), Y.getValue(), textWidth + 8, textHeight + 4, ColorUtil.toRGBA(0, 0, 0, 255));
RenderUtil.drawRectangleCorrectly(X.getValue(), Y.getValue(), textWidth + 8, 1, ColorUtil1.rainbow(this.delay.getValue()).hashCode());
mc.fontRenderer.drawString(message, X.getValue() + 3, Y.getValue() + 3, ColorUtil.toRGBA(255, 255, 255, 255), false);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -204,15 +204,15 @@ public void onRender2D(final Render2DEvent event) {
final String grayString = this.grayNess.getValue() ? "" : "";
switch (this.watermark.getValue()) {
case PHOBOS: {
this.renderer.drawString("Nsm Phobos" + (this.modeVer.getValue() ? " v2.0.2" : ""), 2.0f, 2.0f, (this.rolling.getValue() && this.rainbow.getValue()) ? this.colorMap.get(2) : this.color, true);
this.renderer.drawString("Nsm Phobos" + (this.modeVer.getValue() ? " v2.0.3" : ""), 2.0f, 2.0f, (this.rolling.getValue() && this.rainbow.getValue()) ? this.colorMap.get(2) : this.color, true);
break;
}
case EARTH: {
this.renderer.drawString("3arthh4ck" + (this.modeVer.getValue() ? " v2.0.2" : ""), 2.0f, 2.0f, (this.rolling.getValue() && this.rainbow.getValue()) ? this.colorMap.get(2) : this.color, true);
this.renderer.drawString("3arthh4ck" + (this.modeVer.getValue() ? " v2.0.3" : ""), 2.0f, 2.0f, (this.rolling.getValue() && this.rainbow.getValue()) ? this.colorMap.get(2) : this.color, true);
break;
}
case CUSTOM: {
this.renderer.drawString(this.customWatermark.getValue() + (this.modeVer.getValue() ? " v2.0.2" : ""), 2.0f, 2.0f, (this.rolling.getValue() && this.rainbow.getValue()) ? this.colorMap.get(2) : this.color, true);
this.renderer.drawString(this.customWatermark.getValue() + (this.modeVer.getValue() ? " v2.0.3" : ""), 2.0f, 2.0f, (this.rolling.getValue() && this.rainbow.getValue()) ? this.colorMap.get(2) : this.color, true);
break;
}
}
Expand Down
1 change: 1 addition & 0 deletions src/main/java/me/earth/phobos/manager/ModuleManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ public void init() {
this.modules.add(new Speedmine());
this.modules.add(new SafeWalk());
this.modules.add(new Blink());
this.modules.add(new CSGOWatermark());
this.modules.add(new CustomMainScreen());
this.modules.add(new MultiTask());
this.modules.add(new BlockTweaks());
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/mcmod.info
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"modid": "nsm",
"name": "Nsm Phobos",
"description": "Phobos is nice.",
"version": "2.0.2",
"version": "2.0.3",
"mcversion": "1.12.2",
"logoFile": "phobos.png",
"url": "",
Expand Down

0 comments on commit 9963d12

Please sign in to comment.