Compare commits

...
106 Commits
Author SHA1 Message Date
Ruling-0 750239cc04 Merge remote-tracking branch 'origin/master' into mu 2026-10-24 09:01:31 -05:00
Chitak 985 71f71514ae Return -1 for missing ListMap values instead of 0 (#121) 2026-10-20 04:52:51 +02:00
Martin Robertz 74a0fcd883 update+bes+deps+gitignore+gradle 2026-10-18 11:43:00 +02:00
Ruling-0 3f8b5d2032 Merge remote-tracking branch 'origin/master' into mu 2026-09-28 07:38:36 -05:00
Ruling-0 e2d7843159 Use MaterialLib items for ExtraBees comb products when they exist 2026-09-27 15:22:55 -05:00
slprime eb36ee9260 Fix Screen Lighting (#120) 2026-09-06 21:02:08 +02:00
boubou19 5988871448 Fix allocation hell hole (#119) 2026-08-25 19:27:44 -04:00
UltraProdigy 5bb88e9115 Fix Avocado Typo (#118) 2026-08-22 00:44:46 -04:00
Mary Hopson 1591cdab8b Use Forestry's ArmorApiaristHelper instead of reinventing it (#117) 2026-08-21 09:09:22 -04:00
Pxx500 42dd7e3fb5 fix compartments with tool station (#116) 2026-08-19 11:08:28 -04:00
Algent d62c5d0054 Fix GL state leak in search grid (#115) 2026-08-13 21:00:35 +02:00
boubou19 e20df09909 apply the PlatinumSludgeOverhaul directly into Binnie (#114) 2026-08-11 10:57:16 +02:00
boubou19 b813b75a8b Cache more enum .values() (#113) 2026-08-11 02:52:53 +02:00
Algent 52d9d1aedc Another performance pass (#110) 2026-08-10 23:18:58 +02:00
boubou19 50bed12f66 Cache enum .values() (#112) 2026-08-10 20:58:59 +02:00
attempt0 0d6d7ff9aa Don't interact with energy net on client side (#111) 2026-08-09 18:17:36 +02:00
Eldrinn-Elantey 0b7ae46d2e Move Paint.NET art sources out of packaged resources (#108) 2026-08-04 22:04:19 +00:00
Dream Master a0cfcc9da6 update+bs+deps+gradle 2026-08-04 11:45:48 +07:00
Algent 171c5b29f6 Improve compartment inventory and GUI performance (#109) 2026-08-03 14:56:47 +07:00
Jordan Rey b5ad490947 fix: multiple issues with genetics machines liquid storage (#103) 2026-07-29 16:37:33 +07:00
__felix__ 00051c4594 fix loader check for gt6 compat (#107) 2026-07-29 16:37:04 +07:00
Ranzu d913e245ed Implement ColorUtils (#106) 2026-07-20 01:25:22 -04:00
Ranzu f253dfc5dc Rename "Gingko" to "Ginkgo" (#105) 2026-07-18 15:41:11 +02:00
Arcadia_Blues 6582ea3e56 Fix unintentional item combining for blocks missing setHasSubtypes(true) (#98) 2026-06-25 04:31:30 +00:00
Martin Robertz bb96e7deae update+gradle+bs+deps 2026-06-23 16:32:55 +02:00
Pxx500andgithub-actions[bot] 7643d11e14 Fix fluids racing to registration (#99)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-06-23 13:18:28 +00:00
Matej Dipčár 4eb26e9d77 Fix ComponentTankContainer draining wrong fluid when specific fluid requested (#97) 2026-05-25 19:06:36 +02:00
Eldrinn-ElanteyandAlexdoru 2b1843b74d fix CraftGUI.render going null on GUI open/reopen (#96)
Co-authored-by: Alexdoru <[email protected]>
2026-05-22 14:30:15 +02:00
Alexdoru 0b312261db fix world client leak caused by static CraftGUI (#95) 2026-05-18 19:05:50 +02:00
tiffit bd0746583a Only send NEI keybinds when no widget is focused (#94) 2026-05-10 20:44:56 +02:00
Ranzu b4143fb0ef Fixed Compartment help tooltip display (#93) 2026-05-09 14:21:17 +02:00
77c47e9071 fix isolator consumption chance config source (#87)
Co-authored-by: Martin Robertz <[email protected]>
Co-authored-by: UltraProdigy <[email protected]>
2026-05-04 01:00:00 +00:00
Max Shen f27b66c53f Fix concurrent modification exception (#92) 2026-05-03 20:43:05 -04:00
brandynandMartin Robertz ad16588e3b Fix ceramic tiles + Add config option to disable compartments (#83)
Co-authored-by: Martin Robertz <[email protected]>
2026-04-30 19:02:55 +02:00
Alexdoru 5acbd0b977 fix world client leak in RendererMachine (#90) 2026-04-09 20:29:55 +00:00
Martin Robertz 7e22128279 update+gradle+deps+bs 2026-04-07 18:54:15 +02:00
TweksTYandUltraProdigy 65e11fa564 Fix Genetics machines' VFX incorrectly appearing at 0;0;0 coordinates (#89)
Co-authored-by: UltraProdigy <[email protected]>
2026-03-20 23:56:15 -04:00
DarkShadow44andMartin Robertz 355c85598e Move out larvae from splicer even when no serum is present anymore (#76)
Co-authored-by: Martin Robertz <[email protected]>
2026-03-20 23:33:14 -04:00
UltraProdigy 63232799bc Optimize Images & Workflow (#88) 2026-03-08 09:28:38 +01:00
Alexdoru a48f59e0ed Cache frequent Enum#values() calls (#86) 2026-03-04 16:15:04 +01:00
Guillaume MercierandCaedis 84d462d8d5 CropsNH Integration/IC2 Depreciation (#82)
Co-authored-by: Caedis <[email protected]>
2026-02-28 20:55:58 +01:00
Casey Primozic b32f2a210c Fix incorrect integer division in getRipeningStage (#85) 2026-02-18 02:20:41 -06:00
Caedis c988aa9870 Cache inventory size in compartments (#84) 2026-02-09 14:29:52 +03:00
ah-OOG-ah 6ba66123eb Yeet reflective item parsing (#75) 2026-01-27 22:29:12 -05:00
Ranzu 1d0568388a Added title localization and inventory slot texture (#81) 2026-01-07 18:37:36 +01:00
TweksTY 3968cc320e Fix the inability to mutate a bee that requires a certain block as a base using alveary if the bottom center block of your alveary is any alveary block from Extra Bees (#80) 2026-01-07 12:29:12 +01:00
DarkShadow44 ed1daa1e96 Mark sequence as not repairable (#79) 2025-12-13 20:58:30 +01:00
Alexdoru ffcc5f7102 [Memory-opti:runtime allocations] Reduce amount of NBTTagCompound created in TileEntityMetadata#getItemStack (#77) 2025-12-01 23:35:01 +01:00
Martin Robertz 4c619fd3b2 update 2025-10-01 18:48:17 +02:00
Glease 341fea50ba fix batched updates does not call window and machine packet listeners (#74) 2025-09-28 10:52:47 +02:00
Julia e6c67df077 Fix Slot Registration Crash (#73) 2025-09-25 15:46:12 +02:00
d24088ea4b Fix metadata error when using Scooporator MX200 Turbo (#69)
Co-authored-by: Wilhelm Schuster <[email protected]>
Co-authored-by: boubou19 <[email protected]>
2025-09-24 23:44:33 +02:00
Julia a2a57d1656 Batch Actions and Defer Registration of Slots (#72) 2025-09-24 23:25:39 +02:00
Julia 2e36fbcfcc Extract Magic String Constants in ContainerCraftGUI (#70) 2025-09-24 17:46:47 +02:00
Martin Robertz bd5bd5c153 update 2025-09-24 17:37:45 +02:00
Julia f324cb53db Fix Inventory List Crash (#71) 2025-09-24 17:29:33 +02:00
Julia c6815bebdf Cleanup ContainerCraftGUI (#68) 2025-09-23 17:46:40 -07:00
Julia 7ffa516892 Change recieve -> receive (#67) 2025-09-23 14:26:33 -07:00
Julia 311d618d53 Cleanup BinnieCorePacketID.java (#66) 2025-09-23 12:54:21 -07:00
Dream Master 9795aad66f update 2025-09-05 16:05:56 +02:00
Matthew Bentham ea7e2d7de4 Fix mutator not accepting items listed on the wiki (#65) 2025-09-05 09:44:41 +02:00
boubou19andAlexdoru 39f86c8b0c Speed up forge event registration (#64)
Co-authored-by: Alexdoru <[email protected]>
2025-07-18 22:22:10 +00:00
TotallyNotOndre 5b551eb8ec "fix" compartment tab name input field (#63) 2025-07-15 19:39:33 +02:00
Martin Robertz f497114579 update 2025-07-08 12:11:02 +02:00
Alexdoru ea547df4d0 Properly apply hunger effect (#62) 2025-07-07 21:42:49 +02:00
Ruling-0 39c9f1f6c6 Remove mutator mutation chance cap (#61) 2025-05-25 17:30:06 +02:00
Maya 4000763323 update 2025-05-07 10:39:29 -05:00
czerwonogrodzki 59e98dd290 Extend Lab Stand GUI width by 80 units (#60) 2025-05-07 10:38:14 -05:00
Maya c1ec3e5c8e Fix stained block hardness (#59) 2025-04-09 01:22:18 -05:00
Maya ac4b21b05e update 2025-04-08 14:24:47 -05:00
Niclas Klugmann 0e0ded5cc0 Revert 5x multiplier removal (#58) 2025-04-08 14:23:05 -05:00
Martin Robertz a1f54e7500 update 2025-01-16 21:59:06 +01:00
Astatine5985andMaya 5f1b5daa24 Isolator crash fix revision (#56)
Co-authored-by: Maya <[email protected]>
2025-01-16 16:50:35 +00:00
Martin Robertz 8d0fa2ebb5 update 2024-12-30 21:12:54 +01:00
glowredman 0db05cb60c Add Localization, Fix Carpentry Hammer / Master Carpentry Hammer Names being reverse (#57) 2024-12-30 21:11:13 +01:00
0265d70a53 Yeet custom config in favor of NHLib (#53)
Co-authored-by: Martin Robertz <[email protected]>
Co-authored-by: Maya <[email protected]>
2024-12-29 12:37:43 -06:00
Martin Robertz 32b7efcd15 update 2024-12-22 01:17:03 +01:00
Guillaume Mercier 7059206cb0 prevent npe and log bad requests (#55) 2024-12-21 10:35:14 -06:00
Martin Robertz 54c702e935 update 2024-11-13 07:12:13 +01:00
Ryan Nasers a3aa358627 Fixing Waila showing incorrect blocks for logs (#54) 2024-11-12 22:04:26 +01:00
ah-OOG-ah f0f14bb278 Minor cleanups (#50)
* Finalize, minor alloc reduction

Also enable Jabel and generic injection

* Update dependencies.gradle

* Clean up Machine a bit

* spotless

more enhanced instanceof

* Update ModuleMachine.java

* More clen

* WARN: Removed exception catching

* Many, many tiny patches + birthday fix

* Spotless

* Spotless again

* Fix getLow and clamp tolerance value

* Revert event -> ignored on unused event parameters

* Rename instanceof variables

* Update Machine.java

* Use StringBuilder

* Cache getStack()

* Oops, Jabel can't handle that

* Spotless

* Spotless again

My IDE was fighting with it

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

* Update gradle-wrapper.properties

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

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

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

* update buildscript

* apply spotless

* Making nei really optional

* Fix wildcard

* Stream chain simplify

* Fix: NPE when events outside the Gui

* Fix: drag and mouse event

* Fix: call mouse event
2023-10-11 14:35:28 +09:00
Lyfts 6e6e806476 fix incubator for real this time (#37) 2023-09-06 19:48:53 +02:00
2409 changed files with 4122 additions and 5923 deletions

No files matched your search

+1
View File
@@ -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
+17
View File
@@ -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
+8 -1
View File
@@ -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
Binary file not shown.

After

Width:  |  Height:  |  Size: 231 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 204 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 220 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 220 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 200 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 222 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 219 B

+2 -1591
View File
File diff suppressed because it is too large. Load diff
+6 -5
View File
@@ -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")
}
+163 -39
View File
@@ -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
+12
View File
@@ -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
Binary file not shown.
+4 -1
View File
@@ -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
Vendored
+20 -17
View File
@@ -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.
Vendored
+24 -34
View File
@@ -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 -11
View File
@@ -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'
}
-4
View File
@@ -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();
}
+155 -158
View File
@@ -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()));
}
}
Loaded 100 of 2409 files, more files were not shown because too many files have changed in this diff. Show more