Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
71f71514ae | ||
|
|
74a0fcd883 | ||
|
|
eb36ee9260 | ||
|
|
5988871448 | ||
|
|
5bb88e9115 | ||
|
|
1591cdab8b | ||
|
|
42dd7e3fb5 | ||
|
|
d62c5d0054 | ||
|
|
e20df09909 | ||
|
|
b813b75a8b | ||
|
|
52d9d1aedc | ||
|
|
50bed12f66 | ||
|
|
0d6d7ff9aa | ||
|
|
0b7ae46d2e | ||
|
|
a0cfcc9da6 | ||
|
|
171c5b29f6 | ||
|
|
b5ad490947 | ||
|
|
00051c4594 | ||
|
|
d913e245ed | ||
|
|
f253dfc5dc | ||
|
|
6582ea3e56 | ||
|
|
bb96e7deae | ||
|
|
7643d11e14 | ||
|
|
4eb26e9d77 | ||
|
|
2b1843b74d | ||
|
|
0b312261db | ||
|
|
bd0746583a | ||
|
|
b4143fb0ef | ||
|
|
77c47e9071 | ||
|
|
f27b66c53f | ||
|
|
ad16588e3b | ||
|
|
5acbd0b977 | ||
|
|
7e22128279 | ||
|
|
65e11fa564 | ||
|
|
355c85598e | ||
|
|
63232799bc | ||
|
|
a48f59e0ed | ||
|
|
84d462d8d5 | ||
|
|
b32f2a210c | ||
|
|
c988aa9870 | ||
|
|
6ba66123eb | ||
|
|
1d0568388a | ||
|
|
3968cc320e | ||
|
|
ed1daa1e96 | ||
|
|
ffcc5f7102 | ||
|
|
4c619fd3b2 | ||
|
|
341fea50ba | ||
|
|
e6c67df077 | ||
|
|
d24088ea4b | ||
|
|
a2a57d1656 | ||
|
|
2e36fbcfcc | ||
|
|
bd5bd5c153 | ||
|
|
f324cb53db | ||
|
|
c6815bebdf | ||
|
|
7ffa516892 | ||
|
|
311d618d53 | ||
|
|
9795aad66f | ||
|
|
ea7e2d7de4 | ||
|
|
39f86c8b0c | ||
|
|
5b551eb8ec | ||
|
|
f497114579 | ||
|
|
ea547df4d0 | ||
|
|
39c9f1f6c6 | ||
|
|
4000763323 | ||
|
|
59e98dd290 | ||
|
|
c1ec3e5c8e | ||
|
|
ac4b21b05e | ||
|
|
0e0ded5cc0 | ||
|
|
a1f54e7500 | ||
|
|
5f1b5daa24 | ||
|
|
8d0fa2ebb5 | ||
|
|
0db05cb60c | ||
|
|
0265d70a53 | ||
|
|
32b7efcd15 | ||
|
|
7059206cb0 | ||
|
|
54c702e935 | ||
|
|
a3aa358627 | ||
|
|
f0f14bb278 | ||
|
|
6b4f3eb1c7 | ||
|
|
f74f9e4967 | ||
|
|
12643d1b98 | ||
|
|
5bf4224f03 | ||
|
|
5a1030bde4 | ||
|
|
948876ffcd | ||
|
|
83142abde9 | ||
|
|
79cda2e4fd | ||
|
|
5409309b36 | ||
|
|
1a6e6b3c2c | ||
|
|
e5dfcc7942 | ||
|
|
ea78ca8069 | ||
|
|
29814550bb | ||
|
|
15769b9ee9 | ||
|
|
1253271111 | ||
|
|
d18be7848d | ||
|
|
ef4dd3710a | ||
|
|
190693ad68 | ||
|
|
3dc2806b36 | ||
|
|
a609f5dce5 | ||
|
|
00c214ee5d | ||
|
|
e497b9505a | ||
|
|
b5ac446e55 | ||
|
|
c00e1b39da |
No files matched your search
@@ -32,6 +32,7 @@
|
||||
*.[dD][lL][lL] binary
|
||||
*.[dD][yY][lL][iI][bB] binary
|
||||
*.[pP][sS][dD] binary
|
||||
*.[pP][dD][nN] binary
|
||||
*.[tT][tT][fF] binary
|
||||
*.[oO][tT][fF] binary
|
||||
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
name: Optimize images
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [ master, main, release/** ]
|
||||
paths:
|
||||
- "**/*.png"
|
||||
|
||||
push:
|
||||
branches: [ master, main, release/** ]
|
||||
paths:
|
||||
- "**/*.png"
|
||||
|
||||
jobs:
|
||||
optimize-images:
|
||||
uses: GTNewHorizons/GTNH-Actions-Workflows/.github/workflows/optimize-images.yml@master
|
||||
secrets: inherit
|
||||
@@ -26,7 +26,14 @@ whitelist.json
|
||||
*.iml
|
||||
*.ipr
|
||||
*.iws
|
||||
src/main/resources/mixins.*.json
|
||||
src/main/resources/mixins.*([!.]).json
|
||||
*.bat
|
||||
*.sh
|
||||
*.DS_Store
|
||||
!gradlew.bat
|
||||
.factorypath
|
||||
addon.local.gradle
|
||||
addon.local.gradle.kts
|
||||
addon.late.local.gradle
|
||||
addon.late.local.gradle.kts
|
||||
layout.json
|
||||
|
After Width: | Height: | Size: 231 B |
|
After Width: | Height: | Size: 204 B |
|
After Width: | Height: | Size: 220 B |
|
After Width: | Height: | Size: 220 B |
|
After Width: | Height: | Size: 200 B |
|
After Width: | Height: | Size: 222 B |
|
After Width: | Height: | Size: 219 B |
@@ -1,11 +1,12 @@
|
||||
// Add your dependencies here
|
||||
|
||||
dependencies {
|
||||
api('com.github.GTNewHorizons:ForestryMC:4.6.14:dev')
|
||||
implementation('com.github.GTNewHorizons:GTNHLib:0.0.13:dev')
|
||||
api('com.github.GTNewHorizons:ForestryMC:4.11.39:dev')
|
||||
implementation('com.github.GTNewHorizons:GTNHLib:0.11.54:dev')
|
||||
|
||||
devOnlyNonPublishable('com.github.GTNewHorizons:NotEnoughItems:2.3.81-GTNH:dev')
|
||||
devOnlyNonPublishable('com.github.GTNewHorizons:NotEnoughItems:2.8.162-GTNH:dev')
|
||||
|
||||
compileOnly('com.github.GTNewHorizons:BuildCraft:7.1.36:api')
|
||||
compileOnly('net.industrial-craft:industrialcraft-2:2.2.828-experimental:dev')
|
||||
compileOnly('com.github.GTNewHorizons:BuildCraft:7.1.64:api')
|
||||
compileOnly('net.industrial-craft:industrialcraft-2:2.2.828-experimental:dev')
|
||||
compileOnly("curse.maven:extrabiomesxl-60041:2273301")
|
||||
}
|
||||
@@ -1,65 +1,135 @@
|
||||
# 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
|
||||
|
||||
# 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
|
||||
|
||||
# Root package of the mod, used to find various classes in other properties,
|
||||
# mcmod.info substitution, enabling assertions in run tasks, etc.
|
||||
modGroup = binnie
|
||||
|
||||
# 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/
|
||||
# Whether to use modGroup as the maven publishing group.
|
||||
# When false, com.github.GTNewHorizons is used.
|
||||
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
|
||||
|
||||
# Version of Minecraft to target
|
||||
minecraftVersion = 1.7.10
|
||||
|
||||
# Version of Minecraft Forge to target
|
||||
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
|
||||
|
||||
# Specify an MCP mappings version for dependency deobfuscation and the deobfParams task.
|
||||
mappingsVersion = 12
|
||||
|
||||
# Define other MCP mappings for dependency deobfuscation
|
||||
remoteMappings = https://raw.githubusercontent.com/MinecraftForge/FML/1.7.10/conf/
|
||||
# Defines other MCP mappings for dependency deobfuscation.
|
||||
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
|
||||
# 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
|
||||
# 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.
|
||||
developmentEnvironmentUserName = Developer
|
||||
|
||||
# Define a source file of your project with:
|
||||
# Enables modern Java syntax support. Valid values:
|
||||
# - false: No modern syntax, Java 8 only
|
||||
# - jabel: Jabel syntax-only support, compiles to J8 bytecode
|
||||
# - jvmDowngrader: Full modern Java via JVM Downgrader (syntax + stdlib APIs)
|
||||
# - modern: Native modern Java bytecode, no downgrading
|
||||
enableModernJavaSyntax = jabel
|
||||
|
||||
# If set, ignores the above setting and compiles with the given toolchain. This may cause unexpected issues,
|
||||
# and should *not* be used in most situations. -1 disables this.
|
||||
# forceToolchainVersion = -1
|
||||
|
||||
# Target JVM version for JVM Downgrader bytecode downgrading.
|
||||
# Only used when enableModernJavaSyntax = jvmDowngrader
|
||||
# downgradeTargetVersion = 8
|
||||
|
||||
# Comma-separated list of Java versions for multi-release jar support (JVM Downgrader only).
|
||||
# Classes will be available in META-INF/versions/N/ for each version N in this list.
|
||||
# Default: "21,25" (J25+ gets native classes, J21-24 gets partial downgrade, J8-20 gets full downgrade).
|
||||
# jvmDowngraderMultiReleaseVersions = 21,25
|
||||
|
||||
# Specifies how JVM Downgrader API stubs are provided. Options:
|
||||
# - shade: Shade minimized stubs into the jar
|
||||
# - gtnhlib: GTNHLib provides stubs at runtime (adds version constraint)
|
||||
# - external: Another dependency provides stubs (no constraint, no warning)
|
||||
# - (empty): Warning reminding you to configure stubs
|
||||
# Note: 'shade' option requires you to verify license compliance, see: https://github.com/unimined/JvmDowngrader/blob/main/LICENSE.md
|
||||
# jvmDowngraderStubsProvider =
|
||||
|
||||
# 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 = true
|
||||
|
||||
# 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 = binnie.core.Tags
|
||||
|
||||
# Name of the token containing the project's current version to generate/replace.
|
||||
gradleTokenVersion = 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";
|
||||
# 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
|
||||
replaceGradleTokenInFile = BinnieCore.java
|
||||
gradleTokenModId =
|
||||
gradleTokenModName =
|
||||
gradleTokenVersion = GRADLETOKEN_VERSION
|
||||
gradleTokenGroupName =
|
||||
# version in @Mod([...], version = VERSION, [...]).
|
||||
# Leave these properties empty to skip individual token replacements.
|
||||
replaceGradleTokenInFile =
|
||||
|
||||
# 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/
|
||||
# Example value: mymodid_at.cfg
|
||||
# There can be multiple files in a space-separated list.
|
||||
# Example value: mymodid_at.cfg nei_at.cfg
|
||||
accessTransformersFile =
|
||||
|
||||
# Provides setup for Mixins if enabled. If you don't know what mixins are: Keep it disabled!
|
||||
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
|
||||
|
||||
# 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!
|
||||
|
||||
# Specify the package that contains all of your Mixins. The package must exist or
|
||||
# the build will fail. If you have a package property defined in your mixins.<modid>.json,
|
||||
# it must match with this 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
|
||||
@@ -67,15 +137,38 @@ 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 in your jar. It is your
|
||||
# responsibility check the licence and request permission for distribution, if required.
|
||||
# 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.
|
||||
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.
|
||||
# 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 =
|
||||
|
||||
# The project's relations on Modrinth. You can use this to refer to other projects on Modrinth.
|
||||
@@ -84,33 +177,64 @@ modrinthProjectId =
|
||||
# type can be one of [project, version],
|
||||
# and the name is the Modrinth project or version slug/id of the other mod.
|
||||
# Example: required-project:fplib;optional-project:gasstation;incompatible-project:gregtech
|
||||
# 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.
|
||||
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 =
|
||||
|
||||
# Comma-separated supported CurseForge environments: client, server (case-insensitive).
|
||||
# Use client or server for mods that only support one environment. Defaults to client,server.
|
||||
# These tags describe where the mod can run, not whether installation is required on both sides.
|
||||
curseForgeEnvironments = client,server
|
||||
|
||||
# The project's relations on CurseForge. You can use this to refer to other projects on CurseForge.
|
||||
# Syntax: type1:name1;type2:name2;...
|
||||
# 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: 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 =
|
||||
|
||||
|
||||
# Optional parameter to customize the produced artifacts. Use this to preserver artifact naming when migrating older
|
||||
# Optional parameter to customize the produced artifacts. Use this to preserve artifact naming when migrating older
|
||||
# projects. New projects should not use this parameter.
|
||||
customArchiveBaseName = binnie-mods
|
||||
|
||||
# Optional parameter to prevent the source code from being published
|
||||
# noPublishedSources =
|
||||
# Optional parameter to customize the default working directory used by the runClient* tasks. Relative to the project directory.
|
||||
# runClientWorkingDirectory = run/client
|
||||
|
||||
# Uncomment this to disable spotless checks
|
||||
# Optional parameter to customize the default working directory used by the runServer* tasks. Relative to the project directory.
|
||||
# runServerWorkingDirectory = run/server
|
||||
|
||||
# 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 =
|
||||
|
||||
# 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.
|
||||
# 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
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
#This file is generated by updateDaemonJvm
|
||||
toolchainUrl.FREE_BSD.AARCH64=https\://api.foojay.io/disco/v3.0/ids/539ea72837c6244075f8ee037babc29e/redirect
|
||||
toolchainUrl.FREE_BSD.X86_64=https\://api.foojay.io/disco/v3.0/ids/876dbbf00bf4ef6190f7da074cee903a/redirect
|
||||
toolchainUrl.LINUX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/539ea72837c6244075f8ee037babc29e/redirect
|
||||
toolchainUrl.LINUX.X86_64=https\://api.foojay.io/disco/v3.0/ids/876dbbf00bf4ef6190f7da074cee903a/redirect
|
||||
toolchainUrl.MAC_OS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/9064f22734b42ac03e85df04b632e167/redirect
|
||||
toolchainUrl.MAC_OS.X86_64=https\://api.foojay.io/disco/v3.0/ids/4d0277c49991306ac78048580fe34bcf/redirect
|
||||
toolchainUrl.UNIX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/539ea72837c6244075f8ee037babc29e/redirect
|
||||
toolchainUrl.UNIX.X86_64=https\://api.foojay.io/disco/v3.0/ids/876dbbf00bf4ef6190f7da074cee903a/redirect
|
||||
toolchainUrl.WINDOWS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/a9fa3b809e484a1e1ac4308a5dda661a/redirect
|
||||
toolchainUrl.WINDOWS.X86_64=https\://api.foojay.io/disco/v3.0/ids/aa99913fa6d767d899ffc96082da01ca/redirect
|
||||
toolchainVersion=25
|
||||
@@ -1,6 +1,9 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-9.7.1-bin.zip
|
||||
networkTimeout=10000
|
||||
retries=0
|
||||
retryBackOffMs=500
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# Copyright © 2015-2021 the original authors.
|
||||
# Copyright © 2015 the original authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@@ -15,10 +15,12 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
##############################################################################
|
||||
#
|
||||
# Gradle start up script for POSIX generated by Gradle.
|
||||
# gradlew start up script for POSIX generated by Gradle.
|
||||
#
|
||||
# Important for running:
|
||||
#
|
||||
@@ -27,7 +29,7 @@
|
||||
# bash, then to run this script, type that shell name before the whole
|
||||
# command line, like:
|
||||
#
|
||||
# ksh Gradle
|
||||
# ksh gradlew
|
||||
#
|
||||
# Busybox and similar reduced shells will NOT work, because this script
|
||||
# requires all of these POSIX shell features:
|
||||
@@ -55,7 +57,7 @@
|
||||
# Darwin, MinGW, and NonStop.
|
||||
#
|
||||
# (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/3d91ce3b8caaf77ad09f381f43615b715b53f72c/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# within the Gradle project.
|
||||
#
|
||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||
@@ -83,7 +85,8 @@ done
|
||||
# This is normally unused
|
||||
# shellcheck disable=SC2034
|
||||
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\n' "$PWD" ) || exit
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD=maximum
|
||||
@@ -111,7 +114,6 @@ case "$( uname )" in #(
|
||||
NONSTOP* ) nonstop=true ;;
|
||||
esac
|
||||
|
||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
|
||||
|
||||
# Determine the Java command to use to start the JVM.
|
||||
@@ -130,10 +132,13 @@ location of your Java installation."
|
||||
fi
|
||||
else
|
||||
JAVACMD=java
|
||||
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
if ! command -v java >/dev/null 2>&1
|
||||
then
|
||||
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
fi
|
||||
|
||||
# Increase the maximum file descriptors if we can.
|
||||
@@ -141,7 +146,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=SC3045
|
||||
# shellcheck disable=SC2039,SC3045
|
||||
MAX_FD=$( ulimit -H -n ) ||
|
||||
warn "Could not query maximum file descriptor limit"
|
||||
esac
|
||||
@@ -149,7 +154,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=SC3045
|
||||
# shellcheck disable=SC2039,SC3045
|
||||
ulimit -n "$MAX_FD" ||
|
||||
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
||||
esac
|
||||
@@ -166,7 +171,6 @@ fi
|
||||
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||
if "$cygwin" || "$msys" ; then
|
||||
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
|
||||
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
|
||||
|
||||
JAVACMD=$( cygpath --unix "$JAVACMD" )
|
||||
|
||||
@@ -198,16 +202,15 @@ fi
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
# Collect all arguments for the java command;
|
||||
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $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.
|
||||
# Collect all arguments for the java command:
|
||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
|
||||
# and any embedded shellness will be escaped.
|
||||
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
|
||||
# treated as '${Hostname}' itself on the command line.
|
||||
|
||||
set -- \
|
||||
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||
-classpath "$CLASSPATH" \
|
||||
org.gradle.wrapper.GradleWrapperMain \
|
||||
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
|
||||
"$@"
|
||||
|
||||
# Stop when "xargs" is not available.
|
||||
|
||||
@@ -13,16 +13,18 @@
|
||||
@rem See the License for the specific language governing permissions and
|
||||
@rem limitations under the License.
|
||||
@rem
|
||||
@rem SPDX-License-Identifier: Apache-2.0
|
||||
@rem
|
||||
|
||||
@if "%DEBUG%"=="" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem Gradle startup script for Windows
|
||||
@rem gradlew startup script for Windows
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
@rem Set local scope for the variables, and ensure extensions are enabled
|
||||
setlocal EnableExtensions
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%"=="" set DIRNAME=.
|
||||
@@ -43,13 +45,13 @@ set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if %ERRORLEVEL% equ 0 goto execute
|
||||
|
||||
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.
|
||||
echo. 1>&2
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
|
||||
echo. 1>&2
|
||||
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
||||
echo location of your Java installation. 1>&2
|
||||
|
||||
goto fail
|
||||
"%COMSPEC%" /c exit 1
|
||||
|
||||
:findJavaFromJavaHome
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
@@ -57,36 +59,24 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto execute
|
||||
|
||||
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.
|
||||
echo. 1>&2
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
|
||||
echo. 1>&2
|
||||
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
||||
echo location of your Java installation. 1>&2
|
||||
|
||||
goto fail
|
||||
"%COMSPEC%" /c exit 1
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
||||
@rem Execute gradlew
|
||||
@rem endlocal doesn't take effect until after the line is parsed and variables are expanded
|
||||
@rem which allows us to clear the local environment before executing the java command
|
||||
endlocal & "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* & call :exitWithErrorLevel
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if %ERRORLEVEL% equ 0 goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
set EXIT_CODE=%ERRORLEVEL%
|
||||
if %EXIT_CODE% equ 0 set EXIT_CODE=1
|
||||
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
|
||||
exit /b %EXIT_CODE%
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
:omega
|
||||
:exitWithErrorLevel
|
||||
@rem Use "%COMSPEC%" /c exit to allow operators to work properly in scripts
|
||||
"%COMSPEC%" /c exit %ERRORLEVEL%
|
||||
@@ -4,10 +4,10 @@ pluginManagement {
|
||||
maven {
|
||||
// RetroFuturaGradle
|
||||
name "GTNH Maven"
|
||||
url "http://jenkins.usrv.eu:8081/nexus/content/groups/public/"
|
||||
allowInsecureProtocol = true
|
||||
url "https://nexus.gtnewhorizons.com/repository/public/"
|
||||
mavenContent {
|
||||
includeGroup("com.gtnewhorizons.retrofuturagradle")
|
||||
includeGroup("com.gtnewhorizons")
|
||||
includeGroupByRegex("com\\.gtnewhorizons\\..+")
|
||||
}
|
||||
}
|
||||
gradlePluginPortal()
|
||||
@@ -17,12 +17,5 @@ pluginManagement {
|
||||
}
|
||||
|
||||
plugins {
|
||||
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
|
||||
id 'com.gtnewhorizons.gtnhsettingsconvention' version '2.0.34'
|
||||
}
|
||||
@@ -5,19 +5,15 @@ import java.util.List;
|
||||
|
||||
import binnie.core.ManagerBase;
|
||||
import binnie.core.genetics.ManagerGenetics;
|
||||
import binnie.core.item.ManagerItem;
|
||||
import binnie.core.liquid.ManagerLiquid;
|
||||
import binnie.core.machines.ManagerMachine;
|
||||
import binnie.core.mod.config.ManagerConfig;
|
||||
import binnie.core.resource.ManagerResource;
|
||||
|
||||
public final class Binnie {
|
||||
|
||||
public static List<ManagerBase> Managers = new ArrayList<>();
|
||||
public static ManagerGenetics Genetics = new ManagerGenetics();
|
||||
public static ManagerConfig Configuration = new ManagerConfig();
|
||||
public static ManagerLiquid Liquid = new ManagerLiquid();
|
||||
public static ManagerMachine Machine = new ManagerMachine();
|
||||
public static ManagerItem Item = new ManagerItem();
|
||||
public static ManagerResource Resource = new ManagerResource();
|
||||
}
|
||||
@@ -6,6 +6,7 @@ import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.event.entity.player.BonemealEvent;
|
||||
import net.minecraftforge.event.entity.player.PlayerInteractEvent;
|
||||
import net.minecraftforge.event.world.BlockEvent;
|
||||
@@ -39,6 +40,7 @@ import binnie.botany.network.PacketID;
|
||||
import binnie.botany.proxy.Proxy;
|
||||
import binnie.core.AbstractMod;
|
||||
import binnie.core.BinnieCore;
|
||||
import binnie.core.Tags;
|
||||
import binnie.core.gui.IBinnieGUID;
|
||||
import binnie.core.item.ItemMisc;
|
||||
import binnie.core.network.BinniePacketHandler;
|
||||
@@ -53,12 +55,7 @@ import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
||||
import cpw.mods.fml.common.eventhandler.Event;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
|
||||
@Mod(
|
||||
modid = "Botany",
|
||||
name = "Botany",
|
||||
version = BinnieCore.VERSION,
|
||||
useMetadata = true,
|
||||
dependencies = "after:BinnieCore")
|
||||
@Mod(modid = "Botany", name = "Botany", version = Tags.VERSION, useMetadata = true, dependencies = "after:BinnieCore")
|
||||
public class Botany extends AbstractMod {
|
||||
|
||||
@Mod.Instance("Botany")
|
||||
@@ -67,35 +64,41 @@ public class Botany extends AbstractMod {
|
||||
@SidedProxy(clientSide = "binnie.botany.proxy.ProxyClient", serverSide = "binnie.botany.proxy.ProxyServer")
|
||||
public static Proxy proxy;
|
||||
|
||||
// Genetics module
|
||||
public static BlockFlower flower;
|
||||
public static Item seed;
|
||||
|
||||
public static ItemFlower flowerItem;
|
||||
public static Item pollen;
|
||||
public static Item seed;
|
||||
public static ItemDictionary database;
|
||||
|
||||
// Gardening module
|
||||
public static BlockPlant plant;
|
||||
public static ItemTrowel trowelWood;
|
||||
public static ItemTrowel trowelStone;
|
||||
public static ItemTrowel trowelIron;
|
||||
public static ItemTrowel trowelDiamond;
|
||||
public static ItemTrowel trowelGold;
|
||||
public static BlockSoil soil;
|
||||
public static BlockSoil loam;
|
||||
public static BlockSoil flowerbed;
|
||||
public static BlockSoil soilNoWeed;
|
||||
public static BlockSoil loamNoWeed;
|
||||
public static BlockSoil flowerbedNoWeed;
|
||||
public static ItemInsulatedTube insulatedTube;
|
||||
public static BlockCeramic ceramic;
|
||||
public static BlockStained stained;
|
||||
public static BlockCeramicPatterned ceramicTile;
|
||||
public static BlockCeramicBrick ceramicBrick;
|
||||
|
||||
public static ItemSoilMeter soilMeter;
|
||||
public static ItemInsulatedTube insulatedTube;
|
||||
public static ItemTrowel trowelWood;
|
||||
public static ItemTrowel trowelStone;
|
||||
public static ItemTrowel trowelIron;
|
||||
public static ItemTrowel trowelDiamond;
|
||||
public static ItemTrowel trowelGold;
|
||||
public static ItemMisc misc;
|
||||
public static ItemFlower flowerItem;
|
||||
public static ItemPigment pigment;
|
||||
public static ItemClay clay;
|
||||
public static BlockCeramic ceramic;
|
||||
public static BlockCeramicPatterned ceramicTile;
|
||||
public static BlockStained stained;
|
||||
public static BlockCeramicBrick ceramicBrick;
|
||||
|
||||
public Botany() {
|
||||
Botany.instance = this;
|
||||
MinecraftForge.EVENT_BUS.register(new EventHandler());
|
||||
}
|
||||
|
||||
@Mod.EventHandler
|
||||
@@ -121,11 +124,6 @@ public class Botany extends AbstractMod {
|
||||
return BotanyGUI.values();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<?>[] getConfigs() {
|
||||
return new Class[0];
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPacketID[] getPacketIDs() {
|
||||
return PacketID.values();
|
||||
@@ -151,120 +149,6 @@ public class Botany extends AbstractMod {
|
||||
return PacketHandler.class;
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onShearFlower(PlayerInteractEvent event) {
|
||||
if (event.action != PlayerInteractEvent.Action.RIGHT_CLICK_BLOCK) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (event.entityPlayer != null && event.entityPlayer.getHeldItem() != null
|
||||
&& event.entityPlayer.getHeldItem().getItem() == Items.shears) {
|
||||
TileEntity tile = event.world.getTileEntity(event.x, event.y, event.z);
|
||||
if (tile instanceof TileEntityFlower) {
|
||||
TileEntityFlower flower = (TileEntityFlower) tile;
|
||||
flower.onShear();
|
||||
event.entityPlayer.getHeldItem().damageItem(1, event.entityPlayer);
|
||||
}
|
||||
}
|
||||
|
||||
if (event.entityPlayer != null && event.entityPlayer.getHeldItem() != null
|
||||
&& event.entityPlayer.getHeldItem().getItem() == Botany.pollen) {
|
||||
TileEntity tile = event.world.getTileEntity(event.x, event.y, event.z);
|
||||
if (tile instanceof TileEntityFlower) {
|
||||
TileEntityFlower flower = (TileEntityFlower) tile;
|
||||
IFlower pollen = BotanyCore.getFlowerRoot().getMember(event.entityPlayer.getHeldItem());
|
||||
if (pollen != null && flower.canMateWith(pollen)) {
|
||||
flower.mateWith(pollen);
|
||||
if (!event.entityPlayer.capabilities.isCreativeMode) {
|
||||
ItemStack heldItem = event.entityPlayer.getHeldItem();
|
||||
heldItem.stackSize--;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onFertiliseSoil(PlayerInteractEvent event) {
|
||||
if (event.action != PlayerInteractEvent.Action.RIGHT_CLICK_BLOCK || event.world == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (event.entityPlayer == null || event.entityPlayer.getHeldItem() == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
int y = event.y;
|
||||
Block block = event.world.getBlock(event.x, y, event.z);
|
||||
if (block == null || !Gardening.isSoil(block)) {
|
||||
block = event.world.getBlock(event.x, --y, event.z);
|
||||
}
|
||||
if (block == null || !Gardening.isSoil(block)) {
|
||||
return;
|
||||
}
|
||||
|
||||
IBlockSoil soil = (IBlockSoil) block;
|
||||
if (Gardening.isNutrientFertiliser(event.entityPlayer.getHeldItem())
|
||||
&& soil.getType(event.world, event.x, y, event.z) != EnumSoilType.FLOWERBED) {
|
||||
EnumSoilType type = soil.getType(event.world, event.x, y, event.z);
|
||||
int next = Math.min(type.ordinal() + Gardening.getFertiliserStrength(event.entityPlayer.getHeldItem()), 2);
|
||||
if (soil.fertilise(event.world, event.x, y, event.z, EnumSoilType.values()[next])
|
||||
&& !event.entityPlayer.capabilities.isCreativeMode) {
|
||||
ItemStack heldItem = event.entityPlayer.getHeldItem();
|
||||
heldItem.stackSize--;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (Gardening.isAcidFertiliser(event.entityPlayer.getHeldItem())
|
||||
&& soil.getPH(event.world, event.x, y, event.z) != EnumAcidity.ACID) {
|
||||
EnumAcidity pH = soil.getPH(event.world, event.x, y, event.z);
|
||||
int next = Math.max(pH.ordinal() - Gardening.getFertiliserStrength(event.entityPlayer.getHeldItem()), 0);
|
||||
if (soil.setPH(event.world, event.x, y, event.z, EnumAcidity.values()[next])
|
||||
&& !event.entityPlayer.capabilities.isCreativeMode) {
|
||||
ItemStack heldItem2 = event.entityPlayer.getHeldItem();
|
||||
heldItem2.stackSize--;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (Gardening.isAlkalineFertiliser(event.entityPlayer.getHeldItem())
|
||||
&& soil.getPH(event.world, event.x, y, event.z) != EnumAcidity.ALKALINE) {
|
||||
EnumAcidity pH = soil.getPH(event.world, event.x, y, event.z);
|
||||
int next = Math.min(pH.ordinal() + Gardening.getFertiliserStrength(event.entityPlayer.getHeldItem()), 2);
|
||||
if (soil.setPH(event.world, event.x, y, event.z, EnumAcidity.values()[next])
|
||||
&& !event.entityPlayer.capabilities.isCreativeMode) {
|
||||
ItemStack heldItem3 = event.entityPlayer.getHeldItem();
|
||||
heldItem3.stackSize--;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (Gardening.isWeedkiller(event.entityPlayer.getHeldItem())
|
||||
&& Gardening.addWeedKiller(event.world, event.x, y, event.z)
|
||||
&& !event.entityPlayer.capabilities.isCreativeMode) {
|
||||
ItemStack heldItem4 = event.entityPlayer.getHeldItem();
|
||||
heldItem4.stackSize--;
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void plantVanilla(BlockEvent.PlaceEvent event) {
|
||||
World world = event.world;
|
||||
int x = event.x;
|
||||
int y = event.y;
|
||||
int z = event.z;
|
||||
Block block = world.getBlock(x, y - 1, z);
|
||||
if (!(block instanceof IBlockSoil)) {
|
||||
return;
|
||||
}
|
||||
|
||||
IFlower flower = BotanyCore.getFlowerRoot().getConversion(event.itemInHand);
|
||||
if (flower != null) {
|
||||
Gardening.plant(world, x, y, z, flower, event.player.getGameProfile());
|
||||
}
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public void onPlantVanilla(PlayerInteractEvent event) {
|
||||
if (!BinnieCore.proxy.isSimulating(event.world)
|
||||
@@ -298,27 +182,6 @@ public class Botany extends AbstractMod {
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onBonemeal(BonemealEvent event) {
|
||||
Block block = event.world.getBlock(event.x, event.y, event.z);
|
||||
if (Gardening.isSoil(block)) {
|
||||
IBlockSoil soil = (IBlockSoil) block;
|
||||
if (soil.fertilise(event.world, event.x, event.y, event.z, EnumSoilType.LOAM)) {
|
||||
event.setResult(Event.Result.ALLOW);
|
||||
}
|
||||
}
|
||||
|
||||
TileEntity tile = event.world.getTileEntity(event.x, event.y, event.z);
|
||||
if (tile instanceof TileEntityFlower && ((TileEntityFlower) tile).onBonemeal()) {
|
||||
event.setResult(Event.Result.ALLOW);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isActive() {
|
||||
return BinnieCore.isBotanyActive();
|
||||
}
|
||||
|
||||
@Mod.EventHandler
|
||||
public void onIMC(FMLInterModComms.IMCEvent event) {
|
||||
for (FMLInterModComms.IMCMessage message : event.getMessages()) {
|
||||
@@ -349,4 +212,138 @@ public class Botany extends AbstractMod {
|
||||
super(Botany.instance);
|
||||
}
|
||||
}
|
||||
|
||||
public static class EventHandler {
|
||||
|
||||
@SubscribeEvent
|
||||
public void onShearFlower(PlayerInteractEvent event) {
|
||||
if (event.action != PlayerInteractEvent.Action.RIGHT_CLICK_BLOCK) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (event.entityPlayer != null && event.entityPlayer.getHeldItem() != null
|
||||
&& event.entityPlayer.getHeldItem().getItem() == Items.shears) {
|
||||
TileEntity tile = event.world.getTileEntity(event.x, event.y, event.z);
|
||||
if (tile instanceof TileEntityFlower tileFlower) {
|
||||
tileFlower.onShear();
|
||||
event.entityPlayer.getHeldItem().damageItem(1, event.entityPlayer);
|
||||
}
|
||||
}
|
||||
|
||||
if (event.entityPlayer != null && event.entityPlayer.getHeldItem() != null
|
||||
&& event.entityPlayer.getHeldItem().getItem() == Botany.pollen) {
|
||||
TileEntity tile = event.world.getTileEntity(event.x, event.y, event.z);
|
||||
if (tile instanceof TileEntityFlower tileFlower) {
|
||||
IFlower pollen = BotanyCore.getFlowerRoot().getMember(event.entityPlayer.getHeldItem());
|
||||
if (pollen != null && tileFlower.canMateWith(pollen)) {
|
||||
tileFlower.mateWith(pollen);
|
||||
if (!event.entityPlayer.capabilities.isCreativeMode) {
|
||||
ItemStack heldItem = event.entityPlayer.getHeldItem();
|
||||
heldItem.stackSize--;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onFertiliseSoil(PlayerInteractEvent event) {
|
||||
if (event.action != PlayerInteractEvent.Action.RIGHT_CLICK_BLOCK || event.world == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (event.entityPlayer == null || event.entityPlayer.getHeldItem() == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
int y = event.y;
|
||||
Block block = event.world.getBlock(event.x, y, event.z);
|
||||
if (!Gardening.isSoil(block)) {
|
||||
block = event.world.getBlock(event.x, --y, event.z);
|
||||
}
|
||||
if (!Gardening.isSoil(block)) {
|
||||
return;
|
||||
}
|
||||
|
||||
IBlockSoil soil = (IBlockSoil) block;
|
||||
if (Gardening.isNutrientFertiliser(event.entityPlayer.getHeldItem())
|
||||
&& soil.getType(event.world, event.x, y, event.z) != EnumSoilType.FLOWERBED) {
|
||||
EnumSoilType type = soil.getType(event.world, event.x, y, event.z);
|
||||
int next = Math
|
||||
.min(type.ordinal() + Gardening.getFertiliserStrength(event.entityPlayer.getHeldItem()), 2);
|
||||
if (soil.fertilise(event.world, event.x, y, event.z, EnumSoilType.VALUES[next])
|
||||
&& !event.entityPlayer.capabilities.isCreativeMode) {
|
||||
ItemStack heldItem = event.entityPlayer.getHeldItem();
|
||||
heldItem.stackSize--;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (Gardening.isAcidFertiliser(event.entityPlayer.getHeldItem())
|
||||
&& soil.getPH(event.world, event.x, y, event.z) != EnumAcidity.ACID) {
|
||||
EnumAcidity pH = soil.getPH(event.world, event.x, y, event.z);
|
||||
int next = Math
|
||||
.max(pH.ordinal() - Gardening.getFertiliserStrength(event.entityPlayer.getHeldItem()), 0);
|
||||
if (soil.setPH(event.world, event.x, y, event.z, EnumAcidity.VALUES[next])
|
||||
&& !event.entityPlayer.capabilities.isCreativeMode) {
|
||||
ItemStack heldItem2 = event.entityPlayer.getHeldItem();
|
||||
heldItem2.stackSize--;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (Gardening.isAlkalineFertiliser(event.entityPlayer.getHeldItem())
|
||||
&& soil.getPH(event.world, event.x, y, event.z) != EnumAcidity.ALKALINE) {
|
||||
EnumAcidity pH = soil.getPH(event.world, event.x, y, event.z);
|
||||
int next = Math
|
||||
.min(pH.ordinal() + Gardening.getFertiliserStrength(event.entityPlayer.getHeldItem()), 2);
|
||||
if (soil.setPH(event.world, event.x, y, event.z, EnumAcidity.VALUES[next])
|
||||
&& !event.entityPlayer.capabilities.isCreativeMode) {
|
||||
ItemStack heldItem3 = event.entityPlayer.getHeldItem();
|
||||
heldItem3.stackSize--;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (Gardening.isWeedkiller(event.entityPlayer.getHeldItem())
|
||||
&& Gardening.addWeedKiller(event.world, event.x, y, event.z)
|
||||
&& !event.entityPlayer.capabilities.isCreativeMode) {
|
||||
ItemStack heldItem4 = event.entityPlayer.getHeldItem();
|
||||
heldItem4.stackSize--;
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void plantVanilla(BlockEvent.PlaceEvent event) {
|
||||
World world = event.world;
|
||||
int x = event.x;
|
||||
int y = event.y;
|
||||
int z = event.z;
|
||||
Block block = world.getBlock(x, y - 1, z);
|
||||
if (!(block instanceof IBlockSoil)) {
|
||||
return;
|
||||
}
|
||||
|
||||
IFlower flower = BotanyCore.getFlowerRoot().getConversion(event.itemInHand);
|
||||
if (flower != null) {
|
||||
Gardening.plant(world, x, y, z, flower, event.player.getGameProfile());
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onBonemeal(BonemealEvent event) {
|
||||
Block block = event.world.getBlock(event.x, event.y, event.z);
|
||||
if (Gardening.isSoil(block)) {
|
||||
IBlockSoil soil = (IBlockSoil) block;
|
||||
if (soil.fertilise(event.world, event.x, event.y, event.z, EnumSoilType.LOAM)) {
|
||||
event.setResult(Event.Result.ALLOW);
|
||||
}
|
||||
}
|
||||
|
||||
TileEntity tile = event.world.getTileEntity(event.x, event.y, event.z);
|
||||
if (tile instanceof TileEntityFlower && ((TileEntityFlower) tile).onBonemeal()) {
|
||||
event.setResult(Event.Result.ALLOW);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6,6 +6,11 @@ public enum EnumAcidity {
|
||||
NEUTRAL,
|
||||
ALKALINE;
|
||||
|
||||
/**
|
||||
* Cached values() array for frequent read-only operations, the array should NOT be mutated.
|
||||
*/
|
||||
public static final EnumAcidity[] VALUES = values();
|
||||
|
||||
public String getID() {
|
||||
return name().toLowerCase();
|
||||
}
|
||||
|
||||
@@ -24,7 +24,11 @@ public enum EnumFlowerChromosome implements IChromosomeType {
|
||||
SAPPINESS(IAlleleFloat.class),
|
||||
STEM(IAlleleInteger.class);
|
||||
|
||||
private Class<? extends IAllele> cls;
|
||||
/**
|
||||
* Cached values() array for frequent read-only operations, the array should NOT be mutated.
|
||||
*/
|
||||
public static final EnumFlowerChromosome[] VALUES = values();
|
||||
private final Class<? extends IAllele> cls;
|
||||
|
||||
EnumFlowerChromosome(Class<? extends IAllele> cls) {
|
||||
this.cls = cls;
|
||||
|
||||
@@ -7,7 +7,7 @@ public enum EnumFlowerStage {
|
||||
POLLEN("Pollen"),
|
||||
NONE("NONE");
|
||||
|
||||
protected String name;
|
||||
private final String name;
|
||||
|
||||
EnumFlowerStage(String name) {
|
||||
this.name = name;
|
||||
|
||||
@@ -6,6 +6,11 @@ public enum EnumMoisture {
|
||||
NORMAL,
|
||||
DAMP;
|
||||
|
||||
/**
|
||||
* Cached values() array for frequent read-only operations, the array should NOT be mutated.
|
||||
*/
|
||||
public static final EnumMoisture[] VALUES = values();
|
||||
|
||||
public String getID() {
|
||||
return name().toLowerCase();
|
||||
}
|
||||
|
||||
@@ -6,6 +6,11 @@ public enum EnumSoilType {
|
||||
LOAM,
|
||||
FLOWERBED;
|
||||
|
||||
/**
|
||||
* Cached values() array for frequent read-only operations, the array should NOT be mutated.
|
||||
*/
|
||||
public static final EnumSoilType[] VALUES = values();
|
||||
|
||||
public String getID() {
|
||||
return name().toLowerCase();
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ public class BlockCeramic extends Block implements IBlockMetadata {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addBlockTooltip(ItemStack stack, List tooltip) {
|
||||
public void addBlockTooltip(ItemStack stack, List<String> tooltip) {
|
||||
int meta = TileEntityMetadata.getItemDamage(stack);
|
||||
tooltip.add(EnumChatFormatting.GRAY + EnumFlowerColor.get(meta).getName());
|
||||
}
|
||||
@@ -92,8 +92,8 @@ public class BlockCeramic extends Block implements IBlockMetadata {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getSubBlocks(Item item, CreativeTabs tabs, List itemList) {
|
||||
for (EnumFlowerColor c : EnumFlowerColor.values()) {
|
||||
public void getSubBlocks(Item item, CreativeTabs tabs, List<ItemStack> itemList) {
|
||||
for (EnumFlowerColor c : EnumFlowerColor.VALUES) {
|
||||
itemList.add(TileEntityMetadata.getItemStack(this, c.ordinal()));
|
||||
}
|
||||
}
|
||||
|
||||