Skip to content
This repository was archived by the owner on Oct 22, 2022. It is now read-only.

Commit 028d593

Browse files
authored
Merge pull request #293 from WurstPlus/0.7.0
0.7.0 Merge
2 parents 7602651 + 3910b5a commit 028d593

File tree

192 files changed

+6851
-2275
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

192 files changed

+6851
-2275
lines changed

.github/workflows/gradle.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ jobs:
3131
# Artifact name
3232
name: WurstPlus3
3333
# A file, directory or wildcard pattern that describes what to upload
34-
path: ./build/libs/*-release.jar
34+
path: ./build/libs/*-release.jar
3535
- name: Prepare Artifact for Discord upload
3636
env:
3737
RUN_ID: ${{ github.run_number }}
38-
run: cp ./build/libs/*-release.jar ./build/libs/wurst-plus-three-Beta-${RUN_ID}.jar
38+
run: cp ./build/libs/*-release.jar ./build/libs/wurst-plus-three-Beta-${GITHUB_SHA::6}.jar
3939
- name: Upload Artifact to Discord
4040
uses: sinshutu/upload-to-discord@master
4141
env:

build.gradle

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,37 @@ buildscript {
1414
classpath 'org.spongepowered:mixingradle:0.6-SNAPSHOT'
1515
classpath 'com.github.jengelman.gradle.plugins:shadow:2.0.4'
1616
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
17+
classpath("gradle.plugin.de.fuerstenau:BuildConfigPlugin:1.1.4")
1718
}
1819
}
1920

21+
22+
def getGitHash = { ->
23+
def stdout = new ByteArrayOutputStream()
24+
exec {
25+
commandLine 'git', 'rev-parse', 'HEAD'
26+
standardOutput = stdout
27+
}
28+
return stdout.toString().trim()
29+
}
30+
31+
2032
apply plugin: 'net.minecraftforge.gradle.forge'
2133
apply plugin: 'kotlin'
2234
apply plugin: 'org.spongepowered.mixin'
2335
apply plugin: 'com.github.johnrengelman.shadow'
36+
apply plugin: 'de.fuerstenau.buildconfig'
2437

25-
version "0.6.1"
38+
version "0.7.0+${getGitHash()}"
2639
group project.modGroup
2740

41+
buildConfig {
42+
buildConfigField "String", "GitHash", "${getGitHash()}"
43+
}
44+
45+
sourceSets.main.java.srcDirs += "build/gen/buildconfig/src/main"
46+
47+
2848
sourceCompatibility = targetCompatibility = '1.8'
2949
compileJava {
3050
sourceCompatibility = targetCompatibility = '1.8'
@@ -44,13 +64,23 @@ repositories {
4464
name = 'spongepowered-repo'
4565
url = 'https://repo.spongepowered.org/repository/maven-public/'
4666
}
67+
maven {
68+
name = 'impactdevelopment-repo'
69+
url = 'https://impactdevelopment.github.io/maven/'
70+
}
71+
maven {
72+
name = "jitpack.io"
73+
url = "https://jitpack.io"
74+
}
4775
jcenter()
4876
maven { url 'https://dl.bintray.com/kotlin/kotlin-eap' }
4977
}
5078

5179
dependencies {
5280
compile group: "com.googlecode.json-simple", name: "json-simple", version: "1.1.1"
5381
compile group: 'club.minnced', name: 'java-discord-rpc', version: '2.0.1'
82+
compile 'com.github.cabaletta:baritone:1.2.14'
83+
compile 'cabaletta:baritone-api:1.2'
5484
compile('org.spongepowered:mixin:0.7.11-SNAPSHOT') {
5585

5686
exclude module: 'launchwrapper'
@@ -114,7 +144,8 @@ jar {
114144
'FMLCorePluginContainsFMLMod': 'true',
115145
'FMLCorePlugin': 'me.travis.wurstplusthree.mixin.MixinLoader',
116146
'ForceLoadAsMod': 'true',
117-
'FMLAT': 'wurstplusthree_at.cfg'
147+
'FMLAT': 'wurstplusthree_at.cfg',
148+
'Githash': getGitHash()
118149
)
119150
}
120151
}
@@ -130,3 +161,4 @@ compileTestKotlin {
130161
jvmTarget = "1.8"
131162
}
132163
}
164+

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
org.gradle.jvmargs=-Xmx3G
22
modGroup=me.travis
3-
modVersion=0.6.1
3+
modVersion=0.7.0
44
modBaseName=wurstplusthree
55
forgeVersion=1.12.2-14.23.5.2768
66
mcpVersion=stable_39

src/main/java/me/travis/wurstplusthree/RPC.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public static void startRPC() {
1818
discordRPC.Discord_Initialize(discordID, eventHandlers, true, null);
1919

2020
discordRichPresence.startTimestamp = System.currentTimeMillis() / 1000L;
21-
discordRichPresence.details = WurstplusThree.MODVER;
21+
discordRichPresence.details = WurstplusThree.INSTANCE.MODVER;
2222
discordRichPresence.largeImageKey = "logo";
2323
discordRichPresence.largeImageText = "with the_fellas";
2424
discordRichPresence.smallImageKey = "small";

src/main/java/me/travis/wurstplusthree/WurstplusThree.java

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,20 @@
11
package me.travis.wurstplusthree;
22

3+
import me.travis.BuildConfig;
34
import me.travis.wurstplusthree.command.Commands;
45
import me.travis.wurstplusthree.event.Events;
56
import me.travis.wurstplusthree.event.processor.EventProcessor;
67
import me.travis.wurstplusthree.gui.WurstplusGuiNew;
8+
import me.travis.wurstplusthree.gui.hud.WurstplusHudGui;
79
import me.travis.wurstplusthree.gui.hud.element.HudManager;
810
import me.travis.wurstplusthree.hack.Hacks;
911
import me.travis.wurstplusthree.manager.*;
1012
import me.travis.wurstplusthree.manager.fonts.DonatorFont;
1113
import me.travis.wurstplusthree.manager.fonts.GuiFont;
1214
import me.travis.wurstplusthree.manager.fonts.MenuFont;
13-
import me.travis.wurstplusthree.networking.handler.ChatHandling;
14-
import me.travis.wurstplusthree.networking.handler.ClientHandling;
15+
import me.travis.wurstplusthree.networking.chat.handler.ChatHandling;
16+
import me.travis.wurstplusthree.networking.chat.handler.ClientHandling;
17+
import me.travis.wurstplusthree.networking.proxy.WurstPlusProxy;
1518
import me.travis.wurstplusthree.setting.Settings;
1619
import me.travis.wurstplusthree.util.RenderUtil2D;
1720
import net.minecraftforge.fml.common.Mod;
@@ -21,6 +24,12 @@
2124
import org.apache.logging.log4j.Logger;
2225
import org.lwjgl.opengl.Display;
2326

27+
import java.io.IOException;
28+
import java.net.URL;
29+
import java.net.URLClassLoader;
30+
import java.util.jar.Attributes;
31+
import java.util.jar.Manifest;
32+
2433
/**
2534
* @author travis - began work on 8th april 2021
2635
*/
@@ -29,7 +38,7 @@ public class WurstplusThree {
2938

3039
public static final String MODID = "wurstplusthree";
3140
public static final String MODNAME = "Wurst+3";
32-
public static final String MODVER = "0.6.1";
41+
public static final String MODVER = "0.7.0+" + BuildConfig.GitHash;
3342

3443
public static final Logger LOGGER = LogManager.getLogger(MODID);
3544

@@ -48,9 +57,11 @@ public class WurstplusThree {
4857

4958
// gui
5059
public static WurstplusGuiNew GUI2;
60+
public static WurstplusHudGui HUDGUI;
5161

5262
// managers
5363
public static MenuFont MENU_FONT_MANAGER;
64+
public static HelpManager HELP_MANAGER;
5465
public static GuiFont GUI_FONT_MANAGER;
5566
public static DonatorFont DONATOR_FONT_MANAGER;
5667
public static FriendManager FRIEND_MANAGER;
@@ -67,6 +78,8 @@ public class WurstplusThree {
6778
public static ClientHandling CLIENT_HANDLING;
6879
public static ChatHandling CHAT_HANDLING;
6980
public static HudManager HUD_MANAGER;
81+
public static KDManager KD_MANAGER;
82+
public static WurstPlusProxy PROXY;
7083

7184
// megs weird thingy
7285
public static RenderUtil2D RENDER_UTIL_2D;
@@ -99,6 +112,9 @@ public void load() {
99112
CHAT_HANDLING = new ChatHandling();
100113
CONFIG_MANAGER.loadConfig();
101114
GUI2 = new WurstplusGuiNew();
115+
HUDGUI = new WurstplusHudGui();
116+
//PROXY = new WurstPlusProxy(420, "0.0.0.0", WurstPlusProxy.Mode.CLIENT);
117+
//PLUGIN_LOADER = new Loader();
102118
}
103119

104120
public static void unLoad() {
@@ -113,13 +129,15 @@ public void loadManagers() {
113129
POP_MANAGER = new PopManager();
114130
SERVER_MANAGER = new ServerManager();
115131
POS_MANAGER = new PositionManager();
132+
HELP_MANAGER = new HelpManager();
116133
ROTATION_MANAGER = new RotationManager();
117134
CONFIG_MANAGER = new ConfigManager();
118135
SONG_MANAGER = new SongManager();
119136
CAPE_MANAGER = new CapeManager();
120137
DONATOR_FONT_MANAGER = new DonatorFont();
121138
COSMETIC_MANAGER = new CosmeticManager();
122139
ALT_MANAGER = new AltManager();
140+
KD_MANAGER = new KDManager();
123141
}
124142

125143
}

src/main/java/me/travis/wurstplusthree/command/Command.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ public abstract class Command implements Globals {
1010

1111
protected List<String> names;
1212

13+
protected List<List<String>> arguments;
14+
1315
public Command(String name) {
1416
this.names = Collections.singletonList(name);
1517
}
@@ -18,12 +20,20 @@ public Command(String... names) {
1820
this.names = Arrays.asList(names.clone());
1921
}
2022

23+
public Command(List<List<String>> arguments){
24+
this.arguments = arguments;
25+
}
26+
2127
public abstract void execute(String[] message);
2228

2329
public List<String> getNames() {
2430
return this.names;
2531
}
2632

33+
public List<List<String>> getArguments(){
34+
return this.arguments;
35+
}
36+
2737
public boolean isName(String name) {
2838
for (String name_ : this.names) {
2939
if (name_.equalsIgnoreCase(name)) {

src/main/java/me/travis/wurstplusthree/command/Commands.java

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package me.travis.wurstplusthree.command;
22

3-
import me.travis.wurstplusthree.command.commands.*;
3+
import me.travis.wurstplusthree.command.commands.BurrowBlockCommand;
44
import me.travis.wurstplusthree.util.ClientMessage;
55
import me.travis.wurstplusthree.util.Globals;
66
import me.travis.wurstplusthree.util.ReflectionUtil;
@@ -13,6 +13,7 @@ public class Commands implements Globals {
1313

1414
public static String prefix = ".";
1515
private final List<Command> commands = new ArrayList<>();
16+
private String nextArgument = "";
1617

1718
// TODO : SETTINGS COMMAND
1819
// TODO : CLEAR CHAT COMMAND
@@ -85,4 +86,29 @@ public BurrowBlockCommand getBurrowCommand(){
8586
return null;
8687
}
8788

89+
public String getNextArgument() {
90+
return nextArgument;
91+
}
92+
/*
93+
public void getNextArgument(String... text){
94+
int size = text.length;
95+
for(Command command : commands){
96+
List<List<String>> args = command.getArguments();
97+
for(int i=0; i<size; i++){
98+
List<String> path = args.get(i);
99+
for(Strin g possible : path){
100+
if(possible.equals(text[i])){
101+
break;
102+
}
103+
if(possible.contains(text[i])){
104+
nextArgument = possible;
105+
}
106+
}
107+
}
108+
}
109+
110+
nextArgument = "";
111+
}
112+
*/
113+
88114
}

src/main/java/me/travis/wurstplusthree/command/commands/ConfigCommand.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public ConfigCommand() {
1515
public void execute(String[] message) {
1616
String folder = message[0].replaceAll("_", " ") + "/";
1717
if (folder.equalsIgnoreCase("/")) {
18-
ClientMessage.sendErrorMessage("Invalid Folder");
18+
ClientMessage.sendMessage("Current config is " + WurstplusThree.CONFIG_MANAGER.configName);
1919
return;
2020
}
2121
WurstplusThree.CONFIG_MANAGER.setActiveConfigFolder(folder);

src/main/java/me/travis/wurstplusthree/command/commands/DebugCommand.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
import me.travis.wurstplusthree.event.events.TestEvent;
77
import me.travis.wurstplusthree.event.processor.CommitEvent;
88
import me.travis.wurstplusthree.event.processor.EventPriority;
9-
import me.travis.wurstplusthree.hack.hacks.client.Hud;
109
import me.travis.wurstplusthree.util.ClientMessage;
1110
import me.travis.wurstplusthree.util.logview.Threads;
1211

@@ -52,7 +51,6 @@ public void execute(String[] message) {
5251
WurstplusThree.EVENT_PROCESSOR.removeEventListener(this);
5352
break;
5453
case "hud":
55-
Hud.INSTANCE.debugHud = message[1].equals("true");
5654
break;
5755
case "capes":
5856
capes = message[1].equals("true");

0 commit comments

Comments
 (0)