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*?PZ#Hk|=xn zGM#0*w4CaB^y0G(J4q=;5NeM@m-P}#mv7QZNF)M!dK^w{mk_!n0`+Y3PQutu-%NBt zzgPXug?JLEbUL{e_dk;Vd896&yPe(hliVK!lj%5+@BKdcrEZ2Nc_*i@ve*2lB>u~{ zFozd2FM|_0+nAGR4TLNHanQn_Oeb!Jr UcvzJ?7p9TTNB}ocO3j$7ij!li8#k6 z@2tSd1>K03K9A#_-MIq)S;T#oE^;>U$)&}okIvDf3lm?kI{d80$>~ xKUoS!%q1Pi?WpsUUt(tI ztjNjY*y&Rm9(S(DC2GuPHBJs@5M{RGm`c1z<6nwyN^)rMo-AS{M2$oM9|y%fM|}G~ DHx0+F literal 0 HcmV?d00001 diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 00000000..37f853b1 --- /dev/null +++ b/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,7 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip +networkTimeout=10000 +validateDistributionUrl=true +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew new file mode 100644 index 00000000..faf93008 --- /dev/null +++ b/gradlew @@ -0,0 +1,251 @@ +#!/bin/sh + +# +# Copyright © 2015-2021 the original authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 +# + +############################################################################## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# +############################################################################## + +# Attempt to set APP_HOME + +# Resolve links: $0 may be a link +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac +done + +# This is normally unused +# shellcheck disable=SC2034 +APP_BASE_NAME=${0##*/} +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD=maximum + +warn () { + echo "$*" +} >&2 + +die () { + echo + echo "$*" + echo + exit 1 +} >&2 + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; +esac + +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 + if ! command -v java >/dev/null 2>&1 + then + 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 +fi + +# Increase the maximum file descriptors if we can. +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac +fi + +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. + +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + + # Now convert the arguments - kludge to limit ourselves to /bin/sh + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) + fi + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg + done +fi + + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Collect all arguments for the java command: +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# and any embedded shellness will be escaped. +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be +# treated as '${Hostname}' itself on the command line. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# Stop when "xargs" is not available. +if ! command -v xargs >/dev/null 2>&1 +then + die "xargs is not available" +fi + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' + +exec "$JAVACMD" "$@" diff --git a/gradlew.bat b/gradlew.bat new file mode 100644 index 00000000..9d21a218 --- /dev/null +++ b/gradlew.bat @@ -0,0 +1,94 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem + +@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 + +set DIRNAME=%~dp0 +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@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="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if %ERRORLEVEL% equ 0 goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +goto fail + +: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 %* + +:end +@rem End local scope for the variables with windows NT shell +if %ERRORLEVEL% equ 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! +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/jitpack.yml b/jitpack.yml new file mode 100644 index 00000000..09bbb514 --- /dev/null +++ b/jitpack.yml @@ -0,0 +1,2 @@ +before_install: + - ./gradlew setupCIWorkspace \ No newline at end of file diff --git a/models/underworld_portal.json b/models/underworld_portal.json new file mode 100644 index 00000000..3a58be92 --- /dev/null +++ b/models/underworld_portal.json @@ -0,0 +1,149 @@ +{ + "format_version": "1.21.6", + "credit": "Made with Blockbench", + "textures": { + "0": "bedrockium_block", + "particle": "bedrockium_block" + }, + "elements": [ + { + "from": [0, 0, 0], + "to": [4, 16, 4], + "faces": { + "north": {"uv": [12, 0, 16, 16], "texture": "#0"}, + "east": {"uv": [8, 0, 12, 16], "texture": "#0"}, + "south": {"uv": [4, 0, 8, 16], "texture": "#0"}, + "west": {"uv": [0, 0, 4, 16], "texture": "#0"}, + "up": {"uv": [0, 0, 4, 4], "texture": "#0"}, + "down": {"uv": [0, 12, 4, 16], "texture": "#0"} + } + }, + { + "from": [12, 0, 0], + "to": [16, 16, 4], + "rotation": {"angle": 0, "axis": "y", "origin": [14, 0, 0]}, + "faces": { + "north": {"uv": [0, 0, 4, 16], "texture": "#0"}, + "east": {"uv": [12, 0, 16, 16], "texture": "#0"}, + "south": {"uv": [8, 0, 12, 16], "texture": "#0"}, + "west": {"uv": [4, 0, 8, 16], "texture": "#0"}, + "up": {"uv": [12, 0, 16, 4], "texture": "#0"}, + "down": {"uv": [12, 12, 16, 16], "texture": "#0"} + } + }, + { + "from": [12, 0, 12], + "to": [16, 16, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [14, 0, 14]}, + "faces": { + "north": {"uv": [4, 0, 8, 16], "texture": "#0"}, + "east": {"uv": [0, 0, 4, 16], "texture": "#0"}, + "south": {"uv": [12, 0, 16, 16], "texture": "#0"}, + "west": {"uv": [8, 0, 12, 16], "texture": "#0"}, + "up": {"uv": [12, 12, 16, 16], "texture": "#0"}, + "down": {"uv": [12, 12, 16, 16], "texture": "#0"} + } + }, + { + "from": [0, 0, 12], + "to": [4, 16, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [0, 0, 14]}, + "faces": { + "north": {"uv": [8, 0, 12, 16], "texture": "#0"}, + "east": {"uv": [4, 0, 8, 16], "texture": "#0"}, + "south": {"uv": [0, 0, 4, 16], "texture": "#0"}, + "west": {"uv": [12, 0, 16, 16], "texture": "#0"}, + "up": {"uv": [0, 12, 4, 16], "texture": "#0"}, + "down": {"uv": [0, 0, 4, 4], "texture": "#0"} + } + }, + { + "from": [0, 0, 4], + "to": [4, 4, 12], + "rotation": {"angle": 0, "axis": "y", "origin": [0, 0, 4]}, + "faces": { + "east": {"uv": [4, 12, 12, 16], "texture": "#0"}, + "west": {"uv": [4, 12, 12, 16], "texture": "#0"}, + "up": {"uv": [7, 4, 11, 12], "texture": "#0"}, + "down": {"uv": [1, 4, 5, 12], "texture": "#0"} + } + }, + { + "from": [4, 0, 0], + "to": [12, 4, 8], + "rotation": {"angle": 0, "axis": "y", "origin": [4, 0, 4]}, + "faces": { + "north": {"uv": [4, 12, 12, 16], "texture": "#0"}, + "south": {"uv": [4, 12, 12, 16], "texture": "#0"}, + "up": {"uv": [4, 4, 12, 12], "texture": "#0"}, + "down": {"uv": [4, 8, 12, 16], "texture": "#0"} + } + }, + { + "from": [4, 0, 8], + "to": [12, 4, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [4, 0, 4]}, + "faces": { + "north": {"uv": [4, 12, 12, 16], "texture": "#0"}, + "south": {"uv": [4, 12, 12, 16], "texture": "#0"}, + "up": {"uv": [4, 4, 12, 12], "rotation": 180, "texture": "#0"}, + "down": {"uv": [4, 0, 12, 8], "texture": "#0"} + } + }, + { + "from": [12, 0, 4], + "to": [16, 4, 12], + "rotation": {"angle": 0, "axis": "y", "origin": [12, 0, 4]}, + "faces": { + "east": {"uv": [4, 12, 12, 16], "texture": "#0"}, + "west": {"uv": [4, 12, 12, 16], "texture": "#0"}, + "up": {"uv": [7, 4, 11, 12], "texture": "#0"}, + "down": {"uv": [12, 4, 16, 12], "texture": "#0"} + } + }, + { + "from": [12, 12, 4], + "to": [16, 16, 12], + "rotation": {"angle": 0, "axis": "y", "origin": [12, 12, 4]}, + "faces": { + "east": {"uv": [4, 0, 12, 4], "texture": "#0"}, + "west": {"uv": [4, 4, 12, 8], "texture": "#0"}, + "up": {"uv": [12, 4, 16, 12], "texture": "#0"}, + "down": {"uv": [4, 6, 12, 10], "rotation": 90, "texture": "#0"} + } + }, + { + "from": [0, 12, 4], + "to": [4, 16, 12], + "rotation": {"angle": 0, "axis": "y", "origin": [0, 12, 4]}, + "faces": { + "east": {"uv": [5, 4, 13, 8], "texture": "#0"}, + "west": {"uv": [4, 0, 12, 4], "texture": "#0"}, + "up": {"uv": [0, 4, 4, 12], "texture": "#0"}, + "down": {"uv": [4, 5, 12, 9], "rotation": 90, "texture": "#0"} + } + }, + { + "from": [4, 12, 0], + "to": [12, 16, 4], + "rotation": {"angle": 0, "axis": "y", "origin": [4, 12, 0]}, + "faces": { + "north": {"uv": [4, 0, 12, 4], "texture": "#0"}, + "south": {"uv": [4, 4, 12, 8], "texture": "#0"}, + "up": {"uv": [4, 0, 12, 4], "texture": "#0"}, + "down": {"uv": [4, 4, 12, 8], "texture": "#0"} + } + }, + { + "from": [4, 12, 12], + "to": [12, 16, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [4, 12, 12]}, + "faces": { + "north": {"uv": [4, 4, 12, 8], "texture": "#0"}, + "south": {"uv": [4, 0, 12, 4], "texture": "#0"}, + "up": {"uv": [4, 12, 12, 16], "texture": "#0"}, + "down": {"uv": [4, 8, 12, 12], "texture": "#0"} + } + } + ] +} \ No newline at end of file diff --git a/repositories.gradle b/repositories.gradle new file mode 100644 index 00000000..7e002f2b --- /dev/null +++ b/repositories.gradle @@ -0,0 +1,5 @@ +// Add any additional repositories for your dependencies here. + +repositories { + +} diff --git a/settings.gradle.kts b/settings.gradle.kts new file mode 100644 index 00000000..cbf0d00d --- /dev/null +++ b/settings.gradle.kts @@ -0,0 +1,21 @@ + +pluginManagement { + repositories { + maven { + // RetroFuturaGradle + name = "GTNH Maven" + url = uri("https://nexus.gtnewhorizons.com/repository/public/") + mavenContent { + includeGroup("com.gtnewhorizons") + includeGroupByRegex("com\\.gtnewhorizons\\..+") + } + } + gradlePluginPortal() + mavenCentral() + mavenLocal() + } +} + +plugins { + id("com.gtnewhorizons.gtnhsettingsconvention") version("1.0.41") +} diff --git a/src/main/java/com/fouristhenumber/utilitiesinexcess/ClientProxy.java b/src/main/java/com/fouristhenumber/utilitiesinexcess/ClientProxy.java new file mode 100644 index 00000000..b613ece7 --- /dev/null +++ b/src/main/java/com/fouristhenumber/utilitiesinexcess/ClientProxy.java @@ -0,0 +1,104 @@ +package com.fouristhenumber.utilitiesinexcess; + +import static com.fouristhenumber.utilitiesinexcess.UtilitiesInExcess.MODID; + +import net.minecraft.client.Minecraft; +import net.minecraft.client.renderer.RenderHelper; +import net.minecraftforge.client.MinecraftForgeClient; +import net.minecraftforge.common.MinecraftForge; + +import org.lwjgl.opengl.GL11; +import org.lwjgl.opengl.GL12; + +import com.fouristhenumber.utilitiesinexcess.common.renderers.FireBatteryRenderer; +import com.fouristhenumber.utilitiesinexcess.common.renderers.GloveRenderer; +import com.fouristhenumber.utilitiesinexcess.common.renderers.InvertedIngotRenderer; +import com.fouristhenumber.utilitiesinexcess.common.tileentities.TileEntityPortalUnderWorld; +import com.fouristhenumber.utilitiesinexcess.compat.Mods; +import com.fouristhenumber.utilitiesinexcess.compat.findit.FindItHelper; +import com.fouristhenumber.utilitiesinexcess.render.ISBRHUnderworldPortal; +import com.fouristhenumber.utilitiesinexcess.render.TESRUnderworldPortal; +import com.gtnewhorizon.gtnhlib.client.model.loading.ModelRegistry; + +import cpw.mods.fml.client.registry.ClientRegistry; +import cpw.mods.fml.client.registry.RenderingRegistry; +import cpw.mods.fml.common.FMLCommonHandler; +import cpw.mods.fml.common.event.FMLInitializationEvent; +import cpw.mods.fml.common.event.FMLPreInitializationEvent; +import cpw.mods.fml.common.eventhandler.SubscribeEvent; +import cpw.mods.fml.common.gameevent.TickEvent; + +@SuppressWarnings("unused") +public class ClientProxy extends CommonProxy { + + // This is just a number that ticks up every frame. + public static int frameCount = 0; + + @Override + public void preInit(FMLPreInitializationEvent event) { + super.preInit(event); + ModelRegistry.registerModid(MODID); + } + + @Override + public void init(FMLInitializationEvent event) { + super.init(event); + if (ModItems.INVERTED_NUGGET.isEnabled()) { + MinecraftForgeClient.registerItemRenderer(ModItems.INVERTED_INGOT.get(), new InvertedIngotRenderer()); + } + if (ModBlocks.UNDERWORLD_PORTAL.isEnabled()) { + ClientRegistry.bindTileEntitySpecialRenderer(TileEntityPortalUnderWorld.class, new TESRUnderworldPortal()); + RenderingRegistry.registerBlockHandler(ISBRHUnderworldPortal.INSTANCE); + } + if (ModItems.GLOVE.isEnabled()) { + MinecraftForgeClient.registerItemRenderer(ModItems.GLOVE.get(), new GloveRenderer()); + } + if (ModItems.FIRE_BATTERY.isEnabled()) { + MinecraftForgeClient.registerItemRenderer(ModItems.FIRE_BATTERY.get(), new FireBatteryRenderer()); + } + + FMLCommonHandler.instance() + .bus() + .register(this); + + if (Mods.FindIt.isLoaded()) { + FindItHelper.init(); + FindItHelper.INSTANCE = new FindItHelper(); + MinecraftForge.EVENT_BUS.register(FindItHelper.INSTANCE); + } + } + + @SubscribeEvent + public void tickRender(TickEvent.RenderTickEvent event) { + frameCount++; + if (event.phase == TickEvent.Phase.END) { + Minecraft mc = Minecraft.getMinecraft(); + if (!(mc.currentScreen == null && mc.theWorld != null + && Minecraft.isGuiEnabled() + && !mc.gameSettings.keyBindPlayerList.getIsKeyPressed())) return; + + GL11.glPushMatrix(); + + boolean hasBlending = GL11.glGetBoolean(GL11.GL_BLEND); + boolean hasDepthTest = GL11.glGetBoolean(GL11.GL_DEPTH_TEST); + int boundTexIndex = GL11.glGetInteger(GL11.GL_TEXTURE_BINDING_2D); + GL11.glPushAttrib(GL11.GL_CURRENT_BIT); + + GL11.glDisable(GL12.GL_RESCALE_NORMAL); + RenderHelper.disableStandardItemLighting(); + GL11.glDisable(GL11.GL_LIGHTING); + GL11.glDisable(GL11.GL_DEPTH_TEST); + + GloveRenderer.renderGloveHudIcon(); + + if (hasBlending) GL11.glEnable(GL11.GL_BLEND); + else GL11.glDisable(GL11.GL_BLEND); + if (hasDepthTest) GL11.glEnable(GL11.GL_DEPTH_TEST); + else GL11.glDisable(GL11.GL_DEPTH_TEST); + GL11.glBindTexture(GL11.GL_TEXTURE_2D, boundTexIndex); + + GL11.glPopAttrib(); + GL11.glPopMatrix(); + } + } +} diff --git a/src/main/java/com/fouristhenumber/utilitiesinexcess/CommonProxy.java b/src/main/java/com/fouristhenumber/utilitiesinexcess/CommonProxy.java new file mode 100644 index 00000000..74580fca --- /dev/null +++ b/src/main/java/com/fouristhenumber/utilitiesinexcess/CommonProxy.java @@ -0,0 +1,48 @@ +package com.fouristhenumber.utilitiesinexcess; + +import org.lwjgl.input.Keyboard; + +import com.fouristhenumber.utilitiesinexcess.client.IMCForNEI; +import com.fouristhenumber.utilitiesinexcess.common.dimensions.endoftime.EndOfTimeEvents; +import com.fouristhenumber.utilitiesinexcess.common.dimensions.underworld.UnderWorldEvents; +import com.fouristhenumber.utilitiesinexcess.compat.Mods; +import com.fouristhenumber.utilitiesinexcess.network.PacketHandler; +import com.fouristhenumber.utilitiesinexcess.utils.SoundVolumeChecks; +import com.gtnewhorizon.gtnhlib.keybind.SyncedKeybind; + +import cpw.mods.fml.common.event.FMLInitializationEvent; +import cpw.mods.fml.common.event.FMLPostInitializationEvent; +import cpw.mods.fml.common.event.FMLPreInitializationEvent; +import cpw.mods.fml.common.event.FMLServerStartingEvent; + +public class CommonProxy { + + public SoundVolumeChecks soundVolumeChecks; + + public SyncedKeybind GLOVE_KEYBIND; + + public void preInit(FMLPreInitializationEvent event) { + // Config is handled in the early mixin loader (UIEMixinLoader) + // since we want the config to be available + // during mixin initialisation time. + PacketHandler.init(); + ModBlocks.init(); + ModItems.init(); + ModDimensions.init(); + ModBiomes.init(); + UnderWorldEvents.init(); + EndOfTimeEvents.init(); + if (Mods.NEI.isLoaded()) { + IMCForNEI.IMCSender(); + } + } + + public void init(FMLInitializationEvent event) { + soundVolumeChecks = new SoundVolumeChecks(); + GLOVE_KEYBIND = SyncedKeybind.createConfigurable("key.uie.glove", "key.categories.uie", Keyboard.KEY_NONE); + } + + public void postInit(FMLPostInitializationEvent event) {} + + public void serverStarting(FMLServerStartingEvent event) {} +} diff --git a/src/main/java/com/fouristhenumber/utilitiesinexcess/ModBiomes.java b/src/main/java/com/fouristhenumber/utilitiesinexcess/ModBiomes.java new file mode 100644 index 00000000..72523afb --- /dev/null +++ b/src/main/java/com/fouristhenumber/utilitiesinexcess/ModBiomes.java @@ -0,0 +1,50 @@ +package com.fouristhenumber.utilitiesinexcess; + +import java.util.function.Function; + +import net.minecraft.world.biome.BiomeGenBase; + +import com.fouristhenumber.utilitiesinexcess.common.dimensions.endoftime.BiomeGenEndOfTime; +import com.fouristhenumber.utilitiesinexcess.common.dimensions.underworld.BiomeGenUnderWorld; +import com.fouristhenumber.utilitiesinexcess.config.dimensions.EndOfTimeConfig; +import com.fouristhenumber.utilitiesinexcess.config.dimensions.UnderWorldConfig; + +/// Adapted from [ModBlocks] +public enum ModBiomes { + // spotless:off + + // make sure to leave a trailing comma + UNDERWORLD(UnderWorldConfig.enableUnderWorldBiome, UnderWorldConfig.underWorldBiomeId, BiomeGenUnderWorld::new), + END_OF_TIME(EndOfTimeConfig.enableEndOfTimeBiome, EndOfTimeConfig.endOfTimeBiomeId, BiomeGenEndOfTime::new), + ; // leave trailing semicolon + // spotless:on + + public static void init() { + + } + + private final boolean isEnabled; + private final int biomeId; + private final BiomeGenBase biome; + + ModBiomes(boolean isEnabled, int id, Function ctor) { + this.isEnabled = isEnabled; + this.biomeId = id; + + this.biome = isEnabled ? ctor.apply(id) : null; + } + + public boolean isEnabled() { + return isEnabled; + } + + public BiomeGenBase getBiome() { + if (!isEnabled) throw new IllegalStateException("Biome " + name() + " is disabled"); + + return biome; + } + + public int getBiomeId() { + return biomeId; + } +} diff --git a/src/main/java/com/fouristhenumber/utilitiesinexcess/ModBlocks.java b/src/main/java/com/fouristhenumber/utilitiesinexcess/ModBlocks.java new file mode 100644 index 00000000..d6aaecc4 --- /dev/null +++ b/src/main/java/com/fouristhenumber/utilitiesinexcess/ModBlocks.java @@ -0,0 +1,255 @@ +package com.fouristhenumber.utilitiesinexcess; + +import net.minecraft.block.Block; +import net.minecraft.init.Blocks; +import net.minecraft.item.Item; +import net.minecraft.item.ItemBlock; +import net.minecraft.item.ItemStack; + +import com.fouristhenumber.utilitiesinexcess.common.blocks.BlockBedrockium; +import com.fouristhenumber.utilitiesinexcess.common.blocks.BlockBlackoutCurtains; +import com.fouristhenumber.utilitiesinexcess.common.blocks.BlockColored; +import com.fouristhenumber.utilitiesinexcess.common.blocks.BlockCompressed; +import com.fouristhenumber.utilitiesinexcess.common.blocks.BlockConveyor; +import com.fouristhenumber.utilitiesinexcess.common.blocks.BlockCursedEarth; +import com.fouristhenumber.utilitiesinexcess.common.blocks.BlockDecorative; +import com.fouristhenumber.utilitiesinexcess.common.blocks.BlockDecorativeGlass; +import com.fouristhenumber.utilitiesinexcess.common.blocks.BlockDrum; +import com.fouristhenumber.utilitiesinexcess.common.blocks.BlockEnderLotus; +import com.fouristhenumber.utilitiesinexcess.common.blocks.BlockEtherealGlass; +import com.fouristhenumber.utilitiesinexcess.common.blocks.BlockFloating; +import com.fouristhenumber.utilitiesinexcess.common.blocks.BlockInverted; +import com.fouristhenumber.utilitiesinexcess.common.blocks.BlockLapisAetherius; +import com.fouristhenumber.utilitiesinexcess.common.blocks.BlockMagicWood; +import com.fouristhenumber.utilitiesinexcess.common.blocks.BlockMarginallyMaximisedChest; +import com.fouristhenumber.utilitiesinexcess.common.blocks.BlockPacifistsBench; +import com.fouristhenumber.utilitiesinexcess.common.blocks.BlockPortalEndOfTime; +import com.fouristhenumber.utilitiesinexcess.common.blocks.BlockPortalUnderWorld; +import com.fouristhenumber.utilitiesinexcess.common.blocks.BlockPureLove; +import com.fouristhenumber.utilitiesinexcess.common.blocks.BlockRadicallyReducedChest; +import com.fouristhenumber.utilitiesinexcess.common.blocks.BlockRainMuffler; +import com.fouristhenumber.utilitiesinexcess.common.blocks.BlockRedstoneClock; +import com.fouristhenumber.utilitiesinexcess.common.blocks.BlockSignificantlyShrunkChest; +import com.fouristhenumber.utilitiesinexcess.common.blocks.BlockSmartPump; +import com.fouristhenumber.utilitiesinexcess.common.blocks.BlockSoundMuffler; +import com.fouristhenumber.utilitiesinexcess.common.blocks.BlockSpike; +import com.fouristhenumber.utilitiesinexcess.common.blocks.BlockTradingPost; +import com.fouristhenumber.utilitiesinexcess.common.blocks.BlockTrashCanEnergy; +import com.fouristhenumber.utilitiesinexcess.common.blocks.BlockTrashCanFluid; +import com.fouristhenumber.utilitiesinexcess.common.blocks.BlockTrashCanItem; +import com.fouristhenumber.utilitiesinexcess.common.blocks.BlockUpdateDetector; +import com.fouristhenumber.utilitiesinexcess.common.blocks.generators.BlockEnderGenerator; +import com.fouristhenumber.utilitiesinexcess.common.blocks.generators.BlockFoodGenerator; +import com.fouristhenumber.utilitiesinexcess.common.blocks.generators.BlockFurnaceGenerator; +import com.fouristhenumber.utilitiesinexcess.common.blocks.generators.BlockHighTemperatureFurnaceGenerator; +import com.fouristhenumber.utilitiesinexcess.common.blocks.generators.BlockLavaGenerator; +import com.fouristhenumber.utilitiesinexcess.common.blocks.generators.BlockLowTemperatureFurnaceGenerator; +import com.fouristhenumber.utilitiesinexcess.common.blocks.generators.BlockNetherStarGenerator; +import com.fouristhenumber.utilitiesinexcess.common.blocks.generators.BlockPinkGenerator; +import com.fouristhenumber.utilitiesinexcess.common.blocks.generators.BlockPotionGenerator; +import com.fouristhenumber.utilitiesinexcess.common.blocks.generators.BlockRedstoneGenerator; +import com.fouristhenumber.utilitiesinexcess.common.blocks.generators.BlockSolarGenerator; +import com.fouristhenumber.utilitiesinexcess.common.blocks.generators.BlockTNTGenerator; +import com.fouristhenumber.utilitiesinexcess.common.blocks.transfer.BlockRetrievalNode; +import com.fouristhenumber.utilitiesinexcess.common.blocks.transfer.BlockRetrievalNodeFluid; +import com.fouristhenumber.utilitiesinexcess.common.blocks.transfer.BlockTransferNode; +import com.fouristhenumber.utilitiesinexcess.common.blocks.transfer.BlockTransferNodeEnergy; +import com.fouristhenumber.utilitiesinexcess.common.blocks.transfer.BlockTransferNodeFluid; +import com.fouristhenumber.utilitiesinexcess.common.blocks.transfer.BlockTransferNodeHyperEnergy; +import com.fouristhenumber.utilitiesinexcess.common.blocks.transfer.BlockTransferPipe; +import com.fouristhenumber.utilitiesinexcess.config.blocks.BlockConfig; +import com.fouristhenumber.utilitiesinexcess.config.blocks.CursedEarthConfig; +import com.fouristhenumber.utilitiesinexcess.config.blocks.EnderLotusConfig; +import com.fouristhenumber.utilitiesinexcess.config.blocks.GeneratorConfig; +import com.fouristhenumber.utilitiesinexcess.config.dimensions.EndOfTimeConfig; +import com.fouristhenumber.utilitiesinexcess.config.dimensions.UnderWorldConfig; +import com.fouristhenumber.utilitiesinexcess.config.items.InversionConfig; +import com.fouristhenumber.utilitiesinexcess.config.items.ItemConfig; + +import cpw.mods.fml.common.registry.GameRegistry; + +// Credit to Et Futurum (Requiem) +public enum ModBlocks { + // spotless:off + + // make sure to leave a trailing comma + FLOATING_BLOCK(BlockConfig.enableFloatingBlock, new BlockFloating(), BlockFloating.ItemBlockFloating.class, "floating_block"), + COMPRESSED_COBBLESTONE(BlockConfig.enableCompressedCobblestone, new BlockCompressed(Blocks.cobblestone, "compressed_cobblestone"), BlockCompressed.ItemCompressedBlock.class, "compressed_cobblestone"), + COMPRESSED_DIRT(BlockConfig.enableCompressedDirt, new BlockCompressed(Blocks.dirt, "compressed_dirt"), BlockCompressed.ItemCompressedBlock.class, "compressed_dirt"), + COMPRESSED_SAND(BlockConfig.enableCompressedSand, new BlockCompressed(Blocks.sand, "compressed_sand"), BlockCompressed.ItemCompressedBlock.class, "compressed_sand"), + COMPRESSED_GRAVEL(BlockConfig.enableCompressedGravel, new BlockCompressed(Blocks.gravel, "compressed_gravel"), BlockCompressed.ItemCompressedBlock.class, "compressed_gravel"), + COLORED_WOOD_PLANKS(BlockConfig.enableColoredBlocks, new BlockColored(Blocks.planks), BlockColored.ItemBlockColored.class, "colored_planks"), + COLORED_GLOWSTONE(BlockConfig.enableColoredBlocks, new BlockColored(Blocks.glowstone).setLightLevel(1f), BlockColored.ItemBlockColored.class, "colored_glowstone"), + COLORED_STONE(BlockConfig.enableColoredBlocks, new BlockColored(Blocks.stone), BlockColored.ItemBlockColored.class, "colored_stone"), + COLORED_COBBLESTONE(BlockConfig.enableColoredBlocks, new BlockColored(Blocks.cobblestone), BlockColored.ItemBlockColored.class, "colored_cobblestone"), + COLORED_QUARTZ_BLOCK(BlockConfig.enableColoredBlocks, new BlockColored(Blocks.quartz_block, 1f), BlockColored.ItemBlockColored.class, "colored_quartz_block"), + COLORED_SOUL_SAND(BlockConfig.enableColoredBlocks, new BlockColored(Blocks.soul_sand), BlockColored.ItemBlockColored.class, "colored_soul_sand"), + COLORED_REDSTONE_LAMP(BlockConfig.enableColoredBlocks, new BlockColored(Blocks.redstone_lamp).setLightLevel(1f), BlockColored.ItemBlockColored.class, "colored_redstone_lamp"), + COLORED_BRICKS(BlockConfig.enableColoredBlocks, new BlockColored(Blocks.brick_block), BlockColored.ItemBlockColored.class, "colored_bricks"), + COLORED_STONE_BRICKS(BlockConfig.enableColoredBlocks, new BlockColored(Blocks.stonebrick), BlockColored.ItemBlockColored.class, "colored_stone_bricks"), + COLORED_LAPIS_BLOCK(BlockConfig.enableColoredBlocks, new BlockColored(Blocks.lapis_block), BlockColored.ItemBlockColored.class, "colored_lapis_block"), + COLORED_OBSIDIAN(BlockConfig.enableColoredBlocks, new BlockColored(Blocks.obsidian), BlockColored.ItemBlockColored.class, "colored_obsidian"), + COLORED_REDSTONE_BLOCK(BlockConfig.enableColoredBlocks, new BlockColored(Blocks.redstone_block, 2f), BlockColored.ItemBlockColored.class, "colored_redstone_block"), + COLORED_COAL_BLOCK(BlockConfig.enableColoredBlocks, new BlockColored(Blocks.coal_block), BlockColored.ItemBlockColored.class, "colored_coal_block"), + REDSTONE_CLOCK(BlockConfig.enableRedstoneClock, new BlockRedstoneClock(), "redstone_clock"), + ETHEREAL_GLASS(BlockConfig.enableEtherealGlass, new BlockEtherealGlass(), BlockEtherealGlass.ItemBlockEtherealGlass.class, "ethereal_glass"), + TRASH_CAN_ITEM(BlockConfig.enableTrashCanItem, new BlockTrashCanItem(), "trash_can_item"), + TRASH_CAN_FLUID(BlockConfig.enableTrashCanFluid, new BlockTrashCanFluid(), "trash_can_fluid"), + TRASH_CAN_ENERGY(BlockConfig.enableTrashCanEnergy, new BlockTrashCanEnergy(), "trash_can_energy"), + DRUM(BlockConfig.enableDrum, new BlockDrum(16000), BlockDrum.ItemBlockDrum.class, "drum"), + SOUND_MUFFLER(BlockConfig.soundMuffler.enableSoundMuffler, new BlockSoundMuffler(), BlockSoundMuffler.ItemBlockSoundMuffler.class, "sound_muffler"), + RAIN_MUFFLER(BlockConfig.rainMuffler.enableRainMuffler, new BlockRainMuffler(), BlockRainMuffler.ItemBlockRainMuffler.class, "rain_muffler"), + MAGIC_WOOD(BlockConfig.enableMagicWood, new BlockMagicWood(), "magic_wood"), + PURE_LOVE(BlockConfig.pureLove.enablePureLove, new BlockPureLove(), BlockPureLove.ItemBlockPureLove.class, "pure_love"), + MARGINALLY_MAXIMISED_CHEST(BlockConfig.enableMarginallyMaximisedChest, new BlockMarginallyMaximisedChest(), "marginally_maximised_chest"), + SIGNIFICANTLY_SHRUNK_CHEST(BlockConfig.enableSignificantlyShrunkChest, new BlockSignificantlyShrunkChest(), "significantly_shrunk_chest"), + RADICALLY_REDUCED_CHEST(BlockConfig.enableRadicallyReducedChest, new BlockRadicallyReducedChest(), "radically_reduced_chest"), + CURSED_EARTH(CursedEarthConfig.enableCursedEarth, new BlockCursedEarth(false), BlockCursedEarth.ItemBlockCursedEarth.class, "cursed_earth"), + BLESSED_EARTH(CursedEarthConfig.enableBlessedEarth, new BlockCursedEarth(true), BlockCursedEarth.ItemBlockCursedEarth.class, "blessed_earth"), + LAPIS_AETHERIUS(BlockConfig.enableLapisAetherius, new BlockLapisAetherius(), BlockLapisAetherius.ItemLapisAetherius.class, "lapis_aetherius"), + BEDROCKIUM_BLOCK(ItemConfig.enableBedrockium, new BlockBedrockium(), BlockBedrockium.ItemBlockBedrockium.class, "bedrockium_block"), + INVERTED_BLOCK(InversionConfig.enableInvertedIngot, new BlockInverted(), "inverted_block"), + LOW_TEMPERATURE_FURNACE_GENERATOR(GeneratorConfig.enableLowTemperatureFurnaceGenerator, new BlockLowTemperatureFurnaceGenerator("low_temperature_furnace_generator", 1), "low_temperature_furnace_generator"), + LOW_TEMPERATURE_FURNACE_GENERATOR_PLUS(GeneratorConfig.enableLowTemperatureFurnaceGenerator, new BlockLowTemperatureFurnaceGenerator("low_temperature_furnace_generator_plus", 8), "low_temperature_furnace_generator_plus"), + LOW_TEMPERATURE_FURNACE_GENERATOR_PLUSPLUS(GeneratorConfig.enableLowTemperatureFurnaceGenerator, new BlockLowTemperatureFurnaceGenerator("low_temperature_furnace_generator_plusplus", 64), "low_temperature_furnace_generator_plusplus"), + FURNACE_GENERATOR(GeneratorConfig.enableFurnaceGenerator, new BlockFurnaceGenerator("furnace_generator", 1), "furnace_generator"), + FURNACE_GENERATOR_PLUS(GeneratorConfig.enableFurnaceGenerator, new BlockFurnaceGenerator("furnace_generator_plus", 8), "furnace_generator_plus"), + FURNACE_GENERATOR_PLUSPLUS(GeneratorConfig.enableFurnaceGenerator, new BlockFurnaceGenerator("furnace_generator_plusplus", 64), "furnace_generator_plusplus"), + HIGH_TEMPERATURE_FURNACE_GENERATOR(GeneratorConfig.enableHighTemperatureFurnaceGenerator, new BlockHighTemperatureFurnaceGenerator("high_temperature_furnace_generator", 1), "high_temperature_furnace_generator"), + HIGH_TEMPERATURE_FURNACE_GENERATOR_PLUS(GeneratorConfig.enableHighTemperatureFurnaceGenerator, new BlockHighTemperatureFurnaceGenerator("high_temperature_furnace_generator_plus", 8), "high_temperature_furnace_generator_plus"), + HIGH_TEMPERATURE_FURNACE_GENERATOR_PLUSPLUS(GeneratorConfig.enableHighTemperatureFurnaceGenerator, new BlockHighTemperatureFurnaceGenerator("high_temperature_furnace_generator_plusplus", 64), "high_temperature_furnace_generator_plusplus"), + LAVA_GENERATOR(GeneratorConfig.enableLavaGenerator, new BlockLavaGenerator("lava_generator", 1), "lava_generator"), + LAVA_GENERATOR_PLUS(GeneratorConfig.enableLavaGenerator, new BlockLavaGenerator("lava_generator_plus", 8), "lava_generator_plus"), + LAVA_GENERATOR_PLUSPLUS(GeneratorConfig.enableLavaGenerator, new BlockLavaGenerator("lava_generator_plusplus", 64), "lava_generator_plusplus"), + ENDER_GENERATOR(GeneratorConfig.enableEnderGenerator, new BlockEnderGenerator("ender_generator", 1), "ender_generator"), + ENDER_GENERATOR_PLUS(GeneratorConfig.enableEnderGenerator, new BlockEnderGenerator("ender_generator_plus", 8), "ender_generator_plus"), + ENDER_GENERATOR_PLUSPLUS(GeneratorConfig.enableEnderGenerator, new BlockEnderGenerator("ender_generator_plusplus", 64), "ender_generator_plusplus"), + REDSTONE_GENERATOR(GeneratorConfig.enableRedstoneGenerator, new BlockRedstoneGenerator("redstone_generator", 1), "redstone_generator"), + REDSTONE_GENERATOR_PLUS(GeneratorConfig.enableRedstoneGenerator, new BlockRedstoneGenerator("redstone_generator_plus", 8), "redstone_generator_plus"), + REDSTONE_GENERATOR_PLUSPLUS(GeneratorConfig.enableRedstoneGenerator, new BlockRedstoneGenerator("redstone_generator_plusplus", 64), "redstone_generator_plusplus"), + FOOD_GENERATOR(GeneratorConfig.enableFoodGenerator, new BlockFoodGenerator("food_generator", 1), "food_generator"), + FOOD_GENERATOR_PLUS(GeneratorConfig.enableFoodGenerator, new BlockFoodGenerator("food_generator_plus", 8), "food_generator_plus"), + FOOD_GENERATOR_PLUSPLUS(GeneratorConfig.enableFoodGenerator, new BlockFoodGenerator("food_generator_plusplus", 64), "food_generator_plusplus"), + POTION_GENERATOR(GeneratorConfig.enablePotionGenerator, new BlockPotionGenerator("potion_generator", 1), "potion_generator"), + POTION_GENERATOR_PLUS(GeneratorConfig.enablePotionGenerator, new BlockPotionGenerator("potion_generator_plus", 8), "potion_generator_plus"), + POTION_GENERATOR_PLUSPLUS(GeneratorConfig.enablePotionGenerator, new BlockPotionGenerator("potion_generator_plusplus", 64), "potion_generator_plusplus"), + SOLAR_GENERATOR(GeneratorConfig.enableSolarGenerator, new BlockSolarGenerator("solar_generator", 1), "solar_generator"), + SOLAR_GENERATOR_PLUS(GeneratorConfig.enableSolarGenerator, new BlockSolarGenerator("solar_generator_plus", 8), "solar_generator_plus"), + SOLAR_GENERATOR_PLUSPLUS(GeneratorConfig.enableSolarGenerator, new BlockSolarGenerator("solar_generator_plusplus", 64), "solar_generator_plusplus"), + TNT_GENERATOR(GeneratorConfig.enableTNTGenerator, new BlockTNTGenerator("tnt_generator", 1), "tnt_generator"), + TNT_GENERATOR_PLUS(GeneratorConfig.enableTNTGenerator, new BlockTNTGenerator("tnt_generator_plus", 8), "tnt_generator_plus"), + TNT_GENERATOR_PLUSPLUS(GeneratorConfig.enableTNTGenerator, new BlockTNTGenerator("tnt_generator_plusplus", 64), "tnt_generator_plusplus"), + PINK_GENERATOR(GeneratorConfig.enablePinkGenerator, new BlockPinkGenerator("pink_generator", 1), "pink_generator"), + PINK_GENERATOR_PLUS(GeneratorConfig.enablePinkGenerator, new BlockPinkGenerator("pink_generator_plus", 8), "pink_generator_plus"), + PINK_GENERATOR_PLUSPLUS(GeneratorConfig.enablePinkGenerator, new BlockPinkGenerator("pink_generator_plusplus", 64), "pink_generator_plusplus"), + NETHER_STAR_GENERATOR(GeneratorConfig.enableNetherStarGenerator, new BlockNetherStarGenerator("nether_star_generator", 1), "nether_star_generator"), + NETHER_STAR_GENERATOR_PLUS(GeneratorConfig.enableNetherStarGenerator, new BlockNetherStarGenerator("nether_star_generator_plus", 8), "nether_star_generator_plus"), + NETHER_STAR_GENERATOR_PLUSPLUS(GeneratorConfig.enableNetherStarGenerator, new BlockNetherStarGenerator("nether_star_generator_plusplus", 64), "nether_star_generator_plusplus"), + BLOCK_UPDATE_DETECTOR(BlockConfig.enableBlockUpdateDetector, new BlockUpdateDetector(), "block_update_detector"), + ENDER_LOTUS(EnderLotusConfig.enableEnderLotus, new BlockEnderLotus(), null, "ender_lotus"), + BLACKOUT_CURTAINS(BlockConfig.enableBlackoutCurtains, new BlockBlackoutCurtains(), "blackout_curtains"), + CONVEYOR(BlockConfig.enableConveyor, new BlockConveyor(), BlockConveyor.ItemBlockConveyor.class, "conveyor"), + SPIKE_WOOD(BlockConfig.spikes.enableWoodenSpike, new BlockSpike(BlockSpike.SpikeType.WOOD, "wood_spike"), BlockSpike.ItemSpike.class, "wood_spike"), + SPIKE_IRON(BlockConfig.spikes.enableIronSpike, new BlockSpike(BlockSpike.SpikeType.IRON, "iron_spike"), BlockSpike.ItemSpike.class, "iron_spike"), + SPIKE_GOLD(BlockConfig.spikes.enableGoldSpike, new BlockSpike(BlockSpike.SpikeType.GOLD, "gold_spike"), BlockSpike.ItemSpike.class, "gold_spike"), + SPIKE_DIAMOND(BlockConfig.spikes.enableDiamondSpike, new BlockSpike(BlockSpike.SpikeType.DIAMOND, "diamond_spike"), BlockSpike.ItemSpike.class, "diamond_spike"), + UNDERWORLD_PORTAL(BlockConfig.enableUnderWorldPortal && UnderWorldConfig.enableUnderWorld, new BlockPortalUnderWorld(), "underworld_portal"), + END_OF_TIME_PORTAL(BlockConfig.enableEndOfTimePortal && EndOfTimeConfig.enableEndOfTime, new BlockPortalEndOfTime(), BlockPortalEndOfTime.ItemBlockPortalEndOfTime.class, "temporal_gate"), + DECORATIVE_GLASS(BlockConfig.enableDecorativeGlass, new BlockDecorativeGlass(), BlockDecorativeGlass.ItemBlockDecorativeGlass.class, "decorative_glass"), + PACIFISTS_BENCH(BlockConfig.enablePacifistsBench, new BlockPacifistsBench(), "pacifists_bench"), + SMART_PUMP(BlockConfig.enableSmartPump, new BlockSmartPump(), "smart_pump"), + TRADING_POST(BlockConfig.enableTradingPost, new BlockTradingPost(), "trading_post"), + DECORATIVE_BLOCKS(BlockConfig.enableDecorativeBlocks, new BlockDecorative(), BlockDecorative.ItemBlockDecorative.class, "decorative_block"), + //TODO: Config + TRANSFER_PIPE(true, new BlockTransferPipe(), "transfer_pipe"), + TRANSFER_NODE(true, new BlockTransferNode(), "transfer_node"), + TRANSFER_NODE_FLUID(true, new BlockTransferNodeFluid(), "transfer_node_fluid"), + TRANSFER_NODE_ENERGY(true, new BlockTransferNodeEnergy(), "transfer_node_energy"), + TRANSFER_NODE_HYPER_ENERGY(true, new BlockTransferNodeHyperEnergy(), "transfer_node_hyper_energy"), + RETRIEVAL_NODE(true, new BlockRetrievalNode(), "retrieval_node"), + RETRIEVAL_NODE_FLUID(true, new BlockRetrievalNodeFluid(), "retrieval_node_fluid"), + ; // leave trailing semicolon + // spotless:on + + public static final ModBlocks[] VALUES = values(); + + public static void init() { + for (ModBlocks block : VALUES) { + if (block.isEnabled()) { + block.theBlock.setCreativeTab(UtilitiesInExcess.uieTab); + if (block.getItemBlock() != null || !block.getHasItemBlock()) { + GameRegistry.registerBlock(block.get(), block.getItemBlock(), block.name); + // This part is used if the getItemBlock() is not ItemBlock.class, so we register a custom ItemBlock + // class as the ItemBlock + // It is also used if the getItemBlock() == null and getHasItemBlock() is false, meaning we WANT to + // register it as null, making the block have no inventory item. + } else { + GameRegistry.registerBlock(block.get(), block.name); + // Used if getItemBlock() == null but getHasItemBlock() is true, registering it with a default + // inventory item. + } + } + } + } + + private final boolean isEnabled; + private final Block theBlock; + /** + * null == default ItemBlock + */ + private final Class extends ItemBlock> itemBlock; + /** + * Determines if we should register the block with an ItemBlock. + * Set to false when the constructor that specifies the ItemBlock is specifically set to false. + */ + private boolean hasItemBlock; + private final String name; + + ModBlocks(Boolean enabled, Block block, String name) { + this(enabled, block, null, name); + hasItemBlock = true; + } + + ModBlocks(Boolean enabled, Block block, Class extends ItemBlock> iblock, String name) { + isEnabled = enabled; + theBlock = block; + itemBlock = iblock; + hasItemBlock = iblock != null; + this.name = name; + } + + /** + * If this is false, the block is initialized without an inventory item, or ItemBlock. + */ + public boolean getHasItemBlock() { + return hasItemBlock; + } + + public Block get() { + return theBlock; + } + + public Class extends ItemBlock> getItemBlock() { + return itemBlock; + } + + public Item getItem() { + return Item.getItemFromBlock(get()); + } + + public boolean isEnabled() { + return isEnabled; + } + + public ItemStack newItemStack() { + return newItemStack(1); + } + + public ItemStack newItemStack(int count) { + return newItemStack(count, 0); + } + + public ItemStack newItemStack(int count, int meta) { + return new ItemStack(this.get(), count, meta); + } +} diff --git a/src/main/java/com/fouristhenumber/utilitiesinexcess/ModDimensions.java b/src/main/java/com/fouristhenumber/utilitiesinexcess/ModDimensions.java new file mode 100644 index 00000000..e7703923 --- /dev/null +++ b/src/main/java/com/fouristhenumber/utilitiesinexcess/ModDimensions.java @@ -0,0 +1,57 @@ +package com.fouristhenumber.utilitiesinexcess; + +import net.minecraft.world.WorldProvider; +import net.minecraftforge.common.DimensionManager; + +import com.fouristhenumber.utilitiesinexcess.common.dimensions.endoftime.WorldProviderEndOfTime; +import com.fouristhenumber.utilitiesinexcess.common.dimensions.underworld.WorldProviderUnderWorld; +import com.fouristhenumber.utilitiesinexcess.config.dimensions.EndOfTimeConfig; +import com.fouristhenumber.utilitiesinexcess.config.dimensions.UnderWorldConfig; + +/// Adapted from [ModBlocks] +public enum ModDimensions { + // spotless:off + + // make sure to leave a trailing comma + UNDERWORLD(UnderWorldConfig.enableUnderWorld, UnderWorldConfig.underWorldDimensionId, WorldProviderUnderWorld.class), + END_OF_TIME(EndOfTimeConfig.enableEndOfTime, EndOfTimeConfig.endOfTimeDimensionId, WorldProviderEndOfTime.class), + ; // leave trailing semicolon + // spotless:on + + public static final ModDimensions[] VALUES = values(); + + public static void init() { + for (ModDimensions dimension : VALUES) { + if (dimension.isEnabled()) { + DimensionManager.registerProviderType(dimension.providerId, dimension.provider, dimension.keepLoaded); + DimensionManager.registerDimension(dimension.dimensionId, dimension.providerId); + } + } + } + + private final boolean isEnabled; + private final int providerId, dimensionId; + /** + * null == default ItemBlock + */ + private final Class extends WorldProvider> provider; + private final boolean keepLoaded; + + ModDimensions(boolean isEnabled, int id, Class extends WorldProvider> provider) { + this(isEnabled, id, id, provider, false); + } + + ModDimensions(boolean isEnabled, int providerId, int dimensionId, Class extends WorldProvider> provider, + boolean keepLoaded) { + this.isEnabled = isEnabled; + this.providerId = providerId; + this.dimensionId = dimensionId; + this.provider = provider; + this.keepLoaded = keepLoaded; + } + + public boolean isEnabled() { + return isEnabled; + } + +} diff --git a/src/main/java/com/fouristhenumber/utilitiesinexcess/ModItems.java b/src/main/java/com/fouristhenumber/utilitiesinexcess/ModItems.java new file mode 100644 index 00000000..b77327ef --- /dev/null +++ b/src/main/java/com/fouristhenumber/utilitiesinexcess/ModItems.java @@ -0,0 +1,124 @@ +package com.fouristhenumber.utilitiesinexcess; + +import net.minecraft.item.Item; +import net.minecraft.item.ItemArmor; +import net.minecraft.item.ItemStack; + +import com.fouristhenumber.utilitiesinexcess.common.items.ItemAnalyzer; +import com.fouristhenumber.utilitiesinexcess.common.items.ItemArchitectsWand; +import com.fouristhenumber.utilitiesinexcess.common.items.ItemBedrockiumIngot; +import com.fouristhenumber.utilitiesinexcess.common.items.ItemDisabled; +import com.fouristhenumber.utilitiesinexcess.common.items.ItemEnderLotusSeed; +import com.fouristhenumber.utilitiesinexcess.common.items.ItemFireBattery; +import com.fouristhenumber.utilitiesinexcess.common.items.ItemGlove; +import com.fouristhenumber.utilitiesinexcess.common.items.ItemGoldenBag; +import com.fouristhenumber.utilitiesinexcess.common.items.ItemHeavenlyRing; +import com.fouristhenumber.utilitiesinexcess.common.items.ItemInversionSigilActive; +import com.fouristhenumber.utilitiesinexcess.common.items.ItemInversionSigilInactive; +import com.fouristhenumber.utilitiesinexcess.common.items.ItemInvertedIngot; +import com.fouristhenumber.utilitiesinexcess.common.items.ItemMobJar; +import com.fouristhenumber.utilitiesinexcess.common.items.ItemPseudoInversionSigil; +import com.fouristhenumber.utilitiesinexcess.common.items.ItemUpgrade; +import com.fouristhenumber.utilitiesinexcess.common.items.ItemWateringCan; +import com.fouristhenumber.utilitiesinexcess.common.items.ItemXRayGlasses; +import com.fouristhenumber.utilitiesinexcess.common.items.tools.ItemAntiParticulateShovel; +import com.fouristhenumber.utilitiesinexcess.common.items.tools.ItemDestructionPickaxe; +import com.fouristhenumber.utilitiesinexcess.common.items.tools.ItemEthericSword; +import com.fouristhenumber.utilitiesinexcess.common.items.tools.ItemGluttonsAxe; +import com.fouristhenumber.utilitiesinexcess.common.items.tools.ItemPrecisionShears; +import com.fouristhenumber.utilitiesinexcess.common.items.tools.ItemReversingHoe; +import com.fouristhenumber.utilitiesinexcess.config.blocks.EnderLotusConfig; +import com.fouristhenumber.utilitiesinexcess.config.items.FireBatteryConfig; +import com.fouristhenumber.utilitiesinexcess.config.items.InversionConfig; +import com.fouristhenumber.utilitiesinexcess.config.items.ItemConfig; +import com.fouristhenumber.utilitiesinexcess.config.items.WateringCanConfig; +import com.fouristhenumber.utilitiesinexcess.config.items.unstabletools.AntiParticulateShovelConfig; +import com.fouristhenumber.utilitiesinexcess.config.items.unstabletools.DestructionPickaxeConfig; +import com.fouristhenumber.utilitiesinexcess.config.items.unstabletools.EthericSwordConfig; +import com.fouristhenumber.utilitiesinexcess.config.items.unstabletools.GluttonsAxeConfig; +import com.fouristhenumber.utilitiesinexcess.config.items.unstabletools.PrecisionShearsConfig; +import com.fouristhenumber.utilitiesinexcess.config.items.unstabletools.ReversingHoeConfig; + +import cpw.mods.fml.common.registry.GameRegistry; + +// Credit to Et Futurum (Requiem) +public enum ModItems { + // spotless:off + + // make sure to leave a trailing comma + GLUTTONS_AXE(GluttonsAxeConfig.enable, new ItemGluttonsAxe(), "gluttons_axe"), + DESTRUCTION_PICKAXE(DestructionPickaxeConfig.enable, new ItemDestructionPickaxe(), "destruction_pickaxe"), + ANTI_PARTICULATE_SHOVEL(AntiParticulateShovelConfig.enable, new ItemAntiParticulateShovel(), "anti_particulate_shovel"), + PRECISION_SHEARS(PrecisionShearsConfig.enable, new ItemPrecisionShears(), "precision_shears"), + ETHERIC_SWORD(EthericSwordConfig.enable, new ItemEthericSword(), "etheric_sword"), + REVERSING_HOE(ReversingHoeConfig.enable, new ItemReversingHoe(), "reversing_hoe"), + HEAVENLY_RING(ItemConfig.enableHeavenlyRing, new ItemHeavenlyRing(), "heavenly_ring"), + MOB_JAR(ItemConfig.enableMobJar, new ItemMobJar(), "mob_jar"), + WATERING_CAN_BASIC(WateringCanConfig.wateringCan.Tier.enableWateringCanBasic, new ItemWateringCan(1,3), "watering_can_basic"), + WATERING_CAN_ADVANCED(WateringCanConfig.wateringCan.Tier.enableWateringCanAdvanced, new ItemWateringCan(2,5), "watering_can_advanced"), + WATERING_CAN_ELITE(WateringCanConfig.wateringCan.Tier.enableWateringCanElite, new ItemWateringCan(3,7), "watering_can_elite"), + INVERSION_SIGIL_INACTIVE(InversionConfig.enableInversionSigil, new ItemInversionSigilInactive(), "inversion_sigil_inactive"), + INVERSION_SIGIL_ACTIVE(InversionConfig.enableInversionSigil, new ItemInversionSigilActive(), "inversion_sigil_active"), + PSEUDO_INVERSION_SIGIL(InversionConfig.enableInversionSigil, new ItemPseudoInversionSigil(), "pseudo_inversion_sigil"), + INVERTED_INGOT(InversionConfig.enableInvertedIngot, new ItemInvertedIngot(), "inverted_ingot"), + INVERTED_NUGGET(InversionConfig.enableInvertedIngot, new ItemInvertedIngot.InvertedNugget(), "inverted_nugget"), + ARCHITECTS_WAND(ItemConfig.enableArchitectsWand, new ItemArchitectsWand(ItemConfig.architectsWandBuildLimit).setTextureName("utilitiesinexcess:architects_wand"), "architects_wand"), + SUPER_ARCHITECTS_WAND(ItemConfig.enableSuperArchitectsWand, new ItemArchitectsWand(ItemConfig.superArchitectsWandBuildLimit).setTextureName("utilitiesinexcess:super_architects_wand"), "super_architects_wand"), + BEDROCKIUM_INGOT(ItemConfig.enableBedrockium, new ItemBedrockiumIngot().setUnlocalizedName("bedrockium_ingot").setTextureName("utilitiesinexcess:bedrockium_ingot"), "bedrockium_ingot"), + FIRE_BATTERY(FireBatteryConfig.enableFireBattery, new ItemFireBattery(), "fire_battery"), + GOLDEN_BAG(ItemConfig.enableGoldenBagOfHolding, new ItemGoldenBag(), "golden_bag"), + ENDER_LOTUS_SEED(EnderLotusConfig.enableEnderLotus, new ItemEnderLotusSeed(ModBlocks.ENDER_LOTUS.get()), "ender_lotus_seed"), + XRAY_GLASSES(ItemConfig.enableXRayGlasses, new ItemXRayGlasses(ItemArmor.ArmorMaterial.IRON, 0, 0), "xray_glasses"), + BLOCK_ANALYZER(ItemConfig.enableBlockAnalyzer, new ItemAnalyzer(), "block_analyzer"), + GLOVE(ItemConfig.enableGlove, new ItemGlove(), "glove"), + // todo config + UPGRADE(true, new ItemUpgrade(), "upgrade"), + + + ; // leave trailing semicolon + // spotless:on + + public static final ModItems[] VALUES = values(); + + public static void init() { + for (ModItems item : VALUES) { + if (item.isEnabled()) { + item.theItem.setCreativeTab(UtilitiesInExcess.uieTab); + GameRegistry.registerItem(item.get(), item.name); + } else if (ItemConfig.registerDisabledItems) GameRegistry.registerItem(item.disabledVersion, item.name); + } + } + + private final boolean isEnabled; + private final Item theItem; + private final String name; + private final ItemDisabled disabledVersion; + + ModItems(boolean enabled, Item item, String name) { + this.isEnabled = enabled; + theItem = item; + this.name = name; + if (ItemConfig.registerDisabledItems) disabledVersion = new ItemDisabled(theItem); + else disabledVersion = null; + } + + public boolean isEnabled() { + return isEnabled; + } + + public Item get() { + return theItem; + } + + public ItemStack newItemStack() { + return newItemStack(1); + } + + public ItemStack newItemStack(int count) { + return newItemStack(count, 0); + } + + public ItemStack newItemStack(int count, int meta) { + return new ItemStack(this.get(), count, meta); + } +} diff --git a/src/main/java/com/fouristhenumber/utilitiesinexcess/UtilitiesInExcess.java b/src/main/java/com/fouristhenumber/utilitiesinexcess/UtilitiesInExcess.java new file mode 100644 index 00000000..56339537 --- /dev/null +++ b/src/main/java/com/fouristhenumber/utilitiesinexcess/UtilitiesInExcess.java @@ -0,0 +1,238 @@ +package com.fouristhenumber.utilitiesinexcess; + +import com.fouristhenumber.utilitiesinexcess.common.tileentities.transfer.TileEntityRetrievalNode; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.WeightedRandomChestContent; +import net.minecraftforge.common.ChestGenHooks; +import net.minecraftforge.common.ForgeChunkManager; +import net.minecraftforge.common.MinecraftForge; + +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +import com.fouristhenumber.utilitiesinexcess.common.recipe.RecipeLoader; +import com.fouristhenumber.utilitiesinexcess.common.renderers.BlackoutCurtainsRenderer; +import com.fouristhenumber.utilitiesinexcess.common.renderers.LapisAetheriusRenderer; +import com.fouristhenumber.utilitiesinexcess.common.renderers.SpikeRenderer; +import com.fouristhenumber.utilitiesinexcess.common.renderers.transfer.TransferNodeRenderer; +import com.fouristhenumber.utilitiesinexcess.common.renderers.transfer.TransferPipeRenderer; +import com.fouristhenumber.utilitiesinexcess.common.tileentities.TileEntityBlockUpdateDetector; +import com.fouristhenumber.utilitiesinexcess.common.tileentities.TileEntityConveyor; +import com.fouristhenumber.utilitiesinexcess.common.tileentities.TileEntityDrum; +import com.fouristhenumber.utilitiesinexcess.common.tileentities.TileEntityMarginallyMaximisedChest; +import com.fouristhenumber.utilitiesinexcess.common.tileentities.TileEntityPacifistsBench; +import com.fouristhenumber.utilitiesinexcess.common.tileentities.TileEntityPortalUnderWorld; +import com.fouristhenumber.utilitiesinexcess.common.tileentities.TileEntityPureLove; +import com.fouristhenumber.utilitiesinexcess.common.tileentities.TileEntityRadicallyReducedChest; +import com.fouristhenumber.utilitiesinexcess.common.tileentities.TileEntityRainMuffler; +import com.fouristhenumber.utilitiesinexcess.common.tileentities.TileEntityRedstoneClock; +import com.fouristhenumber.utilitiesinexcess.common.tileentities.TileEntitySignificantlyShrunkChest; +import com.fouristhenumber.utilitiesinexcess.common.tileentities.TileEntitySmartPump; +import com.fouristhenumber.utilitiesinexcess.common.tileentities.TileEntitySoundMuffler; +import com.fouristhenumber.utilitiesinexcess.common.tileentities.TileEntitySpike; +import com.fouristhenumber.utilitiesinexcess.common.tileentities.TileEntityTradingPost; +import com.fouristhenumber.utilitiesinexcess.common.tileentities.TileEntityTrashCanEnergy; +import com.fouristhenumber.utilitiesinexcess.common.tileentities.TileEntityTrashCanFluid; +import com.fouristhenumber.utilitiesinexcess.common.tileentities.TileEntityTrashCanItem; +import com.fouristhenumber.utilitiesinexcess.common.tileentities.generators.TileEntityEnderGenerator; +import com.fouristhenumber.utilitiesinexcess.common.tileentities.generators.TileEntityFoodGenerator; +import com.fouristhenumber.utilitiesinexcess.common.tileentities.generators.TileEntityFurnaceGenerator; +import com.fouristhenumber.utilitiesinexcess.common.tileentities.generators.TileEntityHighTemperatureFurnaceGenerator; +import com.fouristhenumber.utilitiesinexcess.common.tileentities.generators.TileEntityLavaGenerator; +import com.fouristhenumber.utilitiesinexcess.common.tileentities.generators.TileEntityLowTemperatureFurnaceGenerator; +import com.fouristhenumber.utilitiesinexcess.common.tileentities.generators.TileEntityNetherStarGenerator; +import com.fouristhenumber.utilitiesinexcess.common.tileentities.generators.TileEntityPinkGenerator; +import com.fouristhenumber.utilitiesinexcess.common.tileentities.generators.TileEntityPotionGenerator; +import com.fouristhenumber.utilitiesinexcess.common.tileentities.generators.TileEntityRedstoneGenerator; +import com.fouristhenumber.utilitiesinexcess.common.tileentities.generators.TileEntitySolarGenerator; +import com.fouristhenumber.utilitiesinexcess.common.tileentities.generators.TileEntityTNTGenerator; +import com.fouristhenumber.utilitiesinexcess.common.tileentities.transfer.TileEntityTransferNode; +import com.fouristhenumber.utilitiesinexcess.common.tileentities.transfer.TileEntityTransferNodeFluid; +import com.fouristhenumber.utilitiesinexcess.common.tileentities.transfer.TileEntityTransferPipe; +import com.fouristhenumber.utilitiesinexcess.common.worldgen.WorldGenEnderLotus; +import com.fouristhenumber.utilitiesinexcess.compat.Mods; +import com.fouristhenumber.utilitiesinexcess.compat.crafttweaker.QEDCraftTweakerSupport; +import com.fouristhenumber.utilitiesinexcess.compat.tinkers.TinkersCompat; +import com.fouristhenumber.utilitiesinexcess.config.OtherConfig; +import com.fouristhenumber.utilitiesinexcess.utils.FMLEventHandler; +import com.fouristhenumber.utilitiesinexcess.utils.ForgeEventHandler; +import com.fouristhenumber.utilitiesinexcess.utils.PinkFuelHelper; +import com.fouristhenumber.utilitiesinexcess.utils.PumpChunkLoadingCallback; + +import cpw.mods.fml.client.registry.RenderingRegistry; +import cpw.mods.fml.common.FMLCommonHandler; +import cpw.mods.fml.common.Mod; +import cpw.mods.fml.common.SidedProxy; +import cpw.mods.fml.common.event.FMLInitializationEvent; +import cpw.mods.fml.common.event.FMLPostInitializationEvent; +import cpw.mods.fml.common.event.FMLPreInitializationEvent; +import cpw.mods.fml.common.event.FMLServerStartingEvent; +import cpw.mods.fml.common.registry.GameRegistry; +import minetweaker.MineTweakerAPI; + +@Mod( + modid = UtilitiesInExcess.MODID, + version = Tags.VERSION, + name = "UtilitiesInExcess", + acceptedMinecraftVersions = "[1.7.10]", + dependencies = "required-after:gtnhlib@[0.6.31,)") +public class UtilitiesInExcess { + + public static final String MODID = "utilitiesinexcess"; + public static final Logger LOG = LogManager.getLogger(MODID); + + @Mod.Instance(MODID) + public static UtilitiesInExcess uieInstance; + + public static int lapisAetheriusRenderID; + public static int blackoutCurtainsRenderID; + public static int spikeRenderID; + public static int transferPipeRenderID; + public static int transferNodeRenderID; + + @SidedProxy( + clientSide = "com.fouristhenumber.utilitiesinexcess.ClientProxy", + serverSide = "com.fouristhenumber.utilitiesinexcess.CommonProxy") + public static CommonProxy proxy; + + @Mod.EventHandler + public void preInit(FMLPreInitializationEvent event) { + GameRegistry.registerTileEntity(TileEntitySpike.class, "utilitiesinexcess:TileEntitySpike"); + proxy.preInit(event); + } + + @Mod.EventHandler + public void init(FMLInitializationEvent event) { + proxy.init(event); + + RecipeLoader.run(); + + MinecraftForge.EVENT_BUS.register(new ForgeEventHandler()); + FMLCommonHandler.instance() + .bus() + .register(new FMLEventHandler()); + + GameRegistry.registerTileEntity(TileEntityRedstoneClock.class, "TileEntityRedstoneClockUIE"); + GameRegistry.registerTileEntity(TileEntityTrashCanItem.class, "TileEntityTrashCanItemUIE"); + GameRegistry.registerTileEntity(TileEntityTrashCanFluid.class, "TileEntityTrashCanFluidUIE"); + GameRegistry.registerTileEntity(TileEntityTrashCanEnergy.class, "TileEntityTrashCanEnergyUIE"); + GameRegistry.registerTileEntity(TileEntityDrum.class, "TileEntityDrumUIE"); + GameRegistry.registerTileEntity(TileEntityPureLove.class, "TileEntityPureLoveUIE"); + GameRegistry + .registerTileEntity(TileEntityMarginallyMaximisedChest.class, "TileEntityMarginallyMaximisedChestUIE"); + GameRegistry + .registerTileEntity(TileEntitySignificantlyShrunkChest.class, "TileEntitySignificantlyShrunkChestUIE"); + GameRegistry.registerTileEntity(TileEntityRadicallyReducedChest.class, "TileEntityRadicallyReducedChestUIE"); + GameRegistry.registerTileEntity(TileEntitySoundMuffler.class, "TileEntitySoundMufflerUIE"); + GameRegistry.registerTileEntity(TileEntityRainMuffler.class, "TileEntityRainMufflerUIE"); + GameRegistry.registerTileEntity(TileEntityBlockUpdateDetector.class, "TileEntityBlockUpdateDetector"); + GameRegistry.registerTileEntity(TileEntityConveyor.class, "TileEntityConveyor"); + GameRegistry.registerTileEntity(TileEntityPortalUnderWorld.class, "TileEntityPortalUnderWorld"); + GameRegistry.registerTileEntity(TileEntityBlockUpdateDetector.class, "TileEntityBlockUpdateDetectorUIE"); + GameRegistry.registerTileEntity(TileEntityConveyor.class, "TileEntityConveyorUIE"); + GameRegistry.registerTileEntity(TileEntityPortalUnderWorld.class, "TileEntityPortalUnderWorldUIE"); + GameRegistry.registerTileEntity(TileEntitySmartPump.class, "TileEntitySmartPumpUIE"); + GameRegistry.registerTileEntity( + TileEntityLowTemperatureFurnaceGenerator.class, + "TileEntityLowTemperatureFurnaceGeneratorUIE"); + GameRegistry.registerTileEntity(TileEntityFurnaceGenerator.class, "TileEntityFurnaceGeneratorUIE"); + GameRegistry.registerTileEntity( + TileEntityHighTemperatureFurnaceGenerator.class, + "TileEntityHighTemperatureFurnaceGeneratorUIE"); + GameRegistry.registerTileEntity(TileEntityLavaGenerator.class, "TileEntityLavaGeneratorUIE"); + GameRegistry.registerTileEntity(TileEntityEnderGenerator.class, "TileEntityEnderGeneratorUIE"); + GameRegistry.registerTileEntity(TileEntityRedstoneGenerator.class, "TileEntityRedstoneGeneratorUIE"); + GameRegistry.registerTileEntity(TileEntityFoodGenerator.class, "TileEntityFoodGeneratorUIE"); + GameRegistry.registerTileEntity(TileEntityPotionGenerator.class, "TileEntityPotionGeneratorUIE"); + GameRegistry.registerTileEntity(TileEntitySolarGenerator.class, "TileEntitySolarGeneratorUIE"); + GameRegistry.registerTileEntity(TileEntityTNTGenerator.class, "TileEntityTNTGeneratorUIE"); + GameRegistry.registerTileEntity(TileEntityPinkGenerator.class, "TileEntityPinkGeneratorUIE"); + GameRegistry.registerTileEntity(TileEntityNetherStarGenerator.class, "TileEntityNetherStarGeneratorUIE"); + GameRegistry.registerTileEntity(TileEntityPacifistsBench.class, "TileEntityPacifistsBenchUIE"); + GameRegistry.registerTileEntity(TileEntityTradingPost.class, "TileEntityTradingPostUIE"); + GameRegistry.registerTileEntity(TileEntityTransferPipe.class, "TileEntityTransferPipeUIE"); + GameRegistry.registerTileEntity(TileEntityRetrievalNode.class,"TileEntityRetrievalNodeUIE"); // not sure if i did the naming correctly + GameRegistry.registerTileEntity(TileEntityTransferNode.class, "TileEntityTransferNodeUIE"); + GameRegistry.registerTileEntity(TileEntityTransferNodeFluid.class, "TileEntityTransferNodeFluidUIE"); + + lapisAetheriusRenderID = RenderingRegistry.getNextAvailableRenderId(); + RenderingRegistry.registerBlockHandler(new LapisAetheriusRenderer()); + blackoutCurtainsRenderID = RenderingRegistry.getNextAvailableRenderId(); + RenderingRegistry.registerBlockHandler(new BlackoutCurtainsRenderer()); + spikeRenderID = RenderingRegistry.getNextAvailableRenderId(); + RenderingRegistry.registerBlockHandler(new SpikeRenderer()); + transferPipeRenderID = RenderingRegistry.getNextAvailableRenderId(); + RenderingRegistry.registerBlockHandler(new TransferPipeRenderer()); + transferNodeRenderID = RenderingRegistry.getNextAvailableRenderId(); + RenderingRegistry.registerBlockHandler(new TransferNodeRenderer()); + + GameRegistry.registerWorldGenerator(new WorldGenEnderLotus(), 10); + + if (ModItems.ENDER_LOTUS_SEED.isEnabled()) { + ChestGenHooks.addItem( + ChestGenHooks.DUNGEON_CHEST, + new WeightedRandomChestContent(ModItems.ENDER_LOTUS_SEED.get(), 0, 1, 2, 8)); + } + if (ModItems.INVERSION_SIGIL_INACTIVE.isEnabled()) { + ChestGenHooks.addItem( + ChestGenHooks.DUNGEON_CHEST, + new WeightedRandomChestContent(ModItems.INVERSION_SIGIL_INACTIVE.get(), 0, 1, 1, 2)); + ChestGenHooks.addItem( + ChestGenHooks.MINESHAFT_CORRIDOR, + new WeightedRandomChestContent(ModItems.INVERSION_SIGIL_INACTIVE.get(), 0, 1, 1, 1)); + ChestGenHooks.addItem( + ChestGenHooks.PYRAMID_DESERT_CHEST, + new WeightedRandomChestContent(ModItems.INVERSION_SIGIL_INACTIVE.get(), 0, 1, 1, 2)); + ChestGenHooks.addItem( + ChestGenHooks.STRONGHOLD_CORRIDOR, + new WeightedRandomChestContent(ModItems.INVERSION_SIGIL_INACTIVE.get(), 0, 1, 1, 2)); + ChestGenHooks.addItem( + ChestGenHooks.STRONGHOLD_CROSSING, + new WeightedRandomChestContent(ModItems.INVERSION_SIGIL_INACTIVE.get(), 0, 1, 1, 1)); + } + + if (ModBlocks.SMART_PUMP.isEnabled()) { + ForgeChunkManager.setForcedChunkLoadingCallback(uieInstance, new PumpChunkLoadingCallback()); + } + + if (ModBlocks.PINK_GENERATOR.isEnabled()) { + PinkFuelHelper.scanRecipesForPinkFuel(); + } + + if (Mods.CraftTweaker.isLoaded()) { + MineTweakerAPI.registerClass(QEDCraftTweakerSupport.class); + } + } + + @Mod.EventHandler + public void postInit(FMLPostInitializationEvent event) { + proxy.postInit(event); + + if (Mods.Tinkers.isLoaded() && OtherConfig.enableTinkersIntegration) { + TinkersCompat.init(); + } + } + + @Mod.EventHandler + public void serverStarting(FMLServerStartingEvent event) { + proxy.serverStarting(event); + } + + public static CreativeTabs uieTab = new CreativeTabs(MODID) { + + @Override + public Item getTabIconItem() { + return this.getIconItemStack() + .getItem(); + } + + public static final ItemStack ICON_ITEM = new ItemStack(ModItems.GLUTTONS_AXE.get()); + + @Override + public ItemStack getIconItemStack() { + return ICON_ITEM; + } + }; +} diff --git a/src/main/java/com/fouristhenumber/utilitiesinexcess/api/QEDRecipe.java b/src/main/java/com/fouristhenumber/utilitiesinexcess/api/QEDRecipe.java new file mode 100644 index 00000000..596c64ab --- /dev/null +++ b/src/main/java/com/fouristhenumber/utilitiesinexcess/api/QEDRecipe.java @@ -0,0 +1,83 @@ +package com.fouristhenumber.utilitiesinexcess.api; + +import net.minecraft.inventory.InventoryCrafting; +import net.minecraft.item.ItemStack; +import net.minecraftforge.oredict.OreDictionary; + +public class QEDRecipe { + + private final Object[] inputs; + private final ItemStack output; + + public QEDRecipe(Object[] inputs, ItemStack output) { + this.inputs = inputs; + this.output = output; + } + + public ItemStack getOutput() { + return this.output; + } + + public Object[] getInputs() { + return inputs; + } + + public boolean matches(InventoryCrafting inv) { + for (int row = 0; row < 3; row++) { + for (int col = 0; col < 3; col++) { + Object rawRecipeInput = this.inputs[row + col * 3]; + ItemStack providedInput = inv.getStackInRowAndColumn(row, col); + + if (rawRecipeInput == null && providedInput == null) continue; + if (rawRecipeInput == null || providedInput == null) return false; + + if (rawRecipeInput instanceof ItemStack recipeInput) { + if (recipeInput.getItem() != providedInput.getItem()) { + return false; + } + + if (recipeInput.getItemDamage() != providedInput.getItemDamage()) { + return recipeInput.getItemDamage() == OreDictionary.WILDCARD_VALUE; + } + } else if (rawRecipeInput instanceof ItemStack[]ores) { + boolean matched = false; + for (ItemStack ore : ores) { + if (OreDictionary.itemMatches(ore, providedInput, false)) { + matched = true; + break; + } + } + + if (!matched) { + return false; + } + } + + } + } + + return true; + } + + public boolean containsInput(ItemStack testStack) { + for (Object rawInput : this.inputs) { + if (rawInput instanceof ItemStack inputStack) { + if (ItemStack.areItemStacksEqual(inputStack, testStack)) { + return true; + } + } else if (rawInput instanceof ItemStack[]inputStacks) { + for (ItemStack inputStack : inputStacks) { + if (ItemStack.areItemStacksEqual(inputStack, testStack)) { + return true; + } + } + } + } + return false; + } + + public ItemStack getResult() { + return this.getOutput() + .copy(); + } +} diff --git a/src/main/java/com/fouristhenumber/utilitiesinexcess/api/QEDRegistry.java b/src/main/java/com/fouristhenumber/utilitiesinexcess/api/QEDRegistry.java new file mode 100644 index 00000000..696795c1 --- /dev/null +++ b/src/main/java/com/fouristhenumber/utilitiesinexcess/api/QEDRegistry.java @@ -0,0 +1,114 @@ +package com.fouristhenumber.utilitiesinexcess.api; + +import java.util.List; + +import net.minecraft.block.Block; +import net.minecraft.inventory.InventoryCrafting; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraftforge.oredict.OreDictionary; + +import com.fouristhenumber.utilitiesinexcess.ModBlocks; +import com.fouristhenumber.utilitiesinexcess.ModItems; +import com.fouristhenumber.utilitiesinexcess.common.recipe.DisableableItemStack; + +import it.unimi.dsi.fastutil.chars.Char2ObjectMap; +import it.unimi.dsi.fastutil.chars.Char2ObjectOpenHashMap; +import it.unimi.dsi.fastutil.objects.ObjectArrayList; +import it.unimi.dsi.fastutil.objects.ObjectList; +import it.unimi.dsi.fastutil.objects.ObjectLists; + +public final class QEDRegistry { + + private static final QEDRegistry REGISTRY = new QEDRegistry(); + + private final ObjectList recipes = new ObjectArrayList<>(); + + private QEDRegistry() {} + + public static QEDRegistry instance() { + return REGISTRY; + } + + public void addRecipe(ItemStack output, String[] pattern, Object... inputs) { + verifyPattern(pattern); + + // Parse the input mapping + Char2ObjectMap