Compare commits

...
32 Commits
Author SHA1 Message Date
Martin Robertz 6b4f3eb1c7 update 2024-09-15 14:30:24 +02:00
Ryan Nasers f74f9e4967 Should be fixed (#49) 2024-09-15 11:07:23 +02:00
Dream Master 12643d1b98 update 2024-08-09 20:41:23 +07:00
Ethryan 5bf4224f03 don't let players eat fluids anymore (#48) 2024-08-09 19:54:49 +07:00
Martin Robertz 5a1030bde4 update 2024-05-31 19:00:50 +02:00
Martin Robertz 948876ffcd Dev (#47)
* Update settings.gradle

* Update gradle-wrapper.properties

* Update dependencies.gradle
2024-05-31 11:23:46 +02:00
chochem 83142abde9 fix division by zero (#46) 2024-05-31 10:38:45 +02:00
Martin Robertz 79cda2e4fd update 2024-03-29 23:42:27 +01:00
DrParadox7 5409309b36 Flower Butterfly Spawns inherits Forestry's configs constraints (#45) 2024-03-29 23:41:24 +01:00
Martin Robertz 1a6e6b3c2c update 2024-02-18 10:54:02 +01:00
Jason Mitchell e5dfcc7942 No more restriction by player name (#44)
* Remove the ability to lock a bee to a specific person, and instead give them acknowledgement.

* Restrict to feb 29th - effectively not allowed unless you're a real chad :trollface: and still gives mentions to the people
2024-02-17 16:27:57 -08:00
Raven Szewczyk ea78ca8069 [ci skip] upgraded build system 2024-02-04 19:57:04 +00:00
Martin Robertz 29814550bb update deps+bs 2024-01-25 10:42:36 +01:00
ghostflyby 15769b9ee9 fix no tooltip in some Gui (#42) 2024-01-24 21:44:37 +01:00
Martin Robertz 1253271111 update bs+deps 2024-01-11 22:55:32 +01:00
Raven Szewczyk d18be7848d [ci skip] upgraded build system 2024-01-08 21:24:08 +00:00
Martin Robertz ef4dd3710a update gradle+bs+deps 2023-12-11 11:41:14 +01:00
ghostflyby 190693ad68 Fix double layers tooltip with NEI (#41)
* Fix double layers tooltip with nei

* Remove wildcard imports
2023-12-11 08:43:58 +01:00
Martin Robertz 3dc2806b36 update bs+deps 2023-11-15 10:13:07 +01:00
Pelotrio a609f5dce5 Optimized flower color enumeration array retrieval (#40) 2023-11-15 00:19:42 +00:00
Martin Robertz 00c214ee5d update deps 2023-10-21 12:22:30 +02:00
miozune e497b9505a Optimize PlankType$ExtraBiomesPlank.getStack() (#39) 2023-10-21 10:55:44 +02:00
Martin Robertz b5ac446e55 update bs+deps 2023-10-11 23:14:28 +02:00
ghostflyby c00e1b39da NEI item manager overlay integration (#38)
* New: NEI item manager overly integration

* update buildscript

* apply spotless

* Making nei really optional

* Fix wildcard

* Stream chain simplify

* Fix: NPE when events outside the Gui

* Fix: drag and mouse event

* Fix: call mouse event
2023-10-11 14:35:28 +09:00
Lyfts 6e6e806476 fix incubator for real this time (#37) 2023-09-06 19:48:53 +02:00
miozuneandMartin Robertz ef877e2f7d Fix NPE with Lumbermill (#35)
* Remove outdated script

* updateBuildScript

* Update dependencies

* Fix NPE with Lumbermill

---------

Co-authored-by: Martin Robertz <[email protected]>
2023-08-19 12:34:10 +02:00
miozune 669aee5ba6 Fix typo: cooper -> copper (#34) 2023-08-12 15:31:22 +02:00
Martin Robertz ef468097d0 update bs+deps 2023-07-18 20:37:11 +02:00
hacatu 22f2eebbd3 Fix Additive Production (#33)
* Fix production modifiers to be additive, fix circuit tooltips for mutation and boolean modifiers

* Chocolate frames have left the building

kuba told me to kill them

* Bruhhhhhhhhhhhh
2023-07-18 20:36:09 +02:00
Maxim f658e9ec57 Fixed the stimulator accepting stacks with a size higher than 1 (#32) 2023-06-16 16:24:18 +02:00
Maxim ddf93bc425 Fix localization of secret species count (#31) 2023-06-14 19:03:59 +02:00
Maxim 503361d6d1 Added alveary unlighting (#30) 2023-06-08 12:39:11 +02:00
63 changed files with 595 additions and 1770 deletions

No files matched your search

-33
View File
@@ -1,33 +0,0 @@
#!/usr/bin/env bash
RUNDIR="run"
CRASH="crash-reports"
SERVERLOG="server.log"
if [[ -d $RUNDIR/$CRASH ]]; then
echo "Crash reports detected:"
cat $RUNDIR/$CRASH/crash*.txt
exit 1
fi
if grep --quiet "Fatal errors were detected" $SERVERLOG; then
echo "Fatal errors detected:"
cat server.log
exit 1
fi
if grep --quiet "The state engine was in incorrect state ERRORED and forced into state SERVER_STOPPED" $SERVERLOG; then
echo "Server force stopped:"
cat server.log
exit 1
fi
if ! grep --quiet -Po '.+Done \(.+\)\! For help, type "help" or "\?"' $SERVERLOG; then
echo "Server didn't finish startup:"
cat server.log
exit 1
fi
echo "No crash reports detected"
exit 0
+7 -1
View File
@@ -26,7 +26,13 @@ whitelist.json
*.iml *.iml
*.ipr *.ipr
*.iws *.iws
src/main/resources/mixins.*.json src/main/resources/mixins.*([!.]).json
*.bat *.bat
*.DS_Store *.DS_Store
!gradlew.bat !gradlew.bat
.factorypath
addon.local.gradle
addon.local.gradle.kts
addon.late.local.gradle
addon.late.local.gradle.kts
layout.json
+2 -1507
View File
File diff suppressed because it is too large. Load diff
+5 -5
View File
@@ -1,12 +1,12 @@
// Add your dependencies here // Add your dependencies here
dependencies { dependencies {
implementation('com.github.GTNewHorizons:GTNHLib:0.0.10:dev') api('com.github.GTNewHorizons:ForestryMC:4.9.16:dev')
compile('com.github.GTNewHorizons:ForestryMC:4.5.6:dev') implementation('com.github.GTNewHorizons:GTNHLib:0.5.11:dev')
compile('com.github.GTNewHorizons:NotEnoughItems:2.3.21-GTNH:dev')
compileOnly('com.github.GTNewHorizons:BuildCraft:7.1.28:api') devOnlyNonPublishable('com.github.GTNewHorizons:NotEnoughItems:2.6.36-GTNH:dev')
compileOnly('com.github.GTNewHorizons:BuildCraft:7.1.39:api')
compileOnly('net.industrial-craft:industrialcraft-2:2.2.828-experimental:dev') compileOnly('net.industrial-craft:industrialcraft-2:2.2.828-experimental:dev')
compileOnly('curse.maven:cofh-lib-220333:2388748') compileOnly("curse.maven:extrabiomesxl-60041:2273301")
} }
+123 -36
View File
@@ -1,65 +1,109 @@
# ExampleMod tag to use as Blowdryer (Spotless, etc.) settings version, leave empty to disable.
# LOCAL to test local config updates.
gtnh.settings.blowdryerTag = 0.2.0
# Human-readable mod name, available for mcmod.info population.
modName = Binnie Core modName = Binnie Core
# This is a case-sensitive string to identify your mod. Convention is to use lower case. # Case-sensitive identifier string, available for mcmod.info population and used for automatic mixin JSON generation.
# Conventionally lowercase.
modId = BinnieCore modId = BinnieCore
# Root package of the mod, used to find various classes in other properties,
# mcmod.info substitution, enabling assertions in run tasks, etc.
modGroup = binnie modGroup = binnie
# WHY is there no version field? # Whether to use modGroup as the maven publishing group.
# The build script relies on git to provide a version via tags. It is super easy and will enable you to always know the # Due to a history of using JitPack, the default is com.github.GTNewHorizons for all mods.
# code base or your binary. Check out this tutorial: https://blog.mattclemente.com/2017/10/13/versioning-with-git-tags/ useModGroupForPublishing = false
# Will update your build.gradle automatically whenever an update is available # Updates your build.gradle and settings.gradle automatically whenever an update is available.
autoUpdateBuildScript = false autoUpdateBuildScript = false
# Version of Minecraft to target
minecraftVersion = 1.7.10 minecraftVersion = 1.7.10
# Version of Minecraft Forge to target
forgeVersion = 10.13.4.1614 forgeVersion = 10.13.4.1614
# Specify a MCP channel and mappings version for dependency deobfuscation and the deobfParams task. # Specify an MCP channel for dependency deobfuscation and the deobfParams task.
channel = stable channel = stable
# Specify an MCP mappings version for dependency deobfuscation and the deobfParams task.
mappingsVersion = 12 mappingsVersion = 12
# Define other MCP mappings for dependency deobfuscation # Defines other MCP mappings for dependency deobfuscation.
remoteMappings = https://raw.githubusercontent.com/MinecraftForge/FML/1.7.10/conf/ remoteMappings = https\://raw.githubusercontent.com/MinecraftForge/FML/1.7.10/conf/
# Select a username for testing your mod with breakpoints. You may leave this empty for a random username each time you # Select a default username for testing your mod. You can always override this per-run by running
# restart Minecraft in development. Choose this dependent on your mod: # `./gradlew runClient --username=AnotherPlayer`, or configuring this command in your IDE.
# Do you need consistent player progressing (for example Thaumcraft)? -> Select a name
# Do you need to test how your custom blocks interacts with a player that is not the owner? -> leave name empty
developmentEnvironmentUserName = Developer developmentEnvironmentUserName = Developer
# Define a source file of your project with: # Enables using modern Java syntax (up to version 17) via Jabel, while still targeting JVM 8.
# See https://github.com/bsideup/jabel for details on how this works.
enableModernJavaSyntax = false
# Enables injecting missing generics into the decompiled source code for a better coding experience.
# Turns most publicly visible List, Map, etc. into proper List<E>, Map<K, V> types.
enableGenericInjection = false
# Generate a class with a String field for the mod version named as defined below.
# If generateGradleTokenClass is empty or not missing, no such class will be generated.
# If gradleTokenVersion is empty or missing, the field will not be present in the class.
generateGradleTokenClass =
# Name of the token containing the project's current version to generate/replace.
gradleTokenVersion = GRADLETOKEN_VERSION
# [DEPRECATED] Mod ID replacement token.
gradleTokenModId =
# [DEPRECATED] Mod name replacement token.
gradleTokenModName =
# [DEPRECATED] Mod Group replacement token.
gradleTokenGroupName =
# [DEPRECATED]
# Multiple source files can be defined here by providing a comma-separated list: Class1.java,Class2.java,Class3.java
# public static final String VERSION = "GRADLETOKEN_VERSION"; # public static final String VERSION = "GRADLETOKEN_VERSION";
# The string's content will be replaced with your mod's version when compiled. You should use this to specify your mod's # The string's content will be replaced with your mod's version when compiled. You should use this to specify your mod's
# version in @Mod([...], version = VERSION, [...]) # version in @Mod([...], version = VERSION, [...]).
# Leave these properties empty to skip individual token replacements # Leave these properties empty to skip individual token replacements.
replaceGradleTokenInFile = BinnieCore.java replaceGradleTokenInFile = BinnieCore.java
gradleTokenModId =
gradleTokenModName =
gradleTokenVersion = GRADLETOKEN_VERSION
gradleTokenGroupName =
# In case your mod provides an API for other mods to implement you may declare its package here. Otherwise, you can # In case your mod provides an API for other mods to implement you may declare its package here. Otherwise, you can
# leave this property empty. # leave this property empty.
# Example value: apiPackage = api + modGroup = com.myname.mymodid -> com.myname.mymodid.api # Example value: (apiPackage = api) + (modGroup = com.myname.mymodid) -> com.myname.mymodid.api
apiPackage = apiPackage =
# Specify the configuration file for Forge's access transformers here. It must be placed into /src/main/resources/META-INF/ # Specify the configuration file for Forge's access transformers here. It must be placed into /src/main/resources/META-INF/
# Example value: mymodid_at.cfg # There can be multiple files in a space-separated list.
# Example value: mymodid_at.cfg nei_at.cfg
accessTransformersFile = accessTransformersFile =
# Provides setup for Mixins if enabled. If you don't know what mixins are: Keep it disabled! # Provides setup for Mixins if enabled. If you don't know what mixins are: Keep it disabled!
usesMixins = false usesMixins = false
# Adds some debug arguments like verbose output and export
# Set to a non-empty string to configure mixins in a separate source set under src/VALUE, instead of src/main.
# This can speed up compile times thanks to not running the mixin annotation processor on all input sources.
# Mixin classes will have access to "main" classes, but not the other way around.
separateMixinSourceSet =
# Adds some debug arguments like verbose output and class export.
usesMixinDebug = false usesMixinDebug = false
# Specify the location of your implementation of IMixinConfigPlugin. Leave it empty otherwise. # Specify the location of your implementation of IMixinConfigPlugin. Leave it empty otherwise.
mixinPlugin = mixinPlugin =
# Specify the package that contains all of your Mixins. You may only place Mixins in this package or the build will fail! # Specify the package that contains all of your Mixins. You may only place Mixins in this package or the build will fail!
mixinsPackage = mixinsPackage =
# Specify the core mod entry class if you use a core mod. This class must implement IFMLLoadingPlugin! # Specify the core mod entry class if you use a core mod. This class must implement IFMLLoadingPlugin!
# This parameter is for legacy compatibility only # This parameter is for legacy compatibility only
# Example value: coreModClass = asm.FMLPlugin + modGroup = com.myname.mymodid -> com.myname.mymodid.asm.FMLPlugin # Example value: (coreModClass = asm.FMLPlugin) + (modGroup = com.myname.mymodid) -> com.myname.mymodid.asm.FMLPlugin
coreModClass = coreModClass =
# If your project is only a consolidation of mixins or a core mod and does NOT contain a 'normal' mod ( = some class # If your project is only a consolidation of mixins or a core mod and does NOT contain a 'normal' mod ( = some class
# that is annotated with @Mod) you want this to be true. When in doubt: leave it on false! # that is annotated with @Mod) you want this to be true. When in doubt: leave it on false!
containsMixinsAndOrCoreModOnly = false containsMixinsAndOrCoreModOnly = false
@@ -67,15 +111,38 @@ containsMixinsAndOrCoreModOnly = false
# Enables Mixins even if this mod doesn't use them, useful if one of the dependencies uses mixins. # Enables Mixins even if this mod doesn't use them, useful if one of the dependencies uses mixins.
forceEnableMixins = false forceEnableMixins = false
# If enabled, you may use 'shadowCompile' for dependencies. They will be integrated in your jar. It is your # If enabled, you may use 'shadowCompile' for dependencies. They will be integrated into your jar. It is your
# responsibility check the licence and request permission for distribution, if required. # responsibility to check the license and request permission for distribution if required.
usesShadowedDependencies = false usesShadowedDependencies = false
# If disabled, won't remove unused classes from shadowed dependencies. Some libraries use reflection to access
# their own classes, making the minimization unreliable.
minimizeShadowedDependencies = true
# Publishing to modrinth requires you to set the MODRINTH_TOKEN environment variable to your current modrinth API token. # If disabled, won't rename the shadowed classes.
relocateShadowedDependencies = true
# Adds CurseMaven, Modrinth, and some more well-known 1.7.10 repositories.
includeWellKnownRepositories = true
# A list of repositories to exclude from the includeWellKnownRepositories setting. Should be a space separated
# list of strings, with the acceptable keys being(case does not matter):
# cursemaven
# modrinth
excludeWellKnownRepositories =
# Change these to your Maven coordinates if you want to publish to a custom Maven repository instead of the default GTNH Maven.
# Authenticate with the MAVEN_USER and MAVEN_PASSWORD environment variables.
# If you need a more complex setup disable maven publishing here and add a publishing repository to addon.gradle.
usesMavenPublishing = true
# Maven repository to publish the mod to.
# mavenPublishUrl = https\://nexus.gtnewhorizons.com/repository/releases/
# Publishing to Modrinth requires you to set the MODRINTH_TOKEN environment variable to your current Modrinth API token.
#
# The project's ID on Modrinth. Can be either the slug or the ID. # The project's ID on Modrinth. Can be either the slug or the ID.
# Leave this empty if you don't want to publish on Modrinth. # Leave this empty if you don't want to publish to Modrinth.
modrinthProjectId = modrinthProjectId =
# The project's relations on Modrinth. You can use this to refer to other projects on Modrinth. # The project's relations on Modrinth. You can use this to refer to other projects on Modrinth.
@@ -87,9 +154,8 @@ modrinthProjectId =
# Note: GTNH Mixins is automatically set as a required dependency if usesMixins = true # Note: GTNH Mixins is automatically set as a required dependency if usesMixins = true
modrinthRelations = modrinthRelations =
# Publishing to CurseForge requires you to set the CURSEFORGE_TOKEN environment variable to one of your CurseForge API tokens. # Publishing to CurseForge requires you to set the CURSEFORGE_TOKEN environment variable to one of your CurseForge API tokens.
#
# The project's numeric ID on CurseForge. You can find this in the About Project box. # The project's numeric ID on CurseForge. You can find this in the About Project box.
# Leave this empty if you don't want to publish on CurseForge. # Leave this empty if you don't want to publish on CurseForge.
curseForgeProjectId = curseForgeProjectId =
@@ -99,18 +165,39 @@ curseForgeProjectId =
# Where type can be one of [requiredDependency, embeddedLibrary, optionalDependency, tool, incompatible], # Where type can be one of [requiredDependency, embeddedLibrary, optionalDependency, tool, incompatible],
# and the name is the CurseForge project slug of the other mod. # and the name is the CurseForge project slug of the other mod.
# Example: requiredDependency:railcraft;embeddedLibrary:cofhlib;incompatible:buildcraft # Example: requiredDependency:railcraft;embeddedLibrary:cofhlib;incompatible:buildcraft
# Note: GTNH Mixins is automatically set as a required dependency if usesMixins = true # Note: UniMixins is automatically set as a required dependency if usesMixins = true.
curseForgeRelations = curseForgeRelations =
# Optional parameter to customize the produced artifacts. Use this to preserve artifact naming when migrating older
# Optional parameter to customize the produced artifacts. Use this to preserver artifact naming when migrating older
# projects. New projects should not use this parameter. # projects. New projects should not use this parameter.
customArchiveBaseName = binnie-mods customArchiveBaseName = binnie-mods
# Optional parameter to prevent the source code from being published # Optional parameter to have the build automatically fail if an illegal version is used.
# noPublishedSources = # This can be useful if you e.g. only want to allow versions in the form of '1.1.xxx'.
# The check is ONLY performed if the version is a git tag.
# Note: the specified string must be escaped, so e.g. 1\\.1\\.\\d+ instead of 1\.1\.\d+
# versionPattern =
# Uncomment this to disable spotless checks # Uncomment to prevent the source code from being published.
# noPublishedSources = true
# Uncomment this to disable Spotless checks.
# This should only be uncommented to keep it easier to sync with upstream/other forks. # This should only be uncommented to keep it easier to sync with upstream/other forks.
# That is, if there is no other active fork/upstream, NEVER change this. # That is, if there is no other active fork/upstream, NEVER change this.
# disableSpotless = true # disableSpotless = true
# Uncomment this to disable Checkstyle checks (currently wildcard import check).
# disableCheckstyle = true
# Override the IDEA build type. Valid values are: "" (leave blank, do not override), "idea" (force use native IDEA build), "gradle"
# (force use delegated build).
# This is meant to be set in $HOME/.gradle/gradle.properties.
# e.g. add "systemProp.org.gradle.project.ideaOverrideBuildType=idea" will override the build type to be native build.
# WARNING: If you do use this option, it will overwrite whatever you have in your existing projects. This might not be what you want!
# Usually there is no need to uncomment this here as other developers do not necessarily use the same build type as you.
# ideaOverrideBuildType = idea
# Whether IDEA should run spotless checks when pressing the Build button.
# This is meant to be set in $HOME/.gradle/gradle.properties.
# ideaCheckSpotlessOnBuild = true
Binary file not shown.
+2 -1
View File
@@ -1,6 +1,7 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
networkTimeout=10000 networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
Vendored
+21 -13
View File
@@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
# #
# SPDX-License-Identifier: Apache-2.0
#
############################################################################## ##############################################################################
# #
@@ -55,7 +57,7 @@
# Darwin, MinGW, and NonStop. # Darwin, MinGW, and NonStop.
# #
# (3) This script is generated from the Groovy template # (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # 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. # within the Gradle project.
# #
# You can find Gradle at https://github.com/gradle/gradle/. # You can find Gradle at https://github.com/gradle/gradle/.
@@ -83,10 +85,9 @@ done
# This is normally unused # This is normally unused
# shellcheck disable=SC2034 # shellcheck disable=SC2034
APP_BASE_NAME=${0##*/} APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit # 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
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. ' "$PWD" ) || exit
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Use the maximum available, or set MAX_FD != -1 to use that value. # Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum MAX_FD=maximum
@@ -133,10 +134,13 @@ location of your Java installation."
fi fi
else else
JAVACMD=java 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. 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 Please set the JAVA_HOME variable in your environment to match the
location of your Java installation." location of your Java installation."
fi
fi fi
# Increase the maximum file descriptors if we can. # Increase the maximum file descriptors if we can.
@@ -144,7 +148,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #( case $MAX_FD in #(
max*) max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045 # shellcheck disable=SC2039,SC3045
MAX_FD=$( ulimit -H -n ) || MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit" warn "Could not query maximum file descriptor limit"
esac esac
@@ -152,7 +156,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
'' | soft) :;; #( '' | soft) :;; #(
*) *)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045 # shellcheck disable=SC2039,SC3045
ulimit -n "$MAX_FD" || ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD" warn "Could not set maximum file descriptor limit to $MAX_FD"
esac esac
@@ -197,11 +201,15 @@ if "$cygwin" || "$msys" ; then
done done
fi fi
# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
# shell script including quotes and variable substitutions, so put them in DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# double quotes to make sure that they get re-expanded; and
# * put everything else in single quotes, so that it's not re-expanded. # Collect all arguments for the java command:
# * DEFAULT_JVM_OPTS, JAVA_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 -- \ set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \ "-Dorg.gradle.appname=$APP_BASE_NAME" \
Vendored
+12 -10
View File
@@ -13,6 +13,8 @@
@rem See the License for the specific language governing permissions and @rem See the License for the specific language governing permissions and
@rem limitations under the License. @rem limitations under the License.
@rem @rem
@rem SPDX-License-Identifier: Apache-2.0
@rem
@if "%DEBUG%"=="" @echo off @if "%DEBUG%"=="" @echo off
@rem ########################################################################## @rem ##########################################################################
@@ -43,11 +45,11 @@ set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1 %JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute if %ERRORLEVEL% equ 0 goto execute
echo. echo. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. echo location of your Java installation. 1>&2
goto fail goto fail
@@ -57,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute if exist "%JAVA_EXE%" goto execute
echo. echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. echo location of your Java installation. 1>&2
goto fail goto fail
-22
View File
@@ -1,26 +1,4 @@
// Add any additional repositories for your dependencies here // Add any additional repositories for your dependencies here
repositories { repositories {
maven {
name 'GTNH Maven'
url 'http://jenkins.usrv.eu:8081/nexus/content/groups/public/'
allowInsecureProtocol
}
maven {
name 'ic2'
url 'http://maven.ic2.player.to/'
metadataSources {
mavenPom()
artifact()
}
}
maven {
url 'https://cursemaven.com'
content {
includeGroup 'curse.maven'
}
}
maven {
url 'https://jitpack.io'
}
} }
+4 -11
View File
@@ -4,10 +4,10 @@ pluginManagement {
maven { maven {
// RetroFuturaGradle // RetroFuturaGradle
name "GTNH Maven" name "GTNH Maven"
url "http://jenkins.usrv.eu:8081/nexus/content/groups/public/" url "https://nexus.gtnewhorizons.com/repository/public/"
allowInsecureProtocol = true
mavenContent { mavenContent {
includeGroup("com.gtnewhorizons.retrofuturagradle") includeGroup("com.gtnewhorizons")
includeGroupByRegex("com\\.gtnewhorizons\\..+")
} }
} }
gradlePluginPortal() gradlePluginPortal()
@@ -17,12 +17,5 @@ pluginManagement {
} }
plugins { plugins {
id 'com.diffplug.blowdryerSetup' version '1.6.0' id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.27'
id 'org.gradle.toolchains.foojay-resolver-convention' version '0.4.0' // Provides java toolchains
}
blowdryerSetup {
repoSubfolder 'gtnhShared'
github('GTNewHorizons/ExampleMod1.7.10', 'tag', '0.2.0')
//devLocal '.' // Use this when testing config updates locally
} }
@@ -88,7 +88,7 @@ public class ItemInsulatedTube extends Item {
enum Material { enum Material {
Copper(0xe3b78e, "cooper"), Copper(0xe3b78e, "copper"),
Tin(0xe1eef4, "tin"), Tin(0xe1eef4, "tin"),
Bronze(0xddc276, "bronze"), Bronze(0xddc276, "bronze"),
Iron(0xd8d8d8, "iron"); Iron(0xd8d8d8, "iron");
@@ -42,6 +42,7 @@ import forestry.api.genetics.IPollinatable;
import forestry.api.lepidopterology.IButterfly; import forestry.api.lepidopterology.IButterfly;
import forestry.api.lepidopterology.IButterflyNursery; import forestry.api.lepidopterology.IButterflyNursery;
import forestry.lepidopterology.entities.EntityButterfly; import forestry.lepidopterology.entities.EntityButterfly;
import forestry.plugins.PluginLepidopterology;
public class TileEntityFlower extends TileEntity implements IPollinatable, IButterflyNursery { public class TileEntityFlower extends TileEntity implements IPollinatable, IButterflyNursery {
@@ -456,7 +457,7 @@ public class TileEntityFlower extends TileEntity implements IPollinatable, IButt
if (worldObj.rand.nextFloat() >= spawn.getGenome().getPrimary().getRarity() * 0.5f) { if (worldObj.rand.nextFloat() >= spawn.getGenome().getPrimary().getRarity() * 0.5f) {
return; return;
} }
if (worldObj.countEntities(EntityButterfly.class) > 100) { if (worldObj.countEntities(EntityButterfly.class) > PluginLepidopterology.spawnConstraint) {
return; return;
} }
if (!spawn.canSpawn(worldObj, x, y, z)) { if (!spawn.canSpawn(worldObj, x, y, z)) {
@@ -92,6 +92,7 @@ public enum EnumFlowerColor implements IFlowerColor {
YELLOW("yellow", 0xffff00), YELLOW("yellow", 0xffff00),
YELLOW_GREEN("yellowGreen", 0x9acd32); YELLOW_GREEN("yellowGreen", 0x9acd32);
private static final EnumFlowerColor[] ALL_VALUES = values();
private int color; private int color;
private int colorDis; private int colorDis;
private String name; private String name;
@@ -2963,7 +2964,7 @@ public enum EnumFlowerColor implements IFlowerColor {
} }
public static EnumFlowerColor get(int i) { public static EnumFlowerColor get(int i) {
return values()[Math.max(0, i) % values().length]; return ALL_VALUES[Math.max(0, i) % ALL_VALUES.length];
} }
@Override @Override
+2
View File
@@ -12,6 +12,7 @@ public class Mods {
public static Mod forestry; public static Mod forestry;
public static Mod ic2; public static Mod ic2;
public static Mod botania; public static Mod botania;
public static Mod extraBiomes;
private static Item findItem(String modId, String name) { private static Item findItem(String modId, String name) {
Item stack = GameRegistry.findItem(modId, name); Item stack = GameRegistry.findItem(modId, name);
@@ -41,6 +42,7 @@ public class Mods {
Mods.forestry = new Mod("Forestry"); Mods.forestry = new Mod("Forestry");
Mods.ic2 = new Mod("IC2"); Mods.ic2 = new Mod("IC2");
Mods.botania = new Mod("Botania"); Mods.botania = new Mod("Botania");
Mods.extraBiomes = new Mod("ExtrabiomesXL");
} }
public static class Mod { public static class Mod {
@@ -54,7 +54,7 @@ public class PageBreeder extends ControlPage<DatabaseTab> {
this, this,
155.0f, 155.0f,
I18N.localise( I18N.localise(
"binniecore.gui.database.species.secretCount", "binniecore.gui.database.species.secretsCount",
system.discoveredSecretCount, system.discoveredSecretCount,
system.totalSecretCount)); system.totalSecretCount));
} }
@@ -30,6 +30,8 @@ import binnie.core.craftgui.events.EventMouse;
import binnie.core.craftgui.geometry.IArea; import binnie.core.craftgui.geometry.IArea;
import binnie.core.craftgui.geometry.IBorder; import binnie.core.craftgui.geometry.IBorder;
import binnie.core.craftgui.geometry.IPoint; import binnie.core.craftgui.geometry.IPoint;
import binnie.core.craftgui.minecraft.control.ControlSlotBase;
import binnie.core.nei.NEIHook;
import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly; import cpw.mods.fml.relauncher.SideOnly;
@@ -76,6 +78,8 @@ public class GuiCraftGUI extends GuiContainer {
@Override @Override
public void drawScreen(int mouseX, int mouseY, float par3) { public void drawScreen(int mouseX, int mouseY, float par3) {
NEIHook.preDraw();
window.setMousePosition(mouseX - (int) window.getPosition().x(), mouseY - (int) window.getPosition().y()); window.setMousePosition(mouseX - (int) window.getPosition().x(), mouseY - (int) window.getPosition().y());
drawDefaultBackground(); drawDefaultBackground();
@@ -89,6 +93,9 @@ public class GuiCraftGUI extends GuiContainer {
window.render(); window.render();
RenderHelper.enableGUIStandardItemLighting(); RenderHelper.enableGUIStandardItemLighting();
NEIHook.renderObjects(window, mouseX, mouseY);
GL11.glPushMatrix(); GL11.glPushMatrix();
GL11.glEnable(32826); // GL_RESCALE_NORMAL_EXT GL11.glEnable(32826); // GL_RESCALE_NORMAL_EXT
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, 240.0f, 240.0f); OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, 240.0f, 240.0f);
@@ -109,10 +116,13 @@ public class GuiCraftGUI extends GuiContainer {
} else { } else {
tooltip.setType(Tooltip.Type.STANDARD); tooltip.setType(Tooltip.Type.STANDARD);
window.getTooltip(tooltip); window.getTooltip(tooltip);
NEIHook.renderToolTips(mouseX, mouseY);
} }
if (tooltip.exists()) { if (tooltip.exists()) {
renderTooltip(new IPoint(mouseX, mouseY), tooltip); renderTooltip(new IPoint(mouseX, mouseY), tooltip);
} else {
NEIHook.renderToolTips(mouseX, mouseY);
} }
zLevel = 0.0f; zLevel = 0.0f;
GL11.glEnable(GL11.GL_LIGHTING); GL11.glEnable(GL11.GL_LIGHTING);
@@ -219,6 +229,8 @@ public class GuiCraftGUI extends GuiContainer {
@Override @Override
protected void mouseClicked(int x, int y, int button) { protected void mouseClicked(int x, int y, int button) {
NEIHook.mouseClicked(x, y, button);
IWidget origin = window; IWidget origin = window;
if (window.getMousedOverWidget() != null) { if (window.getMousedOverWidget() != null) {
origin = window.getMousedOverWidget(); origin = window.getMousedOverWidget();
@@ -228,6 +240,8 @@ public class GuiCraftGUI extends GuiContainer {
@Override @Override
protected void keyTyped(char c, int key) { protected void keyTyped(char c, int key) {
NEIHook.lastKeyTyped(key, c);
if (key == 1 || (key == mc.gameSettings.keyBindInventory.getKeyCode() && window.getFocusedWidget() == null)) { if (key == 1 || (key == mc.gameSettings.keyBindInventory.getKeyCode() && window.getFocusedWidget() == null)) {
mc.thePlayer.closeScreen(); mc.thePlayer.closeScreen();
} }
@@ -241,6 +255,7 @@ public class GuiCraftGUI extends GuiContainer {
if (button != -1) { if (button != -1) {
window.callEvent(new EventMouse.Up(origin, x, y, button)); window.callEvent(new EventMouse.Up(origin, x, y, button));
} }
NEIHook.mouseUp(x, y, button);
} }
@Override @Override
@@ -250,6 +265,8 @@ public class GuiCraftGUI extends GuiContainer {
if (dWheel != 0) { if (dWheel != 0) {
window.callEvent(new EventMouse.Wheel(window, dWheel)); window.callEvent(new EventMouse.Wheel(window, dWheel));
} }
NEIHook.handleMouseWheel();
} }
@Override @Override
@@ -506,4 +523,13 @@ public class GuiCraftGUI extends GuiContainer {
GL11.glDisable(GL11.GL_BLEND); GL11.glDisable(GL11.GL_BLEND);
GL11.glEnable(GL11.GL_TEXTURE_2D); GL11.glEnable(GL11.GL_TEXTURE_2D);
} }
public ItemStack getStackUnderMouse(int x, int y) {
for (IWidget widget : window.calculateMousedOverWidgets()) {
if (widget instanceof ControlSlotBase && widget.isVisible()) {
return ((ControlSlotBase) widget).getItemStack();
}
}
return null;
}
} }
@@ -29,6 +29,7 @@ import binnie.core.craftgui.minecraft.control.ControlHelp;
import binnie.core.craftgui.minecraft.control.ControlInfo; import binnie.core.craftgui.minecraft.control.ControlInfo;
import binnie.core.craftgui.minecraft.control.ControlPowerSystem; import binnie.core.craftgui.minecraft.control.ControlPowerSystem;
import binnie.core.craftgui.minecraft.control.ControlSlot; import binnie.core.craftgui.minecraft.control.ControlSlot;
import binnie.core.craftgui.minecraft.control.ControlSlotBase;
import binnie.core.craftgui.minecraft.control.ControlUser; import binnie.core.craftgui.minecraft.control.ControlUser;
import binnie.core.craftgui.minecraft.control.EnumHighlighting; import binnie.core.craftgui.minecraft.control.EnumHighlighting;
import binnie.core.craftgui.renderer.Renderer; import binnie.core.craftgui.renderer.Renderer;
@@ -40,6 +41,7 @@ import binnie.core.machines.Machine;
import binnie.core.machines.inventory.IInventoryMachine; import binnie.core.machines.inventory.IInventoryMachine;
import binnie.core.machines.network.INetwork; import binnie.core.machines.network.INetwork;
import binnie.core.machines.power.PowerSystem; import binnie.core.machines.power.PowerSystem;
import binnie.core.nei.NEIHook;
import binnie.core.network.packet.MessageCraftGUI; import binnie.core.network.packet.MessageCraftGUI;
import binnie.core.resource.BinnieResource; import binnie.core.resource.BinnieResource;
import binnie.core.resource.ResourceType; import binnie.core.resource.ResourceType;
@@ -118,6 +120,9 @@ public abstract class Window extends TopLevelWidget implements INetwork.RecieveG
if (!widget.calculateIsMouseOver()) { if (!widget.calculateIsMouseOver()) {
continue; continue;
} }
if (NEIHook.enabled && widget instanceof ControlSlotBase) {
return;
}
if (widget instanceof ITooltip) { if (widget instanceof ITooltip) {
((ITooltip) widget).getTooltip(tooltip); ((ITooltip) widget).getTooltip(tooltip);
if (tooltip.exists()) { if (tooltip.exists()) {
@@ -13,6 +13,7 @@ import binnie.core.craftgui.geometry.IArea;
import binnie.core.craftgui.geometry.IPoint; import binnie.core.craftgui.geometry.IPoint;
import binnie.core.craftgui.minecraft.Window; import binnie.core.craftgui.minecraft.Window;
import binnie.core.craftgui.resource.minecraft.CraftGUITexture; import binnie.core.craftgui.resource.minecraft.CraftGUITexture;
import binnie.core.nei.NEIHook;
public abstract class ControlSlotBase extends Control implements ITooltip { public abstract class ControlSlotBase extends Control implements ITooltip {
@@ -60,6 +61,7 @@ public abstract class ControlSlotBase extends Control implements ITooltip {
@Override @Override
public void getTooltip(Tooltip tooltip) { public void getTooltip(Tooltip tooltip) {
if (NEIHook.enabled) return;
ItemStack item = getItemStack(); ItemStack item = getItemStack();
if (item == null) { if (item == null) {
return; return;
@@ -16,24 +16,40 @@ public class BeeModifierLogic {
} }
public float getModifier(EnumBeeModifier modifier, float currentModifier) { public float getModifier(EnumBeeModifier modifier, float currentModifier) {
if (!modifiers.containsKey(modifier)) { if (modifier == EnumBeeModifier.PRODUCTION) {
return 1.0f; if (!modifiers.containsKey(modifier)) {
} return 0.0f;
}
Float[] values = modifiers.get(modifier); Float[] values = modifiers.get(modifier);
float mult = values[0]; float offset = values[0], max = values[1];
float max = values[1]; if (offset < 0) {// negative modifiers should always apply
if (max >= 1.0f) { return offset;
if (max <= currentModifier) { }
if (currentModifier >= max) {// don't decrease modifiers already over the max, just skip increasing it
return 0.0f;
}
return Math.min(offset, max - currentModifier);
} else {
if (!modifiers.containsKey(modifier)) {
return 1.0f; return 1.0f;
} }
return Math.min(max / currentModifier, mult);
Float[] values = modifiers.get(modifier);
float mult = values[0];
float max = values[1];
if (max >= 1.0f) {
if (max <= currentModifier) {
return 1.0f;
}
return Math.min(max / currentModifier, mult);
}
if (max >= currentModifier) {
return 1.0f;
}
return Math.max(max / currentModifier, mult);
} }
if (max >= currentModifier) {
return 1.0f;
}
return Math.max(max / currentModifier, mult);
} }
public boolean getModifier(EnumBeeBooleanModifier modifier) { public boolean getModifier(EnumBeeBooleanModifier modifier) {
@@ -1,8 +1,15 @@
package binnie.core.genetics; package binnie.core.genetics;
import binnie.core.util.I18N;
public enum EnumBeeBooleanModifier { public enum EnumBeeBooleanModifier {
SEALED, SEALED,
SELF_LIGHTED, SELF_LIGHTED,
SUNLIGHT_STIMULATED, SUNLIGHT_STIMULATED,
HELLISH HELLISH;
public String getName() {
return I18N.localise("binniecore.beebooleanmodifier." + name().toLowerCase());
}
} }
@@ -6,12 +6,9 @@ import java.util.Map;
import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs; import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.item.ItemFood;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon; import net.minecraft.util.IIcon;
import net.minecraft.world.World;
import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.FluidStack;
import binnie.Binnie; import binnie.Binnie;
@@ -19,7 +16,7 @@ import binnie.core.util.I18N;
import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly; import cpw.mods.fml.relauncher.SideOnly;
public class ItemFluidContainer extends ItemFood { public class ItemFluidContainer extends Item {
private FluidContainer container; private FluidContainer container;
public static int LiquidExtraBee = 64; public static int LiquidExtraBee = 64;
@@ -39,7 +36,6 @@ public class ItemFluidContainer extends ItemFood {
} }
public ItemFluidContainer(FluidContainer container) { public ItemFluidContainer(FluidContainer container) {
super(0, false);
this.container = container; this.container = container;
container.item = this; container.item = this;
maxStackSize = container.getMaxStackSize(); maxStackSize = container.getMaxStackSize();
@@ -113,26 +109,4 @@ public class ItemFluidContainer extends ItemFood {
return true; return true;
} }
@Override
public ItemStack onEaten(ItemStack stack, World world, EntityPlayer player) {
player.getFoodStats().func_151686_a(this, stack);
world.playSoundAtEntity(player, "random.burp", 0.5f, world.rand.nextFloat() * 0.1f + 0.9f);
onFoodEaten(stack, world, player);
return container.getEmpty();
}
@Override
public int getMaxItemUseDuration(ItemStack stack) {
return 32;
}
@Override
public int func_150905_g(ItemStack stack) {
return 0;
}
@Override
public float func_150906_h(ItemStack stack) {
return 0.0f;
}
} }
@@ -122,7 +122,7 @@ public class TransferRequest {
|| ((IInventorySlots) destination).getSlot(slot) == null || ((IInventorySlots) destination).getSlot(slot) == null
|| !((IInventorySlots) destination).getSlot(slot).isRecipe()) { || !((IInventorySlots) destination).getSlot(slot).isRecipe()) {
if (destination.getStackInSlot(slot) != null) { if (destination.getStackInSlot(slot) != null) {
if (item.isStackable()) { if (item.isStackable() && destination.getInventoryStackLimit() > 1) {
ItemStack merged = destination.getStackInSlot(slot).copy(); ItemStack merged = destination.getStackInSlot(slot).copy();
ItemStack[] newStacks = mergeStacks(item.copy(), merged.copy()); ItemStack[] newStacks = mergeStacks(item.copy(), merged.copy());
item = newStacks[0]; item = newStacks[0];
@@ -149,7 +149,16 @@ public class TransferRequest {
if (destination.getStackInSlot(slot) == null) { if (destination.getStackInSlot(slot) == null) {
insertedSlots.add(new TransferSlot(slot, destination)); insertedSlots.add(new TransferSlot(slot, destination));
if (doAdd) { if (doAdd) {
destination.setInventorySlotContents(slot, item.copy()); ItemStack movedStack = item.copy();
if (movedStack.stackSize > destination.getInventoryStackLimit()) {
movedStack.stackSize = destination.getInventoryStackLimit();
}
item.stackSize -= movedStack.stackSize;
destination.setInventorySlotContents(slot, movedStack);
if (item.stackSize <= 0) {
item = null;
}
return item;
} }
return null; return null;
} }
@@ -247,7 +256,12 @@ public class TransferRequest {
FluidStack largeAmountOfLiquid = containerLiquid.copy(); FluidStack largeAmountOfLiquid = containerLiquid.copy();
largeAmountOfLiquid.amount = tank.getCapacity(); largeAmountOfLiquid.amount = tank.getCapacity();
int amountAdded = tank.fill(largeAmountOfLiquid, false); int amountAdded = tank.fill(largeAmountOfLiquid, false);
int numberOfContainersToAdd = amountAdded / containerLiquid.amount; int numberOfContainersToAdd;
if (containerLiquid.amount > 0) {
numberOfContainersToAdd = amountAdded / containerLiquid.amount;
} else {
numberOfContainersToAdd = item.stackSize;
}
if (numberOfContainersToAdd > item.stackSize) { if (numberOfContainersToAdd > item.stackSize) {
numberOfContainersToAdd = item.stackSize; numberOfContainersToAdd = item.stackSize;
} }
@@ -349,7 +363,12 @@ public class TransferRequest {
int maximumExtractedLiquid = item.stackSize * fluid.amount; int maximumExtractedLiquid = item.stackSize * fluid.amount;
FluidStack drainedLiquid = tank.drain(maximumExtractedLiquid, false); FluidStack drainedLiquid = tank.drain(maximumExtractedLiquid, false);
int amountInTank = (drainedLiquid == null) ? 0 : drainedLiquid.amount; int amountInTank = (drainedLiquid == null) ? 0 : drainedLiquid.amount;
int numberOfContainersToFill = amountInTank / fluid.amount; int numberOfContainersToFill;
if (fluid.amount > 0) {
numberOfContainersToFill = amountInTank / fluid.amount;
} else {
numberOfContainersToFill = item.stackSize;
}
if (numberOfContainersToFill > item.stackSize) { if (numberOfContainersToFill > item.stackSize) {
numberOfContainersToFill = item.stackSize; numberOfContainersToFill = item.stackSize;
} }
@@ -0,0 +1,49 @@
package binnie.core.nei;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.item.ItemStack;
import binnie.core.craftgui.minecraft.GuiCraftGUI;
import codechicken.nei.guihook.IContainerObjectHandler;
import cpw.mods.fml.common.Optional;
@Optional.Interface(
iface = "codechicken.nei.guihook.IContainerObjectHandler",
modid = "NotEnoughItems",
striprefs = true)
public final class ContainerObjectHandler implements IContainerObjectHandler {
@Override
public void guiTick(GuiContainer gui) {
}
@Override
public void refresh(GuiContainer gui) {
}
@Override
public void load(GuiContainer gui) {
}
@Override
public ItemStack getStackUnderMouse(GuiContainer gui, int mousex, int mousey) {
if (gui instanceof GuiCraftGUI) {
return ((GuiCraftGUI) gui).getStackUnderMouse(mousex, mousey);
} else {
return null;
}
}
@Override
public boolean objectUnderMouse(GuiContainer gui, int mousex, int mousey) {
return false;
}
@Override
public boolean shouldShowTooltip(GuiContainer gui) {
return true;
}
}
+107
View File
@@ -0,0 +1,107 @@
package binnie.core.nei;
import org.lwjgl.opengl.GL11;
import binnie.core.craftgui.minecraft.Window;
import codechicken.nei.guihook.GuiContainerManager;
import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.Optional;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@SideOnly(Side.CLIENT)
public final class NEIHook {
public static boolean enabled = false;
static {
if (Loader.isModLoaded("NotEnoughItems")) {
enabled = true;
addHandler();
}
}
@Optional.Method(modid = "NotEnoughItems")
private static void addHandler() {
GuiContainerManager.addObjectHandler(new ContainerObjectHandler());
}
@Optional.Method(modid = "NotEnoughItems")
private static GuiContainerManager getManager() {
return GuiContainerManager.getManager();
}
@Optional.Method(modid = "NotEnoughItems")
private static void preDrawImpl() {
GuiContainerManager manager = getManager();
if (manager != null) manager.preDraw();
}
public static void preDraw() {
if (enabled) preDrawImpl();
}
@Optional.Method(modid = "NotEnoughItems")
private static void renderObjectsImpl(Window window, int mouseX, int mouseY) {
GL11.glPushMatrix();
GL11.glTranslatef(window.x(), window.y(), 0.0f);
GuiContainerManager manager = getManager();
if (manager != null) manager.renderObjects(mouseX, mouseY);
GL11.glTranslatef(-window.x(), -window.y(), 0.0f);
GL11.glPopMatrix();
}
public static void renderObjects(Window window, int mouseX, int mouseY) {
if (enabled) renderObjectsImpl(window, mouseX, mouseY);
}
@Optional.Method(modid = "NotEnoughItems")
private static void renderToolTipsImpl(int mouseX, int mouseY) {
GuiContainerManager manager = getManager();
if (manager != null) manager.renderToolTips(mouseX, mouseY);
}
public static void renderToolTips(int mouseX, int mouseY) {
if (enabled) renderToolTipsImpl(mouseX, mouseY);
}
@Optional.Method(modid = "NotEnoughItems")
private static void mouseClickedImpl(int x, int y, int button) {
GuiContainerManager manager = getManager();
if (manager != null) manager.mouseClicked(x, y, button);
}
public static void mouseClicked(int x, int y, int button) {
if (enabled) mouseClickedImpl(x, y, button);
}
@Optional.Method(modid = "NotEnoughItems")
private static void lastKeyTypedImpl(int k, char c) {
GuiContainerManager manager = getManager();
if (manager != null) manager.lastKeyTyped(k, c);
}
public static void lastKeyTyped(int k, char c) {
if (enabled) lastKeyTypedImpl(k, c);
}
@Optional.Method(modid = "NotEnoughItems")
private static void handleMouseWheelImpl() {
GuiContainerManager manager = getManager();
if (manager != null) manager.handleMouseWheel();
}
public static void handleMouseWheel() {
if (enabled) handleMouseWheelImpl();
}
@Optional.Method(modid = "NotEnoughItems")
private static void mouseUpImpl(int mouseX, int mouseY, int button) {
GuiContainerManager manager = getManager();
if (manager != null) manager.mouseUp(mouseX, mouseY, button);
}
public static void mouseUp(int mouseX, int mouseY, int button) {
if (enabled) mouseUpImpl(mouseX, mouseY, button);
}
}
+5 -1
View File
@@ -2,7 +2,11 @@ package binnie.core.nei;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraftforge.fluids.*; import net.minecraftforge.fluids.Fluid;
import net.minecraftforge.fluids.FluidContainerRegistry;
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.IFluidBlock;
import net.minecraftforge.fluids.IFluidContainerItem;
public class NEIUtils { public class NEIUtils {
@@ -1,6 +1,7 @@
package binnie.core.nei; package binnie.core.nei;
import java.awt.*; import java.awt.Point;
import java.awt.Rectangle;
import java.util.Collection; import java.util.Collection;
import java.util.Collections; import java.util.Collections;
import java.util.List; import java.util.List;
@@ -1,6 +1,6 @@
package binnie.core.nei; package binnie.core.nei;
import java.awt.*; import java.awt.Rectangle;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@@ -1,6 +1,7 @@
package binnie.core.nei; package binnie.core.nei;
import java.awt.*; import java.awt.Point;
import java.awt.Rectangle;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@@ -33,7 +33,7 @@ public class ComponentBeeModifier extends MachineComponent implements IBeeModifi
@Override @Override
public float getProductionModifier(IBeeGenome genome, float currentModifier) { public float getProductionModifier(IBeeGenome genome, float currentModifier) {
return 1.0f; return 0.0f;
} }
@Override @Override
@@ -36,17 +36,17 @@ public enum EnumHiveFrame implements IHiveFrame, IBeeModifier {
public static void init() { public static void init() {
EnumHiveFrame.Cocoa.logic.setModifier(EnumBeeModifier.LIFESPAN, 0.75f, 0.25f); EnumHiveFrame.Cocoa.logic.setModifier(EnumBeeModifier.LIFESPAN, 0.75f, 0.25f);
EnumHiveFrame.Cocoa.logic.setModifier(EnumBeeModifier.PRODUCTION, 1.5f, 5.0f); EnumHiveFrame.Cocoa.logic.setModifier(EnumBeeModifier.PRODUCTION, 0.5f, 2.0f);// was 1.5x lim 5.0x
EnumHiveFrame.Cage.logic.setModifier(EnumBeeModifier.TERRITORY, 0.5f, 0.1f); EnumHiveFrame.Cage.logic.setModifier(EnumBeeModifier.TERRITORY, 0.5f, 0.1f);
EnumHiveFrame.Cage.logic.setModifier(EnumBeeModifier.LIFESPAN, 0.75f, 0.5f); EnumHiveFrame.Cage.logic.setModifier(EnumBeeModifier.LIFESPAN, 0.75f, 0.5f);
EnumHiveFrame.Cage.logic.setModifier(EnumBeeModifier.PRODUCTION, 0.75f, 0.5f); EnumHiveFrame.Cage.logic.setModifier(EnumBeeModifier.PRODUCTION, -0.25f, 0.0f);// was 0.75x lim 0.5x
EnumHiveFrame.Soul.logic.setModifier(EnumBeeModifier.MUTATION, 1.5f, 5.0f); EnumHiveFrame.Soul.logic.setModifier(EnumBeeModifier.MUTATION, 1.5f, 5.0f);
EnumHiveFrame.Soul.logic.setModifier(EnumBeeModifier.LIFESPAN, 0.75f, 0.5f); EnumHiveFrame.Soul.logic.setModifier(EnumBeeModifier.LIFESPAN, 0.75f, 0.5f);
EnumHiveFrame.Soul.logic.setModifier(EnumBeeModifier.PRODUCTION, 0.25f, 0.1f); EnumHiveFrame.Soul.logic.setModifier(EnumBeeModifier.PRODUCTION, -0.75f, 0.0f);// was 0.25x lim 0.1x
EnumHiveFrame.Soul.setMaxDamage(80); EnumHiveFrame.Soul.setMaxDamage(80);
EnumHiveFrame.Clay.logic.setModifier(EnumBeeModifier.LIFESPAN, 1.5f, 5.0f); EnumHiveFrame.Clay.logic.setModifier(EnumBeeModifier.LIFESPAN, 1.5f, 5.0f);
EnumHiveFrame.Clay.logic.setModifier(EnumBeeModifier.MUTATION, 0.5f, 0.2f); EnumHiveFrame.Clay.logic.setModifier(EnumBeeModifier.MUTATION, 0.5f, 0.2f);
EnumHiveFrame.Clay.logic.setModifier(EnumBeeModifier.PRODUCTION, 0.75f, 0.2f); EnumHiveFrame.Clay.logic.setModifier(EnumBeeModifier.PRODUCTION, -0.25f, 0.0f);// was 0.75x lim 0.2x
EnumHiveFrame.Debug.logic.setModifier(EnumBeeModifier.LIFESPAN, 1.0E-4f, 1.0E-4f); EnumHiveFrame.Debug.logic.setModifier(EnumBeeModifier.LIFESPAN, 1.0E-4f, 1.0E-4f);
GameRegistry.addRecipe( GameRegistry.addRecipe(
@@ -152,7 +152,7 @@ public class TileExtraBeeAlveary extends TileEntityMachine implements IAlvearyCo
@Override @Override
public float getProductionModifier(IBeeGenome genome, float currentModifier) { public float getProductionModifier(IBeeGenome genome, float currentModifier) {
if (getBeeModifier() == null) { if (getBeeModifier() == null) {
return 1.0f; return 0.0f;
} }
return getBeeModifier().getProductionModifier(genome, currentModifier); return getBeeModifier().getProductionModifier(genome, currentModifier);
} }
@@ -18,6 +18,7 @@ import binnie.extrabees.apiary.machine.mutator.MutatorAlvearyPackage;
import binnie.extrabees.apiary.machine.rainShield.RainShieldAlvearyPackage; import binnie.extrabees.apiary.machine.rainShield.RainShieldAlvearyPackage;
import binnie.extrabees.apiary.machine.stimulator.StimulatorAlvearyPackage; import binnie.extrabees.apiary.machine.stimulator.StimulatorAlvearyPackage;
import binnie.extrabees.apiary.machine.transmission.TransmissionAlvearyPackage; import binnie.extrabees.apiary.machine.transmission.TransmissionAlvearyPackage;
import binnie.extrabees.apiary.machine.unlighting.UnlightingAlvearyPackage;
public enum AlvearyMachine implements IMachineType { public enum AlvearyMachine implements IMachineType {
@@ -27,7 +28,8 @@ public enum AlvearyMachine implements IMachineType {
Lighting(LightingAlvearyPackage.class), Lighting(LightingAlvearyPackage.class),
Stimulator(StimulatorAlvearyPackage.class), Stimulator(StimulatorAlvearyPackage.class),
Hatchery(HatcheryAlvearyPackage.class), Hatchery(HatcheryAlvearyPackage.class),
Transmission(TransmissionAlvearyPackage.class); Transmission(TransmissionAlvearyPackage.class),
Unlighting(UnlightingAlvearyPackage.class);
protected Class<? extends MachinePackage> cls; protected Class<? extends MachinePackage> cls;
@@ -72,7 +72,7 @@ public class FrameComponentModifier extends ComponentBeeModifier implements IBee
public float getProductionModifier(IBeeGenome genome, float currentModifier) { public float getProductionModifier(IBeeGenome genome, float currentModifier) {
IHiveFrame frame = getHiveFrame(); IHiveFrame frame = getHiveFrame();
if (frame == null) { if (frame == null) {
return 1.0f; return 0.0f;
} }
return frame.getBeeModifier().getProductionModifier(genome, currentModifier); return frame.getBeeModifier().getProductionModifier(genome, currentModifier);
} }
@@ -20,15 +20,17 @@ public enum CircuitType implements IBeeModifier {
Territory(2, 10); Territory(2, 10);
static { static {
CircuitType.LowVoltage.logic.setModifier(EnumBeeModifier.PRODUCTION, 1.5f, 5.0f); CircuitType.LowVoltage.logic.setModifier(EnumBeeModifier.PRODUCTION, 0.5f, 5.0f);
CircuitType.HighVoltage.logic.setModifier(EnumBeeModifier.PRODUCTION, 2.5f, 10.0f); CircuitType.HighVoltage.logic.setModifier(EnumBeeModifier.PRODUCTION, 1.5f, 10.0f);
CircuitType.Plant.logic.setModifier(EnumBeeModifier.FLOWERING, 1.5f, 5.0f); CircuitType.Plant.logic.setModifier(EnumBeeModifier.FLOWERING, 1.5f, 5.0f);
CircuitType.Death.logic.setModifier(EnumBeeModifier.LIFESPAN, 0.8f, 0.2f); CircuitType.Death.logic.setModifier(EnumBeeModifier.LIFESPAN, 0.8f, 0.2f);
CircuitType.Life.logic.setModifier(EnumBeeModifier.LIFESPAN, 1.5f, 5.0f); CircuitType.Life.logic.setModifier(EnumBeeModifier.LIFESPAN, 1.5f, 5.0f);
CircuitType.Nether.logic.setModifier(EnumBeeBooleanModifier.HELLISH); CircuitType.Nether.logic.setModifier(EnumBeeBooleanModifier.HELLISH);
CircuitType.Mutation.logic.setModifier(EnumBeeModifier.MUTATION, 1.5f, 5.0f); CircuitType.Mutation.logic.setModifier(EnumBeeModifier.MUTATION, 1.5f, 5.0f);
CircuitType.Inhibitor.logic.setModifier(EnumBeeModifier.TERRITORY, 0.4f, 0.1f); CircuitType.Inhibitor.logic.setModifier(EnumBeeModifier.TERRITORY, 0.4f, 0.1f);
CircuitType.Inhibitor.logic.setModifier(EnumBeeModifier.PRODUCTION, 0.9f, 0.5f); CircuitType.Inhibitor.logic.setModifier(EnumBeeModifier.PRODUCTION, -0.1f, 0.0f);// was 0.9x, now -0.1. limit
// was 0.5x, now it's 0, but
// currently ignored
CircuitType.Territory.logic.setModifier(EnumBeeModifier.TERRITORY, 1.5f, 5.0f); CircuitType.Territory.logic.setModifier(EnumBeeModifier.TERRITORY, 1.5f, 5.0f);
for (CircuitType type : values()) { for (CircuitType type : values()) {
type.logic.setModifier(EnumBeeModifier.GENETIC_DECAY, 1.5f, 10.0f); type.logic.setModifier(EnumBeeModifier.GENETIC_DECAY, 1.5f, 10.0f);
@@ -48,18 +50,34 @@ public enum CircuitType implements IBeeModifier {
public void createCircuit(ICircuitLayout layout) { public void createCircuit(ICircuitLayout layout) {
StimulatorCircuit circuit = new StimulatorCircuit(this, layout); StimulatorCircuit circuit = new StimulatorCircuit(this, layout);
for (EnumBeeModifier modifier : EnumBeeModifier.values()) { for (EnumBeeBooleanModifier modifier : EnumBeeBooleanModifier.values()) {
float mod = logic.getModifier(modifier, 1.0f); if (logic.getModifier(modifier)) {
if (mod == 1.0f) { circuit.addTooltipString("Enables " + modifier.getName());
continue;
} }
}
if (mod > 1.0f) { for (EnumBeeModifier modifier : EnumBeeModifier.values()) {
int increase = (int) ((mod - 1.0f) * 100.0f); if (modifier == EnumBeeModifier.PRODUCTION) {
circuit.addTooltipString("Increases " + modifier.getName() + " by " + increase + "%"); float mod = logic.getModifier(modifier, 0.0f);
if (mod == 0.0f) {
continue;
}
if (mod > 0.0f) {
circuit.addTooltipString("Increases " + modifier.getName() + " by +" + mod);
} else {
circuit.addTooltipString("Increases " + modifier.getName() + " by " + mod);
}
} else { } else {
int decrease = (int) ((1.0f - mod) * 100.0f); float mod = logic.getModifier(modifier, 1.0f);
circuit.addTooltipString("Decreases " + modifier.getName() + " by " + decrease + "%"); if (mod == 1.0f) {
continue;
}
if (mod > 1.0f) {
int increase = (int) ((mod - 1.0f) * 100.0f);
circuit.addTooltipString("Increases " + modifier.getName() + " by " + increase + "%");
} else {
int decrease = (int) ((1.0f - mod) * 100.0f);
circuit.addTooltipString("Decreases " + modifier.getName() + " by " + decrease + "%");
}
} }
} }
} }
@@ -18,7 +18,13 @@ public class StimulatorAlvearyPackage extends AlvearyMachine.AlvearyPackage impl
@Override @Override
public void createMachine(Machine machine) { public void createMachine(Machine machine) {
new ComponentExtraBeeGUI(machine, ExtraBeeGUID.AlvearyStimulator); new ComponentExtraBeeGUI(machine, ExtraBeeGUID.AlvearyStimulator);
ComponentInventorySlots inventory = new ComponentInventorySlots(machine); ComponentInventorySlots inventory = new ComponentInventorySlots(machine) {
@Override
public int getInventoryStackLimit() {
return 1;
}
};
inventory.addSlot(AlvearyStimulator.SLOT_CIRCUIT, "circuit"); inventory.addSlot(AlvearyStimulator.SLOT_CIRCUIT, "circuit");
inventory.getSlot(AlvearyStimulator.SLOT_CIRCUIT).setValidator(new CircuitSlotValidator()); inventory.getSlot(AlvearyStimulator.SLOT_CIRCUIT).setValidator(new CircuitSlotValidator());
new ComponentPowerReceptor(machine); new ComponentPowerReceptor(machine);
@@ -100,13 +100,14 @@ public class StimulatorModifierComponent extends ComponentBeeModifier implements
@Override @Override
public float getProductionModifier(IBeeGenome genome, float currentModifier) { public float getProductionModifier(IBeeGenome genome, float currentModifier) {
float mod = 1.0f; float mod = 0.0f;// production modifiers are now additive, and the "base" value of 1 comes in forestry's
// Bee.java and BeeKeepingMode.java
if (!powered) { if (!powered) {
return mod; return mod;
} }
for (IBeeModifier beeMod : modifiers) { for (IBeeModifier beeMod : modifiers) {
mod *= beeMod.getProductionModifier(genome, mod); mod += beeMod.getProductionModifier(genome, mod);
} }
return mod; return mod;
} }
@@ -0,0 +1,18 @@
package binnie.extrabees.apiary.machine.unlighting;
import binnie.core.craftgui.minecraft.IMachineInformation;
import binnie.core.machines.Machine;
import binnie.extrabees.apiary.machine.AlvearyMachine;
import binnie.extrabees.core.ExtraBeeTexture;
public class UnlightingAlvearyPackage extends AlvearyMachine.AlvearyPackage implements IMachineInformation {
public UnlightingAlvearyPackage() {
super("unlighting", ExtraBeeTexture.AlvearyUnlighting.getTexture(), false);
}
@Override
public void createMachine(Machine machine) {
new UnlightingComponentModifier(machine);
}
}
@@ -0,0 +1,18 @@
package binnie.extrabees.apiary.machine.unlighting;
import binnie.core.machines.Machine;
import binnie.extrabees.apiary.ComponentBeeModifier;
import forestry.api.apiculture.IBeeListener;
import forestry.api.apiculture.IBeeModifier;
public class UnlightingComponentModifier extends ComponentBeeModifier implements IBeeModifier, IBeeListener {
public UnlightingComponentModifier(Machine machine) {
super(machine);
}
@Override
public boolean isSelfUnlighted() {
return true;
}
}
@@ -12,6 +12,7 @@ public enum ExtraBeeTexture implements IBinnieTexture {
AlvearyNovaBlock(ResourceType.Tile, "alveary/AlvearyNovaBlock"), AlvearyNovaBlock(ResourceType.Tile, "alveary/AlvearyNovaBlock"),
AlvearyFrame(ResourceType.Tile, "alveary/AlvearyFrame"), AlvearyFrame(ResourceType.Tile, "alveary/AlvearyFrame"),
AlvearyLighting(ResourceType.Tile, "alveary/AlvearyLighting"), AlvearyLighting(ResourceType.Tile, "alveary/AlvearyLighting"),
AlvearyUnlighting(ResourceType.Tile, "alveary/AlvearyUnlighting"),
AlvearyRainShield(ResourceType.Tile, "alveary/AlvearyRainShield"), AlvearyRainShield(ResourceType.Tile, "alveary/AlvearyRainShield"),
AlvearyStimulator(ResourceType.Tile, "alveary/AlvearyStimulator"), AlvearyStimulator(ResourceType.Tile, "alveary/AlvearyStimulator"),
AlvearyHatchery(ResourceType.Tile, "alveary/AlvearyHatchery"), AlvearyHatchery(ResourceType.Tile, "alveary/AlvearyHatchery"),
@@ -1673,7 +1673,10 @@ public enum ExtraBeeDefinition implements IBeeDefinition {
@Override @Override
protected void registerMutations() { protected void registerMutations() {
registerMutation(BeeDefinition.CULTIVATED, CELEBRATORY, 5).restrictPerson( final ExtraBeeMutation mutation = registerMutation(BeeDefinition.CULTIVATED, CELEBRATORY, 5);
mutation.restrictDateRange(2, 29, 2, 29);
mutation.requireDay();
mutation.restrictPerson(
new RequirementPerson().add( new RequirementPerson().add(
name -> "" + EnumChatFormatting.DARK_RED name -> "" + EnumChatFormatting.DARK_RED
+ EnumChatFormatting.BOLD + EnumChatFormatting.BOLD
@@ -4,7 +4,9 @@ import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
import binnie.extrabees.genetics.requirements.*; import binnie.extrabees.genetics.requirements.DummyMutationCondition;
import binnie.extrabees.genetics.requirements.IMutationRequirement;
import binnie.extrabees.genetics.requirements.RequirementPerson;
import forestry.api.apiculture.BeeManager; import forestry.api.apiculture.BeeManager;
import forestry.api.apiculture.IAlleleBeeSpecies; import forestry.api.apiculture.IAlleleBeeSpecies;
import forestry.api.apiculture.IBeeGenome; import forestry.api.apiculture.IBeeGenome;
@@ -57,7 +57,6 @@ public class RequirementPerson implements IMutationRequirement {
@Override @Override
public boolean fufilled(IBeeHousing housing, IAllele allele0, IAllele allele1, IGenome genome0, IGenome genome1) { public boolean fufilled(IBeeHousing housing, IAllele allele0, IAllele allele1, IGenome genome0, IGenome genome1) {
String ownerName = housing.getOwner().getName(); return true;
return ownerName != null && names.contains(ownerName);
} }
} }
@@ -8,13 +8,12 @@ import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon; import net.minecraft.util.IIcon;
import com.google.common.base.Optional;
import binnie.core.Mods; import binnie.core.Mods;
import binnie.core.block.TileEntityMetadata; import binnie.core.block.TileEntityMetadata;
import binnie.core.util.I18N; import binnie.core.util.I18N;
import binnie.extratrees.ExtraTrees; import binnie.extratrees.ExtraTrees;
import binnie.extratrees.api.CarpentryManager; import binnie.extratrees.api.CarpentryManager;
import extrabiomes.api.Stuff;
public class PlankType { public class PlankType {
@@ -267,13 +266,10 @@ public class PlankType {
@Override @Override
public ItemStack getStack() { public ItemStack getStack() {
try { if (!Mods.extraBiomes.active()) {
Class clss = Class.forName("extrabiomes.api.Stuff");
Block block = (Block) ((Optional) clss.getField("planks").get(null)).get();
return new ItemStack(block, 1, ordinal());
} catch (Exception e) {
return null; return null;
} }
return Stuff.planks.transform(block -> new ItemStack(block, 1, ordinal())).orNull();
} }
@Override @Override
@@ -8,6 +8,7 @@ import net.minecraft.init.Blocks;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import binnie.core.Mods;
import binnie.core.block.TileEntityMetadata; import binnie.core.block.TileEntityMetadata;
import binnie.extratrees.ExtraTrees; import binnie.extratrees.ExtraTrees;
import binnie.extratrees.api.CarpentryManager; import binnie.extratrees.api.CarpentryManager;
@@ -17,6 +18,8 @@ import binnie.extratrees.block.decor.FenceType;
public class WoodManager { public class WoodManager {
private static List<IPlankType> allPlankTypes;
public static IPlankType getPlankType(int index) { public static IPlankType getPlankType(int index) {
IDesignMaterial wood = CarpentryManager.carpentryInterface.getWoodMaterial(index); IDesignMaterial wood = CarpentryManager.carpentryInterface.getWoodMaterial(index);
if (wood instanceof IPlankType) { if (wood instanceof IPlankType) {
@@ -97,16 +100,18 @@ public class WoodManager {
} }
public static List<IPlankType> getAllPlankTypes() { public static List<IPlankType> getAllPlankTypes() {
if (allPlankTypes != null) {
return allPlankTypes;
}
List<IPlankType> list = new ArrayList<>(); List<IPlankType> list = new ArrayList<>();
Collections.addAll(list, PlankType.ExtraTreePlanks.values()); Collections.addAll(list, PlankType.ExtraTreePlanks.values());
Collections.addAll(list, PlankType.ForestryPlanks.values()); Collections.addAll(list, PlankType.ForestryPlanks.values());
for (IPlankType type : PlankType.ExtraBiomesPlank.values()) { if (Mods.extraBiomes.active()) {
if (type.getStack() != null) { Collections.addAll(list, PlankType.ExtraBiomesPlank.values());
list.add(type);
}
} }
Collections.addAll(list, PlankType.VanillaPlanks.values()); Collections.addAll(list, PlankType.VanillaPlanks.values());
allPlankTypes = list;
return list; return list;
} }
@@ -29,19 +29,18 @@ public class Lumbermill {
public static Map<ItemStack, ItemStack> recipes = new HashMap<>(); public static Map<ItemStack, ItemStack> recipes = new HashMap<>();
public static ItemStack getPlankProduct(ItemStack item) { public static ItemStack getPlankProduct(ItemStack item) {
ItemStack stack = null;
if (Lumbermill.recipes.isEmpty()) { if (Lumbermill.recipes.isEmpty()) {
calculateLumbermillProducts(); calculateLumbermillProducts();
} }
for (Map.Entry<ItemStack, ItemStack> entry : Lumbermill.recipes.entrySet()) { for (Map.Entry<ItemStack, ItemStack> entry : Lumbermill.recipes.entrySet()) {
if (entry.getKey().isItemEqual(item)) { if (entry.getKey().isItemEqual(item)) {
stack = entry.getValue().copy(); ItemStack stack = entry.getValue().copy();
break; stack.stackSize = 6;
return stack;
} }
} }
stack.stackSize = 6; return null;
return stack;
} }
public static void calculateLumbermillProducts() { public static void calculateLumbermillProducts() {
@@ -1,6 +1,6 @@
package binnie.extratrees.nei; package binnie.extratrees.nei;
import java.awt.*; import java.awt.Rectangle;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@@ -1,6 +1,6 @@
package binnie.genetics.nei; package binnie.genetics.nei;
import java.awt.*; import java.awt.Rectangle;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@@ -1,6 +1,6 @@
package binnie.genetics.nei; package binnie.genetics.nei;
import java.awt.*; import java.awt.Rectangle;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@@ -1,6 +1,9 @@
package binnie.genetics.nei; package binnie.genetics.nei;
import java.awt.*; import static binnie.genetics.Genetics.itemSerum;
import static binnie.genetics.Genetics.itemSerumArray;
import java.awt.Rectangle;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@@ -15,11 +18,9 @@ import binnie.core.Mods;
import binnie.core.nei.NEIUtils; import binnie.core.nei.NEIUtils;
import binnie.core.nei.PositionedFluidTank; import binnie.core.nei.PositionedFluidTank;
import binnie.core.nei.RecipeHandlerBase; import binnie.core.nei.RecipeHandlerBase;
import binnie.genetics.Genetics;
import binnie.genetics.api.IItemSerum; import binnie.genetics.api.IItemSerum;
import binnie.genetics.item.GeneticLiquid; import binnie.genetics.item.GeneticLiquid;
import codechicken.lib.gui.GuiDraw; import codechicken.lib.gui.GuiDraw;
import codechicken.nei.ItemList;
import codechicken.nei.NEIServerUtils; import codechicken.nei.NEIServerUtils;
import codechicken.nei.PositionedStack; import codechicken.nei.PositionedStack;
import forestry.api.genetics.AlleleManager; import forestry.api.genetics.AlleleManager;
@@ -30,14 +31,9 @@ public class InoculatorRecipeHandler extends RecipeHandlerBase {
private static final List<InoculatorRecipe> recipes = new ArrayList<>(); private static final List<InoculatorRecipe> recipes = new ArrayList<>();
private void createInoculatorRecipeForNEI(ItemStack dnaManipulable) { private void createInoculatorRecipeForNEI(ItemStack dnaManipulable) {
recipes.add(new InoculatorRecipe(dnaManipulable, new ItemStack(itemSerum, 1, OreDictionary.WILDCARD_VALUE)));
recipes.add( recipes.add(
new InoculatorRecipe( new InoculatorRecipe(dnaManipulable, new ItemStack(itemSerumArray, 1, OreDictionary.WILDCARD_VALUE)));
dnaManipulable,
new ItemStack(Genetics.itemSerum, 1, OreDictionary.WILDCARD_VALUE)));
recipes.add(
new InoculatorRecipe(
dnaManipulable,
new ItemStack(Genetics.itemSerumArray, 1, OreDictionary.WILDCARD_VALUE)));
} }
@Override @Override
@@ -151,9 +147,10 @@ public class InoculatorRecipeHandler extends RecipeHandlerBase {
if (recipe.getSerum() != null && recipe.getDnaManipulable() != null) { if (recipe.getSerum() != null && recipe.getDnaManipulable() != null) {
ISpeciesRoot root1 = AlleleManager.alleleRegistry.getSpeciesRoot(recipe.getDnaManipulable()); ISpeciesRoot root1 = AlleleManager.alleleRegistry.getSpeciesRoot(recipe.getDnaManipulable());
List<ItemStack> serums = new ArrayList<>(); List<ItemStack> serums = new ArrayList<>(200);
List<ItemStack> allSerumList = new ArrayList<>(1000);
for (ItemStack serumStack : ItemList.itemMap.get(recipe.getSerum().getItem())) { recipe.serum.getItem().getSubItems(recipe.serum.getItem(), null, allSerumList);
for (ItemStack serumStack : allSerumList) {
if (serumStack.getTagCompound() != null) { if (serumStack.getTagCompound() != null) {
IItemSerum itemSerum = (IItemSerum) serumStack.getItem(); IItemSerum itemSerum = (IItemSerum) serumStack.getItem();
ISpeciesRoot root2 = itemSerum.getSpeciesRoot(serumStack); ISpeciesRoot root2 = itemSerum.getSpeciesRoot(serumStack);
@@ -1,6 +1,6 @@
package binnie.genetics.nei; package binnie.genetics.nei;
import java.awt.*; import java.awt.Rectangle;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@@ -1,6 +1,6 @@
package binnie.genetics.nei; package binnie.genetics.nei;
import java.awt.*; import java.awt.Rectangle;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@@ -18,7 +18,6 @@ import binnie.genetics.Genetics;
import binnie.genetics.api.IItemSerum; import binnie.genetics.api.IItemSerum;
import binnie.genetics.item.GeneticLiquid; import binnie.genetics.item.GeneticLiquid;
import codechicken.lib.gui.GuiDraw; import codechicken.lib.gui.GuiDraw;
import codechicken.nei.ItemList;
import codechicken.nei.NEIServerUtils; import codechicken.nei.NEIServerUtils;
import codechicken.nei.PositionedStack; import codechicken.nei.PositionedStack;
import forestry.api.genetics.AlleleManager; import forestry.api.genetics.AlleleManager;
@@ -143,9 +142,10 @@ public class SplicerRecipeHandler extends RecipeHandlerBase {
public CachedSplicer(SplicerRecipe recipe) { public CachedSplicer(SplicerRecipe recipe) {
if (recipe.getSerum() != null && recipe.getDnaManipulable() != null) { if (recipe.getSerum() != null && recipe.getDnaManipulable() != null) {
ISpeciesRoot root1 = AlleleManager.alleleRegistry.getSpeciesRoot(recipe.getDnaManipulable()); ISpeciesRoot root1 = AlleleManager.alleleRegistry.getSpeciesRoot(recipe.getDnaManipulable());
List<ItemStack> serums = new ArrayList<>(); List<ItemStack> serums = new ArrayList<>(200);
List<ItemStack> allSerumList = new ArrayList<>(1000);
for (ItemStack serumStack : ItemList.itemMap.get(recipe.getSerum().getItem())) { recipe.serum.getItem().getSubItems(recipe.serum.getItem(), null, allSerumList);
for (ItemStack serumStack : allSerumList) {
if (serumStack.getTagCompound() != null) { if (serumStack.getTagCompound() != null) {
IItemSerum itemSerum = (IItemSerum) serumStack.getItem(); IItemSerum itemSerum = (IItemSerum) serumStack.getItem();
ISpeciesRoot root2 = itemSerum.getSpeciesRoot(serumStack); ISpeciesRoot root2 = itemSerum.getSpeciesRoot(serumStack);
@@ -182,7 +182,12 @@ binniecore.beemodifier.mutation=Mutation
binniecore.beemodifier.lifespan=Lifespan binniecore.beemodifier.lifespan=Lifespan
binniecore.beemodifier.production=Production binniecore.beemodifier.production=Production
binniecore.beemodifier.flowering=Flowering binniecore.beemodifier.flowering=Flowering
binniecore.beemodifier.geneticdecay=Genetic Decay binniecore.beemodifier.genetic_decay=Genetic Decay
binniecore.beebooleanmodifier.sealed=Rain Protection
binniecore.beebooleanmodifier.self_lighted=Self Lighting
binniecore.beebooleanmodifier.sunlight_stimulated=Sunlight Stimulation
binniecore.beebooleanmodifier.hellish=Hellish Emulation
binniecore.gui.breedingmessage.species=Species Discovered binniecore.gui.breedingmessage.species=Species Discovered
binniecore.gui.breedingmessage.branch=Branch Discovered binniecore.gui.breedingmessage.branch=Branch Discovered
@@ -182,7 +182,7 @@ binniecore.beemodifier.mutation=Мутация
binniecore.beemodifier.lifespan=Время жизни binniecore.beemodifier.lifespan=Время жизни
binniecore.beemodifier.production=Продукция binniecore.beemodifier.production=Продукция
binniecore.beemodifier.flowering=Цветы binniecore.beemodifier.flowering=Цветы
binniecore.beemodifier.geneticdecay=Склонность к вырождению binniecore.beemodifier.genetic_decay=Склонность к вырождению
binniecore.gui.breedingmessage.species=Видов обнаружено binniecore.gui.breedingmessage.species=Видов обнаружено
binniecore.gui.breedingmessage.branch=Семейств обнаружено binniecore.gui.breedingmessage.branch=Семейств обнаружено
@@ -182,7 +182,7 @@ binniecore.beemodifier.mutation=变异
binniecore.beemodifier.lifespan=寿命 binniecore.beemodifier.lifespan=寿命
binniecore.beemodifier.production=产物 binniecore.beemodifier.production=产物
binniecore.beemodifier.flowering=授粉速度 binniecore.beemodifier.flowering=授粉速度
binniecore.beemodifier.geneticdecay=基因衰变 binniecore.beemodifier.genetic_decay=基因衰变
binniecore.gui.breedingmessage.species=已发现品种 binniecore.gui.breedingmessage.species=已发现品种
binniecore.gui.breedingmessage.branch=已发现分支 binniecore.gui.breedingmessage.branch=已发现分支
@@ -366,7 +366,7 @@ for.binnie.circuit.garden.damp.neutral=Garden (Damp, Neutral)
for.binnie.circuit.garden.damp.alkaline=Garden (Damp, Alkaline) for.binnie.circuit.garden.damp.alkaline=Garden (Damp, Alkaline)
botany.tube.name=Insulated Tube botany.tube.name=Insulated Tube
botany.tube.cooper=Cooper botany.tube.copper=Copper
botany.tube.tin=Tin botany.tube.tin=Tin
botany.tube.bronze=Bronze botany.tube.bronze=Bronze
botany.tube.iron=Iron botany.tube.iron=Iron
@@ -366,7 +366,7 @@ for.binnie.circuit.garden.damp.neutral=Сад (влажный, нейтраль
for.binnie.circuit.garden.damp.alkaline=Сад (влажный, щелочной) for.binnie.circuit.garden.damp.alkaline=Сад (влажный, щелочной)
botany.tube.name=изолирующая лампа botany.tube.name=изолирующая лампа
botany.tube.cooper=Медная botany.tube.copper=Медная
botany.tube.tin=Оловяная botany.tube.tin=Оловяная
botany.tube.bronze=Бронзовая botany.tube.bronze=Бронзовая
botany.tube.iron=Железная botany.tube.iron=Железная
@@ -364,7 +364,7 @@ for.binnie.circuit.garden.damp.neutral=花土(潮湿,中性)
for.binnie.circuit.garden.damp.alkaline=花土(潮湿,碱性) for.binnie.circuit.garden.damp.alkaline=花土(潮湿,碱性)
botany.tube.name=恒温管 botany.tube.name=恒温管
botany.tube.cooper=铜 botany.tube.copper=铜
botany.tube.tin=锡 botany.tube.tin=锡
botany.tube.bronze=青铜 botany.tube.bronze=青铜
botany.tube.iron=铁 botany.tube.iron=铁
@@ -191,6 +191,9 @@ extrabees.machine.alveay.frame.tooltip=Hive Frames
extrabees.machine.alveay.lighting=Alveary Lighting extrabees.machine.alveay.lighting=Alveary Lighting
extrabees.machine.alveay.lighting.info=The Alveary Lighting tricks bees into thinking it is daylight at night time. extrabees.machine.alveay.lighting.info=The Alveary Lighting tricks bees into thinking it is daylight at night time.
extrabees.machine.alveay.unlighting=Alveary Unlighting
extrabees.machine.alveay.unlighting.info=The Alveary Unlighting tricks bees into thinking it is night time during the day.
extrabees.machine.alveay.mutator=Mutator extrabees.machine.alveay.mutator=Mutator
extrabees.machine.alveay.mutator.info=The Mutator uses certain items in order to encourage bee mutation. extrabees.machine.alveay.mutator.info=The Mutator uses certain items in order to encourage bee mutation.
extrabees.machine.alveay.mutator.tooltip=Mutagenic Agents extrabees.machine.alveay.mutator.tooltip=Mutagenic Agents
@@ -253,7 +256,7 @@ extrabees.genetics.allele.caveDwelling=Cave Dwelling
extrabees.genetics.allele.tolerantFlyer=Rainfall extrabees.genetics.allele.tolerantFlyer=Rainfall
extrabees.genetics.corrupted=Corrupted extrabees.genetics.corrupted=Corrupted
extrabees.genetics.requirements.user=Can only be bred by %s extrabees.genetics.requirements.user=Inspired by %s
for.genus.bees.barren=Barren for.genus.bees.barren=Barren
for.genus.bees.barren.description=Although initially these bees are considerably useless due to their meagre combs, they can lead onto greater things. for.genus.bees.barren.description=Although initially these bees are considerably useless due to their meagre combs, they can lead onto greater things.
@@ -253,7 +253,7 @@ extrabees.genetics.allele.caveDwelling=пещерности
extrabees.genetics.allele.tolerantFlyer=дождливости extrabees.genetics.allele.tolerantFlyer=дождливости
extrabees.genetics.corrupted=повреждено extrabees.genetics.corrupted=повреждено
extrabees.genetics.requirements.user=Может быть выведено только игроком %s extrabees.genetics.requirements.user=Inspired by %s
# КЛАССЫ ПЧЁЛ # КЛАССЫ ПЧЁЛ
@@ -253,7 +253,7 @@ extrabees.genetics.allele.caveDwelling=穴居性
extrabees.genetics.allele.tolerantFlyer=耐雨飞行性 extrabees.genetics.allele.tolerantFlyer=耐雨飞行性
extrabees.genetics.corrupted=肮脏的 extrabees.genetics.corrupted=肮脏的
extrabees.genetics.requirements.user=Can only be bred by %s extrabees.genetics.requirements.user=Inspired by %s
for.genus.bees.barren=荒芜 for.genus.bees.barren=荒芜
for.genus.bees.barren.description=人们因其贫瘠的蜂窝而小看这些蜜蜂,但它们仍能引发巨大的变动。 for.genus.bees.barren.description=人们因其贫瘠的蜂窝而小看这些蜜蜂,但它们仍能引发巨大的变动。
@@ -515,4 +515,4 @@ extrabees.gui.database.tab.species.further=次代突变
extrabees.gui.database.tab.branches.overview=概述 extrabees.gui.database.tab.branches.overview=概述
extrabees.gui.database.tab.branches.species=种 extrabees.gui.database.tab.branches.species=种
extrabees.gui.database.tab.breeder=杂交路线 extrabees.gui.database.tab.breeder=杂交路线
Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB