Skip to content

Commit

Permalink
woo
Browse files Browse the repository at this point in the history
  • Loading branch information
quasar098 committed Oct 24, 2022
1 parent 9c01e62 commit 2daf36e
Show file tree
Hide file tree
Showing 9 changed files with 83 additions and 37 deletions.
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
# voxyl enhanced

### it does this:

- autogg
- obstacles info
### it can do this:
- auto gg
- saying the kill count after gg
- obstacles time info
- obstacles opponent win stats \(gauge opponent strength\)
- obstacles auto requeue after death in singleplayer
- obstacles keybind to enter new singleplayer
- keybind to go to /hub at any given moment

### command aliases:

Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ plugins {
id "net.minecraftforge.gradle.forge" version "2.0.2"
}
*/
version = "0.1.3"
version = "0.1.4"
group= "com.quasar.voxylenhanced" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "voxylenhanced"

Expand Down
7 changes: 3 additions & 4 deletions src/main/java/com/quasar/voxylenhanced/VoxylEnhanced.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import com.google.common.collect.Lists;
import com.quasar.voxylenhanced.autogg.VoxylAutoGG;
import com.quasar.voxylenhanced.obstacles.VoxylObstacles;
import com.quasar.voxylenhanced.obstacles.VoxylObstaclesKeybindList;
import net.minecraftforge.client.ClientCommandHandler;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.common.config.Configuration;
Expand All @@ -23,7 +22,7 @@
public class VoxylEnhanced
{
public static final String MODID = "voxylenhanced";
public static final String VERSION = "0.1.3";
public static final String VERSION = "0.1.4";

public static String apiKey = "missing";

Expand All @@ -35,14 +34,14 @@ public class VoxylEnhanced
@EventHandler
public void init(FMLInitializationEvent event)
{
VoxylObstaclesKeybindList.register();
VoxylKeybinds.register();
MinecraftForge.EVENT_BUS.register(new VoxylInputHandler());

for (VoxylFeature listener : listeners) {
MinecraftForge.EVENT_BUS.register(listener);
}

MinecraftForge.EVENT_BUS.register(new VoxylEnhancedMainListener());
MinecraftForge.EVENT_BUS.register(new VoxylInputHandler());
ClientCommandHandler.instance.registerCommand(new VoxylEnhancedCommand());
}

Expand Down
7 changes: 5 additions & 2 deletions src/main/java/com/quasar/voxylenhanced/VoxylInputHandler.java
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
package com.quasar.voxylenhanced;

import com.quasar.voxylenhanced.misc.VoxylMisc;
import com.quasar.voxylenhanced.obstacles.VoxylObstacles;
import com.quasar.voxylenhanced.obstacles.VoxylObstaclesKeybindList;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.common.gameevent.TickEvent;

public class VoxylInputHandler {

@SubscribeEvent
public void clientTick(TickEvent.ClientTickEvent event) {
if (VoxylObstaclesKeybindList.keyBindings[0].isPressed()) {
if (VoxylKeybinds.keyBindings.get(0).isPressed()) {
VoxylMisc.goToHub();
}
if (VoxylKeybinds.keyBindings.get(1).isPressed()) {
VoxylObstacles.restartPrivateGame();
}
}
Expand Down
34 changes: 34 additions & 0 deletions src/main/java/com/quasar/voxylenhanced/VoxylKeybinds.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
package com.quasar.voxylenhanced;

import net.minecraft.client.settings.KeyBinding;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.fml.client.registry.ClientRegistry;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.common.gameevent.TickEvent;
import org.lwjgl.input.Keyboard;

import java.util.ArrayList;

public class VoxylKeybinds {
public static ArrayList<KeyBinding> keyBindings;

public static void register() {
keyBindings = new ArrayList<>();

keyBindings.add(new KeyBinding(
"voxylenhanced.gotohub",
Keyboard.KEY_NONE,
"voxylenhanced.vekeybinds"
)); // 0, gotohub

keyBindings.add(new KeyBinding(
"voxylenhanced.obstaclesautorequeue",
Keyboard.KEY_NONE,
"voxylenhanced.vekeybinds"
)); // 1, obstaclesautorequeue

for (KeyBinding keyBinding : keyBindings) {
ClientRegistry.registerKeyBinding(keyBinding);
}
}
}
15 changes: 15 additions & 0 deletions src/main/java/com/quasar/voxylenhanced/misc/VoxylMisc.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package com.quasar.voxylenhanced.misc;

import net.minecraft.client.Minecraft;

public class VoxylMisc {
public static void goToHub() {
if (Minecraft.getMinecraft() == null) {
return;
}
if (Minecraft.getMinecraft().thePlayer == null) {
return;
}
Minecraft.getMinecraft().thePlayer.sendChatMessage("/hub");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ public class VoxylObstacles extends VoxylFeature {
public static int qrOpenFirst = 0;
public static boolean qrOpeningSecond = false;
public static int qrOpenSecond = 0;
public static boolean autoRQToggled = false;

// other
public static boolean isInObstacles = false;
Expand All @@ -59,20 +60,23 @@ public class VoxylObstacles extends VoxylFeature {
@Override
public void configurate(Configuration config, boolean loadFromFile) {
Property toggledProp = config.get(Configuration.CATEGORY_CLIENT, "obstacles-toggled", true, "Is obstacles UI on or not");
Property autoRQProp = config.get(Configuration.CATEGORY_CLIENT, "obstacles-autoRQ", false, "Automatically Requeue Singleplayer matches on death");
Property leftAlignedProp = config.get(Configuration.CATEGORY_CLIENT, "obstacles-leftAligned", false, "Is UI left aligned instead of right aligned");

if (loadFromFile) {
autoRQToggled = autoRQProp.getBoolean();
toggled = toggledProp.getBoolean();
leftAligned = leftAlignedProp.getBoolean();
} else {
leftAlignedProp.set(leftAligned);
autoRQProp.set(autoRQToggled);
toggledProp.set(toggled);
}
}

public static void handleCommand(String[] args) {
if (args.length == 1) {
VoxylUtils.informPlayer("/ve obstacles <toggle|alignment>");
VoxylUtils.informPlayer("/ve obstacles <toggle|alignment|autorequeue>");
return;
}
if (args[1].equals("toggle")) {
Expand All @@ -85,7 +89,13 @@ public static void handleCommand(String[] args) {
VoxylUtils.informPlayer("Set alignment to " + (leftAligned ? "left" : "right"));
return;
}
VoxylUtils.informPlayer("/ve obstacles <toggle|alignment>");
if (args[1].equals("autorequeue")) {
autoRQToggled = !autoRQToggled;
VoxylUtils.informPlayer(
"Singleplayer auto requeue functionality " + (autoRQToggled ? "on" : "off"));
return;
}
VoxylUtils.informPlayer("/ve obstacles <toggle|alignment|autorequeue>");
}

public static String getStringUsername() {
Expand All @@ -108,7 +118,9 @@ public void chatEvent(ClientChatReceivedEvent event) {
Pattern pattern = Pattern.compile("%username% fell into the void\\.$".replace("%username%", getStringUsername()));
if (pattern.matcher(event.message.getUnformattedText()).find()) {
deathCount += 1;
restartPrivateGame();
if (autoRQToggled) {
restartPrivateGame();
}
}

// check to see if player in obstacles
Expand Down

This file was deleted.

3 changes: 2 additions & 1 deletion src/main/resources/assets/voxylenhanced/lang/en_US.lang
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
KEY.voxylenhanced.obstaclesautorequeue=Obstacles Auto RQ
KEY.voxylenhanced.vekeybinds=Voxyl Enhanced
KEY.voxylenhanced.gotohub=Go to Hub
KEY.voxylenhanced.vekeybinds=Voxyl Enhanced

0 comments on commit 2daf36e

Please sign in to comment.