Skip to content

Commit a2be4a5

Browse files
committed
holy i forgot what i did
1 parent e199518 commit a2be4a5

14 files changed

Lines changed: 2336 additions & 5 deletions

build.gradle.kts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,14 @@ sourceSets {
6161

6262
repositories {
6363
maven("https://repo.polyfrost.cc/releases")
64+
maven ("https://jitpack.io")
6465
}
6566

6667
dependencies {
6768
modCompileOnly("cc.polyfrost:oneconfig-$platform:0.1.0-alpha+")
6869
shade("cc.polyfrost:oneconfig-wrapper-launchwrapper:1.0.0-alpha+")
6970
compileOnly("org.spongepowered:mixin:0.7.11-SNAPSHOT")
70-
71+
implementation("com.github.Wolfsurge:AnimationSystem:1.1")
7172
//add kotlin dependencies here
7273

7374
}

src/main/java/me/anemoi/rendertools/RenderTools.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
package me.anemoi.rendertools;
22

3+
import cc.polyfrost.oneconfig.events.EventManager;
34
import cc.polyfrost.oneconfig.utils.commands.CommandManager;
45
import me.anemoi.rendertools.command.ExampleCommand;
56
import me.anemoi.rendertools.config.MainConfig;
6-
import me.anemoi.rendertools.modules.BreadCrumbsNew;
7-
import me.anemoi.rendertools.modules.ChinaHat;
8-
import me.anemoi.rendertools.modules.GhostBlocker;
7+
import me.anemoi.rendertools.modules.*;
98
import net.minecraft.client.Minecraft;
109
import net.minecraftforge.common.MinecraftForge;
1110

@@ -28,5 +27,8 @@ public void onFMLInitialization(net.minecraftforge.fml.common.event.FMLInitializ
2827
MinecraftForge.EVENT_BUS.register(new GhostBlocker());
2928
//EventManager.INSTANCE.register(new Bre());
3029
MinecraftForge.EVENT_BUS.register(new BreadCrumbsNew());
30+
MinecraftForge.EVENT_BUS.register(new TestModule());
31+
EventManager.INSTANCE.register(new TestModule());
32+
MinecraftForge.EVENT_BUS.register(new Trajectories());
3133
}
3234
}

src/main/java/me/anemoi/rendertools/config/MainConfig.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,18 +35,27 @@ public class MainConfig extends Config {
3535
@Page(name = "Nick Hider", location = PageLocation.TOP)
3636
public static NickHiderConfig nickHider = new NickHiderConfig();
3737

38-
@Page(name = "Bread Crumbs", location = PageLocation.BOTTOM)
38+
@Page(name = "Bread Crumbs", location = PageLocation.TOP)
3939
public static BreadCrumbsConfig breadCrumbs = new BreadCrumbsConfig();
4040

4141
@Page(name = "Giants", location = PageLocation.TOP)
4242
public static GiantsConfig giants = new GiantsConfig();
4343

44+
@Page(name = "Test", location = PageLocation.TOP)
45+
public static TestConfig test = new TestConfig();
46+
47+
@Page(name = "Trajectories",category = "Hidden", location = PageLocation.TOP)
48+
public static TrajectoriesConfig trajectoriesConfig = new TrajectoriesConfig();
49+
4450
@KeyBind(name = "Create Ghost Block's", category = "Other")
4551
public static OneKeyBind createGhostBlocks = new OneKeyBind(UKeyboard.KEY_NONE);
4652

4753
@Switch(name = "Push Out Of Blocks", category = "Other")
4854
public static boolean pushOutOfBlocks = false;
4955

56+
@Switch(name = "???????", description = "Go dm Anemoi#7990", category = "Hidden")
57+
public static boolean anemoi = false;
58+
5059
public MainConfig() {
5160
super(new Mod(RenderTools.NAME, ModType.UTIL_QOL), RenderTools.MODID + ".json");
5261
initialize();
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
package me.anemoi.rendertools.config.modules;
2+
3+
import cc.polyfrost.oneconfig.config.annotations.Color;
4+
import cc.polyfrost.oneconfig.config.annotations.Page;
5+
import cc.polyfrost.oneconfig.config.annotations.Switch;
6+
import cc.polyfrost.oneconfig.config.core.OneColor;
7+
8+
public class TestConfig {
9+
@Switch(name = "Toggled", description = "Toggles the module on or off")
10+
public static boolean toggled = false;
11+
12+
@Color(name = "Color", description = "The color of the module")
13+
public static OneColor color = new OneColor(new java.awt.Color(255, 0, 0, 255));
14+
15+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
package me.anemoi.rendertools.config.modules;
2+
3+
import cc.polyfrost.oneconfig.config.annotations.Color;
4+
import cc.polyfrost.oneconfig.config.annotations.Slider;
5+
import cc.polyfrost.oneconfig.config.annotations.Switch;
6+
import cc.polyfrost.oneconfig.config.core.OneColor;
7+
8+
public class TrajectoriesConfig {
9+
@Switch(name = "Toggled", description = "Toggles the Trajectories module")
10+
public static boolean toggled = false;
11+
12+
13+
@Color(
14+
name = "Color"
15+
)
16+
public static OneColor color = new OneColor(new java.awt.Color(255, 0, 0, 255));
17+
18+
19+
@Switch(name = "Render Others")
20+
public static boolean renderOther = false;
21+
22+
@Slider(name = "Width",min = 1,max = 20)
23+
public static float width = 1;
24+
/*
25+
@Slider(name = "Inner Size",min = -5,max = 5)
26+
public static float innerSize = 1;
27+
*/
28+
@Slider(name = "Slices",min = 2,max = 50)
29+
public static float slices = 3;
30+
31+
}

src/main/java/me/anemoi/rendertools/mixin/MinecraftMixin.java

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package me.anemoi.rendertools.mixin;
22

33
import net.minecraft.client.Minecraft;
4+
import org.lwjgl.Sys;
45
import org.spongepowered.asm.mixin.Mixin;
56
import org.spongepowered.asm.mixin.injection.At;
67
import org.spongepowered.asm.mixin.injection.Inject;
@@ -15,4 +16,24 @@ private void onStartGame(CallbackInfo ci) {
1516
System.out.println("Hello, world!");
1617
}
1718
}
19+
20+
long lastFrame = getTime();
21+
22+
long getTime() {
23+
return (Sys.getTime() * 1000) / Sys.getTimerResolution();
24+
}
25+
26+
@Inject(method = "runGameLoop", at = @At(value = "HEAD"))
27+
private void onRunGameLoop(CallbackInfo ci) {
28+
//--Delta--//
29+
/*
30+
long currentTime = getTime();
31+
int deltaTime = (int) (currentTime - lastFrame);
32+
lastFrame = currentTime;
33+
Delta.DELTATIME = deltaTime;
34+
System.out.println(Delta.DELTATIME);
35+
*/
36+
//--Delta--//
37+
}
38+
1839
}
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
package me.anemoi.rendertools.modules;
2+
3+
import cc.polyfrost.oneconfig.events.event.HudRenderEvent;
4+
import cc.polyfrost.oneconfig.libs.eventbus.Subscribe;
5+
import cc.polyfrost.oneconfig.renderer.RenderManager;
6+
import me.anemoi.rendertools.config.modules.TestConfig;
7+
import me.surge.animation.BoundedAnimation;
8+
import me.surge.animation.Easing;
9+
import net.minecraftforge.client.event.RenderWorldLastEvent;
10+
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
11+
import org.lwjgl.input.Mouse;
12+
13+
import java.awt.*;
14+
15+
import static me.anemoi.rendertools.RenderTools.mc;
16+
17+
public class TestModule {
18+
private BoundedAnimation anim = new BoundedAnimation(1, 500, 2000, false, Easing.CUBIC_IN_OUT);
19+
20+
@SubscribeEvent
21+
public void onRenderWordl(RenderWorldLastEvent event) {
22+
if (mc.thePlayer == null || mc.theWorld == null || !TestConfig.toggled) return;
23+
anim.setState(true);
24+
25+
//RenderUtilsNew.renderCircle(new Point3dD(mc.thePlayer.getPositionVector()), (float) anim.getAnimationFactor(), new Color(255, 0, 0, 255), event.partialTicks);
26+
27+
}
28+
29+
@Subscribe
30+
public void onRenderScreen(HudRenderEvent event) {
31+
if (mc.thePlayer == null || mc.theWorld == null || !TestConfig.toggled) return;
32+
RenderManager.setupAndDraw(l -> {
33+
anim.setState(true);
34+
RenderManager.drawRect(l, (float) anim.getAnimationFactor(), 10, 20, 20, new Color(255, 0, 0, 255).getRGB());
35+
if (Mouse.isButtonDown(0)) {
36+
anim.resetToDefault();
37+
}
38+
});
39+
}
40+
}

0 commit comments

Comments
 (0)