*glares at gradle* Look at me. I am the captain now.
This commit is contained in:
parent
5ca02711d4
commit
5edb2fd541
45 changed files with 718 additions and 472 deletions
56
build.gradle
Normal file
56
build.gradle
Normal file
|
|
@ -0,0 +1,56 @@
|
||||||
|
buildscript{
|
||||||
|
repositories{
|
||||||
|
jcenter()
|
||||||
|
maven{
|
||||||
|
name = "forge"
|
||||||
|
url = "http://files.minecraftforge.net/maven"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
dependencies{
|
||||||
|
classpath 'net.minecraftforge.gradle:ForgeGradle:2.1-SNAPSHOT'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
apply plugin: 'net.minecraftforge.gradle.forge'
|
||||||
|
|
||||||
|
version = "1.3"
|
||||||
|
group= "com.oitsjustjose.criss_cross"
|
||||||
|
archivesBaseName = "CrissCross-1.8.8"
|
||||||
|
|
||||||
|
minecraft{
|
||||||
|
version = "1.8.8-11.15.0.1609-1.8.8"
|
||||||
|
runDir = "run"
|
||||||
|
|
||||||
|
replaceIn "lib/Lib.java"
|
||||||
|
replace "@VERSION@", project.version
|
||||||
|
|
||||||
|
mappings = "snapshot_20151122"
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies{
|
||||||
|
}
|
||||||
|
|
||||||
|
task deobfJar(type: Jar) {
|
||||||
|
from sourceSets.main.output
|
||||||
|
classifier = 'DEV'
|
||||||
|
}
|
||||||
|
|
||||||
|
artifacts{
|
||||||
|
archives deobfJar
|
||||||
|
}
|
||||||
|
|
||||||
|
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'
|
||||||
|
expand 'version':project.version, 'mcversion':project.minecraft.version
|
||||||
|
}
|
||||||
|
|
||||||
|
from(sourceSets.main.resources.srcDirs) {
|
||||||
|
exclude 'mcmod.info'
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Normal file
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Normal file
Binary file not shown.
6
gradle/wrapper/gradle-wrapper.properties
vendored
Normal file
6
gradle/wrapper/gradle-wrapper.properties
vendored
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
#Mon Sep 14 12:28:28 PDT 2015
|
||||||
|
distributionBase=GRADLE_USER_HOME
|
||||||
|
distributionPath=wrapper/dists
|
||||||
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
zipStorePath=wrapper/dists
|
||||||
|
distributionUrl=https\://services.gradle.org/distributions/gradle-2.7-bin.zip
|
||||||
164
gradlew
vendored
Normal file
164
gradlew
vendored
Normal file
|
|
@ -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 "$@"
|
||||||
90
gradlew.bat
vendored
Normal file
90
gradlew.bat
vendored
Normal file
|
|
@ -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
|
||||||
|
|
@ -1,21 +1,16 @@
|
||||||
package com.oitsjustjose.criss_cross;
|
package com.oitsjustjose.criss_cross;
|
||||||
|
|
||||||
import com.oitsjustjose.criss_cross.blocks.CCBlocks;
|
import com.oitsjustjose.criss_cross.lib.ConfigHandler;
|
||||||
import com.oitsjustjose.criss_cross.items.CCItems;
|
import com.oitsjustjose.criss_cross.lib.CreativeTab;
|
||||||
import com.oitsjustjose.criss_cross.items.ItemDust;
|
import com.oitsjustjose.criss_cross.lib.Lib;
|
||||||
import com.oitsjustjose.criss_cross.recipes.VanillaRecipes;
|
import com.oitsjustjose.criss_cross.lib.LibBlocks;
|
||||||
|
import com.oitsjustjose.criss_cross.lib.LibItems;
|
||||||
import com.oitsjustjose.criss_cross.recipes.CCMachineRecipes;
|
import com.oitsjustjose.criss_cross.recipes.CCMachineRecipes;
|
||||||
import com.oitsjustjose.criss_cross.util.CCTab;
|
import com.oitsjustjose.criss_cross.recipes.VanillaRecipes;
|
||||||
import com.oitsjustjose.criss_cross.util.ClientProxy;
|
import com.oitsjustjose.criss_cross.util.ClientProxy;
|
||||||
import com.oitsjustjose.criss_cross.util.CommonProxy;
|
import com.oitsjustjose.criss_cross.util.CommonProxy;
|
||||||
import com.oitsjustjose.criss_cross.util.ConfigHandler;
|
|
||||||
import com.oitsjustjose.criss_cross.util.OreDictionaryAdder;
|
|
||||||
import com.oitsjustjose.criss_cross.util.Lib;
|
|
||||||
|
|
||||||
import net.minecraft.client.Minecraft;
|
|
||||||
import net.minecraft.client.resources.model.ModelResourceLocation;
|
|
||||||
import net.minecraft.creativetab.CreativeTabs;
|
import net.minecraft.creativetab.CreativeTabs;
|
||||||
import net.minecraft.item.Item;
|
|
||||||
import net.minecraftforge.common.MinecraftForge;
|
import net.minecraftforge.common.MinecraftForge;
|
||||||
import net.minecraftforge.fml.common.Mod;
|
import net.minecraftforge.fml.common.Mod;
|
||||||
import net.minecraftforge.fml.common.Mod.EventHandler;
|
import net.minecraftforge.fml.common.Mod.EventHandler;
|
||||||
|
|
@ -40,20 +35,19 @@ public class CrissCross
|
||||||
{
|
{
|
||||||
ConfigHandler.init(event.getSuggestedConfigurationFile());
|
ConfigHandler.init(event.getSuggestedConfigurationFile());
|
||||||
MinecraftForge.EVENT_BUS.register(new ConfigHandler());
|
MinecraftForge.EVENT_BUS.register(new ConfigHandler());
|
||||||
CCTab = new CCTab();
|
CCTab = new CreativeTab();
|
||||||
proxy.preInit();
|
proxy.preInit();
|
||||||
|
|
||||||
CCBlocks.init();
|
LibBlocks.init();
|
||||||
CCItems.init();
|
LibItems.init();
|
||||||
VanillaRecipes.init();
|
VanillaRecipes.init();
|
||||||
CCMachineRecipes.init();
|
CCMachineRecipes.init();
|
||||||
OreDictionaryAdder.init();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public static void init(FMLInitializationEvent event)
|
public static void init(FMLInitializationEvent event)
|
||||||
{
|
{
|
||||||
if(event.getSide().isClient())
|
if (event.getSide().isClient())
|
||||||
ClientProxy.init();
|
ClientProxy.init();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -4,9 +4,9 @@ import java.util.Random;
|
||||||
|
|
||||||
import com.oitsjustjose.criss_cross.CrissCross;
|
import com.oitsjustjose.criss_cross.CrissCross;
|
||||||
import com.oitsjustjose.criss_cross.gui.GUIHandler;
|
import com.oitsjustjose.criss_cross.gui.GUIHandler;
|
||||||
|
import com.oitsjustjose.criss_cross.lib.Lib;
|
||||||
import com.oitsjustjose.criss_cross.tileentity.TileCobblegen;
|
import com.oitsjustjose.criss_cross.tileentity.TileCobblegen;
|
||||||
import com.oitsjustjose.criss_cross.util.ClientProxy;
|
import com.oitsjustjose.criss_cross.util.ClientProxy;
|
||||||
import com.oitsjustjose.criss_cross.util.Lib;
|
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.state.IBlockState;
|
import net.minecraft.block.state.IBlockState;
|
||||||
|
|
@ -56,8 +56,7 @@ public class BlockCobblegen extends BlockMachineBase
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumFacing side, float hitX, float hitY,
|
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumFacing side, float hitX, float hitY, float hitZ)
|
||||||
float hitZ)
|
|
||||||
{
|
{
|
||||||
if (world.isRemote)
|
if (world.isRemote)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -4,9 +4,9 @@ import java.util.Random;
|
||||||
|
|
||||||
import com.oitsjustjose.criss_cross.CrissCross;
|
import com.oitsjustjose.criss_cross.CrissCross;
|
||||||
import com.oitsjustjose.criss_cross.gui.GUIHandler;
|
import com.oitsjustjose.criss_cross.gui.GUIHandler;
|
||||||
|
import com.oitsjustjose.criss_cross.lib.Lib;
|
||||||
import com.oitsjustjose.criss_cross.tileentity.TileCropomator;
|
import com.oitsjustjose.criss_cross.tileentity.TileCropomator;
|
||||||
import com.oitsjustjose.criss_cross.util.ClientProxy;
|
import com.oitsjustjose.criss_cross.util.ClientProxy;
|
||||||
import com.oitsjustjose.criss_cross.util.Lib;
|
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.state.IBlockState;
|
import net.minecraft.block.state.IBlockState;
|
||||||
|
|
@ -57,8 +57,7 @@ public class BlockCropomator extends BlockMachineBase
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumFacing side, float hitX, float hitY,
|
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumFacing side, float hitX, float hitY, float hitZ)
|
||||||
float hitZ)
|
|
||||||
{
|
{
|
||||||
if (world.isRemote)
|
if (world.isRemote)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -4,9 +4,9 @@ import java.util.Random;
|
||||||
|
|
||||||
import com.oitsjustjose.criss_cross.CrissCross;
|
import com.oitsjustjose.criss_cross.CrissCross;
|
||||||
import com.oitsjustjose.criss_cross.gui.GUIHandler;
|
import com.oitsjustjose.criss_cross.gui.GUIHandler;
|
||||||
|
import com.oitsjustjose.criss_cross.lib.Lib;
|
||||||
import com.oitsjustjose.criss_cross.tileentity.TileElectroextractor;
|
import com.oitsjustjose.criss_cross.tileentity.TileElectroextractor;
|
||||||
import com.oitsjustjose.criss_cross.util.ClientProxy;
|
import com.oitsjustjose.criss_cross.util.ClientProxy;
|
||||||
import com.oitsjustjose.criss_cross.util.Lib;
|
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.state.IBlockState;
|
import net.minecraft.block.state.IBlockState;
|
||||||
|
|
@ -56,8 +56,7 @@ public class BlockElectroextractor extends BlockMachineBase
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumFacing side, float hitX, float hitY,
|
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumFacing side, float hitX, float hitY, float hitZ)
|
||||||
float hitZ)
|
|
||||||
{
|
{
|
||||||
if (world.isRemote)
|
if (world.isRemote)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
package com.oitsjustjose.criss_cross.blocks;
|
package com.oitsjustjose.criss_cross.blocks;
|
||||||
|
|
||||||
import com.oitsjustjose.criss_cross.CrissCross;
|
import com.oitsjustjose.criss_cross.CrissCross;
|
||||||
import com.oitsjustjose.criss_cross.util.Lib;
|
import com.oitsjustjose.criss_cross.lib.Lib;
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.BlockContainer;
|
import net.minecraft.block.BlockContainer;
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,7 @@ import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||||
public class BlockMobGrinder extends BlockMachineBase
|
public class BlockMobGrinder extends BlockMachineBase
|
||||||
{
|
{
|
||||||
private static String unlocName = "mobGinder";
|
private static String unlocName = "mobGinder";
|
||||||
|
|
||||||
public BlockMobGrinder()
|
public BlockMobGrinder()
|
||||||
{
|
{
|
||||||
super(unlocName);
|
super(unlocName);
|
||||||
|
|
|
||||||
|
|
@ -47,8 +47,7 @@ public class BlockStonegen extends BlockMachineBase
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumFacing side, float hitX, float hitY,
|
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumFacing side, float hitX, float hitY, float hitZ)
|
||||||
float hitZ)
|
|
||||||
{
|
{
|
||||||
if (world.isRemote)
|
if (world.isRemote)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -4,9 +4,9 @@ import java.util.Random;
|
||||||
|
|
||||||
import com.oitsjustjose.criss_cross.CrissCross;
|
import com.oitsjustjose.criss_cross.CrissCross;
|
||||||
import com.oitsjustjose.criss_cross.gui.GUIHandler;
|
import com.oitsjustjose.criss_cross.gui.GUIHandler;
|
||||||
|
import com.oitsjustjose.criss_cross.lib.Lib;
|
||||||
import com.oitsjustjose.criss_cross.tileentity.TileWoodchipper;
|
import com.oitsjustjose.criss_cross.tileentity.TileWoodchipper;
|
||||||
import com.oitsjustjose.criss_cross.util.ClientProxy;
|
import com.oitsjustjose.criss_cross.util.ClientProxy;
|
||||||
import com.oitsjustjose.criss_cross.util.Lib;
|
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.state.IBlockState;
|
import net.minecraft.block.state.IBlockState;
|
||||||
|
|
@ -57,8 +57,7 @@ public class BlockWoodchipper extends BlockMachineBase
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumFacing side, float hitX, float hitY,
|
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumFacing side, float hitX, float hitY, float hitZ)
|
||||||
float hitZ)
|
|
||||||
{
|
{
|
||||||
if (world.isRemote)
|
if (world.isRemote)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -101,43 +101,38 @@ public class ContainerCobblegen extends Container
|
||||||
|
|
||||||
slot.onSlotChange(itemstack1, itemstack);
|
slot.onSlotChange(itemstack1, itemstack);
|
||||||
}
|
}
|
||||||
else
|
else if (slotID != 1 && slotID != 0)
|
||||||
if (slotID != 1 && slotID != 0)
|
{
|
||||||
|
if (TileCobblegen.isValid(itemstack1))
|
||||||
{
|
{
|
||||||
if (TileCobblegen.isValid(itemstack1))
|
if (!this.mergeItemStack(itemstack1, 0, 1, false))
|
||||||
{
|
|
||||||
if (!this.mergeItemStack(itemstack1, 0, 1, false))
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
if (TileCobblegen.isItemFuel(itemstack1))
|
|
||||||
{
|
|
||||||
if (!this.mergeItemStack(itemstack1, 1, 2, false))
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
if (slotID >= 3 && slotID < 30)
|
|
||||||
{
|
|
||||||
if (!this.mergeItemStack(itemstack1, 30, 39, false))
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
if (slotID >= 30 && slotID < 39 && !this.mergeItemStack(itemstack1, 3, 30, false))
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
if (!this.mergeItemStack(itemstack1, 3, 39, false))
|
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else if (TileCobblegen.isItemFuel(itemstack1))
|
||||||
|
{
|
||||||
|
if (!this.mergeItemStack(itemstack1, 1, 2, false))
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (slotID >= 3 && slotID < 30)
|
||||||
|
{
|
||||||
|
if (!this.mergeItemStack(itemstack1, 30, 39, false))
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (slotID >= 30 && slotID < 39 && !this.mergeItemStack(itemstack1, 3, 30, false))
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (!this.mergeItemStack(itemstack1, 3, 39, false))
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
if (itemstack1.stackSize == 0)
|
if (itemstack1.stackSize == 0)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -103,43 +103,38 @@ public class ContainerCropomator extends Container
|
||||||
|
|
||||||
slot.onSlotChange(itemstack1, itemstack);
|
slot.onSlotChange(itemstack1, itemstack);
|
||||||
}
|
}
|
||||||
else
|
else if (slotID != 1 && slotID != 0)
|
||||||
if (slotID != 1 && slotID != 0)
|
{
|
||||||
|
if (TileCropomator.isValid(itemstack1))
|
||||||
{
|
{
|
||||||
if (TileCropomator.isValid(itemstack1))
|
if (!this.mergeItemStack(itemstack1, 0, 1, false))
|
||||||
{
|
|
||||||
if (!this.mergeItemStack(itemstack1, 0, 1, false))
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
if (TileCropomator.isItemCatalyst(itemstack1))
|
|
||||||
{
|
|
||||||
if (!this.mergeItemStack(itemstack1, 1, 2, false))
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
if (slotID >= 3 && slotID < 30)
|
|
||||||
{
|
|
||||||
if (!this.mergeItemStack(itemstack1, 30, 39, false))
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
if (slotID >= 30 && slotID < 39 && !this.mergeItemStack(itemstack1, 3, 30, false))
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
if (!this.mergeItemStack(itemstack1, 3, 39, false))
|
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else if (TileCropomator.isItemCatalyst(itemstack1))
|
||||||
|
{
|
||||||
|
if (!this.mergeItemStack(itemstack1, 1, 2, false))
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (slotID >= 3 && slotID < 30)
|
||||||
|
{
|
||||||
|
if (!this.mergeItemStack(itemstack1, 30, 39, false))
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (slotID >= 30 && slotID < 39 && !this.mergeItemStack(itemstack1, 3, 30, false))
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (!this.mergeItemStack(itemstack1, 3, 39, false))
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
if (itemstack1.stackSize == 0)
|
if (itemstack1.stackSize == 0)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -103,43 +103,38 @@ public class ContainerElectroextractor extends Container
|
||||||
|
|
||||||
slot.onSlotChange(itemstack1, itemstack);
|
slot.onSlotChange(itemstack1, itemstack);
|
||||||
}
|
}
|
||||||
else
|
else if (slotID != 1 && slotID != 0)
|
||||||
if (slotID != 1 && slotID != 0)
|
{
|
||||||
|
if (TileElectroextractor.isValid(itemstack1))
|
||||||
{
|
{
|
||||||
if (TileElectroextractor.isValid(itemstack1))
|
if (!this.mergeItemStack(itemstack1, 0, 1, false))
|
||||||
{
|
|
||||||
if (!this.mergeItemStack(itemstack1, 0, 1, false))
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
if (TileElectroextractor.isItemEnergetic(itemstack1))
|
|
||||||
{
|
|
||||||
if (!this.mergeItemStack(itemstack1, 1, 2, false))
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
if (slotID >= 3 && slotID < 30)
|
|
||||||
{
|
|
||||||
if (!this.mergeItemStack(itemstack1, 30, 39, false))
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
if (slotID >= 30 && slotID < 39 && !this.mergeItemStack(itemstack1, 3, 30, false))
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
if (!this.mergeItemStack(itemstack1, 3, 39, false))
|
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else if (TileElectroextractor.isItemEnergetic(itemstack1))
|
||||||
|
{
|
||||||
|
if (!this.mergeItemStack(itemstack1, 1, 2, false))
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (slotID >= 3 && slotID < 30)
|
||||||
|
{
|
||||||
|
if (!this.mergeItemStack(itemstack1, 30, 39, false))
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (slotID >= 30 && slotID < 39 && !this.mergeItemStack(itemstack1, 3, 30, false))
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (!this.mergeItemStack(itemstack1, 3, 39, false))
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
if (itemstack1.stackSize == 0)
|
if (itemstack1.stackSize == 0)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -101,43 +101,38 @@ public class ContainerStonegen extends Container
|
||||||
|
|
||||||
slot.onSlotChange(itemstack1, itemstack);
|
slot.onSlotChange(itemstack1, itemstack);
|
||||||
}
|
}
|
||||||
else
|
else if (slotID != 1 && slotID != 0)
|
||||||
if (slotID != 1 && slotID != 0)
|
{
|
||||||
|
if (TileStonegen.isValid(itemstack1))
|
||||||
{
|
{
|
||||||
if (TileStonegen.isValid(itemstack1))
|
if (!this.mergeItemStack(itemstack1, 0, 1, false))
|
||||||
{
|
|
||||||
if (!this.mergeItemStack(itemstack1, 0, 1, false))
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
if (TileStonegen.isItemFuel(itemstack1))
|
|
||||||
{
|
|
||||||
if (!this.mergeItemStack(itemstack1, 1, 2, false))
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
if (slotID >= 3 && slotID < 30)
|
|
||||||
{
|
|
||||||
if (!this.mergeItemStack(itemstack1, 30, 39, false))
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
if (slotID >= 30 && slotID < 39 && !this.mergeItemStack(itemstack1, 3, 30, false))
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
if (!this.mergeItemStack(itemstack1, 3, 39, false))
|
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else if (TileStonegen.isItemFuel(itemstack1))
|
||||||
|
{
|
||||||
|
if (!this.mergeItemStack(itemstack1, 1, 2, false))
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (slotID >= 3 && slotID < 30)
|
||||||
|
{
|
||||||
|
if (!this.mergeItemStack(itemstack1, 30, 39, false))
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (slotID >= 30 && slotID < 39 && !this.mergeItemStack(itemstack1, 3, 30, false))
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (!this.mergeItemStack(itemstack1, 3, 39, false))
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
if (itemstack1.stackSize == 0)
|
if (itemstack1.stackSize == 0)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -101,43 +101,38 @@ public class ContainerWoodchipper extends Container
|
||||||
|
|
||||||
slot.onSlotChange(itemstack1, itemstack);
|
slot.onSlotChange(itemstack1, itemstack);
|
||||||
}
|
}
|
||||||
else
|
else if (slotID != 1 && slotID != 0)
|
||||||
if (slotID != 1 && slotID != 0)
|
{
|
||||||
|
if (TileWoodchipper.isValidForWoodchipper(itemstack1))
|
||||||
{
|
{
|
||||||
if (TileWoodchipper.isValidForWoodchipper(itemstack1))
|
if (!this.mergeItemStack(itemstack1, 0, 1, false))
|
||||||
{
|
|
||||||
if (!this.mergeItemStack(itemstack1, 0, 1, false))
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
if (TileWoodchipper.isItemFuel(itemstack1))
|
|
||||||
{
|
|
||||||
if (!this.mergeItemStack(itemstack1, 1, 2, false))
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
if (slotID >= 3 && slotID < 30)
|
|
||||||
{
|
|
||||||
if (!this.mergeItemStack(itemstack1, 30, 39, false))
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
if (slotID >= 30 && slotID < 39 && !this.mergeItemStack(itemstack1, 3, 30, false))
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
if (!this.mergeItemStack(itemstack1, 3, 39, false))
|
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else if (TileWoodchipper.isItemFuel(itemstack1))
|
||||||
|
{
|
||||||
|
if (!this.mergeItemStack(itemstack1, 1, 2, false))
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (slotID >= 3 && slotID < 30)
|
||||||
|
{
|
||||||
|
if (!this.mergeItemStack(itemstack1, 30, 39, false))
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (slotID >= 30 && slotID < 39 && !this.mergeItemStack(itemstack1, 3, 30, false))
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (!this.mergeItemStack(itemstack1, 3, 39, false))
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
if (itemstack1.stackSize == 0)
|
if (itemstack1.stackSize == 0)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
package com.oitsjustjose.criss_cross.event;
|
package com.oitsjustjose.criss_cross.event;
|
||||||
|
|
||||||
import com.oitsjustjose.criss_cross.items.CCItems;
|
import com.oitsjustjose.criss_cross.lib.LibItems;
|
||||||
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.init.Items;
|
import net.minecraft.init.Items;
|
||||||
|
|
@ -17,7 +17,7 @@ public class InfiniAppleEvent
|
||||||
return;
|
return;
|
||||||
EntityPlayer player = event.entityPlayer;
|
EntityPlayer player = event.entityPlayer;
|
||||||
|
|
||||||
if (player.inventory.hasItem(CCItems.infiniApple))
|
if (player.inventory.hasItem(LibItems.infiniApple))
|
||||||
{
|
{
|
||||||
if (player.getFoodStats() != null)
|
if (player.getFoodStats() != null)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
package com.oitsjustjose.criss_cross.event;
|
||||||
|
|
||||||
|
import com.oitsjustjose.criss_cross.items.ItemMantleSmasher;
|
||||||
|
|
||||||
|
import net.minecraft.block.material.Material;
|
||||||
|
import net.minecraftforge.event.entity.player.PlayerEvent.BreakSpeed;
|
||||||
|
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||||
|
|
||||||
|
public class ToolEfficiencyEvent
|
||||||
|
{
|
||||||
|
@SubscribeEvent
|
||||||
|
public void registerEvent(BreakSpeed event)
|
||||||
|
{
|
||||||
|
if(event.entityPlayer == null || event.entityPlayer.getHeldItem() == null)
|
||||||
|
return;
|
||||||
|
|
||||||
|
Material m = event.entityPlayer.worldObj.getBlockState(event.pos).getBlock().getMaterial();
|
||||||
|
|
||||||
|
if(event.entityPlayer.getHeldItem().getItem() instanceof ItemMantleSmasher)
|
||||||
|
if(m == Material.ground || m == Material.grass || m == Material.sand)
|
||||||
|
event.newSpeed = event.originalSpeed * 5;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -3,8 +3,8 @@ package com.oitsjustjose.criss_cross.gui;
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
import com.oitsjustjose.criss_cross.container.ContainerCropomator;
|
import com.oitsjustjose.criss_cross.container.ContainerCropomator;
|
||||||
|
import com.oitsjustjose.criss_cross.lib.Lib;
|
||||||
import com.oitsjustjose.criss_cross.tileentity.TileCropomator;
|
import com.oitsjustjose.criss_cross.tileentity.TileCropomator;
|
||||||
import com.oitsjustjose.criss_cross.util.Lib;
|
|
||||||
|
|
||||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||||
import net.minecraft.client.resources.I18n;
|
import net.minecraft.client.resources.I18n;
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
package com.oitsjustjose.criss_cross.gui;
|
package com.oitsjustjose.criss_cross.gui;
|
||||||
|
|
||||||
import com.oitsjustjose.criss_cross.util.ConfigHandler;
|
import com.oitsjustjose.criss_cross.lib.ConfigHandler;
|
||||||
import com.oitsjustjose.criss_cross.util.Lib;
|
import com.oitsjustjose.criss_cross.lib.Lib;
|
||||||
|
|
||||||
import net.minecraft.client.gui.GuiScreen;
|
import net.minecraft.client.gui.GuiScreen;
|
||||||
import net.minecraftforge.common.config.ConfigElement;
|
import net.minecraftforge.common.config.ConfigElement;
|
||||||
|
|
@ -12,7 +12,7 @@ public class ModGUIConfig extends GuiConfig
|
||||||
{
|
{
|
||||||
public ModGUIConfig(GuiScreen guiScreen)
|
public ModGUIConfig(GuiScreen guiScreen)
|
||||||
{
|
{
|
||||||
super(guiScreen, new ConfigElement(ConfigHandler.config.getCategory(Configuration.CATEGORY_GENERAL)).getChildElements(), Lib.modid,
|
super(guiScreen, new ConfigElement(ConfigHandler.config.getCategory(Configuration.CATEGORY_GENERAL)).getChildElements(), Lib.modid, false, true, GuiConfig.getAbridgedConfigPath(
|
||||||
false, true, GuiConfig.getAbridgedConfigPath(ConfigHandler.config.toString()));
|
ConfigHandler.config.toString()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -4,8 +4,8 @@ import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.oitsjustjose.criss_cross.CrissCross;
|
import com.oitsjustjose.criss_cross.CrissCross;
|
||||||
|
import com.oitsjustjose.criss_cross.lib.Lib;
|
||||||
import com.oitsjustjose.criss_cross.util.ClientProxy;
|
import com.oitsjustjose.criss_cross.util.ClientProxy;
|
||||||
import com.oitsjustjose.criss_cross.util.Lib;
|
|
||||||
|
|
||||||
import net.minecraft.creativetab.CreativeTabs;
|
import net.minecraft.creativetab.CreativeTabs;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
|
|
@ -62,8 +62,7 @@ public class ItemDust extends Item
|
||||||
public String getUnlocalizedNameInefficiently(ItemStack itemstack)
|
public String getUnlocalizedNameInefficiently(ItemStack itemstack)
|
||||||
{
|
{
|
||||||
int meta = itemstack.getItemDamage();
|
int meta = itemstack.getItemDamage();
|
||||||
return (StatCollector.translateToLocal("item.CrissCross.dustPrefix") + " " + ItemDust.getName(meta) + " " + StatCollector.translateToLocal(
|
return (StatCollector.translateToLocal("item.CrissCross.dustPrefix") + " " + ItemDust.getName(meta) + " " + StatCollector.translateToLocal("item.CrissCross.dustPostfix"));
|
||||||
"item.CrissCross.dustPostfix"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ package com.oitsjustjose.criss_cross.items;
|
||||||
|
|
||||||
import com.oitsjustjose.criss_cross.CrissCross;
|
import com.oitsjustjose.criss_cross.CrissCross;
|
||||||
import com.oitsjustjose.criss_cross.event.InfiniAppleEvent;
|
import com.oitsjustjose.criss_cross.event.InfiniAppleEvent;
|
||||||
import com.oitsjustjose.criss_cross.util.Lib;
|
import com.oitsjustjose.criss_cross.lib.Lib;
|
||||||
|
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraftforge.common.MinecraftForge;
|
import net.minecraftforge.common.MinecraftForge;
|
||||||
|
|
|
||||||
|
|
@ -1,26 +1,20 @@
|
||||||
package com.oitsjustjose.criss_cross.items;
|
package com.oitsjustjose.criss_cross.items;
|
||||||
|
|
||||||
import com.oitsjustjose.criss_cross.CrissCross;
|
import com.oitsjustjose.criss_cross.CrissCross;
|
||||||
import com.oitsjustjose.criss_cross.util.Lib;
|
import com.oitsjustjose.criss_cross.event.ToolEfficiencyEvent;
|
||||||
|
import com.oitsjustjose.criss_cross.lib.Lib;
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.block.state.IBlockState;
|
import net.minecraft.block.state.IBlockState;
|
||||||
import net.minecraft.entity.Entity;
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.entity.player.EntityPlayerMP;
|
|
||||||
import net.minecraft.item.ItemPickaxe;
|
import net.minecraft.item.ItemPickaxe;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.util.BlockPos;
|
import net.minecraft.util.BlockPos;
|
||||||
import net.minecraft.util.EnumFacing;
|
import net.minecraft.util.EnumFacing;
|
||||||
import net.minecraft.util.MathHelper;
|
|
||||||
import net.minecraft.util.MovingObjectPosition;
|
|
||||||
import net.minecraft.util.Vec3;
|
|
||||||
import net.minecraft.util.Vec3i;
|
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraftforge.common.MinecraftForge;
|
||||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||||
import net.minecraftforge.fml.relauncher.Side;
|
|
||||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
|
||||||
|
|
||||||
public class ItemMantleSmasher extends ItemPickaxe
|
public class ItemMantleSmasher extends ItemPickaxe
|
||||||
{
|
{
|
||||||
|
|
@ -29,17 +23,11 @@ public class ItemMantleSmasher extends ItemPickaxe
|
||||||
super(material);
|
super(material);
|
||||||
this.setUnlocalizedName(Lib.modid + ".mantleSmasher_" + material.name());
|
this.setUnlocalizedName(Lib.modid + ".mantleSmasher_" + material.name());
|
||||||
this.setCreativeTab(CrissCross.CCTab);
|
this.setCreativeTab(CrissCross.CCTab);
|
||||||
|
MinecraftForge.EVENT_BUS.register(new ToolEfficiencyEvent());
|
||||||
GameRegistry.registerItem(this, this.getUnlocalizedName());
|
GameRegistry.registerItem(this, this.getUnlocalizedName());
|
||||||
Lib.add(this);
|
Lib.add(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
@SideOnly(Side.CLIENT)
|
|
||||||
public boolean isFull3D()
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onBlockStartBreak(ItemStack itemstack, BlockPos pos, EntityPlayer player)
|
public boolean onBlockStartBreak(ItemStack itemstack, BlockPos pos, EntityPlayer player)
|
||||||
{
|
{
|
||||||
|
|
@ -47,13 +35,17 @@ public class ItemMantleSmasher extends ItemPickaxe
|
||||||
|
|
||||||
if (!world.isRemote && !player.isSneaking())
|
if (!world.isRemote && !player.isSneaking())
|
||||||
{
|
{
|
||||||
if (world.getBlockState(pos).getBlock().getMaterial() != Material.rock)
|
Material m = world.getBlockState(pos).getBlock().getMaterial();
|
||||||
return super.onBlockStartBreak(itemstack, pos, player);
|
|
||||||
|
|
||||||
MovingObjectPosition movObjPos = raytraceFromEntity(world, player, false, 4.5d);
|
if (m != Material.ground)
|
||||||
EnumFacing side = movObjPos.sideHit;
|
if(m != Material.grass)
|
||||||
|
if(m != Material.sand)
|
||||||
|
if(m != Material.rock)
|
||||||
|
return super.onBlockStartBreak(itemstack, pos, player);
|
||||||
|
|
||||||
if(side == null)
|
EnumFacing side = this.getMovingObjectPositionFromPlayer(world, player, true).sideHit;
|
||||||
|
|
||||||
|
if (side == null)
|
||||||
return super.onBlockStartBreak(itemstack, pos, player);
|
return super.onBlockStartBreak(itemstack, pos, player);
|
||||||
|
|
||||||
if (itemstack.getItem() instanceof ItemMantleSmasher)
|
if (itemstack.getItem() instanceof ItemMantleSmasher)
|
||||||
|
|
@ -68,8 +60,6 @@ public class ItemMantleSmasher extends ItemPickaxe
|
||||||
breakBlock(world, player, pos.down().west());
|
breakBlock(world, player, pos.down().west());
|
||||||
breakBlock(world, player, pos.down());
|
breakBlock(world, player, pos.down());
|
||||||
breakBlock(world, player, pos.down().east());
|
breakBlock(world, player, pos.down().east());
|
||||||
return super.onBlockStartBreak(itemstack, pos, player);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else if (side == EnumFacing.EAST || side == EnumFacing.WEST)
|
else if (side == EnumFacing.EAST || side == EnumFacing.WEST)
|
||||||
{
|
{
|
||||||
|
|
@ -81,8 +71,6 @@ public class ItemMantleSmasher extends ItemPickaxe
|
||||||
breakBlock(world, player, pos.down().north());
|
breakBlock(world, player, pos.down().north());
|
||||||
breakBlock(world, player, pos.down());
|
breakBlock(world, player, pos.down());
|
||||||
breakBlock(world, player, pos.down().south());
|
breakBlock(world, player, pos.down().south());
|
||||||
return super.onBlockStartBreak(itemstack, pos, player);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else if (side == EnumFacing.UP || side == EnumFacing.DOWN)
|
else if (side == EnumFacing.UP || side == EnumFacing.DOWN)
|
||||||
{
|
{
|
||||||
|
|
@ -94,7 +82,6 @@ public class ItemMantleSmasher extends ItemPickaxe
|
||||||
breakBlock(world, player, pos.south().east());
|
breakBlock(world, player, pos.south().east());
|
||||||
breakBlock(world, player, pos.south());
|
breakBlock(world, player, pos.south());
|
||||||
breakBlock(world, player, pos.south().west());
|
breakBlock(world, player, pos.south().west());
|
||||||
return super.onBlockStartBreak(itemstack, pos, player);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -106,42 +93,22 @@ public class ItemMantleSmasher extends ItemPickaxe
|
||||||
Block block = world.getBlockState(pos).getBlock();
|
Block block = world.getBlockState(pos).getBlock();
|
||||||
IBlockState state = world.getBlockState(pos);
|
IBlockState state = world.getBlockState(pos);
|
||||||
|
|
||||||
if (block.getMaterial() == Material.rock)
|
Material m = block.getMaterial();
|
||||||
{
|
|
||||||
block.onBlockHarvested(world, pos, state, player);
|
|
||||||
if (block.removedByPlayer(world, pos, player, true))
|
|
||||||
{
|
|
||||||
block.onBlockDestroyedByPlayer(world, pos, state);
|
|
||||||
block.harvestBlock(world, player, pos, state, world.getTileEntity(pos));
|
|
||||||
}
|
|
||||||
world.playAuxSFXAtEntity(player, Block.getIdFromBlock(block), pos, 1);
|
|
||||||
world.setBlockToAir(pos);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static MovingObjectPosition raytraceFromEntity(World world, Entity player, boolean par3, double range)
|
if (m == Material.ground || m == Material.grass || m == Material.sand || m == Material.rock)
|
||||||
{
|
|
||||||
float f = 1.0F;
|
|
||||||
float f1 = player.prevRotationPitch + (player.rotationPitch - player.prevRotationPitch) * f;
|
|
||||||
float f2 = player.prevRotationYaw + (player.rotationYaw - player.prevRotationYaw) * f;
|
|
||||||
double d0 = player.prevPosX + (player.posX - player.prevPosX) * (double) f;
|
|
||||||
double d1 = player.prevPosY + (player.posY - player.prevPosY) * (double) f;
|
|
||||||
if (!world.isRemote && player instanceof EntityPlayer)
|
|
||||||
d1 += 1.62D;
|
|
||||||
double d2 = player.prevPosZ + (player.posZ - player.prevPosZ) * (double) f;
|
|
||||||
Vec3 vec3 = new Vec3(d0, d1, d2);
|
|
||||||
float f3 = MathHelper.cos(-f2 * 0.017453292F - (float) Math.PI);
|
|
||||||
float f4 = MathHelper.sin(-f2 * 0.017453292F - (float) Math.PI);
|
|
||||||
float f5 = -MathHelper.cos(-f1 * 0.017453292F);
|
|
||||||
float f6 = MathHelper.sin(-f1 * 0.017453292F);
|
|
||||||
float f7 = f4 * f5;
|
|
||||||
float f8 = f3 * f5;
|
|
||||||
double d3 = range;
|
|
||||||
if (player instanceof EntityPlayerMP)
|
|
||||||
{
|
{
|
||||||
d3 = ((EntityPlayerMP) player).theItemInWorldManager.getBlockReachDistance();
|
if (block.getBlockHardness(world, pos) != -1.0F)
|
||||||
|
{
|
||||||
|
block.onBlockHarvested(world, pos, state, player);
|
||||||
|
if (block.removedByPlayer(world, pos, player, true))
|
||||||
|
{
|
||||||
|
block.onBlockDestroyedByPlayer(world, pos, state);
|
||||||
|
block.harvestBlock(world, player, pos, state, world.getTileEntity(pos));
|
||||||
|
player.getHeldItem().attemptDamageItem(1, player.getRNG());
|
||||||
|
world.playAuxSFX(2001, pos, Block.getIdFromBlock(block) + (block.getMetaFromState(state) << 12));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Vec3 vec31 = vec3.addVector((double) f7 * d3, (double) f6 * d3, (double) f8 * d3);
|
|
||||||
return world.rayTraceBlocks(vec3, vec31, par3, !par3, par3);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -3,8 +3,8 @@ package com.oitsjustjose.criss_cross.items;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.oitsjustjose.criss_cross.CrissCross;
|
import com.oitsjustjose.criss_cross.CrissCross;
|
||||||
|
import com.oitsjustjose.criss_cross.lib.Lib;
|
||||||
import com.oitsjustjose.criss_cross.util.ClientProxy;
|
import com.oitsjustjose.criss_cross.util.ClientProxy;
|
||||||
import com.oitsjustjose.criss_cross.util.Lib;
|
|
||||||
|
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.block.state.IBlockState;
|
import net.minecraft.block.state.IBlockState;
|
||||||
|
|
@ -36,13 +36,13 @@ public class ItemModBuckets extends Item
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public boolean hasEffect(ItemStack stack)
|
public boolean hasEffect(ItemStack stack)
|
||||||
{
|
{
|
||||||
if(stack.getItemDamage() == 0)
|
if (stack.getItemDamage() == 0)
|
||||||
return true;
|
return true;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer player)
|
public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer player)
|
||||||
|
|
@ -77,8 +77,7 @@ public class ItemModBuckets extends Item
|
||||||
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (world.getBlockState(blockpos).getBlock().getMaterial() == Material.lava || world.getBlockState(blockpos).getBlock()
|
if (world.getBlockState(blockpos).getBlock().getMaterial() == Material.lava || world.getBlockState(blockpos).getBlock().getMaterial() == Material.water)
|
||||||
.getMaterial() == Material.water)
|
|
||||||
return itemstack;
|
return itemstack;
|
||||||
|
|
||||||
int x = blockpos.getX();
|
int x = blockpos.getX();
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package com.oitsjustjose.criss_cross.util;
|
package com.oitsjustjose.criss_cross.lib;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
|
||||||
|
|
@ -16,10 +16,9 @@ public class ConfigHandler
|
||||||
public static String cropomatorRecipeItem;
|
public static String cropomatorRecipeItem;
|
||||||
public static String[] cropomatorInputs;
|
public static String[] cropomatorInputs;
|
||||||
public static String[] cropomatorCatalysts;
|
public static String[] cropomatorCatalysts;
|
||||||
public static String[] defaultCropomatorInputs = new String[] { "minecraft:apple", "minecraft:reeds", "minecraft:nether_wart", "minecraft:carrot",
|
public static String[] defaultCropomatorInputs = new String[] { "minecraft:apple", "minecraft:reeds", "minecraft:nether_wart", "minecraft:carrot", "minecraft:cactus", "minecraft:potato",
|
||||||
"minecraft:cactus", "minecraft:potato", "minecraft:sapling:0", "minecraft:sapling:1", "minecraft:sapling:2", "minecraft:sapling:3",
|
"minecraft:sapling:0", "minecraft:sapling:1", "minecraft:sapling:2", "minecraft:sapling:3", "minecraft:sapling:4", "minecraft:sapling:5", "minecraft:melon", "minecraft:brown_mushroom",
|
||||||
"minecraft:sapling:4", "minecraft:sapling:5", "minecraft:melon", "minecraft:brown_mushroom", "minecraft:red_mushroom", "minecraft:dye:3",
|
"minecraft:red_mushroom", "minecraft:dye:3", "minecraft:pumpkin", "minecraft:wheat", "minecraft:wheat_seeds" };
|
||||||
"minecraft:pumpkin", "minecraft:wheat", "minecraft:wheat_seeds" };
|
|
||||||
public static String[] defaultCropomatorCatalystItems = new String[] { "minecraft:dye:15" };
|
public static String[] defaultCropomatorCatalystItems = new String[] { "minecraft:dye:15" };
|
||||||
|
|
||||||
public static int electroextractorProcessTime;
|
public static int electroextractorProcessTime;
|
||||||
|
|
@ -27,9 +26,8 @@ public class ConfigHandler
|
||||||
public static String electroextractorRecipeItem;
|
public static String electroextractorRecipeItem;
|
||||||
public static String[] electroextractorEnergySources;
|
public static String[] electroextractorEnergySources;
|
||||||
public static String[] electroextractorOreDictInputs;
|
public static String[] electroextractorOreDictInputs;
|
||||||
public static String[] defaultElectroextractorOreDictInputs = new String[] { "Iron:12428902", "Gold:15400704", "Aluminum:15987699",
|
public static String[] defaultElectroextractorOreDictInputs = new String[] { "Iron:12428902", "Gold:15400704", "Aluminum:15987699", "Cobalt:17663", "Ardite:13938485", "Copper:16751872",
|
||||||
"Cobalt:17663", "Ardite:13938485", "Copper:16751872", "Tin:15132390", "Silver:13297640", "Lead:5722979", "Platinum:11067903",
|
"Tin:15132390", "Silver:13297640", "Lead:5722979", "Platinum:11067903", "Mithril:4433113", "Nickel:16580553" };
|
||||||
"Mithril:4433113", "Nickel:16580553" };
|
|
||||||
public static String[] defaultElectroextractorEnergySources = new String[] { "minecraft:redstone_block" };
|
public static String[] defaultElectroextractorEnergySources = new String[] { "minecraft:redstone_block" };
|
||||||
|
|
||||||
public static int woodchipperProcessTime;
|
public static int woodchipperProcessTime;
|
||||||
|
|
@ -54,41 +52,34 @@ public class ConfigHandler
|
||||||
{
|
{
|
||||||
// Cropomator Configs
|
// Cropomator Configs
|
||||||
cropomatorInputs = config.get(config.CATEGORY_GENERAL, "Cropomator's Recipe Items.", defaultCropomatorInputs,
|
cropomatorInputs = config.get(config.CATEGORY_GENERAL, "Cropomator's Recipe Items.", defaultCropomatorInputs,
|
||||||
"A list of items to be added to the Cropomator's recipe list. Formatted as: <modid>:<item>:<meta> or <modid>:<item>.")
|
"A list of items to be added to the Cropomator's recipe list. Formatted as: <modid>:<item>:<meta> or <modid>:<item>.").getStringList();
|
||||||
.getStringList();
|
|
||||||
|
|
||||||
cropomatorCatalysts = config.get(config.CATEGORY_GENERAL, "Cropomator's Catalyst Items.", defaultCropomatorCatalystItems,
|
cropomatorCatalysts = config.get(config.CATEGORY_GENERAL, "Cropomator's Catalyst Items.", defaultCropomatorCatalystItems,
|
||||||
"A list of items to be added to the Cropomator's catalyst list. Formatted as: <modid>:<item>:<meta> or <modid>:<item>.")
|
"A list of items to be added to the Cropomator's catalyst list. Formatted as: <modid>:<item>:<meta> or <modid>:<item>.").getStringList();
|
||||||
.getStringList();
|
|
||||||
|
|
||||||
cropomatorProcessTime = config.getInt("Cropomator Processing Time", config.CATEGORY_GENERAL, 150, 1, Short.MAX_VALUE,
|
cropomatorProcessTime = config.getInt("Cropomator Processing Time", config.CATEGORY_GENERAL, 150, 1, Short.MAX_VALUE,
|
||||||
"Control how many ticks it takes the Cropomator to process an item. Default is 150; furnaces are 200.");
|
"Control how many ticks it takes the Cropomator to process an item. Default is 150; furnaces are 200.");
|
||||||
|
|
||||||
cropomatorOutput = config.getInt("Cropomator Output Quantity", config.CATEGORY_GENERAL, 3, 0, 64,
|
cropomatorOutput = config.getInt("Cropomator Output Quantity", config.CATEGORY_GENERAL, 3, 0, 64, "Control how many of the input item you get as the output item. Default is 3.");
|
||||||
"Control how many of the input item you get as the output item. Default is 3.");
|
|
||||||
|
|
||||||
cropomatorRecipeItem = config.getString("Cropomator Crafting Item.", config.CATEGORY_GENERAL, "minecraft:diamond_block",
|
cropomatorRecipeItem = config.getString("Cropomator Crafting Item.", config.CATEGORY_GENERAL, "minecraft:diamond_block",
|
||||||
"This is the item located in the center of the crafting recipe for the Cropomator. Formatted as: <modid>:<item>:<meta> or <modid>:<item>.");
|
"This is the item located in the center of the crafting recipe for the Cropomator. Formatted as: <modid>:<item>:<meta> or <modid>:<item>.");
|
||||||
|
|
||||||
// Electroextractor's Configs
|
// Electroextractor's Configs
|
||||||
electroextractorEnergySources = config.get(config.CATEGORY_GENERAL, "Electroextractor's Fuel Items.", defaultElectroextractorEnergySources,
|
electroextractorEnergySources = config.get(config.CATEGORY_GENERAL, "Electroextractor's Fuel Items.", defaultElectroextractorEnergySources,
|
||||||
"A list of items to be added as the Electroextractor's energy sources. Formatted as: <modid>:<item>:<meta> or <modid>:<item>.")
|
"A list of items to be added as the Electroextractor's energy sources. Formatted as: <modid>:<item>:<meta> or <modid>:<item>.").getStringList();
|
||||||
.getStringList();
|
|
||||||
|
|
||||||
electroextractorProcessTime = config.getInt("Electroextractor Processing Time", config.CATEGORY_GENERAL, 250, 0, Short.MAX_VALUE,
|
electroextractorProcessTime = config.getInt("Electroextractor Processing Time", config.CATEGORY_GENERAL, 250, 0, Short.MAX_VALUE,
|
||||||
"Control how many ticks it takes the Electroextractor to process an item. Default is 250; furnaces are 200.");
|
"Control how many ticks it takes the Electroextractor to process an item. Default is 250; furnaces are 200.");
|
||||||
|
|
||||||
electroextractorOutput = config.getInt("Electroextractor Output Quantity", config.CATEGORY_GENERAL, 2, 0, 64,
|
electroextractorOutput = config.getInt("Electroextractor Output Quantity", config.CATEGORY_GENERAL, 2, 0, 64, "Control how many dusts you get as the output. Default is 2.");
|
||||||
"Control how many dusts you get as the output. Default is 2.");
|
|
||||||
|
|
||||||
electroextractorRecipeItem = config.getString("Electroextractor Crafting Item.", config.CATEGORY_GENERAL, "minecraft:diamond_block",
|
electroextractorRecipeItem = config.getString("Electroextractor Crafting Item.", config.CATEGORY_GENERAL, "minecraft:diamond_block",
|
||||||
"This is the item located in the center of the crafting recipe for the Electroextractor. Formatted as: <modid>:<item>:<meta> or <modid>:<item>.");
|
"This is the item located in the center of the crafting recipe for the Electroextractor. Formatted as: <modid>:<item>:<meta> or <modid>:<item>.");
|
||||||
|
|
||||||
electroextractorOreDictInputs = config.get(config.CATEGORY_GENERAL, "Electroextractor OreDictionary Entries.",
|
electroextractorOreDictInputs = config.get(config.CATEGORY_GENERAL, "Electroextractor OreDictionary Entries.", defaultElectroextractorOreDictInputs,
|
||||||
defaultElectroextractorOreDictInputs, "Formatted as <OreDictName>:<DecimalColorYouWant>." + "\n"
|
"Formatted as <OreDictName>:<DecimalColorYouWant>." + "\n" + " Remove the 'ore' part of the oredict name (i.e. 'oreIron' should be entered as 'Iron')" + "\n"
|
||||||
+ " Remove the 'ore' part of the oredict name (i.e. 'oreIron' should be entered as 'Iron')" + "\n"
|
+ "Use http://www.colorpicker.com/ to find a color and http://bit.ly/1RhPhcX to convert it from Hex to Decimal.").getStringList();
|
||||||
+ "Use http://www.colorpicker.com/ to find a color and http://bit.ly/1RhPhcX to convert it from Hex to Decimal.")
|
|
||||||
.getStringList();
|
|
||||||
|
|
||||||
// Woodchipper's Configs
|
// Woodchipper's Configs
|
||||||
woodchipperFuels = config.get(config.CATEGORY_GENERAL, "Woodchipper Fuel Items", defaultWoodchipperFuels,
|
woodchipperFuels = config.get(config.CATEGORY_GENERAL, "Woodchipper Fuel Items", defaultWoodchipperFuels,
|
||||||
|
|
@ -97,8 +88,7 @@ public class ConfigHandler
|
||||||
woodchipperProcessTime = config.getInt("Woodchipper Process Time", config.CATEGORY_GENERAL, 400, 0, Short.MAX_VALUE,
|
woodchipperProcessTime = config.getInt("Woodchipper Process Time", config.CATEGORY_GENERAL, 400, 0, Short.MAX_VALUE,
|
||||||
"Control how many ticks it takes the Woodchipper to process an item. Default is 400; furnaces are 200.");
|
"Control how many ticks it takes the Woodchipper to process an item. Default is 400; furnaces are 200.");
|
||||||
|
|
||||||
woodchipperOutput = config.getInt("Woodchipper Output Quantity", config.CATEGORY_GENERAL, 6, 0, 64,
|
woodchipperOutput = config.getInt("Woodchipper Output Quantity", config.CATEGORY_GENERAL, 6, 0, 64, "Control how many planks are yielded from processing a log. Default is 6.");
|
||||||
"Control how many planks are yielded from processing a log. Default is 6.");
|
|
||||||
|
|
||||||
woodchipperRecipeItem = config.getString("Woodchipper Crafting Item", config.CATEGORY_GENERAL, "minecraft:diamond_block",
|
woodchipperRecipeItem = config.getString("Woodchipper Crafting Item", config.CATEGORY_GENERAL, "minecraft:diamond_block",
|
||||||
"This is the item located in the center of the crafting recipe for the Woodchipper. Formatted as: <modid>:<item>:<meta> or <modid>:<item>.");
|
"This is the item located in the center of the crafting recipe for the Woodchipper. Formatted as: <modid>:<item>:<meta> or <modid>:<item>.");
|
||||||
|
|
@ -123,9 +113,8 @@ public class ConfigHandler
|
||||||
{
|
{
|
||||||
if (GameRegistry.findItem(modid, name) != null)
|
if (GameRegistry.findItem(modid, name) != null)
|
||||||
return new ItemStack(GameRegistry.findItem(modid, name));
|
return new ItemStack(GameRegistry.findItem(modid, name));
|
||||||
else
|
else if (GameRegistry.findBlock(modid, name) != null)
|
||||||
if (GameRegistry.findBlock(modid, name) != null)
|
return new ItemStack(GameRegistry.findBlock(modid, name));
|
||||||
return new ItemStack(GameRegistry.findBlock(modid, name));
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
package com.oitsjustjose.criss_cross.lib;
|
||||||
|
|
||||||
|
import net.minecraft.creativetab.CreativeTabs;
|
||||||
|
import net.minecraft.item.Item;
|
||||||
|
|
||||||
|
public class CreativeTab extends CreativeTabs
|
||||||
|
{
|
||||||
|
public CreativeTab()
|
||||||
|
{
|
||||||
|
super(CreativeTabs.getNextID(), "tab" + Lib.modid);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Item getTabIconItem()
|
||||||
|
{
|
||||||
|
return Item.getItemFromBlock(LibBlocks.electroextractor);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package com.oitsjustjose.criss_cross.util;
|
package com.oitsjustjose.criss_cross.lib;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
|
@ -8,8 +8,8 @@ import net.minecraft.item.Item;
|
||||||
public class Lib
|
public class Lib
|
||||||
{
|
{
|
||||||
public static final String modid = "CrissCross";
|
public static final String modid = "CrissCross";
|
||||||
public static final String name = "Criss Cross";
|
public static final String name = "CrissCross";
|
||||||
public static final String version = "1.3";
|
public static final String version = "@VERSION@";
|
||||||
public static final String guifactory = "com.oitsjustjose.criss_cross.gui.GUIFactory";
|
public static final String guifactory = "com.oitsjustjose.criss_cross.gui.GUIFactory";
|
||||||
|
|
||||||
private static final ArrayList<Item> allItems = new ArrayList<Item>();
|
private static final ArrayList<Item> allItems = new ArrayList<Item>();
|
||||||
|
|
@ -1,12 +1,17 @@
|
||||||
package com.oitsjustjose.criss_cross.blocks;
|
package com.oitsjustjose.criss_cross.lib;
|
||||||
|
|
||||||
import com.oitsjustjose.criss_cross.CrissCross;
|
import com.oitsjustjose.criss_cross.CrissCross;
|
||||||
|
import com.oitsjustjose.criss_cross.blocks.BlockCobblegen;
|
||||||
|
import com.oitsjustjose.criss_cross.blocks.BlockCropomator;
|
||||||
|
import com.oitsjustjose.criss_cross.blocks.BlockElectroextractor;
|
||||||
|
import com.oitsjustjose.criss_cross.blocks.BlockStonegen;
|
||||||
|
import com.oitsjustjose.criss_cross.blocks.BlockWoodchipper;
|
||||||
import com.oitsjustjose.criss_cross.gui.GUIHandler;
|
import com.oitsjustjose.criss_cross.gui.GUIHandler;
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraftforge.fml.common.network.NetworkRegistry;
|
import net.minecraftforge.fml.common.network.NetworkRegistry;
|
||||||
|
|
||||||
public class CCBlocks
|
public class LibBlocks
|
||||||
{
|
{
|
||||||
public static Block cropomator;
|
public static Block cropomator;
|
||||||
public static Block electroextractor;
|
public static Block electroextractor;
|
||||||
|
|
@ -22,7 +27,7 @@ public class CCBlocks
|
||||||
woodchipper = new BlockWoodchipper();
|
woodchipper = new BlockWoodchipper();
|
||||||
cobblegen = new BlockCobblegen();
|
cobblegen = new BlockCobblegen();
|
||||||
stonegen = new BlockStonegen();
|
stonegen = new BlockStonegen();
|
||||||
// mobGrinder = new BlockMobGrinder();
|
// mobGrinder = new BlockMobGrinder();
|
||||||
NetworkRegistry.INSTANCE.registerGuiHandler(CrissCross.instance, new GUIHandler());
|
NetworkRegistry.INSTANCE.registerGuiHandler(CrissCross.instance, new GUIHandler());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1,4 +1,9 @@
|
||||||
package com.oitsjustjose.criss_cross.items;
|
package com.oitsjustjose.criss_cross.lib;
|
||||||
|
|
||||||
|
import com.oitsjustjose.criss_cross.items.ItemDust;
|
||||||
|
import com.oitsjustjose.criss_cross.items.ItemInfiniApple;
|
||||||
|
import com.oitsjustjose.criss_cross.items.ItemMantleSmasher;
|
||||||
|
import com.oitsjustjose.criss_cross.items.ItemModBuckets;
|
||||||
|
|
||||||
import net.minecraft.init.Blocks;
|
import net.minecraft.init.Blocks;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
|
|
@ -6,7 +11,7 @@ import net.minecraft.item.Item.ToolMaterial;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraftforge.common.util.EnumHelper;
|
import net.minecraftforge.common.util.EnumHelper;
|
||||||
|
|
||||||
public class CCItems
|
public class LibItems
|
||||||
{
|
{
|
||||||
public static Item dusts;
|
public static Item dusts;
|
||||||
public static Item buckets;
|
public static Item buckets;
|
||||||
|
|
@ -19,9 +24,9 @@ public class CCItems
|
||||||
|
|
||||||
public static void init()
|
public static void init()
|
||||||
{
|
{
|
||||||
mkI = EnumHelper.addToolMaterial("mkI", 7, 6244, 8.0F, 0.0F, 22);
|
mkI = EnumHelper.addToolMaterial("mkI", 7, 6244, 8.0F, 0.0F, 0);
|
||||||
mkI.setRepairItem(new ItemStack(Blocks.emerald_block));
|
mkI.setRepairItem(new ItemStack(Blocks.emerald_block));
|
||||||
mkII = EnumHelper.addToolMaterial("mkII", 10, -1, 12.0F, 0.0F, 32);
|
mkII = EnumHelper.addToolMaterial("mkII", 10, -1, 12.0F, 0.0F, 0);
|
||||||
|
|
||||||
dusts = new ItemDust();
|
dusts = new ItemDust();
|
||||||
buckets = new ItemModBuckets();
|
buckets = new ItemModBuckets();
|
||||||
|
|
@ -3,15 +3,15 @@ package com.oitsjustjose.criss_cross.recipes;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.oitsjustjose.criss_cross.items.CCItems;
|
|
||||||
import com.oitsjustjose.criss_cross.items.ItemDust;
|
import com.oitsjustjose.criss_cross.items.ItemDust;
|
||||||
|
import com.oitsjustjose.criss_cross.lib.ConfigHandler;
|
||||||
|
import com.oitsjustjose.criss_cross.lib.LibItems;
|
||||||
import com.oitsjustjose.criss_cross.tileentity.TileCobblegen;
|
import com.oitsjustjose.criss_cross.tileentity.TileCobblegen;
|
||||||
import com.oitsjustjose.criss_cross.tileentity.TileCropomator;
|
import com.oitsjustjose.criss_cross.tileentity.TileCropomator;
|
||||||
import com.oitsjustjose.criss_cross.tileentity.TileElectroextractor;
|
import com.oitsjustjose.criss_cross.tileentity.TileElectroextractor;
|
||||||
import com.oitsjustjose.criss_cross.tileentity.TileStonegen;
|
import com.oitsjustjose.criss_cross.tileentity.TileStonegen;
|
||||||
import com.oitsjustjose.criss_cross.tileentity.TileWoodchipper;
|
import com.oitsjustjose.criss_cross.tileentity.TileWoodchipper;
|
||||||
import com.oitsjustjose.criss_cross.util.CCLog;
|
import com.oitsjustjose.criss_cross.util.CCLog;
|
||||||
import com.oitsjustjose.criss_cross.util.ConfigHandler;
|
|
||||||
import com.oitsjustjose.criss_cross.util.ItemHelper;
|
import com.oitsjustjose.criss_cross.util.ItemHelper;
|
||||||
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
|
@ -39,13 +39,23 @@ public class CCMachineRecipes
|
||||||
initWoodchipperOreDictionary();
|
initWoodchipperOreDictionary();
|
||||||
|
|
||||||
TileStonegen.addFuel(new ItemStack(Items.water_bucket));
|
TileStonegen.addFuel(new ItemStack(Items.water_bucket));
|
||||||
TileStonegen.addFuel(new ItemStack(CCItems.buckets));
|
TileStonegen.addFuel(new ItemStack(LibItems.buckets));
|
||||||
TileCobblegen.addFuel(new ItemStack(Items.water_bucket));
|
TileCobblegen.addFuel(new ItemStack(Items.water_bucket));
|
||||||
TileCobblegen.addFuel(new ItemStack(CCItems.buckets));
|
TileCobblegen.addFuel(new ItemStack(LibItems.buckets));
|
||||||
|
|
||||||
ElectroextractorRecipes.getInstance().addRecipe(new ItemStack(Blocks.diamond_ore), new ItemStack(Items.diamond, electroQTY));
|
ElectroextractorRecipes.getInstance().addRecipe(new ItemStack(Blocks.diamond_ore), new ItemStack(Items.diamond, electroQTY));
|
||||||
ElectroextractorRecipes.getInstance().addRecipe(new ItemStack(Blocks.emerald_ore), new ItemStack(Items.emerald, electroQTY));
|
ElectroextractorRecipes.getInstance().addRecipe(new ItemStack(Blocks.emerald_ore), new ItemStack(Items.emerald, electroQTY));
|
||||||
ElectroextractorRecipes.getInstance().addRecipe(new ItemStack(Blocks.coal_ore), new ItemStack(Items.coal, electroQTY));
|
ElectroextractorRecipes.getInstance().addRecipe(new ItemStack(Blocks.coal_ore), new ItemStack(Items.coal, electroQTY));
|
||||||
|
|
||||||
|
registerOreDict();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void registerOreDict()
|
||||||
|
{
|
||||||
|
ArrayList<String> dustNames = ItemDust.getDusts();
|
||||||
|
|
||||||
|
for (int i = 0; i < dustNames.size(); i++)
|
||||||
|
OreDictionary.registerOre("dust" + dustNames.get(i), new ItemStack(LibItems.dusts, 1, i));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void initCropomatorRecipes()
|
public static void initCropomatorRecipes()
|
||||||
|
|
@ -60,8 +70,7 @@ public class CCMachineRecipes
|
||||||
if (ConfigHandler.findItemStack(unlocStack[0], unlocStack[1]) != null)
|
if (ConfigHandler.findItemStack(unlocStack[0], unlocStack[1]) != null)
|
||||||
{
|
{
|
||||||
ItemStack newStack = ConfigHandler.findItemStack(unlocStack[0], unlocStack[1]);
|
ItemStack newStack = ConfigHandler.findItemStack(unlocStack[0], unlocStack[1]);
|
||||||
CropomatorRecipes.getInstance().addRecipe(newStack, new ItemStack(newStack.getItem(), cropomatorQTY, newStack
|
CropomatorRecipes.getInstance().addRecipe(newStack, new ItemStack(newStack.getItem(), cropomatorQTY, newStack.getItemDamage()));
|
||||||
.getItemDamage()));
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -74,11 +83,9 @@ public class CCMachineRecipes
|
||||||
{
|
{
|
||||||
if (ConfigHandler.findItemStack(unlocStack[0], unlocStack[1]) != null)
|
if (ConfigHandler.findItemStack(unlocStack[0], unlocStack[1]) != null)
|
||||||
{
|
{
|
||||||
ItemStack newStack = new ItemStack(ConfigHandler.findItemStack(unlocStack[0], unlocStack[1]).getItem(), 1, Integer.parseInt(
|
ItemStack newStack = new ItemStack(ConfigHandler.findItemStack(unlocStack[0], unlocStack[1]).getItem(), 1, Integer.parseInt(unlocStack[2]));
|
||||||
unlocStack[2]));
|
|
||||||
newStack.stackSize = cropomatorQTY;
|
newStack.stackSize = cropomatorQTY;
|
||||||
CropomatorRecipes.getInstance().addRecipe(newStack, new ItemStack(newStack.getItem(), cropomatorQTY, newStack
|
CropomatorRecipes.getInstance().addRecipe(newStack, new ItemStack(newStack.getItem(), cropomatorQTY, newStack.getItemDamage()));
|
||||||
.getItemDamage()));
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -117,8 +124,7 @@ public class CCMachineRecipes
|
||||||
{
|
{
|
||||||
if (ConfigHandler.findItemStack(unlocStack[0], unlocStack[1]) != null)
|
if (ConfigHandler.findItemStack(unlocStack[0], unlocStack[1]) != null)
|
||||||
{
|
{
|
||||||
ItemStack newStack = new ItemStack(ConfigHandler.findItemStack(unlocStack[0], unlocStack[1]).getItem(), 1, Integer.parseInt(
|
ItemStack newStack = new ItemStack(ConfigHandler.findItemStack(unlocStack[0], unlocStack[1]).getItem(), 1, Integer.parseInt(unlocStack[2]));
|
||||||
unlocStack[2]));
|
|
||||||
TileCropomator.addFuel(newStack);
|
TileCropomator.addFuel(newStack);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
@ -142,7 +148,7 @@ public class CCMachineRecipes
|
||||||
{
|
{
|
||||||
Container local1 = new Container()
|
Container local1 = new Container()
|
||||||
{
|
{
|
||||||
public boolean canInteractWith(EntityPlayer paramAnonymousEntityPlayer)
|
public boolean canInteractWith(EntityPlayer p)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
@ -183,8 +189,8 @@ public class CCMachineRecipes
|
||||||
if (localItemStack3 != null)
|
if (localItemStack3 != null)
|
||||||
{
|
{
|
||||||
localItemStack4 = localItemStack3.copy();
|
localItemStack4 = localItemStack3.copy();
|
||||||
ItemStack tmp201_199 = localItemStack4;
|
ItemStack temp = localItemStack4;
|
||||||
tmp201_199.stackSize = woodchipperQTY;
|
temp.stackSize = woodchipperQTY;
|
||||||
WoodchipperRecipes.getInstance().addRecipe(localItemStack2, localItemStack4);
|
WoodchipperRecipes.getInstance().addRecipe(localItemStack2, localItemStack4);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -213,8 +219,7 @@ public class CCMachineRecipes
|
||||||
{
|
{
|
||||||
if (ConfigHandler.findItemStack(unlocStack[0], unlocStack[1]) != null)
|
if (ConfigHandler.findItemStack(unlocStack[0], unlocStack[1]) != null)
|
||||||
{
|
{
|
||||||
ItemStack newStack = new ItemStack(ConfigHandler.findItemStack(unlocStack[0], unlocStack[1]).getItem(), 1, Integer.parseInt(
|
ItemStack newStack = new ItemStack(ConfigHandler.findItemStack(unlocStack[0], unlocStack[1]).getItem(), 1, Integer.parseInt(unlocStack[2]));
|
||||||
unlocStack[2]));
|
|
||||||
TileWoodchipper.addFuel(newStack);
|
TileWoodchipper.addFuel(newStack);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
@ -244,8 +249,7 @@ public class CCMachineRecipes
|
||||||
TileElectroextractor.addFuel(ConfigHandler.findItemStack(unlocStack[0], unlocStack[1]));
|
TileElectroextractor.addFuel(ConfigHandler.findItemStack(unlocStack[0], unlocStack[1]));
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
CCLog.warn("Item " + ConfigHandler.electroextractorEnergySources[i]
|
CCLog.warn("Item " + ConfigHandler.electroextractorEnergySources[i] + " could not be added to the Electroextractor's fuel list.");
|
||||||
+ " could not be added to the Electroextractor's fuel list.");
|
|
||||||
CCLog.warn("Please confirm you have the name and formatting correct.");
|
CCLog.warn("Please confirm you have the name and formatting correct.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -254,14 +258,12 @@ public class CCMachineRecipes
|
||||||
{
|
{
|
||||||
if (ConfigHandler.findItemStack(unlocStack[0], unlocStack[1]) != null)
|
if (ConfigHandler.findItemStack(unlocStack[0], unlocStack[1]) != null)
|
||||||
{
|
{
|
||||||
ItemStack newStack = new ItemStack(ConfigHandler.findItemStack(unlocStack[0], unlocStack[1]).getItem(), 1, Integer.parseInt(
|
ItemStack newStack = new ItemStack(ConfigHandler.findItemStack(unlocStack[0], unlocStack[1]).getItem(), 1, Integer.parseInt(unlocStack[2]));
|
||||||
unlocStack[2]));
|
|
||||||
TileElectroextractor.addFuel(newStack);
|
TileElectroextractor.addFuel(newStack);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
CCLog.warn("Item " + ConfigHandler.electroextractorEnergySources[i]
|
CCLog.warn("Item " + ConfigHandler.electroextractorEnergySources[i] + " could not be added to the Electroextractor's fuel list.");
|
||||||
+ " could not be added to the Electroextractor's fuel list.");
|
|
||||||
CCLog.warn("Please confirm you have the name and formatting correct.");
|
CCLog.warn("Please confirm you have the name and formatting correct.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -284,16 +286,15 @@ public class CCMachineRecipes
|
||||||
List<ItemStack> ores = OreDictionary.getOres("ore" + entry[0]);
|
List<ItemStack> ores = OreDictionary.getOres("ore" + entry[0]);
|
||||||
ItemDust.addDustType(entry[0], Integer.parseInt(entry[1]));
|
ItemDust.addDustType(entry[0], Integer.parseInt(entry[1]));
|
||||||
for (int j = 0; j < ores.size(); j++)
|
for (int j = 0; j < ores.size(); j++)
|
||||||
ElectroextractorRecipes.getInstance().addRecipe(ores.get(j), new ItemStack(CCItems.dusts, electroQTY, dustNames.size() - 1));
|
ElectroextractorRecipes.getInstance().addRecipe(ores.get(j), new ItemStack(LibItems.dusts, electroQTY, dustNames.size() - 1));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
CCLog.warn("Your oreDictionary Entry " + ConfigHandler.electroextractorOreDictInputs[i] + " could not be registered.");
|
CCLog.warn("Your oreDictionary Entry " + ConfigHandler.electroextractorOreDictInputs[i] + " could not be registered.");
|
||||||
if (!doesOreNameExist("ore" + entry[0]))
|
if (!doesOreNameExist("ore" + entry[0]))
|
||||||
CCLog.warn("This is because your oreDictionary Entry was not valid or registered as " + entry[0] + ".");
|
CCLog.warn("This is because your oreDictionary Entry was not valid or registered as " + entry[0] + ".");
|
||||||
else
|
else if (!doesOreNameExist("ingot" + entry[0]))
|
||||||
if (!doesOreNameExist("ingot" + entry[0]))
|
CCLog.warn("This is because your oreDictionary Entry does not have an ingot for " + entry[0] + ".");
|
||||||
CCLog.warn("This is because your oreDictionary Entry does not have an ingot for " + entry[0] + ".");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -303,7 +304,7 @@ public class CCMachineRecipes
|
||||||
if (doesOreNameExist("ingot" + dustNames.get(i)))
|
if (doesOreNameExist("ingot" + dustNames.get(i)))
|
||||||
ingot = OreDictionary.getOres("ingot" + dustNames.get(i)).get(0);
|
ingot = OreDictionary.getOres("ingot" + dustNames.get(i)).get(0);
|
||||||
if (ingot != null)
|
if (ingot != null)
|
||||||
GameRegistry.addSmelting(new ItemStack(CCItems.dusts, 1, i), ingot, 0.0F);
|
GameRegistry.addSmelting(new ItemStack(LibItems.dusts, 1, i), ingot, 0.0F);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
package com.oitsjustjose.criss_cross.recipes;
|
package com.oitsjustjose.criss_cross.recipes;
|
||||||
|
|
||||||
import com.oitsjustjose.criss_cross.blocks.CCBlocks;
|
import com.oitsjustjose.criss_cross.lib.ConfigHandler;
|
||||||
import com.oitsjustjose.criss_cross.items.CCItems;
|
import com.oitsjustjose.criss_cross.lib.LibBlocks;
|
||||||
|
import com.oitsjustjose.criss_cross.lib.LibItems;
|
||||||
import com.oitsjustjose.criss_cross.util.CCLog;
|
import com.oitsjustjose.criss_cross.util.CCLog;
|
||||||
import com.oitsjustjose.criss_cross.util.ConfigHandler;
|
|
||||||
|
|
||||||
import net.minecraft.init.Blocks;
|
import net.minecraft.init.Blocks;
|
||||||
import net.minecraft.init.Items;
|
import net.minecraft.init.Items;
|
||||||
|
|
@ -24,17 +24,18 @@ public class VanillaRecipes
|
||||||
|
|
||||||
static void initBlockGeneratorRecipes()
|
static void initBlockGeneratorRecipes()
|
||||||
{
|
{
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(CCBlocks.cobblegen), "CPC", "#$#", "CPC", '$', "blockIron", 'C', "cobblestone", 'P', Blocks.piston, '#', Items.stone_pickaxe));
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(LibBlocks.cobblegen), "CPC", "#$#", "CPC", '$', "blockIron", 'C', "cobblestone", 'P', Blocks.piston, '#', Items.stone_pickaxe));
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(CCBlocks.stonegen), "CPC", "#$#", "CPC", '$', "blockIron", 'C', "stone", 'P', Blocks.piston, '#', Items.stone_pickaxe));
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(LibBlocks.stonegen), "CPC", "#$#", "CPC", '$', "blockIron", 'C', "stone", 'P', Blocks.piston, '#', Items.stone_pickaxe));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void initOthers()
|
static void initOthers()
|
||||||
{
|
{
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(CCItems.buckets, 1, 0), "DFD", "WBW", "DFD", 'W', Items.water_bucket, 'B', Items.bucket, 'D', "gemDiamond", 'F', "blockDiamond"));
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(LibItems.buckets, 1, 0), "DFD", "WBW", "DFD", 'W', Items.water_bucket, 'B', Items.bucket, 'D', "gemDiamond", 'F', "blockDiamond"));
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(CCItems.buckets, 1, 1), "OGO", "GBG", "OGO", 'B', Items.bucket, 'G', "blockGlass", 'O', Blocks.obsidian));
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(LibItems.buckets, 1, 1), "OGO", "GBG", "OGO", 'B', Items.bucket, 'G', "blockGlass", 'O', Blocks.obsidian));
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(CCItems.infiniApple, 1, 0), "###", "#N#", "###", '#', new ItemStack(Items.golden_apple, 1, 1), 'N', Items.nether_star));
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(LibItems.infiniApple, 1, 0), "###", "#N#", "###", '#', new ItemStack(Items.golden_apple, 1, 1), 'N', Items.nether_star));
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(CCItems.mantleSmasherMkI), "## ", "#PI", " II", '#', "blockEmerald", 'I', "blockIron", 'P', Items.diamond_pickaxe));
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(LibItems.mantleSmasherMkI), "## ", "#PI", " II", '#', "blockEmerald", 'I', "blockIron", 'P', Items.diamond_pickaxe));
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(CCItems.mantleSmasherMkII), "## ", "#PI", " IN", '#', "blockDiamond", 'I', "blockGold", 'P', CCItems.mantleSmasherMkI, 'N', Items.nether_star));
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(LibItems.mantleSmasherMkII), "## ", "#PI", " IN", '#', "blockDiamond", 'I', "blockGold", 'P', LibItems.mantleSmasherMkI, 'N',
|
||||||
|
Items.nether_star));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void woodChipperRecipe()
|
static void woodChipperRecipe()
|
||||||
|
|
@ -56,7 +57,7 @@ public class VanillaRecipes
|
||||||
CCLog.warn("Please confirm you have the name and formatting correct.");
|
CCLog.warn("Please confirm you have the name and formatting correct.");
|
||||||
}
|
}
|
||||||
|
|
||||||
GameRegistry.addRecipe(new ItemStack(CCBlocks.woodchipper), new Object[] { "I#I", "SCS", "I#I", '#', Items.diamond_axe, 'I', Blocks.iron_bars, 'S', Items.golden_axe, 'C', centerItem });
|
GameRegistry.addRecipe(new ItemStack(LibBlocks.woodchipper), new Object[] { "I#I", "SCS", "I#I", '#', Items.diamond_axe, 'I', Blocks.iron_bars, 'S', Items.golden_axe, 'C', centerItem });
|
||||||
}
|
}
|
||||||
|
|
||||||
static void electroextractorRecipe()
|
static void electroextractorRecipe()
|
||||||
|
|
@ -79,7 +80,7 @@ public class VanillaRecipes
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
GameRegistry.addRecipe(new ItemStack(CCBlocks.electroextractor), new Object[] { "I#I", "SCS", "I#I", '#', Blocks.piston, 'I', Blocks.iron_bars, 'S', Items.golden_pickaxe, 'C', centerItem });
|
GameRegistry.addRecipe(new ItemStack(LibBlocks.electroextractor), new Object[] { "I#I", "SCS", "I#I", '#', Blocks.piston, 'I', Blocks.iron_bars, 'S', Items.golden_pickaxe, 'C', centerItem });
|
||||||
}
|
}
|
||||||
|
|
||||||
static void cropomatorRecipe()
|
static void cropomatorRecipe()
|
||||||
|
|
@ -101,7 +102,7 @@ public class VanillaRecipes
|
||||||
CCLog.warn("Please confirm you have the name and formatting correct.");
|
CCLog.warn("Please confirm you have the name and formatting correct.");
|
||||||
}
|
}
|
||||||
|
|
||||||
GameRegistry.addRecipe(new ItemStack(CCBlocks.cropomator), new Object[] { "I#I", "SCS", "I#I", '#', Blocks.hay_block, 'I', Items.iron_ingot, 'S', Items.golden_hoe, 'C', centerItem });
|
GameRegistry.addRecipe(new ItemStack(LibBlocks.cropomator), new Object[] { "I#I", "SCS", "I#I", '#', Blocks.hay_block, 'I', Items.iron_ingot, 'S', Items.golden_hoe, 'C', centerItem });
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -4,8 +4,8 @@ import java.util.ArrayList;
|
||||||
|
|
||||||
import com.oitsjustjose.criss_cross.blocks.BlockStonegen;
|
import com.oitsjustjose.criss_cross.blocks.BlockStonegen;
|
||||||
import com.oitsjustjose.criss_cross.container.ContainerCobblegen;
|
import com.oitsjustjose.criss_cross.container.ContainerCobblegen;
|
||||||
import com.oitsjustjose.criss_cross.util.ConfigHandler;
|
import com.oitsjustjose.criss_cross.lib.ConfigHandler;
|
||||||
import com.oitsjustjose.criss_cross.util.Lib;
|
import com.oitsjustjose.criss_cross.lib.Lib;
|
||||||
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.entity.player.InventoryPlayer;
|
import net.minecraft.entity.player.InventoryPlayer;
|
||||||
|
|
|
||||||
|
|
@ -4,9 +4,9 @@ import java.util.ArrayList;
|
||||||
|
|
||||||
import com.oitsjustjose.criss_cross.blocks.BlockCropomator;
|
import com.oitsjustjose.criss_cross.blocks.BlockCropomator;
|
||||||
import com.oitsjustjose.criss_cross.container.ContainerCropomator;
|
import com.oitsjustjose.criss_cross.container.ContainerCropomator;
|
||||||
|
import com.oitsjustjose.criss_cross.lib.ConfigHandler;
|
||||||
|
import com.oitsjustjose.criss_cross.lib.Lib;
|
||||||
import com.oitsjustjose.criss_cross.recipes.CropomatorRecipes;
|
import com.oitsjustjose.criss_cross.recipes.CropomatorRecipes;
|
||||||
import com.oitsjustjose.criss_cross.util.ConfigHandler;
|
|
||||||
import com.oitsjustjose.criss_cross.util.Lib;
|
|
||||||
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.entity.player.InventoryPlayer;
|
import net.minecraft.entity.player.InventoryPlayer;
|
||||||
|
|
@ -208,7 +208,7 @@ public class TileCropomator extends TileEntityLockable implements ITickable, ISi
|
||||||
|
|
||||||
this.catalystTime = tag.getShort("BonemealTime");
|
this.catalystTime = tag.getShort("BonemealTime");
|
||||||
this.processTime = tag.getShort("ProcessTime");
|
this.processTime = tag.getShort("ProcessTime");
|
||||||
if(this.ItemStacks[1] != null)
|
if (this.ItemStacks[1] != null)
|
||||||
this.catalystInUseTime = getItemBurnTime(this.ItemStacks[1]);
|
this.catalystInUseTime = getItemBurnTime(this.ItemStacks[1]);
|
||||||
else
|
else
|
||||||
this.catalystInUseTime = 0;
|
this.catalystInUseTime = 0;
|
||||||
|
|
@ -320,11 +320,10 @@ public class TileCropomator extends TileEntityLockable implements ITickable, ISi
|
||||||
{
|
{
|
||||||
ItemStacks[2] = output.copy();
|
ItemStacks[2] = output.copy();
|
||||||
}
|
}
|
||||||
else
|
else if (outputSlot.isItemEqual(output))
|
||||||
if (outputSlot.isItemEqual(output))
|
{
|
||||||
{
|
outputSlot.stackSize += output.stackSize;
|
||||||
outputSlot.stackSize += output.stackSize;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
--input.stackSize;
|
--input.stackSize;
|
||||||
if (input.stackSize <= 0)
|
if (input.stackSize <= 0)
|
||||||
|
|
@ -352,8 +351,7 @@ public class TileCropomator extends TileEntityLockable implements ITickable, ISi
|
||||||
|
|
||||||
public boolean isUseableByPlayer(EntityPlayer player)
|
public boolean isUseableByPlayer(EntityPlayer player)
|
||||||
{
|
{
|
||||||
return this.worldObj.getTileEntity(this.pos) != this ? false
|
return this.worldObj.getTileEntity(this.pos) != this ? false : player.getDistanceSq((double) this.pos.getX() + 0.5D, (double) this.pos.getY() + 0.5D, (double) this.pos.getZ() + 0.5D) <= 64.0D;
|
||||||
: player.getDistanceSq((double) this.pos.getX() + 0.5D, (double) this.pos.getY() + 0.5D, (double) this.pos.getZ() + 0.5D) <= 64.0D;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
|
|
@ -4,9 +4,9 @@ import java.util.ArrayList;
|
||||||
|
|
||||||
import com.oitsjustjose.criss_cross.blocks.BlockElectroextractor;
|
import com.oitsjustjose.criss_cross.blocks.BlockElectroextractor;
|
||||||
import com.oitsjustjose.criss_cross.container.ContainerElectroextractor;
|
import com.oitsjustjose.criss_cross.container.ContainerElectroextractor;
|
||||||
|
import com.oitsjustjose.criss_cross.lib.ConfigHandler;
|
||||||
|
import com.oitsjustjose.criss_cross.lib.Lib;
|
||||||
import com.oitsjustjose.criss_cross.recipes.ElectroextractorRecipes;
|
import com.oitsjustjose.criss_cross.recipes.ElectroextractorRecipes;
|
||||||
import com.oitsjustjose.criss_cross.util.ConfigHandler;
|
|
||||||
import com.oitsjustjose.criss_cross.util.Lib;
|
|
||||||
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.entity.player.InventoryPlayer;
|
import net.minecraft.entity.player.InventoryPlayer;
|
||||||
|
|
@ -190,7 +190,7 @@ public class TileElectroextractor extends TileEntityLockable implements ITickabl
|
||||||
|
|
||||||
this.fuelTime = tag.getShort("Energy");
|
this.fuelTime = tag.getShort("Energy");
|
||||||
this.crushTime = tag.getShort("CrushTime");
|
this.crushTime = tag.getShort("CrushTime");
|
||||||
if(this.ItemStacks[1] != null)
|
if (this.ItemStacks[1] != null)
|
||||||
this.fuelInUseTime = getItemBurnTime(this.ItemStacks[1]);
|
this.fuelInUseTime = getItemBurnTime(this.ItemStacks[1]);
|
||||||
else
|
else
|
||||||
this.fuelInUseTime = 0;
|
this.fuelInUseTime = 0;
|
||||||
|
|
@ -302,11 +302,10 @@ public class TileElectroextractor extends TileEntityLockable implements ITickabl
|
||||||
{
|
{
|
||||||
ItemStacks[2] = output.copy();
|
ItemStacks[2] = output.copy();
|
||||||
}
|
}
|
||||||
else
|
else if (outputSlot.isItemEqual(output))
|
||||||
if (outputSlot.isItemEqual(output))
|
{
|
||||||
{
|
outputSlot.stackSize += output.stackSize;
|
||||||
outputSlot.stackSize += output.stackSize;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
--input.stackSize;
|
--input.stackSize;
|
||||||
if (input.stackSize <= 0)
|
if (input.stackSize <= 0)
|
||||||
|
|
@ -323,7 +322,7 @@ public class TileElectroextractor extends TileEntityLockable implements ITickabl
|
||||||
|
|
||||||
public static boolean isItemEnergetic(ItemStack itemstack)
|
public static boolean isItemEnergetic(ItemStack itemstack)
|
||||||
{
|
{
|
||||||
if(fuelItems == null || fuelItems.size() <= 0)
|
if (fuelItems == null || fuelItems.size() <= 0)
|
||||||
return false;
|
return false;
|
||||||
for (int i = 0; i < fuelItems.size(); i++)
|
for (int i = 0; i < fuelItems.size(); i++)
|
||||||
{
|
{
|
||||||
|
|
@ -336,8 +335,7 @@ public class TileElectroextractor extends TileEntityLockable implements ITickabl
|
||||||
|
|
||||||
public boolean isUseableByPlayer(EntityPlayer player)
|
public boolean isUseableByPlayer(EntityPlayer player)
|
||||||
{
|
{
|
||||||
return this.worldObj.getTileEntity(this.pos) != this ? false
|
return this.worldObj.getTileEntity(this.pos) != this ? false : player.getDistanceSq((double) this.pos.getX() + 0.5D, (double) this.pos.getY() + 0.5D, (double) this.pos.getZ() + 0.5D) <= 64.0D;
|
||||||
: player.getDistanceSq((double) this.pos.getX() + 0.5D, (double) this.pos.getY() + 0.5D, (double) this.pos.getZ() + 0.5D) <= 64.0D;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ public class TileMobGrinder extends TileEntity implements ITickable
|
||||||
{
|
{
|
||||||
World world = this.worldObj;
|
World world = this.worldObj;
|
||||||
|
|
||||||
if(!world.isRemote)
|
if (!world.isRemote)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -36,11 +36,16 @@ public class TileMobGrinder extends TileEntity implements ITickable
|
||||||
{
|
{
|
||||||
switch (facing)
|
switch (facing)
|
||||||
{
|
{
|
||||||
case 2: return new AxisAlignedBB(pos, pos.north(3));
|
case 2:
|
||||||
case 3: return new AxisAlignedBB(pos, pos.south(3));
|
return new AxisAlignedBB(pos, pos.north(3));
|
||||||
case 4: return new AxisAlignedBB(pos, pos.west(3));
|
case 3:
|
||||||
case 5: return new AxisAlignedBB(pos, pos.east(3));
|
return new AxisAlignedBB(pos, pos.south(3));
|
||||||
default: return new AxisAlignedBB(pos, pos);
|
case 4:
|
||||||
|
return new AxisAlignedBB(pos, pos.west(3));
|
||||||
|
case 5:
|
||||||
|
return new AxisAlignedBB(pos, pos.east(3));
|
||||||
|
default:
|
||||||
|
return new AxisAlignedBB(pos, pos);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,8 @@ import java.util.ArrayList;
|
||||||
|
|
||||||
import com.oitsjustjose.criss_cross.blocks.BlockStonegen;
|
import com.oitsjustjose.criss_cross.blocks.BlockStonegen;
|
||||||
import com.oitsjustjose.criss_cross.container.ContainerStonegen;
|
import com.oitsjustjose.criss_cross.container.ContainerStonegen;
|
||||||
import com.oitsjustjose.criss_cross.util.ConfigHandler;
|
import com.oitsjustjose.criss_cross.lib.ConfigHandler;
|
||||||
import com.oitsjustjose.criss_cross.util.Lib;
|
import com.oitsjustjose.criss_cross.lib.Lib;
|
||||||
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.entity.player.InventoryPlayer;
|
import net.minecraft.entity.player.InventoryPlayer;
|
||||||
|
|
@ -212,7 +212,7 @@ public class TileStonegen extends TileEntityLockable implements ITickable, ISide
|
||||||
|
|
||||||
this.fuelTime = tag.getShort("FuelTime");
|
this.fuelTime = tag.getShort("FuelTime");
|
||||||
this.processTime = tag.getShort("WorkTime");
|
this.processTime = tag.getShort("WorkTime");
|
||||||
if(this.ItemStacks[1] != null)
|
if (this.ItemStacks[1] != null)
|
||||||
this.fuelUsetime = getItemBurnTime(this.ItemStacks[1]);
|
this.fuelUsetime = getItemBurnTime(this.ItemStacks[1]);
|
||||||
else
|
else
|
||||||
this.fuelUsetime = 0;
|
this.fuelUsetime = 0;
|
||||||
|
|
@ -322,11 +322,10 @@ public class TileStonegen extends TileEntityLockable implements ITickable, ISide
|
||||||
{
|
{
|
||||||
ItemStacks[2] = output.copy();
|
ItemStacks[2] = output.copy();
|
||||||
}
|
}
|
||||||
else
|
else if (outputSlot.isItemEqual(output))
|
||||||
if (outputSlot.isItemEqual(output))
|
{
|
||||||
{
|
outputSlot.stackSize += output.stackSize;
|
||||||
outputSlot.stackSize += output.stackSize;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (input.stackSize <= 0)
|
if (input.stackSize <= 0)
|
||||||
{
|
{
|
||||||
|
|
@ -353,8 +352,7 @@ public class TileStonegen extends TileEntityLockable implements ITickable, ISide
|
||||||
|
|
||||||
public boolean isUseableByPlayer(EntityPlayer player)
|
public boolean isUseableByPlayer(EntityPlayer player)
|
||||||
{
|
{
|
||||||
return this.worldObj.getTileEntity(this.pos) != this ? false
|
return this.worldObj.getTileEntity(this.pos) != this ? false : player.getDistanceSq((double) this.pos.getX() + 0.5D, (double) this.pos.getY() + 0.5D, (double) this.pos.getZ() + 0.5D) <= 64.0D;
|
||||||
: player.getDistanceSq((double) this.pos.getX() + 0.5D, (double) this.pos.getY() + 0.5D, (double) this.pos.getZ() + 0.5D) <= 64.0D;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
|
|
@ -4,9 +4,9 @@ import java.util.ArrayList;
|
||||||
|
|
||||||
import com.oitsjustjose.criss_cross.blocks.BlockWoodchipper;
|
import com.oitsjustjose.criss_cross.blocks.BlockWoodchipper;
|
||||||
import com.oitsjustjose.criss_cross.container.ContainerWoodchipper;
|
import com.oitsjustjose.criss_cross.container.ContainerWoodchipper;
|
||||||
|
import com.oitsjustjose.criss_cross.lib.ConfigHandler;
|
||||||
|
import com.oitsjustjose.criss_cross.lib.Lib;
|
||||||
import com.oitsjustjose.criss_cross.recipes.WoodchipperRecipes;
|
import com.oitsjustjose.criss_cross.recipes.WoodchipperRecipes;
|
||||||
import com.oitsjustjose.criss_cross.util.ConfigHandler;
|
|
||||||
import com.oitsjustjose.criss_cross.util.Lib;
|
|
||||||
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.entity.player.InventoryPlayer;
|
import net.minecraft.entity.player.InventoryPlayer;
|
||||||
|
|
@ -207,7 +207,7 @@ public class TileWoodchipper extends TileEntityLockable implements ITickable, IS
|
||||||
|
|
||||||
this.fuelTime = tag.getShort("FuelTime");
|
this.fuelTime = tag.getShort("FuelTime");
|
||||||
this.processTime = tag.getShort("WorkTime");
|
this.processTime = tag.getShort("WorkTime");
|
||||||
if(this.ItemStacks[1] != null)
|
if (this.ItemStacks[1] != null)
|
||||||
this.fuelUsetime = getItemBurnTime(this.ItemStacks[1]);
|
this.fuelUsetime = getItemBurnTime(this.ItemStacks[1]);
|
||||||
else
|
else
|
||||||
this.fuelUsetime = 0;
|
this.fuelUsetime = 0;
|
||||||
|
|
@ -319,11 +319,10 @@ public class TileWoodchipper extends TileEntityLockable implements ITickable, IS
|
||||||
{
|
{
|
||||||
ItemStacks[2] = output.copy();
|
ItemStacks[2] = output.copy();
|
||||||
}
|
}
|
||||||
else
|
else if (outputSlot.isItemEqual(output))
|
||||||
if (outputSlot.isItemEqual(output))
|
{
|
||||||
{
|
outputSlot.stackSize += output.stackSize;
|
||||||
outputSlot.stackSize += output.stackSize;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
--input.stackSize;
|
--input.stackSize;
|
||||||
if (input.stackSize <= 0)
|
if (input.stackSize <= 0)
|
||||||
|
|
@ -351,8 +350,7 @@ public class TileWoodchipper extends TileEntityLockable implements ITickable, IS
|
||||||
|
|
||||||
public boolean isUseableByPlayer(EntityPlayer player)
|
public boolean isUseableByPlayer(EntityPlayer player)
|
||||||
{
|
{
|
||||||
return this.worldObj.getTileEntity(this.pos) != this ? false
|
return this.worldObj.getTileEntity(this.pos) != this ? false : player.getDistanceSq((double) this.pos.getX() + 0.5D, (double) this.pos.getY() + 0.5D, (double) this.pos.getZ() + 0.5D) <= 64.0D;
|
||||||
: player.getDistanceSq((double) this.pos.getX() + 0.5D, (double) this.pos.getY() + 0.5D, (double) this.pos.getZ() + 0.5D) <= 64.0D;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,8 @@ package com.oitsjustjose.criss_cross.util;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.apache.logging.log4j.LogManager;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.apache.logging.log4j.Logger;
|
||||||
|
|
||||||
|
import com.oitsjustjose.criss_cross.lib.Lib;
|
||||||
|
|
||||||
public class CCLog
|
public class CCLog
|
||||||
{
|
{
|
||||||
private static Logger LOGGER = LogManager.getLogger(Lib.modid);
|
private static Logger LOGGER = LogManager.getLogger(Lib.modid);
|
||||||
|
|
|
||||||
|
|
@ -1,21 +0,0 @@
|
||||||
package com.oitsjustjose.criss_cross.util;
|
|
||||||
|
|
||||||
import com.oitsjustjose.criss_cross.blocks.CCBlocks;
|
|
||||||
|
|
||||||
import net.minecraft.creativetab.CreativeTabs;
|
|
||||||
import net.minecraft.item.Item;
|
|
||||||
|
|
||||||
public class CCTab extends CreativeTabs
|
|
||||||
{
|
|
||||||
public CCTab()
|
|
||||||
{
|
|
||||||
super(CreativeTabs.getNextID(), "tab" + Lib.modid);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Item getTabIconItem()
|
|
||||||
{
|
|
||||||
return Item.getItemFromBlock(CCBlocks.electroextractor);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -4,6 +4,7 @@ import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.oitsjustjose.criss_cross.CrissCross;
|
import com.oitsjustjose.criss_cross.CrissCross;
|
||||||
|
import com.oitsjustjose.criss_cross.lib.Lib;
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
|
|
|
||||||
|
|
@ -95,31 +95,29 @@ public class ItemHelper
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
else if (dmgItems[1] != null && dmgItems[0].getItem() == dmgItems[1].getItem() && dmgItems[0].stackSize == 1 && dmgItems[1].stackSize == 1 && dmgItems[0].getItem().isRepairable())
|
||||||
|
{
|
||||||
|
Item theItem = dmgItems[0].getItem();
|
||||||
|
int var13 = theItem.getMaxDamage() - dmgItems[0].getItemDamage();
|
||||||
|
int var8 = theItem.getMaxDamage() - dmgItems[1].getItemDamage();
|
||||||
|
int var9 = var13 + var8 + theItem.getMaxDamage() * 5 / 100;
|
||||||
|
int var10 = Math.max(0, theItem.getMaxDamage() - var9);
|
||||||
|
|
||||||
|
return new ItemStack(dmgItems[0].getItem(), 1, var10);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
if (dmgItems[1] != null && dmgItems[0].getItem() == dmgItems[1].getItem() && dmgItems[0].stackSize == 1 && dmgItems[1].stackSize == 1
|
{
|
||||||
&& dmgItems[0].getItem().isRepairable())
|
IRecipe recipe;
|
||||||
|
for (int i = 0; i < CraftingManager.getInstance().getRecipeList().size(); i++)
|
||||||
{
|
{
|
||||||
Item theItem = dmgItems[0].getItem();
|
recipe = (IRecipe) CraftingManager.getInstance().getRecipeList().get(i);
|
||||||
int var13 = theItem.getMaxDamage() - dmgItems[0].getItemDamage();
|
|
||||||
int var8 = theItem.getMaxDamage() - dmgItems[1].getItemDamage();
|
|
||||||
int var9 = var13 + var8 + theItem.getMaxDamage() * 5 / 100;
|
|
||||||
int var10 = Math.max(0, theItem.getMaxDamage() - var9);
|
|
||||||
|
|
||||||
return new ItemStack(dmgItems[0].getItem(), 1, var10);
|
if (recipe.matches(inv, world))
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
IRecipe recipe;
|
|
||||||
for (int i = 0; i < CraftingManager.getInstance().getRecipeList().size(); i++)
|
|
||||||
{
|
{
|
||||||
recipe = (IRecipe) CraftingManager.getInstance().getRecipeList().get(i);
|
return recipe.getCraftingResult(inv);
|
||||||
|
|
||||||
if (recipe.matches(inv, world))
|
|
||||||
{
|
|
||||||
return recipe.getCraftingResult(inv);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1,20 +0,0 @@
|
||||||
package com.oitsjustjose.criss_cross.util;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
|
|
||||||
import com.oitsjustjose.criss_cross.items.CCItems;
|
|
||||||
import com.oitsjustjose.criss_cross.items.ItemDust;
|
|
||||||
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraftforge.oredict.OreDictionary;
|
|
||||||
|
|
||||||
public class OreDictionaryAdder
|
|
||||||
{
|
|
||||||
public static void init()
|
|
||||||
{
|
|
||||||
ArrayList<String> dustNames = ItemDust.getDusts();
|
|
||||||
|
|
||||||
for (int i = 0; i < dustNames.size(); i++)
|
|
||||||
OreDictionary.registerOre("dust" + dustNames.get(i), new ItemStack(CCItems.dusts, 1, i));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"modid": "CrissCross",
|
"modid": "CrissCross",
|
||||||
"name": "CrissCross",
|
"name": "Criss Cross",
|
||||||
"description": "A Criss-Cross of Vanilla-Styled Machinery!",
|
"description": "A Criss-Cross of Vanilla-Styled Machinery!",
|
||||||
"version": "1.3",
|
"version": "${version}",
|
||||||
"mcversion": "1.8.8",
|
"mcversion": "${mcversion}",
|
||||||
"url": "",
|
"url": "",
|
||||||
"updateUrl": "",
|
"updateUrl": "",
|
||||||
"authorList": ["oitsjustjose"],
|
"authorList": ["oitsjustjose"],
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue