aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore5
-rw-r--r--ID Range.txt6
-rw-r--r--build.gradle111
-rw-r--r--build.properties5
-rw-r--r--gradlew164
-rw-r--r--gradlew.bat90
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/GuiHandler.java26
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/MainMod.java66
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/client/creativetabs/GT2Tab.java17
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/client/gui/GT_GUIContainer_Destructopack.java31
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/client/gui/GT_GUIContainer_LESU.java60
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/ConfigHandler.java31
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BW_Blocks.java63
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/items/BW_ItemBlocks.java60
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/items/GT_Destructopack_Item.java35
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/items/GT_Rockcutter_Item.java145
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/items/GT_Teslastaff_Item.java122
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/items/SimpleIconItem.java21
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/ItemRegistry.java48
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/LoaderRegistry.java14
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/RecipeLoader.java149
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/GT_MetaTileEntity_EnergyDistributor.java53
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/GT_TileEntity_LESU.java403
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/server/container/GT_Container_Item_Destructopack.java58
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/server/container/GT_Container_LESU.java37
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/util/ChatColorHelper.java27
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/util/ConnectedBlocksChecker.java171
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/util/NEIbartworksConfig.java30
-rw-r--r--src/main/resources/assets/bartworks/lang/en_US.lang8
-rw-r--r--src/main/resources/assets/bartworks/textures/GT2/gui/Destructopack.pngbin0 -> 3569 bytes
-rw-r--r--src/main/resources/assets/bartworks/textures/GT2/gui/LESU.pngbin0 -> 2266 bytes
-rw-r--r--src/main/resources/assets/bartworks/textures/blocks/EtchedLapisCell.pngbin0 -> 471 bytes
-rw-r--r--src/main/resources/assets/bartworks/textures/blocks/LESU_CASING_0.pngbin0 -> 666 bytes
-rw-r--r--src/main/resources/assets/bartworks/textures/blocks/LESU_CASING_1.pngbin0 -> 680 bytes
-rw-r--r--src/main/resources/assets/bartworks/textures/blocks/LESU_CASING_2.pngbin0 -> 680 bytes
-rw-r--r--src/main/resources/assets/bartworks/textures/blocks/LESU_CASING_3.pngbin0 -> 682 bytes
-rw-r--r--src/main/resources/assets/bartworks/textures/blocks/LESU_CELL.pngbin0 -> 795 bytes
-rw-r--r--src/main/resources/assets/bartworks/textures/blocks/PlatedLapisCell.pngbin0 -> 623 bytes
-rw-r--r--src/main/resources/assets/bartworks/textures/items/GT2Coin.pngbin0 -> 259 bytes
-rw-r--r--src/main/resources/assets/bartworks/textures/items/GT_Rockcutter.pngbin0 -> 353 bytes
-rw-r--r--src/main/resources/assets/bartworks/textures/items/GT_Teslastaff.pngbin0 -> 362 bytes
-rw-r--r--src/main/resources/assets/bartworks/textures/items/gt.GT2Destructopack.pngbin0 -> 284 bytes
-rw-r--r--src/main/resources/mcmod.info16
43 files changed, 2072 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index a1c2a238a9..5f699efc89 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,6 +7,11 @@
# BlueJ files
*.ctxt
+# IDEA files
+*.iml
+*.ipr
+*.iws
+
# Mobile Tools for Java (J2ME)
.mtj.tmp/
diff --git a/ID Range.txt b/ID Range.txt
new file mode 100644
index 0000000000..07d3e9079a
--- /dev/null
+++ b/ID Range.txt
@@ -0,0 +1,6 @@
+12500-13000
+
+12500-12600 are occupied by Crops++
+12900-13000 are occupied by EMT
+
+12600-12700 are aviable for bartworks \ No newline at end of file
diff --git a/build.gradle b/build.gradle
new file mode 100644
index 0000000000..21d3faeed4
--- /dev/null
+++ b/build.gradle
@@ -0,0 +1,111 @@
+buildscript {
+ repositories {
+ mavenCentral()
+ maven {
+ name = "forge"
+ url = "http://files.minecraftforge.net/maven"
+ }
+ maven {
+ name = "sonatype"
+ url = "https://oss.sonatype.org/content/repositories/snapshots/"
+ }
+ }
+ dependencies {
+ classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT'
+ classpath "de.undercouch:gradle-download-task:3.1.2"
+ }
+}
+
+apply plugin: 'forge'
+apply plugin: 'idea'
+apply plugin: 'signing'
+import de.undercouch.gradle.tasks.download.Download
+
+sourceCompatibility = JavaVersion.VERSION_1_8
+targetCompatibility = JavaVersion.VERSION_1_8
+sourceCompatibility = 1.8
+targetCompatibility = 1.8
+
+
+ext.configFile = file "build.properties"
+configFile.withReader {
+ def prop = new Properties()
+ prop.load(it)
+ project.ext.config = new ConfigSlurper().parse prop
+}
+
+
+version = config.mod_version
+group= "com.github.bartimaeusnek.bartworks" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
+archivesBaseName = "bartworks"+ "[" + config.mc_version + "]"
+
+
+
+minecraft {
+ version = "1.7.10-10.13.4.1614-1.7.10"
+ replaceIn "MainMod.java"
+ replace "@version@", project.version
+ runDir = "run"
+}
+
+repositories {
+ mavenLocal()
+ maven {
+ name = "ic2"
+ url = "http://maven.ic2.player.to/"
+ }
+}
+
+dependencies {
+ compile "net.industrial-craft:industrialcraft-2:${config.ic2.version}:dev"
+}
+
+//task getGregTech(type: Download) {
+// onlyIf {
+// !file("libs/gregtech-${config.gregtech.version}-dev.jar").exists()
+// }
+// src "http://jenkins.usrv.eu:8080/job/Gregtech-5-Unofficial/${config.gregtech.jenkinsbuild}/artifact/build/libs/gregtech-${config.gregtech.version}-dev.jar"
+// dest file("libs/gregtech-${config.gregtech.version}-dev.jar")
+// mustRunAfter "deobfBinJar"
+// mustRunAfter "repackMinecraft"
+//}
+
+tasks.setupCIWorkspace.dependsOn getGregTech
+tasks.setupDevWorkspace.dependsOn getGregTech
+tasks.setupDecompWorkspace.dependsOn getGregTech
+tasks.compileJava.dependsOn getGregTech
+
+processResources
+{
+ // this will ensure that this task is redone when the versions change.
+ inputs.property "version", project.version
+ inputs.property "mcversion", project.minecraft.version
+
+ // replace stuff in mcmod.info, nothing else
+ from(sourceSets.main.resources.srcDirs) {
+ include 'mcmod.info'
+
+ // replace version and mcversion
+ expand 'version':project.version, 'mcversion':project.minecraft.version
+ }
+
+ // copy everything else, thats not the mcmod.info
+ from(sourceSets.main.resources.srcDirs) {
+ exclude 'mcmod.info'
+ }
+}
+
+task signJar(dependsOn: 'reobf'){
+ doLast {
+ ant.signjar(
+ destDir: jar.destinationDir,
+ jar: jar.getArchivePath(),
+ alias: findProperty('keyStoreAlias') ?: '',
+ keystore: findProperty('keyStore') ?: '',
+ storepass: findProperty('keyStorePass') ?: '',
+ digestalg: findProperty('signDigestAlg') ?: '',
+ tsaurl: findProperty('signTSAurl') ?: '',
+ verbose: true
+ )
+ }
+}
diff --git a/build.properties b/build.properties
new file mode 100644
index 0000000000..d52a4ddb8b
--- /dev/null
+++ b/build.properties
@@ -0,0 +1,5 @@
+mc_version=1.7.10
+mod_version=0.0.1
+ic2.version=2.2.828-experimental
+gregtech.version=5.09.32.36
+gregtech.jenkinsbuild=143
diff --git a/gradlew b/gradlew
new file mode 100644
index 0000000000..91a7e269e1
--- /dev/null
+++ b/gradlew
@@ -0,0 +1,164 @@
+#!/usr/bin/env bash
+
+##############################################################################
+##
+## Gradle start up script for UN*X
+##
+##############################################################################
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS=""
+
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD="maximum"
+
+warn ( ) {
+ echo "$*"
+}
+
+die ( ) {
+ echo
+ echo "$*"
+ echo
+ exit 1
+}
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+case "`uname`" in
+ CYGWIN* )
+ cygwin=true
+ ;;
+ Darwin* )
+ darwin=true
+ ;;
+ MINGW* )
+ msys=true
+ ;;
+esac
+
+# For Cygwin, ensure paths are in UNIX format before anything is touched.
+if $cygwin ; then
+ [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
+fi
+
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG=`dirname "$PRG"`"/$link"
+ fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >&-
+APP_HOME="`pwd -P`"
+cd "$SAVED" >&-
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+ # IBM's JDK on AIX uses strange locations for the executables
+ JAVACMD="$JAVA_HOME/jre/sh/java"
+ else
+ JAVACMD="$JAVA_HOME/bin/java"
+ fi
+ if [ ! -x "$JAVACMD" ] ; then
+ die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+ fi
+else
+ JAVACMD="java"
+ which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+
+# Increase the maximum file descriptors if we can.
+if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
+ MAX_FD_LIMIT=`ulimit -H -n`
+ if [ $? -eq 0 ] ; then
+ if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
+ MAX_FD="$MAX_FD_LIMIT"
+ fi
+ ulimit -n $MAX_FD
+ if [ $? -ne 0 ] ; then
+ warn "Could not set maximum file descriptor limit: $MAX_FD"
+ fi
+ else
+ warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
+ fi
+fi
+
+# For Darwin, add options to specify how the application appears in the dock
+if $darwin; then
+ GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
+fi
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin ; then
+ APP_HOME=`cygpath --path --mixed "$APP_HOME"`
+ CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+
+ # We build the pattern for arguments to be converted via cygpath
+ ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+ SEP=""
+ for dir in $ROOTDIRSRAW ; do
+ ROOTDIRS="$ROOTDIRS$SEP$dir"
+ SEP="|"
+ done
+ OURCYGPATTERN="(^($ROOTDIRS))"
+ # Add a user-defined pattern to the cygpath arguments
+ if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+ OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
+ fi
+ # Now convert the arguments - kludge to limit ourselves to /bin/sh
+ i=0
+ for arg in "$@" ; do
+ CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
+ CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
+
+ if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
+ eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
+ else
+ eval `echo args$i`="\"$arg\""
+ fi
+ i=$((i+1))
+ done
+ case $i in
+ (0) set -- ;;
+ (1) set -- "$args0" ;;
+ (2) set -- "$args0" "$args1" ;;
+ (3) set -- "$args0" "$args1" "$args2" ;;
+ (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+ (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+ (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+ (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+ (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+ (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+ esac
+fi
+
+# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
+function splitJvmOpts() {
+ JVM_OPTS=("$@")
+}
+eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
+JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
+
+exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
diff --git a/gradlew.bat b/gradlew.bat
new file mode 100644
index 0000000000..8a0b282aa6
--- /dev/null
+++ b/gradlew.bat
@@ -0,0 +1,90 @@
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS=
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto init
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto init
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:init
+@rem Get command-line arguments, handling Windowz variants
+
+if not "%OS%" == "Windows_NT" goto win9xME_args
+if "%@eval[2+2]" == "4" goto 4NT_args
+
+:win9xME_args
+@rem Slurp the command line arguments.
+set CMD_LINE_ARGS=
+set _SKIP=2
+
+:win9xME_args_slurp
+if "x%~1" == "x" goto execute
+
+set CMD_LINE_ARGS=%*
+goto execute
+
+:4NT_args
+@rem Get arguments from the 4NT Shell from JP Software
+set CMD_LINE_ARGS=%$
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/GuiHandler.java b/src/main/java/com/github/bartimaeusnek/bartworks/GuiHandler.java
new file mode 100644
index 0000000000..1a19fa32d6
--- /dev/null
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/GuiHandler.java
@@ -0,0 +1,26 @@
+package com.github.bartimaeusnek.bartworks;
+
+import com.github.bartimaeusnek.bartworks.client.gui.GT_GUIContainer_Destructopack;
+import com.github.bartimaeusnek.bartworks.server.container.GT_Container_Item_Destructopack;
+import cpw.mods.fml.common.network.IGuiHandler;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.world.World;
+
+public class GuiHandler implements IGuiHandler {
+
+ @Override
+ public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
+ switch (ID){
+ case 0: return new GT_Container_Item_Destructopack(player.inventory);
+ }
+ return null;
+ }
+
+ @Override
+ public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
+ switch (ID){
+ case 0: return new GT_GUIContainer_Destructopack(player.inventory);
+ }
+ return null;
+ }
+}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/MainMod.java b/src/main/java/com/github/bartimaeusnek/bartworks/MainMod.java
new file mode 100644
index 0000000000..8e7bb21122
--- /dev/null
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/MainMod.java
@@ -0,0 +1,66 @@
+package com.github.bartimaeusnek.bartworks;
+
+
+import codechicken.nei.NEIActions;
+import codechicken.nei.NEIClientUtils;
+import codechicken.nei.NEIServerUtils;
+import codechicken.nei.asm.NEICorePlugin;
+import com.github.bartimaeusnek.bartworks.client.creativetabs.GT2Tab;
+import com.github.bartimaeusnek.bartworks.common.ConfigHandler;
+import com.github.bartimaeusnek.bartworks.common.loaders.ItemRegistry;
+import com.github.bartimaeusnek.bartworks.common.loaders.LoaderRegistry;
+import com.github.bartimaeusnek.bartworks.common.tileentities.GT_MetaTileEntity_EnergyDistributor;
+import com.github.bartimaeusnek.bartworks.common.tileentities.GT_TileEntity_LESU;
+import cpw.mods.fml.common.Loader;
+import cpw.mods.fml.common.Mod;
+import cpw.mods.fml.common.event.FMLInitializationEvent;
+import cpw.mods.fml.common.event.FMLPostInitializationEvent;
+import cpw.mods.fml.common.event.FMLPreInitializationEvent;
+import cpw.mods.fml.common.network.IGuiHandler;
+import cpw.mods.fml.common.network.NetworkRegistry;
+import gregtech.api.enums.GT_Values;
+import gregtech.nei.NEI_GT_Config;
+import net.minecraft.creativetab.CreativeTabs;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+
+@Mod(
+ modid = MainMod.modID, name = MainMod.name, version = MainMod.version,
+ dependencies = "required-after:IC2; "
+ + "required-after:gregtech; "
+ )
+public final class MainMod {
+ public static final String name = "BartWorks";
+ public static final String version = "@version@";
+ public static final String modID = "bartworks";
+ public static final Logger logger = LogManager.getLogger(name);
+ public static boolean GTNH = false;
+ public static final CreativeTabs GT2 = new GT2Tab("GT2C");
+ public static final IGuiHandler GH = new GuiHandler();
+ @Mod.Instance(modID)
+ public static MainMod instance;
+ public static ConfigHandler CHandler;
+
+
+ @Mod.EventHandler
+ public void preInit(FMLPreInitializationEvent preinit) {
+ if(Loader.isModLoaded("dreamcraft")) {
+ GTNH = true;
+ }
+ CHandler= new ConfigHandler(preinit);
+ if (GTNH)
+ logger.info("GTNH-Detected . . . ACTIVATE HARDMODE.");
+ }
+ @Mod.EventHandler
+ public void init(FMLInitializationEvent init) {
+ new LoaderRegistry().run();
+ }
+
+ @Mod.EventHandler
+ public void postInit(FMLPostInitializationEvent postinit) {
+ NetworkRegistry.INSTANCE.registerGuiHandler(instance,GH);
+ }
+
+
+
+}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/client/creativetabs/GT2Tab.java b/src/main/java/com/github/bartimaeusnek/bartworks/client/creativetabs/GT2Tab.java
new file mode 100644
index 0000000000..82188db9c5
--- /dev/null
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/client/creativetabs/GT2Tab.java
@@ -0,0 +1,17 @@
+package com.github.bartimaeusnek.bartworks.client.creativetabs;
+
+import com.github.bartimaeusnek.bartworks.common.loaders.ItemRegistry;
+import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.item.Item;
+
+public class GT2Tab extends CreativeTabs {
+
+ public GT2Tab (String lable) {
+ super(lable);
+ }
+
+ @Override
+ public Item getTabIconItem() {
+ return ItemRegistry.tab;
+ }
+}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/GT_GUIContainer_Destructopack.java b/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/GT_GUIContainer_Destructopack.java
new file mode 100644
index 0000000000..4946bdb328
--- /dev/null
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/GT_GUIContainer_Destructopack.java
@@ -0,0 +1,31 @@
+package com.github.bartimaeusnek.bartworks.client.gui;
+
+import com.github.bartimaeusnek.bartworks.MainMod;
+import com.github.bartimaeusnek.bartworks.server.container.GT_Container_Item_Destructopack;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.gui.inventory.GuiContainer;
+import net.minecraft.entity.player.InventoryPlayer;
+import net.minecraft.inventory.Container;
+import net.minecraft.util.ResourceLocation;
+import org.lwjgl.opengl.GL11;
+
+public class GT_GUIContainer_Destructopack extends GuiContainer
+{
+ public GT_GUIContainer_Destructopack(InventoryPlayer inventory) {
+ super(new GT_Container_Item_Destructopack(inventory));
+ }
+ public static final ResourceLocation texture = new ResourceLocation(MainMod.modID, "textures/GT2/gui/Destructopack.png");
+
+ @Override
+ public void drawGuiContainerBackgroundLayer(float f, int j, int i) {
+ GL11.glColor4f(1F, 1F, 1F, 1F);
+ Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
+ drawTexturedModalRect(guiLeft, guiTop, 0, 0, 175, 165);
+ }
+
+ @Override
+ protected void drawGuiContainerForegroundLayer(int par1, int par2) {
+ }
+
+
+}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/GT_GUIContainer_LESU.java b/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/GT_GUIContainer_LESU.java
new file mode 100644
index 0000000000..574bc89536
--- /dev/null
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/GT_GUIContainer_LESU.java
@@ -0,0 +1,60 @@
+package com.github.bartimaeusnek.bartworks.client.gui;
+
+import com.github.bartimaeusnek.bartworks.MainMod;
+import com.github.bartimaeusnek.bartworks.common.tileentities.GT_TileEntity_LESU;
+import com.github.bartimaeusnek.bartworks.server.container.GT_Container_LESU;
+import com.github.bartimaeusnek.bartworks.util.ChatColorHelper;
+import gregtech.api.gui.GT_GUIContainer;
+import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import net.minecraft.client.Minecraft;
+import net.minecraft.entity.player.InventoryPlayer;
+import net.minecraft.util.ResourceLocation;
+import org.lwjgl.opengl.GL11;
+
+import java.awt.*;
+
+public class GT_GUIContainer_LESU extends GT_GUIContainer {
+
+ protected GT_Container_LESU mContainer;
+
+ public static final ResourceLocation texture = new ResourceLocation(MainMod.modID, "textures/GT2/gui/LESU.png");
+ private GT_TileEntity_LESU c;
+
+ public GT_GUIContainer_LESU(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) {
+ super(new GT_Container_LESU(aInventoryPlayer, aTileEntity), texture.getResourceDomain());
+ mContainer = ((GT_Container_LESU)this.inventorySlots);
+ c = ((GT_TileEntity_LESU)(this.mContainer.mTileEntity.getMetaTileEntity()));
+ }
+
+ @Override
+ protected void drawGuiContainerForegroundLayer(final int par1, final int par2) {
+ this.drawString(this.fontRendererObj,"L.E.S.U.", 11, 8, 16448255);
+ if (this.mContainer != null) {
+ String percell = String.valueOf(c.energyPerCell).substring(1);
+ this.drawString(this.fontRendererObj,"EU: " + String.valueOf(this.mContainer.mEnergy), 11, 16, 16448255);
+ this.drawString(this.fontRendererObj,"MAX: " + (this.c.getBaseMetaTileEntity().isActive() ? String.valueOf(this.mContainer.mOutput)+ percell : Integer.toString(0)), 11, 24, 16448255);
+ this.drawString(this.fontRendererObj,"MAX EU/t IN: " + String.valueOf(this.mContainer.mInput), 11, 32, 16448255);
+ this.drawString(this.fontRendererObj,"EU/t OUT: " + String.valueOf(this.mContainer.mOutput), 11, 40, 16448255);
+ this.drawString(this.fontRendererObj,"AMP/t IN/OUT: " + String.valueOf(c.getBaseMetaTileEntity().getInputAmperage()), 11, 48, 16448255);
+ if (c.maxEUStore() >= Long.MAX_VALUE-1) {
+ this.drawString(this.fontRendererObj, "Maximum Capacity!", 11, 56, Color.YELLOW.getRGB());
+ }
+ if (!this.c.getBaseMetaTileEntity().isActive()) {
+ this.drawString(this.fontRendererObj,"Multiple Controllers!", 11, 56, Color.RED.getRGB());
+ }
+ }
+ }
+
+ @Override
+ protected void drawGuiContainerBackgroundLayer(final float par1, final int par2, final int par3) {
+ GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
+ Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
+ final int x = (this.width - this.xSize) / 2;
+ final int y = (this.height - this.ySize) / 2;
+ this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize);
+ if (this.mContainer != null) {
+ final long tScale = this.mContainer.mEnergy / Math.max(1, c.maxEUStore() / 116);
+ this.drawTexturedModalRect(x + 8, y + 73, 0, 251, (int) tScale, 5);
+ }
+ }
+}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/ConfigHandler.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/ConfigHandler.java
new file mode 100644
index 0000000000..e1dbebf049
--- /dev/null
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/ConfigHandler.java
@@ -0,0 +1,31 @@
+package com.github.bartimaeusnek.bartworks.common;
+
+
+import com.github.bartimaeusnek.bartworks.MainMod;
+import com.github.bartimaeusnek.bartworks.common.tileentities.GT_TileEntity_LESU;
+import cpw.mods.fml.common.event.FMLPreInitializationEvent;
+import gregtech.api.enums.GT_Values;
+import net.minecraftforge.common.config.Configuration;
+
+import java.io.File;
+
+public class ConfigHandler {
+ public static int IDOffset = 12500;
+ public static final int IDU=1+ GT_Values.VN.length;
+ public static boolean ezmode = false;
+ public static boolean teslastaff = false;
+ public final Configuration c;
+ public ConfigHandler(FMLPreInitializationEvent e){
+ c = new Configuration(new File(e.getModConfigurationDirectory().toString()+"/"+MainMod.modID+".cfg"));
+
+ IDOffset=c.get("System","ID Offset",12500,"ID Offset for this mod. This Mod uses "+IDU+" IDs. DO NOT CHANGE IF YOU DONT KNOW WHAT THIS IS").getInt(12500);
+ GT_TileEntity_LESU.energyPerCell=c.get("Multiblocks","energyPerLESUCell",1000000,"This will set Up the Energy per LESU Cell",1000000,Integer.MAX_VALUE).getInt(1000000);
+ ezmode=c.get("System","Mode switch",false,"If GTNH is Loaded, this will enable easy recipes, if not, it will enable harder recipes.").getBoolean(false);
+ MainMod.GTNH = ezmode ? !MainMod.GTNH : MainMod.GTNH;
+ teslastaff=c.get("System","Enable Teslastaff",false,"Enables the Teslastaff, an Item used to destroy Electric Armors").getBoolean(false);
+
+ if (c.hasChanged())
+ c.save();
+ }
+
+}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BW_Blocks.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BW_Blocks.java
new file mode 100644
index 0000000000..983ec42653
--- /dev/null
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BW_Blocks.java
@@ -0,0 +1,63 @@
+package com.github.bartimaeusnek.bartworks.common.blocks;
+
+import com.github.bartimaeusnek.bartworks.MainMod;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import net.minecraft.block.Block;
+import net.minecraft.block.material.Material;
+import net.minecraft.client.renderer.texture.IIconRegister;
+import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.item.Item;