Skip to content

Commit

Permalink
update mod name, added raw input, fixed key bindings
Browse files Browse the repository at this point in the history
  • Loading branch information
storycraft committed Sep 13, 2018
1 parent f533f34 commit 92e7b20
Show file tree
Hide file tree
Showing 138 changed files with 340 additions and 239 deletions.
Empty file added README.md
Empty file.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
6 changes: 3 additions & 3 deletions out/production/story-dev-tools/mcmod.info
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[
{
"modid": "story-dev-tools",
"name": "storycraft DevTools",
"description": "storycraft's DevTools",
"modid": "story-pvp-util",
"name": "storycraft's pvp util",
"description": "A simple minecraft mod that can help pvp",
"version": "0.1",
"mcversion": "${mcversion}",
"url": "",
Expand Down
6 changes: 3 additions & 3 deletions resources/mcmod.info
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[
{
"modid": "story-dev-tools",
"name": "storycraft DevTools",
"description": "storycraft's DevTools",
"modid": "story-pvp-util",
"name": "storycraft's pvp util",
"description": "A simple minecraft mod that can help pvp",
"version": "0.1",
"mcversion": "${mcversion}",
"url": "",
Expand Down

This file was deleted.

11 changes: 0 additions & 11 deletions src/com/storycraft/devtools/module/IModule.java

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package com.storycraft.devtools;
package com.storycraft.pvputil;

import com.storycraft.devtools.command.CommandManager;
import com.storycraft.devtools.config.ConfigManager;
import com.storycraft.devtools.config.IConfigFile;
import com.storycraft.devtools.registry.RegistryManager;
import com.storycraft.devtools.storage.Storage;
import com.storycraft.pvputil.command.CommandManager;
import com.storycraft.pvputil.config.ConfigManager;
import com.storycraft.pvputil.config.IConfigFile;
import com.storycraft.pvputil.registry.RegistryManager;
import com.storycraft.pvputil.storage.Storage;

import java.util.logging.Logger;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,24 +1,23 @@
package com.storycraft.devtools;

import com.storycraft.devtools.command.CommandManager;
import com.storycraft.devtools.config.ConfigManager;
import com.storycraft.devtools.config.json.JsonConfigFile;
import com.storycraft.devtools.module.ModuleManager;
import com.storycraft.devtools.registry.RegistryManager;
import com.storycraft.devtools.storage.ModDataStorage;
package com.storycraft.pvputil;

import com.storycraft.pvputil.command.CommandManager;
import com.storycraft.pvputil.config.ConfigManager;
import com.storycraft.pvputil.config.json.JsonConfigFile;
import com.storycraft.pvputil.module.ModuleManager;
import com.storycraft.pvputil.registry.RegistryManager;
import com.storycraft.pvputil.storage.ModDataStorage;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.ModMetadata;
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
import net.minecraftforge.fml.common.event.FMLLoadCompleteEvent;
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;

import java.util.logging.Logger;

@Mod(modid = "story-dev-tools", version = "0.1", clientSideOnly = true, guiFactory = "com.storycraft.devtools.config.ingame.InGameDefaultConfigFactory")
public class DevTools implements IStoryMod {
@Mod(modid = "story-pvp-util", version = "0.1", clientSideOnly = true, guiFactory = "com.storycraft.pvputil.config.ingame.InGameDefaultConfigFactory")
public class PvpUtil implements IStoryMod {

private static DevTools instance;
private static PvpUtil instance;

private static boolean isInited;
private static boolean isLoaded;
Expand All @@ -40,7 +39,7 @@ public static boolean isModLoaded(){
return isLoaded;
}

public static DevTools getInstance(){
public static PvpUtil getInstance(){
return instance;
}

Expand All @@ -61,7 +60,7 @@ public static ModMetadata getModMetadata() {
private Logger logger;
private ModuleManager moduleManager;

public DevTools() {
public PvpUtil() {
this.instance = this;
this.logger = Logger.getLogger("minecraft");
this.moduleManager = new ModuleManager(this);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.storycraft.devtools.command;
package com.storycraft.pvputil.command;

import net.minecraftforge.event.ServerChatEvent;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.storycraft.devtools.command;
package com.storycraft.pvputil.command;

import com.storycraft.devtools.IStoryMod;
import com.storycraft.pvputil.IStoryMod;
import net.minecraftforge.common.MinecraftForge;

import java.util.*;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.storycraft.devtools.command;
package com.storycraft.pvputil.command;

import net.minecraft.entity.player.EntityPlayer;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
package com.storycraft.devtools.config;
package com.storycraft.pvputil.config;

import com.storycraft.devtools.IStoryMod;
import com.storycraft.devtools.storage.ModDataStorage;
import com.storycraft.devtools.storage.Storage;
import com.storycraft.devtools.util.AsyncTask;
import com.storycraft.devtools.util.Parallel;
import com.storycraft.pvputil.IStoryMod;
import com.storycraft.pvputil.storage.Storage;
import com.storycraft.pvputil.util.AsyncTask;
import com.storycraft.pvputil.util.Parallel;

import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.storycraft.devtools.config;
package com.storycraft.pvputil.config;

public interface IConfigEntry<T extends IConfigEntry> {
void set(String key, T value);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.storycraft.devtools.config;
package com.storycraft.pvputil.config;

import net.minecraftforge.fml.client.config.IConfigElement;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.storycraft.devtools.config.ingame;
package com.storycraft.pvputil.config.ingame;

import com.storycraft.devtools.DevTools;
import com.storycraft.pvputil.PvpUtil;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiScreen;
import net.minecraftforge.common.MinecraftForge;
Expand Down Expand Up @@ -36,10 +36,10 @@ public RuntimeOptionGuiHandler getHandlerFor(RuntimeOptionCategoryElement elemen

@SubscribeEvent(priority = EventPriority.LOWEST)
public void onConfigChanged(ConfigChangedEvent.OnConfigChangedEvent e) {
if (!DevTools.getModMetadata().modId.equalsIgnoreCase(e.modID) || e.getResult() == Event.Result.DENY || e.isCanceled())
if (!PvpUtil.getModMetadata().modId.equalsIgnoreCase(e.modID) || e.getResult() == Event.Result.DENY || e.isCanceled())
return;

DevTools.getDefaultGlobalConfig().updateFromForgeConfig();
DevTools.getInstance().getConfigManager().saveAll();
PvpUtil.getDefaultGlobalConfig().updateFromForgeConfig();
PvpUtil.getInstance().getConfigManager().saveAll();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package com.storycraft.pvputil.config.ingame;

import com.storycraft.pvputil.PvpUtil;
import net.minecraft.client.gui.GuiScreen;
import net.minecraftforge.fml.client.config.GuiConfig;

public class InGameDefaultConfigGui extends GuiConfig {
public InGameDefaultConfigGui(GuiScreen parentScreen) {
super(parentScreen, PvpUtil.getDefaultGlobalConfig().getForgeConfigElement(), PvpUtil.getModMetadata().modId, false, false, "storycraft PvpUtil");
}
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.storycraft.devtools.config.json;
package com.storycraft.pvputil.config.json;

import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.storycraft.devtools.config.IConfigEntry;
import com.storycraft.pvputil.config.IConfigEntry;

public class JsonConfigEntry implements IConfigEntry<JsonConfigEntry> {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
package com.storycraft.devtools.config.json;
package com.storycraft.pvputil.config.json;

import com.google.gson.*;
import com.google.gson.stream.JsonWriter;
import com.storycraft.devtools.config.IConfigFile;
import com.storycraft.pvputil.config.IConfigFile;
import net.minecraftforge.common.config.ConfigCategory;
import net.minecraftforge.common.config.ConfigElement;
import net.minecraftforge.common.config.Property;
Expand Down
11 changes: 11 additions & 0 deletions src/com/storycraft/pvputil/module/IModule.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package com.storycraft.pvputil.module;

import com.storycraft.pvputil.PvpUtil;

public interface IModule {
void preInitialize();
void initialize(PvpUtil mod);
default void postInitialize() {

}
}
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
package com.storycraft.devtools.module;

import com.storycraft.devtools.DevTools;
import com.storycraft.devtools.module.chat.ChatOptimize;
import com.storycraft.devtools.module.fullscreen.FullscreenCursorConfine;
import com.storycraft.devtools.module.hitsound.PlayerHitSound;
import com.storycraft.devtools.module.render.ClientPlayerNameTag;
import com.storycraft.devtools.module.render.DynamicBoundingBox;
import com.storycraft.devtools.module.render.LabelBoxRenderToggle;
import com.storycraft.devtools.module.server.ServerResourcePackBypass;
import com.storycraft.devtools.module.screenshot.AsyncScreenshot;
import com.storycraft.devtools.module.session.SessionRefresh;
import com.storycraft.devtools.module.taboverlay.TabOptimize;
import com.storycraft.devtools.util.Parallel;
package com.storycraft.pvputil.module;

import com.storycraft.pvputil.PvpUtil;
import com.storycraft.pvputil.module.chat.ChatOptimize;
import com.storycraft.pvputil.module.fullscreen.FullscreenCursorConfine;
import com.storycraft.pvputil.module.hitsound.PlayerHitSound;
import com.storycraft.pvputil.module.input.Rawinput;
import com.storycraft.pvputil.module.render.ClientPlayerNameTag;
import com.storycraft.pvputil.module.render.DynamicBoundingBox;
import com.storycraft.pvputil.module.render.LabelBoxRenderToggle;
import com.storycraft.pvputil.module.server.ServerResourcePackBypass;
import com.storycraft.pvputil.module.screenshot.AsyncScreenshot;
import com.storycraft.pvputil.module.session.SessionRefresh;
import com.storycraft.pvputil.module.taboverlay.TabOptimize;
import com.storycraft.pvputil.util.Parallel;

import java.util.HashMap;
import java.util.Map;
Expand All @@ -20,9 +21,9 @@ public class ModuleManager {

private Map<String, IModule> moduleMap;

private DevTools mod;
private PvpUtil mod;

public ModuleManager(DevTools mod){
public ModuleManager(PvpUtil mod){
this.mod = mod;
this.moduleMap = new HashMap<>();

Expand All @@ -45,10 +46,12 @@ private void addDefaultModule() {
addModule("chat_optimize", new ChatOptimize());
addModule("tab_optimize", new TabOptimize());

addModule("rawinput", new Rawinput());

addModule("server_resourcepacks_bypass", new ServerResourcePackBypass());
}

public DevTools getMod() {
public PvpUtil getMod() {
return mod;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
package com.storycraft.devtools.module.chat;
package com.storycraft.pvputil.module.chat;

import com.storycraft.devtools.DevTools;
import com.storycraft.devtools.config.json.JsonConfigEntry;
import com.storycraft.devtools.module.IModule;
import com.storycraft.devtools.util.reflect.Reflect;
import com.storycraft.pvputil.PvpUtil;
import com.storycraft.pvputil.config.json.JsonConfigEntry;
import com.storycraft.pvputil.module.IModule;
import com.storycraft.pvputil.util.reflect.Reflect;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.*;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.IChatComponent;
import net.minecraft.util.MathHelper;
import net.minecraftforge.client.event.GuiOpenEvent;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.fml.client.event.ConfigChangedEvent;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.common.network.FMLNetworkEvent;
import org.lwjgl.input.Mouse;

import java.util.List;

Expand All @@ -40,7 +38,7 @@ public class ChatOptimize implements IModule {
defaultInputFieldText = Reflect.getField(GuiChat.class, "defaultInputFieldText", "field_146409_v");
}

private DevTools mod;
private PvpUtil mod;
private Minecraft minecraft;

private boolean isBackgroundEnabled;
Expand All @@ -53,7 +51,7 @@ public void preInitialize() {
}

@Override
public void initialize(DevTools mod) {
public void initialize(PvpUtil mod) {
this.mod = mod;

this.isBackgroundEnabled = isBackgroundEnabled();
Expand Down
Loading

0 comments on commit 92e7b20

Please sign in to comment.