Compare commits

..
2 Commits
46 changed files with 1810 additions and 440 deletions

No files matched your search

+33
View File
@@ -0,0 +1,33 @@
#!/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
+1 -7
View File
@@ -26,13 +26,7 @@ whitelist.json
*.iml
*.ipr
*.iws
src/main/resources/mixins.*([!.]).json
src/main/resources/mixins.*.json
*.bat
*.DS_Store
!gradlew.bat
.factorypath
addon.local.gradle
addon.local.gradle.kts
addon.late.local.gradle
addon.late.local.gradle.kts
layout.json
+1603 -3
View File
File diff suppressed because it is too large. Load diff
+5 -5
View File
@@ -1,12 +1,12 @@
// Add your dependencies here
dependencies {
api('com.github.GTNewHorizons:ForestryMC:4.9.7:dev')
implementation('com.github.GTNewHorizons:GTNHLib:0.4.2:dev')
implementation('com.github.GTNewHorizons:GTNHLib:0.0.13:dev')
compile('com.github.GTNewHorizons:ForestryMC:4.6.12-pre:dev')
compile('com.github.GTNewHorizons:NotEnoughItems:2.3.73-GTNH:dev')
devOnlyNonPublishable('com.github.GTNewHorizons:NotEnoughItems:2.6.22-GTNH:dev')
compileOnly('com.github.GTNewHorizons:BuildCraft:7.1.34:api')
compileOnly('com.github.GTNewHorizons:BuildCraft:7.1.39:api')
compileOnly('net.industrial-craft:industrialcraft-2:2.2.828-experimental:dev')
compileOnly("curse.maven:extrabiomesxl-60041:2273301")
compileOnly('curse.maven:cofh-lib-220333:2388748')
}
+36 -123
View File
@@ -1,109 +1,65 @@
# 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
# Case-sensitive identifier string, available for mcmod.info population and used for automatic mixin JSON generation.
# Conventionally lowercase.
# This is a case-sensitive string to identify your mod. Convention is to use lower case.
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
# Whether to use modGroup as the maven publishing group.
# Due to a history of using JitPack, the default is com.github.GTNewHorizons for all mods.
useModGroupForPublishing = false
# WHY is there no version field?
# The build script relies on git to provide a version via tags. It is super easy and will enable you to always know the
# code base or your binary. Check out this tutorial: https://blog.mattclemente.com/2017/10/13/versioning-with-git-tags/
# Updates your build.gradle and settings.gradle automatically whenever an update is available.
# Will update your build.gradle automatically whenever an update is available
autoUpdateBuildScript = false
# Version of Minecraft to target
minecraftVersion = 1.7.10
# Version of Minecraft Forge to target
forgeVersion = 10.13.4.1614
# Specify an MCP channel for dependency deobfuscation and the deobfParams task.
# Specify a MCP channel and mappings version for dependency deobfuscation and the deobfParams task.
channel = stable
# Specify an MCP mappings version for dependency deobfuscation and the deobfParams task.
mappingsVersion = 12
# Defines other MCP mappings for dependency deobfuscation.
remoteMappings = https\://raw.githubusercontent.com/MinecraftForge/FML/1.7.10/conf/
# Define other MCP mappings for dependency deobfuscation
remoteMappings = https://raw.githubusercontent.com/MinecraftForge/FML/1.7.10/conf/
# Select a default username for testing your mod. You can always override this per-run by running
# `./gradlew runClient --username=AnotherPlayer`, or configuring this command in your IDE.
# Select a username for testing your mod with breakpoints. You may leave this empty for a random username each time you
# restart Minecraft in development. Choose this dependent on your mod:
# 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
# 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
# Define a source file of your project with:
# 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
# version in @Mod([...], version = VERSION, [...]).
# Leave these properties empty to skip individual token replacements.
# version in @Mod([...], version = VERSION, [...])
# Leave these properties empty to skip individual token replacements
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
# 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 =
# Specify the configuration file for Forge's access transformers here. It must be placed into /src/main/resources/META-INF/
# There can be multiple files in a space-separated list.
# Example value: mymodid_at.cfg nei_at.cfg
# Example value: mymodid_at.cfg
accessTransformersFile =
# Provides setup for Mixins if enabled. If you don't know what mixins are: Keep it disabled!
usesMixins = false
# 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.
# Adds some debug arguments like verbose output and export
usesMixinDebug = false
# Specify the location of your implementation of IMixinConfigPlugin. Leave it empty otherwise.
mixinPlugin =
# Specify the package that contains all of your Mixins. You may only place Mixins in this package or the build will fail!
mixinsPackage =
# Specify the core mod entry class if you use a core mod. This class must implement IFMLLoadingPlugin!
# 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 =
# 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!
containsMixinsAndOrCoreModOnly = false
@@ -111,38 +67,15 @@ containsMixinsAndOrCoreModOnly = false
# Enables Mixins even if this mod doesn't use them, useful if one of the dependencies uses mixins.
forceEnableMixins = false
# If enabled, you may use 'shadowCompile' for dependencies. They will be integrated into your jar. It is your
# responsibility to check the license and request permission for distribution if required.
# If enabled, you may use 'shadowCompile' for dependencies. They will be integrated in your jar. It is your
# responsibility check the licence and request permission for distribution, if required.
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
# If disabled, won't rename the shadowed classes.
relocateShadowedDependencies = true
# Publishing to modrinth requires you to set the MODRINTH_TOKEN environment variable to your current modrinth API token.
# 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.
# Leave this empty if you don't want to publish to Modrinth.
# Leave this empty if you don't want to publish on Modrinth.
modrinthProjectId =
# The project's relations on Modrinth. You can use this to refer to other projects on Modrinth.
@@ -154,8 +87,9 @@ modrinthProjectId =
# Note: GTNH Mixins is automatically set as a required dependency if usesMixins = true
modrinthRelations =
# 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.
# Leave this empty if you don't want to publish on CurseForge.
curseForgeProjectId =
@@ -165,39 +99,18 @@ curseForgeProjectId =
# Where type can be one of [requiredDependency, embeddedLibrary, optionalDependency, tool, incompatible],
# and the name is the CurseForge project slug of the other mod.
# Example: requiredDependency:railcraft;embeddedLibrary:cofhlib;incompatible:buildcraft
# Note: UniMixins is automatically set as a required dependency if usesMixins = true.
# Note: GTNH Mixins is automatically set as a required dependency if usesMixins = true
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.
customArchiveBaseName = binnie-mods
# Optional parameter to have the build automatically fail if an illegal version is used.
# 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 =
# Optional parameter to prevent the source code from being published
# noPublishedSources =
# Uncomment to prevent the source code from being published.
# noPublishedSources = true
# Uncomment this to disable Spotless checks.
# Uncomment this to disable spotless checks
# 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.
# 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
# disableSpotless = true
Binary file not shown.
+1 -2
View File
@@ -1,7 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Vendored
+13 -21
View File
@@ -15,8 +15,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
#
##############################################################################
#
@@ -57,7 +55,7 @@
# 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
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
@@ -85,9 +83,10 @@ 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
' "$PWD" ) || exit
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
# 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"'
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
@@ -134,13 +133,10 @@ 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.
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
fi
# Increase the maximum file descriptors if we can.
@@ -148,7 +144,7 @@ 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
# shellcheck disable=SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
@@ -156,7 +152,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC2039,SC3045
# shellcheck disable=SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
@@ -201,15 +197,11 @@ if "$cygwin" || "$msys" ; then
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, 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.
# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
# double quotes to make sure that they get re-expanded; and
# * put everything else in single quotes, so that it's not re-expanded.
set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
Vendored
+10 -12
View File
@@ -13,8 +13,6 @@
@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 ##########################################################################
@@ -45,11 +43,11 @@ 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
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
@@ -59,11 +57,11 @@ 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
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
+22
View File
@@ -1,4 +1,26 @@
// Add any additional repositories for your dependencies here
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'
}
}
+11 -4
View File
@@ -4,10 +4,10 @@ pluginManagement {
maven {
// RetroFuturaGradle
name "GTNH Maven"
url "https://nexus.gtnewhorizons.com/repository/public/"
url "http://jenkins.usrv.eu:8081/nexus/content/groups/public/"
allowInsecureProtocol = true
mavenContent {
includeGroup("com.gtnewhorizons")
includeGroupByRegex("com\\.gtnewhorizons\\..+")
includeGroup("com.gtnewhorizons.retrofuturagradle")
}
}
gradlePluginPortal()
@@ -17,5 +17,12 @@ pluginManagement {
}
plugins {
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.26'
id 'com.diffplug.blowdryerSetup' version '1.6.0'
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 {
Copper(0xe3b78e, "copper"),
Copper(0xe3b78e, "cooper"),
Tin(0xe1eef4, "tin"),
Bronze(0xddc276, "bronze"),
Iron(0xd8d8d8, "iron");
@@ -42,7 +42,6 @@ import forestry.api.genetics.IPollinatable;
import forestry.api.lepidopterology.IButterfly;
import forestry.api.lepidopterology.IButterflyNursery;
import forestry.lepidopterology.entities.EntityButterfly;
import forestry.plugins.PluginLepidopterology;
public class TileEntityFlower extends TileEntity implements IPollinatable, IButterflyNursery {
@@ -457,7 +456,7 @@ public class TileEntityFlower extends TileEntity implements IPollinatable, IButt
if (worldObj.rand.nextFloat() >= spawn.getGenome().getPrimary().getRarity() * 0.5f) {
return;
}
if (worldObj.countEntities(EntityButterfly.class) > PluginLepidopterology.spawnConstraint) {
if (worldObj.countEntities(EntityButterfly.class) > 100) {
return;
}
if (!spawn.canSpawn(worldObj, x, y, z)) {
@@ -92,7 +92,6 @@ public enum EnumFlowerColor implements IFlowerColor {
YELLOW("yellow", 0xffff00),
YELLOW_GREEN("yellowGreen", 0x9acd32);
private static final EnumFlowerColor[] ALL_VALUES = values();
private int color;
private int colorDis;
private String name;
@@ -2964,7 +2963,7 @@ public enum EnumFlowerColor implements IFlowerColor {
}
public static EnumFlowerColor get(int i) {
return ALL_VALUES[Math.max(0, i) % ALL_VALUES.length];
return values()[Math.max(0, i) % values().length];
}
@Override
-2
View File
@@ -12,7 +12,6 @@ public class Mods {
public static Mod forestry;
public static Mod ic2;
public static Mod botania;
public static Mod extraBiomes;
private static Item findItem(String modId, String name) {
Item stack = GameRegistry.findItem(modId, name);
@@ -42,7 +41,6 @@ public class Mods {
Mods.forestry = new Mod("Forestry");
Mods.ic2 = new Mod("IC2");
Mods.botania = new Mod("Botania");
Mods.extraBiomes = new Mod("ExtrabiomesXL");
}
public static class Mod {
@@ -30,8 +30,6 @@ import binnie.core.craftgui.events.EventMouse;
import binnie.core.craftgui.geometry.IArea;
import binnie.core.craftgui.geometry.IBorder;
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.SideOnly;
@@ -78,8 +76,6 @@ public class GuiCraftGUI extends GuiContainer {
@Override
public void drawScreen(int mouseX, int mouseY, float par3) {
NEIHook.preDraw();
window.setMousePosition(mouseX - (int) window.getPosition().x(), mouseY - (int) window.getPosition().y());
drawDefaultBackground();
@@ -93,9 +89,6 @@ public class GuiCraftGUI extends GuiContainer {
window.render();
RenderHelper.enableGUIStandardItemLighting();
NEIHook.renderObjects(window, mouseX, mouseY);
GL11.glPushMatrix();
GL11.glEnable(32826); // GL_RESCALE_NORMAL_EXT
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, 240.0f, 240.0f);
@@ -116,13 +109,10 @@ public class GuiCraftGUI extends GuiContainer {
} else {
tooltip.setType(Tooltip.Type.STANDARD);
window.getTooltip(tooltip);
NEIHook.renderToolTips(mouseX, mouseY);
}
if (tooltip.exists()) {
renderTooltip(new IPoint(mouseX, mouseY), tooltip);
} else {
NEIHook.renderToolTips(mouseX, mouseY);
}
zLevel = 0.0f;
GL11.glEnable(GL11.GL_LIGHTING);
@@ -229,8 +219,6 @@ public class GuiCraftGUI extends GuiContainer {
@Override
protected void mouseClicked(int x, int y, int button) {
NEIHook.mouseClicked(x, y, button);
IWidget origin = window;
if (window.getMousedOverWidget() != null) {
origin = window.getMousedOverWidget();
@@ -240,8 +228,6 @@ public class GuiCraftGUI extends GuiContainer {
@Override
protected void keyTyped(char c, int key) {
NEIHook.lastKeyTyped(key, c);
if (key == 1 || (key == mc.gameSettings.keyBindInventory.getKeyCode() && window.getFocusedWidget() == null)) {
mc.thePlayer.closeScreen();
}
@@ -255,7 +241,6 @@ public class GuiCraftGUI extends GuiContainer {
if (button != -1) {
window.callEvent(new EventMouse.Up(origin, x, y, button));
}
NEIHook.mouseUp(x, y, button);
}
@Override
@@ -265,8 +250,6 @@ public class GuiCraftGUI extends GuiContainer {
if (dWheel != 0) {
window.callEvent(new EventMouse.Wheel(window, dWheel));
}
NEIHook.handleMouseWheel();
}
@Override
@@ -523,13 +506,4 @@ public class GuiCraftGUI extends GuiContainer {
GL11.glDisable(GL11.GL_BLEND);
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,7 +29,6 @@ import binnie.core.craftgui.minecraft.control.ControlHelp;
import binnie.core.craftgui.minecraft.control.ControlInfo;
import binnie.core.craftgui.minecraft.control.ControlPowerSystem;
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.EnumHighlighting;
import binnie.core.craftgui.renderer.Renderer;
@@ -41,7 +40,6 @@ import binnie.core.machines.Machine;
import binnie.core.machines.inventory.IInventoryMachine;
import binnie.core.machines.network.INetwork;
import binnie.core.machines.power.PowerSystem;
import binnie.core.nei.NEIHook;
import binnie.core.network.packet.MessageCraftGUI;
import binnie.core.resource.BinnieResource;
import binnie.core.resource.ResourceType;
@@ -120,9 +118,6 @@ public abstract class Window extends TopLevelWidget implements INetwork.RecieveG
if (!widget.calculateIsMouseOver()) {
continue;
}
if (NEIHook.enabled && widget instanceof ControlSlotBase) {
return;
}
if (widget instanceof ITooltip) {
((ITooltip) widget).getTooltip(tooltip);
if (tooltip.exists()) {
@@ -13,7 +13,6 @@ import binnie.core.craftgui.geometry.IArea;
import binnie.core.craftgui.geometry.IPoint;
import binnie.core.craftgui.minecraft.Window;
import binnie.core.craftgui.resource.minecraft.CraftGUITexture;
import binnie.core.nei.NEIHook;
public abstract class ControlSlotBase extends Control implements ITooltip {
@@ -61,7 +60,6 @@ public abstract class ControlSlotBase extends Control implements ITooltip {
@Override
public void getTooltip(Tooltip tooltip) {
if (NEIHook.enabled) return;
ItemStack item = getItemStack();
if (item == null) {
return;
@@ -6,9 +6,12 @@ import java.util.Map;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemFood;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import net.minecraft.world.World;
import net.minecraftforge.fluids.FluidStack;
import binnie.Binnie;
@@ -16,7 +19,7 @@ import binnie.core.util.I18N;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class ItemFluidContainer extends Item {
public class ItemFluidContainer extends ItemFood {
private FluidContainer container;
public static int LiquidExtraBee = 64;
@@ -36,6 +39,7 @@ public class ItemFluidContainer extends Item {
}
public ItemFluidContainer(FluidContainer container) {
super(0, false);
this.container = container;
container.item = this;
maxStackSize = container.getMaxStackSize();
@@ -109,4 +113,26 @@ public class ItemFluidContainer extends Item {
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).isRecipe()) {
if (destination.getStackInSlot(slot) != null) {
if (item.isStackable() && destination.getInventoryStackLimit() > 1) {
if (item.isStackable()) {
ItemStack merged = destination.getStackInSlot(slot).copy();
ItemStack[] newStacks = mergeStacks(item.copy(), merged.copy());
item = newStacks[0];
@@ -158,9 +158,8 @@ public class TransferRequest {
if (item.stackSize <= 0) {
item = null;
}
return item;
}
return null;
return item;
}
}
}
@@ -256,12 +255,7 @@ public class TransferRequest {
FluidStack largeAmountOfLiquid = containerLiquid.copy();
largeAmountOfLiquid.amount = tank.getCapacity();
int amountAdded = tank.fill(largeAmountOfLiquid, false);
int numberOfContainersToAdd;
if (containerLiquid.amount > 0) {
numberOfContainersToAdd = amountAdded / containerLiquid.amount;
} else {
numberOfContainersToAdd = item.stackSize;
}
int numberOfContainersToAdd = amountAdded / containerLiquid.amount;
if (numberOfContainersToAdd > item.stackSize) {
numberOfContainersToAdd = item.stackSize;
}
@@ -363,12 +357,7 @@ public class TransferRequest {
int maximumExtractedLiquid = item.stackSize * fluid.amount;
FluidStack drainedLiquid = tank.drain(maximumExtractedLiquid, false);
int amountInTank = (drainedLiquid == null) ? 0 : drainedLiquid.amount;
int numberOfContainersToFill;
if (fluid.amount > 0) {
numberOfContainersToFill = amountInTank / fluid.amount;
} else {
numberOfContainersToFill = item.stackSize;
}
int numberOfContainersToFill = amountInTank / fluid.amount;
if (numberOfContainersToFill > item.stackSize) {
numberOfContainersToFill = item.stackSize;
}
@@ -1,49 +0,0 @@
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
@@ -1,107 +0,0 @@
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);
}
}
+1 -5
View File
@@ -2,11 +2,7 @@ package binnie.core.nei;
import net.minecraft.block.Block;
import net.minecraft.item.ItemStack;
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;
import net.minecraftforge.fluids.*;
public class NEIUtils {
@@ -1,7 +1,6 @@
package binnie.core.nei;
import java.awt.Point;
import java.awt.Rectangle;
import java.awt.*;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
@@ -1,6 +1,6 @@
package binnie.core.nei;
import java.awt.Rectangle;
import java.awt.*;
import java.util.ArrayList;
import java.util.List;
@@ -1,7 +1,6 @@
package binnie.core.nei;
import java.awt.Point;
import java.awt.Rectangle;
import java.awt.*;
import java.util.ArrayList;
import java.util.List;
@@ -36,7 +36,7 @@ public enum EnumHiveFrame implements IHiveFrame, IBeeModifier {
public static void init() {
EnumHiveFrame.Cocoa.logic.setModifier(EnumBeeModifier.LIFESPAN, 0.75f, 0.25f);
EnumHiveFrame.Cocoa.logic.setModifier(EnumBeeModifier.PRODUCTION, 0.5f, 2.0f);// was 1.5x lim 5.0x
EnumHiveFrame.Cocoa.logic.setModifier(EnumBeeModifier.PRODUCTION, 1.5f, 5.0f);
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.PRODUCTION, -0.25f, 0.0f);// was 0.75x lim 0.5x
@@ -20,8 +20,8 @@ public enum CircuitType implements IBeeModifier {
Territory(2, 10);
static {
CircuitType.LowVoltage.logic.setModifier(EnumBeeModifier.PRODUCTION, 0.5f, 5.0f);
CircuitType.HighVoltage.logic.setModifier(EnumBeeModifier.PRODUCTION, 1.5f, 10.0f);
CircuitType.LowVoltage.logic.setModifier(EnumBeeModifier.PRODUCTION, 1.5f, 5.0f);
CircuitType.HighVoltage.logic.setModifier(EnumBeeModifier.PRODUCTION, 2.5f, 10.0f);
CircuitType.Plant.logic.setModifier(EnumBeeModifier.FLOWERING, 1.5f, 5.0f);
CircuitType.Death.logic.setModifier(EnumBeeModifier.LIFESPAN, 0.8f, 0.2f);
CircuitType.Life.logic.setModifier(EnumBeeModifier.LIFESPAN, 1.5f, 5.0f);
@@ -1673,10 +1673,7 @@ public enum ExtraBeeDefinition implements IBeeDefinition {
@Override
protected void registerMutations() {
final ExtraBeeMutation mutation = registerMutation(BeeDefinition.CULTIVATED, CELEBRATORY, 5);
mutation.restrictDateRange(2, 29, 2, 29);
mutation.requireDay();
mutation.restrictPerson(
registerMutation(BeeDefinition.CULTIVATED, CELEBRATORY, 5).restrictPerson(
new RequirementPerson().add(
name -> "" + EnumChatFormatting.DARK_RED
+ EnumChatFormatting.BOLD
@@ -4,9 +4,7 @@ import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import binnie.extrabees.genetics.requirements.DummyMutationCondition;
import binnie.extrabees.genetics.requirements.IMutationRequirement;
import binnie.extrabees.genetics.requirements.RequirementPerson;
import binnie.extrabees.genetics.requirements.*;
import forestry.api.apiculture.BeeManager;
import forestry.api.apiculture.IAlleleBeeSpecies;
import forestry.api.apiculture.IBeeGenome;
@@ -57,6 +57,7 @@ public class RequirementPerson implements IMutationRequirement {
@Override
public boolean fufilled(IBeeHousing housing, IAllele allele0, IAllele allele1, IGenome genome0, IGenome genome1) {
return true;
String ownerName = housing.getOwner().getName();
return ownerName != null && names.contains(ownerName);
}
}
@@ -8,12 +8,13 @@ import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import com.google.common.base.Optional;
import binnie.core.Mods;
import binnie.core.block.TileEntityMetadata;
import binnie.core.util.I18N;
import binnie.extratrees.ExtraTrees;
import binnie.extratrees.api.CarpentryManager;
import extrabiomes.api.Stuff;
public class PlankType {
@@ -266,10 +267,13 @@ public class PlankType {
@Override
public ItemStack getStack() {
if (!Mods.extraBiomes.active()) {
try {
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 Stuff.planks.transform(block -> new ItemStack(block, 1, ordinal())).orNull();
}
@Override
@@ -8,7 +8,6 @@ import net.minecraft.init.Blocks;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import binnie.core.Mods;
import binnie.core.block.TileEntityMetadata;
import binnie.extratrees.ExtraTrees;
import binnie.extratrees.api.CarpentryManager;
@@ -18,8 +17,6 @@ import binnie.extratrees.block.decor.FenceType;
public class WoodManager {
private static List<IPlankType> allPlankTypes;
public static IPlankType getPlankType(int index) {
IDesignMaterial wood = CarpentryManager.carpentryInterface.getWoodMaterial(index);
if (wood instanceof IPlankType) {
@@ -100,18 +97,16 @@ public class WoodManager {
}
public static List<IPlankType> getAllPlankTypes() {
if (allPlankTypes != null) {
return allPlankTypes;
}
List<IPlankType> list = new ArrayList<>();
Collections.addAll(list, PlankType.ExtraTreePlanks.values());
Collections.addAll(list, PlankType.ForestryPlanks.values());
if (Mods.extraBiomes.active()) {
Collections.addAll(list, PlankType.ExtraBiomesPlank.values());
for (IPlankType type : PlankType.ExtraBiomesPlank.values()) {
if (type.getStack() != null) {
list.add(type);
}
}
Collections.addAll(list, PlankType.VanillaPlanks.values());
allPlankTypes = list;
return list;
}
@@ -29,18 +29,19 @@ public class Lumbermill {
public static Map<ItemStack, ItemStack> recipes = new HashMap<>();
public static ItemStack getPlankProduct(ItemStack item) {
ItemStack stack = null;
if (Lumbermill.recipes.isEmpty()) {
calculateLumbermillProducts();
}
for (Map.Entry<ItemStack, ItemStack> entry : Lumbermill.recipes.entrySet()) {
if (entry.getKey().isItemEqual(item)) {
ItemStack stack = entry.getValue().copy();
stack.stackSize = 6;
return stack;
stack = entry.getValue().copy();
break;
}
}
return null;
stack.stackSize = 6;
return stack;
}
public static void calculateLumbermillProducts() {
@@ -1,6 +1,6 @@
package binnie.extratrees.nei;
import java.awt.Rectangle;
import java.awt.*;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
@@ -1,6 +1,6 @@
package binnie.genetics.nei;
import java.awt.Rectangle;
import java.awt.*;
import java.util.ArrayList;
import java.util.List;
@@ -1,6 +1,6 @@
package binnie.genetics.nei;
import java.awt.Rectangle;
import java.awt.*;
import java.util.ArrayList;
import java.util.List;
@@ -1,6 +1,6 @@
package binnie.genetics.nei;
import java.awt.Rectangle;
import java.awt.*;
import java.util.ArrayList;
import java.util.List;
@@ -1,6 +1,6 @@
package binnie.genetics.nei;
import java.awt.Rectangle;
import java.awt.*;
import java.util.ArrayList;
import java.util.List;
@@ -1,6 +1,6 @@
package binnie.genetics.nei;
import java.awt.Rectangle;
import java.awt.*;
import java.util.ArrayList;
import java.util.List;
@@ -366,7 +366,7 @@ for.binnie.circuit.garden.damp.neutral=Garden (Damp, Neutral)
for.binnie.circuit.garden.damp.alkaline=Garden (Damp, Alkaline)
botany.tube.name=Insulated Tube
botany.tube.copper=Copper
botany.tube.cooper=Cooper
botany.tube.tin=Tin
botany.tube.bronze=Bronze
botany.tube.iron=Iron
@@ -366,7 +366,7 @@ for.binnie.circuit.garden.damp.neutral=Сад (влажный, нейтраль
for.binnie.circuit.garden.damp.alkaline=Сад (влажный, щелочной)
botany.tube.name=изолирующая лампа
botany.tube.copper=Медная
botany.tube.cooper=Медная
botany.tube.tin=Оловяная
botany.tube.bronze=Бронзовая
botany.tube.iron=Железная
@@ -364,7 +364,7 @@ for.binnie.circuit.garden.damp.neutral=花土(潮湿,中性)
for.binnie.circuit.garden.damp.alkaline=花土(潮湿,碱性)
botany.tube.name=恒温管
botany.tube.copper=铜
botany.tube.cooper=铜
botany.tube.tin=锡
botany.tube.bronze=青铜
botany.tube.iron=铁
@@ -256,7 +256,7 @@ extrabees.genetics.allele.caveDwelling=Cave Dwelling
extrabees.genetics.allele.tolerantFlyer=Rainfall
extrabees.genetics.corrupted=Corrupted
extrabees.genetics.requirements.user=Inspired by %s
extrabees.genetics.requirements.user=Can only be bred by %s
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.
@@ -253,7 +253,7 @@ extrabees.genetics.allele.caveDwelling=пещерности
extrabees.genetics.allele.tolerantFlyer=дождливости
extrabees.genetics.corrupted=повреждено
extrabees.genetics.requirements.user=Inspired by %s
extrabees.genetics.requirements.user=Может быть выведено только игроком %s
# КЛАССЫ ПЧЁЛ
@@ -253,7 +253,7 @@ extrabees.genetics.allele.caveDwelling=穴居性
extrabees.genetics.allele.tolerantFlyer=耐雨飞行性
extrabees.genetics.corrupted=肮脏的
extrabees.genetics.requirements.user=Inspired by %s
extrabees.genetics.requirements.user=Can only be bred by %s
for.genus.bees.barren=荒芜
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.species=种
extrabees.gui.database.tab.breeder=杂交路线
extrabees.gui.database.tab.breeder=杂交路线