Compare commits

...
323 Commits
Author SHA1 Message Date
mezz d2d9da6af7 Version 5.8.1 Release 2018-07-15 13:42:27 -07:00
temp1011 a9819781d0 Clean up some condition checking (#2191) 2018-07-12 22:11:41 +02:00
temp1011 055834b63a Fix some crashes when disabling fluids #2188 (#2190) 2018-07-12 22:11:29 +02:00
temp1011 e244a0c82c Fix cocoon tile name (#2181) 2018-07-12 22:10:21 +02:00
temp1011 ef96f754d8 fix uncraftable capsules with apiculture disabled #2183 (#2184) 2018-07-11 15:34:30 +02:00
Nedelosk 32270601e7 Merge remote-tracking branch 'origin/mc-1.12' into mc 2018-07-11 15:28:20 +02:00
Nedelosk 823305dd94 Fix #2165, #2186, #2166 De-Sync of all inventory containers and guis 2018-07-11 15:27:56 +02:00
Konstantin bbf80a4320 Update ru_ru.lang (#2122) 2018-07-11 14:21:08 +02:00
Urey. Xue 4057537027 Update zh_cn.lang (#2187) 2018-07-11 14:20:38 +02:00
temp1011 3a294b79a7 Fix buildcraft dependencies (#2180) 2018-07-10 00:00:40 +02:00
temp1011 206d483422 Fix tree gen #2178 (#2179) 2018-07-08 15:14:23 +02:00
Nedelosk 6d51d53da1 Add interface for more easy handling of charcoal pile walls 2018-07-06 01:43:28 +02:00
Nedelosk 1ee6c05494 Update JEI and add farming JEI Category 2018-07-05 17:12:20 +02:00
therealfarfetchd 8feb3500a4 BuildCraft support (#2158) 2018-06-28 21:54:17 +02:00
Nedelosk 4515aa513a Update TileEntityDataFixable log from 'info' to 'debug' 2018-06-28 21:48:21 +02:00
Nedelosk c06057ddd0 Merge branch 'mc-1.12' of https://github.com/ForestryMC/ForestryMC into tile-test 2018-06-28 21:43:16 +02:00
Nedelosk 9b4a4c2b1d Fix Tile Entity Registration 2018-06-28 18:23:45 +02:00
temp1011 2b3d21b05d prevent effect damage underwater (#2149) 2018-06-27 03:06:57 +02:00
temp1011 cb43bbee52 fix broken texture in butterfly model #2171 (#2173) 2018-06-27 03:06:46 +02:00
temp1011 b92a1a10e9 add kill count to butterfly kill command (#2174) 2018-06-27 03:06:38 +02:00
Urey. Xue 8a431e56ef Update zh_cn.lang (#2169) 2018-06-23 23:01:51 +02:00
Nedelosk f73b48695e Merge remote-tracking branch 'origin/mc-1.12' into bug-1.12 2018-06-22 11:25:19 +02:00
Nedelosk 0454fea0a8 Fix broken Flower Cache synchronisation to the client and disk 2018-06-22 11:25:03 +02:00
temp1011 4ff772954e fix a bug in hasFlowersCache (#2168) 2018-06-19 19:48:32 +02:00
temp1011 d8304d5d7e fix log not formatting correctly #2023 (#2164) 2018-06-19 19:48:24 +02:00
Nedelosk a12cfff9d9 Clean Up Analyzer Provider 2018-06-16 17:50:56 +02:00
Nedelosk d34ad60d31 Fix #2159 Minecart Apiary Gui Crash 2018-06-16 17:46:27 +02:00
Nedelosk 508b26ca45 Update ForestryPacket.java 2018-06-15 10:30:37 +02:00
Nedelosk 255bd9da99 Fix #2157 Crash on attempt to break Dehumidifier while camouflaged as block from Chisel 2018-06-14 20:09:35 +02:00
Nedelosk 5cedc2adca Merge branch 'mc-1.12' of https://github.com/ForestryMC/ForestryMC into dev 2018-06-14 19:36:39 +02:00
Nedelosk c968278d27 Fix #2160 Remove @SideOnly(Side.CLIENT) from IAlyzerPlugin 2018-06-14 19:36:20 +02:00
src_resources 2392785daa Better zh_cn.lang translation file update. (#2146)
Better zh_cn.lang translation file update.
2018-06-14 18:10:57 +02:00
temp1011 e82691165f Add config for global biome blacklisting for trees and bees (#2150) 2018-06-14 18:09:54 +02:00
temp1011 e54cd57162 clean up some config comments (#2153) 2018-06-14 18:07:42 +02:00
temp1011 0a3a933b77 Cleanup (#2138) 2018-06-14 18:07:31 +02:00
Nedelosk 10dbed1406 Merge pull request #2151 from rosebeats/mc-1.12
fixed the localization names for the StorageJeiPlugin
2018-06-14 18:05:48 +02:00
Nedelosk b515870cb4 Merge remote-tracking branch 'origin/mc-1.12' into dev 2018-06-14 18:02:36 +02:00
Nedelosk 30010d2554 Improve and Clean Up Gui Elements 2018-06-14 18:01:27 +02:00
rosebeats 317d9abfda fixed the localization names for the StorageJeiPlugin 2018-06-07 21:14:09 -04:00
Nedelosk 7df3a94916 Merge pull request #2142 from temp1011/plugin-compat
fix ic2 crash with apiculture #2139
2018-05-28 22:58:09 +02:00
temp1011 8158562974 fix ic2 crash with apiculture #2139 2018-05-28 14:28:55 +01:00
temp1011 a96ce6c873 use new maven for teslaAPI (#2133) 2018-05-28 14:06:39 +02:00
temp1011 6efbdd747d Improve Industrialcraft2 plugin (#2057) 2018-05-28 14:05:32 +02:00
Jason Carrete 82dd0e5eed Update frames.json (#2137) 2018-05-27 11:57:29 +02:00
Nedelosk 64c0590bef Fix Manual Multi-Farms placing humus 2018-05-17 15:28:49 +02:00
Nedelosk 691ccd578e Fix #1525 Balance Electric Engine Circuits 2018-05-11 12:27:58 +02:00
Nedelosk 98cd99aa4e Fix #1914 Forestry Not Playing Right with Fast Leaf Rendering Options. 2018-05-11 12:17:12 +02:00
Nedelosk cd8e78f60a Merge remote-tracking branch 'origin/mc-1.12' into dev 2018-05-11 11:37:21 +02:00
Nedelosk 5ed536da7c Fix #2021 Multifarm configurable without board bug 2018-05-11 11:19:07 +02:00
temp1011 96ca20c784 Add configuration for crates (#2047) 2018-05-11 11:04:11 +02:00
Dmitriy Medvedev 764d969bb4 Fixed Backpacks Localization (#2120) 2018-05-11 11:02:55 +02:00
temp1011 a26a86fe99 use mod log rather than fml log (#2129) 2018-05-11 11:02:43 +02:00
Nedelosk ebe6580aaf Fix #2130 Can't insert Immersive engineering industrial hemp into crop multifarm block 2018-05-11 11:01:02 +02:00
Nedelosk e90ab8caf6 Merge branch 'mc-1.12' of https://github.com/ForestryMC/ForestryMC into dev 2018-05-04 15:04:20 +02:00
Nedelosk efdffd31c8 Fix #2113 Conduits / Itemducts not working with alveary 2018-05-04 15:04:07 +02:00
mezz fa515f0941 Fix #2114 Limit crafting operations to 64 crafts per shift-click 2018-05-02 21:57:28 -07:00
temp1011 78c033a7d2 Clean up code (#2053) 2018-05-01 19:48:06 +02:00
temp1011 4975fa80c3 Make tree gen be configurable (#2046) 2018-05-01 18:42:46 +02:00
temp1011 aa642a3ee8 small fix for a JEI log error (#2110) 2018-05-01 18:42:24 +02:00
Nedelosk b19809bd3c Merge branch 'mc-1.12' of https://github.com/ForestryMC/ForestryMC into dev 2018-05-01 18:42:01 +02:00
temp1011 b566a1befd small fix comb recipes (#2112) 2018-05-01 18:41:49 +02:00
Nedelosk 88c9270316 Fix #2082 Unable to put fuel into the fermenter 2018-05-01 18:41:32 +02:00
Nedelosk f52cc3893b Add lang file back 2018-04-29 12:27:25 +02:00
Nedelosk b7578e3a11 Remove lang files 2018-04-29 12:26:58 +02:00
Nedelosk c124a34533 Remove outdated lang files and lowercase the names of the other files 2018-04-29 12:24:44 +02:00
Nedelosk ae038b23f2 Update Lang files to 1.12 2018-04-29 12:11:34 +02:00
mezz df29777b49 Update README.md 2018-04-28 15:34:43 -07:00
mezz a786d71cfd Rename LANG.md to README.md 2018-04-28 15:33:41 -07:00
temp1011 2b757ae91a Move lang files in to the main project (#2104) 2018-04-28 15:23:56 -07:00
Nedelosk decc351e04 Fix Machine Hit Particles 2018-04-28 14:16:33 +02:00
Nedelosk 98806129bc Merge branch 'mc-1.12' of https://github.com/ForestryMC/ForestryMC into dev 2018-04-28 09:49:31 +02:00
Nedelosk 55c01f4cea Fix #1503 Machine Breaking Particle Speed 2018-04-28 09:48:07 +02:00
temp1011 38447d4d13 Start removing metadata from code in preparation for 1.13 (#2068) 2018-04-27 13:51:41 +02:00
temp1011 348149f4d6 Add config to let capsules be reusable (#2066)
* Add config option to make capsules non consumable

* Fix naming
2018-04-27 13:51:22 +02:00
Jose dfb4504cde Tweak ash texture (#1902)
* Make ash less confusing

* Updated textures
2018-04-27 13:51:13 +02:00
temp1011 f12c6d2d11 Add IMC for registering flowers (#2027) 2018-04-27 13:51:04 +02:00
temp1011 0ff0aa802c Tech reborn plugin (#2078)
* Add Plugin Tech Reborn
2018-04-27 13:50:38 +02:00
temp1011 fd25e0822d fix crash when raytrace result is null #2090 (#2105) 2018-04-27 13:49:57 +02:00
temp1011 649c13f5f0 fix wrong localisation key for habitat locator #2100 (#2106) 2018-04-27 13:49:51 +02:00
Nedelosk 630dcde28a Add missing code 2018-04-20 17:43:56 +02:00
Nedelosk d4dee797d7 Fix book entry loading after reloading the resource manager 2018-04-20 17:35:01 +02:00
Nedelosk 47ff5d9ad1 Fix #2094, Fix #2096 Wrong entry order and Clean Up resource loading 2018-04-20 15:01:31 +02:00
Nedelosk 6ff1d8b8d7 Fix #2095 Duplicated Book Entries 2018-04-20 14:05:02 +02:00
Nedelosk 934ffde12a Merge remote-tracking branch 'origin/mc-1.12' into dev 2018-04-16 20:30:39 +02:00
Nedelosk 6c806c377a Fix #2087 Issue with guide book 2018-04-16 20:30:09 +02:00
temp1011 24c8add7fc Update README (#2080) 2018-04-14 16:42:08 -07:00
temp1011 8c39ad956e Optimise Worldgen Hives (#2063) 2018-04-14 16:41:25 -07:00
Nedelosk 36ccd5c3e1 Fix #2077 Crash from disabling the Arboriculture Module 2018-04-09 18:55:51 +02:00
Nedelosk d621d8a5df Add more methods to ModuleHelper 2018-04-06 16:14:13 +02:00
Nedelosk 76d77b4784 Clean Up Book 2018-04-06 15:57:39 +02:00
Nedelosk 6efbd6e158 Add missing Side Only Annotations Fix #2076 2018-04-06 00:45:53 +02:00
temp1011 aa45da81ba Fix extra drop from greenhouse window (#2072) 2018-04-05 21:22:48 +02:00
temp1011 3cd1c30dbc Update Forge and Mappings (#2075) 2018-04-05 21:21:48 +02:00
Nedelosk 8ba478d758 Add Guide Book and Analyzer Screen (#2073) 2018-04-05 21:20:16 +02:00
Nedelosk b5a8740e4a Merge pull request #2016 from temp1011/engine-output
Stop peat fired engine outputting ash through power side
2018-03-30 18:23:19 +02:00
Nedelosk 8f6b056776 Merge pull request #2051 from temp1011/remove-chisel-plugin
Remove Chisel Plugin
2018-03-30 18:22:24 +02:00
Nedelosk d72ba48a1a Merge pull request #2055 from temp1011/butterfly-gamerule
Make butterflies obey mob spawning gamerules
2018-03-30 18:21:50 +02:00
Nedelosk c0a3e2240f Merge pull request #2054 from temp1011/block-xp-drop
Use different method to drop xp from Apatite Ore
2018-03-30 18:21:39 +02:00
temp1011 46f78ce7b3 Make butterflies obey mob spawning gamerules 2018-03-24 02:13:28 +00:00
temp1011 b0bc8429ac Don't drop xp orbs into world directly 2018-03-24 01:52:15 +00:00
temp1011 9c44111665 Remove Chisel Plugin 2018-03-23 22:18:37 +00:00
mezz 54a9da917d Replace Forestry IRC link with discord badge 2018-03-17 23:51:56 -07:00
temp1011 bcafbcbc32 resolve conflict 2018-03-14 18:53:30 +00:00
Nedelosk 2ce018d84b Merge pull request #1998 from asiekierka/mc-1.12
minor ShapedRecipeCustom optimization
2018-03-14 17:06:35 +01:00
Nedelosk 0638822b74 Merge pull request #2006 from temp1011/self-breeding
Add self-pollination of leaves near bees
2018-03-14 17:06:24 +01:00
Nedelosk 2b8d905e0e Merge branch 'mc-1.12' into self-breeding 2018-03-14 17:06:16 +01:00
Nedelosk d0f28a32b2 Merge pull request #2012 from temp1011/repairable-armour
Make Apiarist Armour Repairable
2018-03-14 17:04:20 +01:00
Nedelosk b74e142ce1 Merge pull request #2025 from temp1011/flowerpot-flowers
Add potted plants as flowers for bees
2018-03-14 17:03:47 +01:00
Nedelosk 3d95b9f6d9 Merge pull request #2032 from temp1011/charcoal-block-oredict
Register Charcoal Block with Ore Dictionary
2018-03-14 17:03:00 +01:00
Nedelosk 571d158809 Merge remote-tracking branch 'origin/mc-1.12' into mc-1.12 2018-03-14 17:02:11 +01:00
Nedelosk 9cd6bfcfa8 Merge pull request #2033 from temp1011/fix-jei-errors
Fix JEI errors for disabled modules
2018-03-14 17:01:44 +01:00
Nedelosk ebc70ab22a Fix #2037 Add Comparator Support for Engines 2018-03-14 16:45:38 +01:00
Nedelosk e3e4a4341d Fix #2042 Another crash with butterflies 2018-03-14 15:35:49 +01:00
Nedelosk 918e4f0099 Fix #2040 Villager AI Crashes Server 2018-03-14 15:25:00 +01:00
temp1011 123bed88a2 Add AI for Apiarist to Replace Bees in Village Bee Houses (#2001) 2018-03-12 21:09:09 -07:00
temp1011 9de446cc4e Fix Broken Ore Dictionary Registration 2018-03-11 19:29:39 +00:00
temp1011 f328efa4e9 Fix JEI errors for disabled modules 2018-03-11 17:40:16 +00:00
temp1011 cdb5ddeb6a Register Charcoal Block with Ore Dictionary 2018-03-11 16:56:47 +00:00
temp1011 7f83c387e3 Remove test, use Enum instead of ordinal 2018-03-06 23:54:34 +00:00
temp1011 95c52f3607 Add potted plants as flowers for bees 2018-03-06 15:32:23 +00:00
temp1011 19a30bdb91 Stop peat fired engine outputting ash through power side 2018-03-01 15:52:00 +00:00
temp1011 1b262d6604 Improve logic 2018-02-28 19:33:09 +00:00
temp1011 ca73687940 Make Apiarist Armour Repairable 2018-02-26 22:39:57 +00:00
temp1011 ed2f06c514 formatting, re-include config 2018-02-26 21:44:12 +00:00
temp1011 bef36c15b0 Move self pollination into main pollination method
- Only happens if normal pollination can't occur
- Will not cause return otherwise would worsen chance for cross pollination
2018-02-26 21:39:19 +00:00
temp1011 7dba583c26 Add self-pollination of leaves near bees 2018-02-24 18:04:17 +00:00
Adrian Siekierka 3168639c89 minor ShapedRecipeCustom optimization 2018-02-19 11:59:44 +01:00
Nedelosk e9019fd8c3 Fix #1997 Actually Additions Integration 2018-02-18 09:58:55 +01:00
Nedelosk d43cc63367 Close #1859, Close #1858 Add Natura huge glowshrooms farm support 2018-02-17 15:54:49 +01:00
Nedelosk 89e8ec8e38 Update Lang 2018-02-17 14:27:23 +01:00
Nedelosk f270231e67 Fix "X-Ray" Leaves and wrong leaf particle color 2018-02-17 14:25:11 +01:00
Nedelosk 34be92d462 Fix #1959 Forestry leaves causing server crash 2018-02-16 18:56:25 +01:00
Nedelosk eea193aa83 Fix #1962 Wood Pile fire spread might be a bit too aggressive 2018-02-16 18:51:33 +01:00
Nedelosk d6a5827f0b Fix #1974 Add Support for Animania wool types in recipes 2018-02-16 18:46:13 +01:00
Nedelosk a093e7c094 Fix #1982 Wrong drop Greenhouse Window 2018-02-16 18:34:17 +01:00
Nedelosk 4ea0795063 Fix #1975 Farm blocks change type on world reload 2018-02-16 18:01:31 +01:00
Nedelosk 31b83ea852 Fix #1963 Forestry leaves confuse minimap mods 2018-02-16 17:55:40 +01:00
Nedelosk 0f494d4ac7 Merge remote-tracking branch 'origin/mc-1.12' into mc-1.12 2018-02-16 17:12:27 +01:00
Nedelosk 0cfddef397 Fix #1984 Server crash when placing an arboretum 2018-02-16 17:12:10 +01:00
Nedelosk e4478bc296 Merge pull request #1968 from temp1011/more-blacklisting
Add whitelist for generation based on dimension
2018-02-16 17:09:45 +01:00
Nedelosk 6a921c78fb Merge pull request #1986 from temp1011/modules-disable
Fix a disabled module crash
2018-02-16 17:09:28 +01:00
Nedelosk 5f9e0f30fd Merge remote-tracking branch 'origin/mc-1.12' into mc-1.12 2018-02-16 17:08:04 +01:00
Nedelosk 355ba9a7ed Fix #1993, Fix #1972 Managed Succulent Farm doesn't work and Farm multiblock causing chunks to be loaded 2018-02-16 17:07:40 +01:00
Nedelosk 424bc8910d Fix #1988 Arborist's Chests causing suffocation damage 2018-02-16 16:50:39 +01:00
Nedelosk 6eab284cd1 Fix #1989 "X-Ray" Leaves 2018-02-16 16:37:17 +01:00
temp1011 1745a7e946 More correct method 2018-02-11 11:52:59 +00:00
temp1011 74e381f184 formatting 2018-02-11 11:24:07 +00:00
temp1011 0b2589b007 Fix crash if HarvestCraft present but Apiculture disabled 2018-02-11 11:22:35 +00:00
Nedelosk d29187746d Merge pull request #1980 from temp1011/gear-fix
Oredict for bronze gear in sorting pipe recipe
2018-02-10 13:11:35 +01:00
temp1011 26d538cb50 Add oredict for bronze gear in sorting pipe recipe 2018-02-08 11:19:34 +00:00
Nedelosk d48fca4652 Fix #1969 Multiblock farms server-crash 2018-02-03 23:17:38 +01:00
temp1011 211ab566a7 Fix return statement 2018-02-03 18:32:24 +00:00
temp1011 bb7a42dff5 Woops 2018-02-03 18:21:31 +00:00
temp1011 31bcc661cd Added whitelist for dimension generation too 2018-02-03 18:13:53 +00:00
temp1011 43a29e7ec8 Merge branch 'mc-1.12' of https://github.com/temp1011/ForestryMC into mc-1.12 2018-02-03 11:57:09 +00:00
temp1011 13905ee4a9 merge (#1)
* Reintroduce the old-style farm

* Remove Unused Files

* Fix #1945 Database duping trees / bees

* Fix broken model baker uvs

* Improve Farm Logic System and add ring farm layout

* Rebalance electron tubes and add ender farm

* Improve fertilizer config and Clean Up

* Clean Up API

* Add missing farm logic localisation

* Add missing fluid handler capability to the planter

* Remove unneeded GL state changes

* Update Lang

* Fix #1955 Add Filter Sorting to fix a server sided bug

* Make cultivation farms more expensive

* Round fertilizer values

* Add deprecated circuit replacement and Version 5.8
2018-02-03 11:55:03 +00:00
Nedelosk 2b9b105211 Add deprecated circuit replacement and Version 5.8 2018-02-03 12:45:27 +01:00
Nedelosk 8b10349309 Merge pull request #1948 from ForestryMC/farm
Reintroduce the old-style farm and Rebalance electron tubes
2018-02-03 12:10:48 +01:00
Nedelosk 0d26b6b2f2 Merge pull request #1965 from temp1011/mc-1.12
Add IMC messages for dimension blacklist
2018-02-03 12:08:05 +01:00
temp1011 3e5de52efd fix imports 2018-02-02 00:18:41 +00:00
temp1011 e30e9f4ab9 Add IMC messages for mods to blacklist dimensions in 2018-02-02 00:07:59 +00:00
Nedelosk 05d1eb87ce Round fertilizer values 2018-01-28 22:54:35 +01:00
Nedelosk 7679dfc393 Make cultivation farms more expensive 2018-01-28 18:38:29 +01:00
Nedelosk bb52acc67c Fix #1955 Add Filter Sorting to fix a server sided bug 2018-01-23 16:24:56 +01:00
Nedelosk 3caf8cbfef Update Lang 2018-01-23 15:36:38 +01:00
Nedelosk 207f15ed0b Remove unneeded GL state changes 2018-01-23 15:29:30 +01:00
Nedelosk c5178be225 Add missing fluid handler capability to the planter 2018-01-22 19:54:14 +01:00
Nedelosk cd7250604e Add missing farm logic localisation 2018-01-22 18:56:25 +01:00
Nedelosk 533c9d0b2a Clean Up API 2018-01-20 21:29:07 +01:00
Nedelosk c00fa15f0e Improve fertilizer config and Clean Up 2018-01-20 21:00:21 +01:00
Nedelosk ce3dea42e3 Pull from branch 'mc-1.12' 2018-01-20 19:28:34 +01:00
Nedelosk 287cb8cb87 Rebalance electron tubes and add ender farm 2018-01-20 18:05:31 +01:00
Nedelosk 10fec50457 Improve Farm Logic System and add ring farm layout 2018-01-20 02:35:33 +01:00
Nedelosk 43c61c18c0 Fix broken model baker uvs 2018-01-15 19:23:54 +01:00
Nedelosk dca593f7d8 Fix #1945 Database duping trees / bees 2018-01-15 19:18:59 +01:00
Nedelosk 4c874fcf7d Update Lang 2018-01-15 19:12:54 +01:00
Nedelosk e62a2f1199 Merge branch 'mc-1.12' of https://github.com/ForestryMC/ForestryMC into pipe-1.12 2018-01-15 19:05:11 +01:00
Nedelosk 8ab94e6741 Improve genetic filter implementation 2018-01-15 19:03:52 +01:00
Nedelosk 1278c09064 Move the filter logic to a separate interface 2018-01-15 19:03:51 +01:00
Nedelosk ed0b884bce Change default filter rule 2018-01-15 19:03:50 +01:00
Nedelosk 85f413f857 Improve Filter collision box 2018-01-15 19:03:49 +01:00
Nedelosk 3cc298b0f1 Remove unused texture 2018-01-15 19:03:49 +01:00
Nedelosk 8b0d54f3ec Add sorting block (Genetic Filter) 2018-01-15 19:03:48 +01:00
temp1011 40445462f1 Add more Dimension Config Blacklists for world generation (#1942) 2018-01-14 12:16:36 -08:00
temp1011 8eea336fdb Removing overworked bees mechanic, cap production modifier at 16x (#1946) 2018-01-14 12:15:45 -08:00
Nedelosk 521514f3d2 Remove Unused Files 2018-01-14 02:53:56 +01:00
Nedelosk cc50a05f43 Reintroduce the old-style farm 2018-01-14 02:35:12 +01:00
Nedelosk 1fc56c3b20 Merge pull request #1941 from phillipasmith1995/mc-1.12
Adds dimension blacklist for hive generation.
2018-01-08 17:17:18 +01:00
phillipasmith1995 9cee882788 Adds dimension blacklist for hive generation. 2018-01-08 09:24:17 -06:00
phillipasmith1995 9404f769bb Merge branch 'mc-1.12' of https://github.com/phillipasmith1995/ForestryMC into mc-1.12
# Conflicts:
#	src/main/java/forestry/apiculture/HiveConfig.java
2018-01-08 09:21:51 -06:00
phillipasmith1995 7b8b317ffe Adds dimension blacklist for hive generation. 2018-01-08 09:18:49 -06:00
phillipasmith1995 b40a6d4ec9 Adds dimension blacklist for hive generation. 2018-01-08 00:52:34 -06:00
Nedelosk 42865951a9 Move the worktable into a separate module 2018-01-07 02:18:11 +01:00
Nedelosk a058c3f8c9 Merge remote-tracking branch 'origin/mc-1.12' into 1.12 2018-01-07 00:21:00 +01:00
Nedelosk a83e428d29 Merge pull request #1938 from temp1011/analyzerpowerconfig
Add power config for Analyzer
2018-01-07 00:20:37 +01:00
temp1011 9c41566485 Should be all of them (hopefully) 2018-01-06 23:18:34 +00:00
temp1011 842b9c7199 Add power config for analyzer 2018-01-06 22:51:36 +00:00
Nedelosk cbb0c15783 Fix #1061 Squeezer is very "liberal" regarding oredict in Recipes 2018-01-06 23:23:46 +01:00
Nedelosk cbc6f9acff Update Lang Git-Module 2018-01-06 22:39:08 +01:00
Nedelosk 03ecce51cc Fix #1937 Backpacks do not hold previously defined items 2018-01-06 22:33:29 +01:00
Nedelosk 644145ac92 Fix #1399 Add Hive Generation Blacklist 2018-01-06 22:19:37 +01:00
Nedelosk 850a7e2919 Fix #1884 Tin can / wax capsule cannot pick up fluid blocks in world 2018-01-06 20:56:15 +01:00
Nedelosk 1f54359836 Fix Crate Registration 2018-01-06 17:14:08 +01:00
Nedelosk debde28aba Merge remote-tracking branch 'origin/mc-1.12' into 1.12 2018-01-06 16:51:38 +01:00
Nedelosk a2aa07c917 Fix #1916 Client Crash with new version 2018-01-06 16:51:13 +01:00
Nedelosk 3c9572eb83 Fix #1874 Crash when adding bee to BQM quest / chestloot 2018-01-06 16:21:47 +01:00
Nedelosk 03fd954781 Merge pull request #1930 from temp1011/mc-1.12
Some minor additions
2018-01-06 16:07:20 +01:00
Nedelosk 2002dff3c9 Fix #1920 Crate registration only on client side 2018-01-06 15:57:16 +01:00
temp1011 d9ade6dae0 No biome check 2018-01-06 14:34:20 +00:00
Nedelosk 3b547c1b87 Fix #1919 Butterfly Model throws NullPointerException 2018-01-06 14:39:43 +01:00
Nedelosk 05070982dc Improve Database Recipe 2018-01-06 13:20:35 +01:00
temp1011 9833dbb01f Merge branch 'mc-1.12' into mc-1.12 2018-01-05 18:10:22 +00:00
temp1011 e67ef8adec Merge branch 'mc-1.12' into mc-1.12 2018-01-05 16:56:54 +00:00
temp1011 b5b4ff2de6 Fix hive flammability
Hive placed in the overworld burned whereas hive placed in nether did not in my tests. Hopefully this works better.
2018-01-05 16:13:40 +00:00
Nedelosk f78e21e31a Merge remote-tracking branch 'origin/mc-1.12' into 1.12 2018-01-05 16:42:56 +01:00
Nedelosk 457962c716 Fix #1932 Client Tile Updates Depending On Apiculture Module 2018-01-05 16:36:00 +01:00
temp1011 7a0dde1140 Woops 2018-01-02 20:36:16 +00:00
temp1011 5f7f7fbed6 add damage option to hives based on config 2017-12-30 23:24:45 +00:00
temp1011 c107c75cbe update config in apiculture 2017-12-30 23:22:19 +00:00
temp1011 8ed4fa8d7b make non hellish hives flammable 2017-12-30 00:09:41 +00:00
mezz 5a10d8a0b2 Fix "Invalid property value detected" error logs from Buildcraft 2017-12-26 19:30:14 -08:00
Nedelosk 16c3fae45d Fix #1918 Fix #1912 packet handler issue with latest Forge (14.23.1.2574+) 2017-12-18 20:25:21 +01:00
Nedelosk b3be6a8f02 Fix Broken Sockets 2017-12-17 16:07:12 +01:00
Nedelosk aac4d730d6 Merge remote-tracking branch 'origin/mc-1.12' into 1.12 2017-12-17 15:45:32 +01:00
Nedelosk dacd2741a3 Fix #1907 Electric engine doesn't update configuration properly 2017-12-17 15:41:01 +01:00
Nedelosk 2f47114015 Fix #1901 Custom Backpack Model Registration 2017-12-17 15:26:43 +01:00
Nedelosk b7ae349314 Fix #1906 Willow leaves can be used to create an x-ray 2017-12-17 10:38:20 +01:00
Remy A fbea338462 Fix resurrected ender dragons having no AI (#1908) 2017-12-12 21:48:56 -08:00
mezz b07e5a1556 Revert "Slightly improve render performance of genetic items (bee, trees, etc)"
This reverts commit 3df3d9121e.
2017-11-29 22:00:21 -08:00
Nedelosk 13f49fc930 Merge remote-tracking branch 'origin/mc-1.12' into 1.12 2017-11-24 00:04:05 +01:00
Nedelosk 3c4b025c74 Fix #1893 False Module Container ID 2017-11-24 00:03:41 +01:00
mezz 3df3d9121e Slightly improve render performance of genetic items (bee, trees, etc) 2017-11-11 22:04:39 -08:00
mezz 58ab49d66e Stop viscous fluids from making water flowing sounds 2017-11-11 20:51:27 -08:00
Nedelosk 37893d8aca Fix #1890 NPE with Quark 2017-11-08 20:33:59 +01:00
Nedelosk 9814601ff2 Fix backward compatibility 2017-11-03 23:10:10 +01:00
Nedelosk 11e8a06a48 Clean Up Module System 2017-11-03 22:38:13 +01:00
Nedelosk 26f44a2862 Fix Module System 2017-11-03 21:34:21 +01:00
Nedelosk 3073473b0e Fix Api 2017-11-03 19:55:25 +01:00
Nedelosk 61af8ba6c9 Improve Module System 2017-11-03 18:40:44 +01:00
Nedelosk 3e60c43b30 Merge remote-tracking branch 'origin/mc-1.12' into mc-1.12 2017-11-03 17:01:50 +01:00
Nedelosk e9ae149ba2 Fix GreenhouseEventHandler 2017-11-03 16:58:31 +01:00
Nedelosk b62ec72422 Change the plugin system to a module system and split up modules
-Changed plugin system to a module
-Renamed forestry plugins to modules
-Mod integration plugins are still called plugins
-Moved the woodpile from the arboriculture module to the charcoal module
-Moved the backpacks from the storage module to the backpacks module
-Moved the crates from the storage module to the creates module
-Added the database module with a new storage block for individuals
-Added a species plugin interface to handle the database gui
-Added some alyzer methods to the species plugin to move the alyzer
integration later to it
2017-11-03 16:56:02 +01:00
Nedelosk 50ef3d8b2c Update Lang 2017-11-03 16:46:09 +01:00
Nedelosk a0e15f76ca Move some classes to the api and fix broken api classes 2017-11-03 16:09:17 +01:00
Nedelosk e7766d3ad9 Remove experimental code 2017-11-02 16:12:06 +01:00
Nedelosk 4e096e7338 Remove unused resources 2017-11-02 16:06:17 +01:00
Nedelosk 88fd031fb4 Change the plugin system to a module system and slit up modules
-Moved the woodpile from the arboriculture module to the charcoal module
-Moved the backpacks from the storage module to the backpacks module
-Moved the crates from the storage module to the creates module
-Added the database module with a new storage for individuals
-Added a gui element system to improve the alyzer api
-Added a species plugin interface to handle the database gui
-Added some alyzer methods to the species plugin to move the alyzer
integration later to it
2017-11-02 16:03:33 +01:00
Nedelosk ee272de168 Fix #1866 Block State Interaction Issues With Pokecube and Forestry 2017-10-12 11:55:06 +02:00
Nedelosk 1faaa6e297 Merge remote-tracking branch 'origin/mc-1.12' into mc-1.12 2017-10-07 14:44:34 +02:00
Nedelosk 6c86447891 Fix Mystical Agriculture Inferium Seeds and update Integration 2017-10-07 14:41:13 +02:00
Nedelosk 905e81c2b9 Fix #1860 Mystical Agriculture Integration (Could not find item) 2017-10-07 14:25:20 +02:00
Nedelosk 25bb682f7d Fix #1856 Non Glass Fluids in Thermionic Fabricator are not getting used up. 2017-10-07 14:15:38 +02:00
Nedelosk 18e10f617c Fix #1863 Bottler does not empty bottles 2017-10-07 14:08:30 +02:00
mezz e0a0ab5594 Add modId to alleles and use new Forge item.getCreatorModId feature 2017-10-03 00:03:46 -07:00
Nedelosk 29d96db1e8 Merge remote-tracking branch 'origin/mc-1.12' into mc-1.12 2017-09-30 16:16:12 +02:00
Nedelosk 3769ec42d2 Fix #1857 Couldn't find resource table forestry:chests/village_naturalist 2017-09-30 16:15:52 +02:00
mezz d0c1133304 Update for 1.12.2 2017-09-18 20:33:56 -07:00
Nedelosk c3ff59fbfb Remove expensive check 2017-09-18 15:26:03 +02:00
Nedelosk aa52b063b7 Fix two Greenhouse Crashes 2017-09-18 15:08:58 +02:00
Nedelosk a74b3c87c4 Fix #1854 Crash on load if the greenhouse plugin is disabled 2017-09-18 13:50:07 +02:00
Nedelosk 6c38a6a28e Fix Greenhouse Climatisers 2017-09-15 13:50:38 +02:00
Nedelosk db49d305f4 Add PreInit Event to the Api 2017-09-10 16:14:32 +02:00
Nedelosk 5df7b9252b Remove Error Message 2017-09-10 01:26:00 +02:00
Nedelosk f4d0979bb1 Fix Climate Sources 2017-09-10 00:20:50 +02:00
Nedelosk 199200cb01 Fix #1425 Add Milk Capsule Cake Recipe 2017-09-09 22:24:37 +02:00
Nedelosk 419cebef33 Fix #1680 Display almost all butterflies 2017-09-09 20:44:19 +02:00
Nedelosk 716167e3ec Fix #1375 Split up the loot tables for every plugin 2017-09-09 20:18:19 +02:00
Nedelosk 60debc45f3 Update Lang 2017-09-09 01:12:03 +02:00
Nedelosk 2c04d42717 Improve Climate Source Circuits 2017-09-09 00:45:38 +02:00
Nedelosk 9e21ed9670 Update Version and Forge 2017-09-08 22:56:48 +02:00
Nedelosk 095e710bec Merge branch 'mc-1.12' of https://github.com/ForestryMC/ForestryMC into Greenhouse 2017-09-08 22:48:31 +02:00
Nedelosk 888c5268d5 Merge branch 'mc-1.12' of https://github.com/ForestryMC/ForestryMC into Greenhouse 2017-09-08 22:48:13 +02:00
Nedelosk 1180c16f45 Improve Climate Sources 2017-09-08 22:43:24 +02:00
mezz dea1fb144a Fix #1434 Fix #1551 Make hives spawn existing flowers only, up to 10 2017-09-07 23:41:59 -07:00
mezz a01190a242 Fix #1679 use fractions of world height to define ore generation levels 2017-09-07 21:41:15 -07:00
Nedelosk ab4489c5aa Improve Climate Modifier Widget 2017-09-07 16:44:28 +02:00
Nedelosk d2ea1d820c Add Climate Modifier Widget 2017-09-07 15:23:43 +02:00
Nedelosk 4d0dfd837e Make Climate state creation only accessible through ClimateStates 2017-09-06 19:33:13 +02:00
Nedelosk e07f10d981 Clean Up Greenhouse Climate 2017-09-06 17:38:00 +02:00
Nedelosk d48e9484b8 Merge branch 'mc-1.12' of https://github.com/ForestryMC/ForestryMC into Greenhouse 2017-09-06 16:27:11 +02:00
Nedelosk 3aa328a522 Clean Up Climatisers 2017-09-02 18:07:46 +02:00
Nedelosk 2b0f5bfdf4 Clean Up 2017-09-02 17:28:13 +02:00
Nedelosk bbe6f919c4 Merge branch 'mc-1.12' of https://github.com/ForestryMC/ForestryMC into mc-1.12 2017-09-02 16:01:22 +02:00
Nedelosk 4441d78eb2 Improve Time Modifier 2017-09-02 15:56:10 +02:00
Nedelosk 6d774de5a6 Clean Up Climate Bar 2017-09-01 12:49:29 +02:00
Nedelosk 0a2ca1febc Fix Camouflage 2017-08-31 17:19:51 +02:00
Nedelosk 6d3ff67efd Fix Greenhouse Target State NPE 2017-08-31 16:47:08 +02:00
Nedelosk d37a52dcf4 Merge branch 'mc-1.12' of https://github.com/ForestryMC/ForestryMC into mc-1.12 2017-08-31 16:38:20 +02:00
Nedelosk c03fa0e955 Improve Climate State 2017-08-31 16:29:46 +02:00
Nedelosk 66f0da433e Fix Targeted state 2017-08-29 19:08:26 +02:00
Nedelosk d8c8aec2ee Move Climate Bar to the top of the gui 2017-08-21 21:16:36 +02:00
Nedelosk 38189388f6 Move Greenhouse classes out of the api 2017-08-14 20:57:34 +02:00
Nedelosk 8bb1b74b1c Merge branch 'Greenhouse' of https://github.com/ForestryMC/ForestryMC into mc-1.12 2017-08-14 19:58:11 +02:00
Nedelosk 465d32af25 Merge branch 'mc-1.12' of https://github.com/ForestryMC/ForestryMC into mc-1.12 2017-08-14 19:57:20 +02:00
Nedelosk 13b8a023a3 Merge branch 'mc-1.11' into Greenhouse 2017-08-14 19:55:09 +02:00
Nedelosk 54ca3488df Update Greenhouse Code to 1.12 2017-08-14 19:51:09 +02:00
Nedelosk 26bf69effc Merge branch 'Greenhouse' of https://github.com/ForestryMC/ForestryMC into mc-1.12 2017-08-14 19:50:34 +02:00
mezz 8f29faa28a Fix #1787 Wood logs drop the wrong item when harvested with silk touch 2017-08-12 12:37:11 -07:00
mezz 1e6716f8ec #1687 Fix crash when genetics items are missing nbt 2017-08-06 12:13:37 -07:00
mezz 787395494c Fix tree generation with Mystcraft 2017-07-29 21:35:50 -07:00
Nedelosk b0b6ffb963 Remove unused code 2017-07-30 01:57:33 +02:00
Nedelosk d3d57ab0df Clean Up 2017-07-30 01:40:27 +02:00
Nedelosk 375515937d Cache Overlay Model 2017-07-30 01:22:51 +02:00
Nedelosk 6c869cab98 Add climate data 2017-07-29 22:40:56 +02:00
Nedelosk 212f857692 Add ash recipe 2017-07-29 22:05:20 +02:00
Nedelosk c40adda51c Fix PluginCore 2017-07-29 17:48:05 +02:00
Nedelosk 35f7ba6153 Merge branch 'mc-1.11' of https://github.com/ForestryMC/ForestryMC into Greenhouse 2017-07-29 17:46:36 +02:00
Nedelosk 327b7bba87 Improve Greenhouse and fix Wood Pile 2017-07-29 17:38:47 +02:00
mezz 694cd8103a Fix client visual glitch with worktable 2017-07-29 00:52:48 -07:00
mezz f50e7281c5 Fix serious issues with the worktable
Fix #1677 Fix #1768 Fix #1558 Fix #1519 Fix #1403
2017-07-29 00:52:48 -07:00
Nedelosk 1034111985 Fix #1772 crash if forestry.factory=false 2017-07-28 00:12:01 +02:00
Nedelosk 0c27bf850c Add OreDictionary support for the Fermenter 2017-07-27 15:40:52 +02:00
Nedelosk 78489a6146 Fix Fertilizer Config from 1.10 to 1.11 / 1.12 2017-07-25 15:59:37 +02:00
Nedelosk b4db0f32e4 Fix #1731 All 45 slot backpacks have localisation issues. 2017-07-24 02:06:58 +02:00
Nedelosk 8ad42a8918 Fix #1686 1.11.2 Config changes in GUI reset to values in file 2017-07-24 01:59:01 +02:00
Nedelosk 96ed44a186 Add Better with Mods Integration and Fix IE, Roots and Rustic Integration 2017-07-24 00:12:36 +02:00
Nedelosk 4e17804997 Add Roots Integration 2017-07-23 21:39:16 +02:00
Nedelosk e391d06f32 Add Rustic Integration 2017-07-23 20:37:56 +02:00
Nedelosk 353fcb1ba7 Port Mystical Agriculture Integration 2017-07-23 17:35:23 +02:00
Nedelosk 322327e1f4 Update Update formatting-settings.jar
- Changed CONTINUATION_INDENT_SIZE from 8 to 4
2017-07-16 13:46:14 +02:00
Nedelosk c2ca77ecae Update formatting-settings.jar 2017-07-15 18:00:34 +02:00
mezz 441f57d027 Test using deobfProvided instead of deobfCompile 2017-07-13 22:42:01 -07:00
mezz 2e0bb5a3b2 Fix JEI dependency info 2017-07-09 21:03:29 -07:00
1481 changed files with 68730 additions and 14960 deletions

No files matched your search

-1
View File
@@ -9,7 +9,6 @@
# files
!/.gitignore
!/.gitmodules
!/CLA.txt
!/CONTRIBUTING.md
!/LICENSE.txt
-3
View File
@@ -1,3 +0,0 @@
[submodule "lang"]
path = lang
url = https://github.com/ForestryMC/Forestry-Localization.git
+9 -4
View File
@@ -9,9 +9,9 @@ Forestry is a modification for the game Minecraft and known primarily for its fa
[Wiki](http://forestry.sengir.net/)
[Latest Builds for 1.11 / 1.11.2](http://jenkins.ic2.player.to/job/Forestry_1.11/)
[Latest Builds for 1.11.2/1.12](http://jenkins.ic2.player.to/job/Forestry_1.11/)
[IRC #forestry on esper.net](http://webchat.esper.net/?nick=ForestryGithub...&channels=forestry&prompt=1)
[![Discord](https://img.shields.io/discord/417745379258400778.svg?colorB=7289DA&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHYAAABWAgMAAABnZYq0AAAACVBMVEUAAB38%2FPz%2F%2F%2F%2Bm8P%2F9AAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxMAAAsTAQCanBgAAAAHdElNRQfhBxwQJhxy2iqrAAABoElEQVRIx7WWzdGEIAyGgcMeKMESrMJ6rILZCiiBg4eYKr%2Fd1ZAfgXFm98sJfAyGNwno3G9sLucgYGpQ4OGVRxQTREMDZjF7ILSWjoiHo1n%2BE03Aw8p7CNY5IhkYd%2F%2F6MtO3f8BNhR1QWnarCH4tr6myl0cWgUVNcfMcXACP1hKrGMt8wcAyxide7Ymcgqale7hN6846uJCkQxw6GG7h2MH4Czz3cLqD1zHu0VOXMfZjHLoYvsdd0Q7ZvsOkafJ1P4QXxrWFd14wMc60h8JKCbyQvImzlFjyGoZTKzohwWR2UzSONHhYXBQOaKKsySsahwGGDnb%2FiYPJw22sCqzirSULYy1qtHhXGbtgrM0oagBV4XiTJok3GoLoDNH8ooTmBm7ZMsbpFzi2bgPGoXWXME6XT%2BRJ4GLddxJ4PpQy7tmfoU2HPN6cKg%2BledKHBKlF8oNSt5w5g5o8eXhu1IOlpl5kGerDxIVT%2BztzKepulD8utXqpChamkzzuo7xYGk%2FkpSYuviLXun5bzdRf0Krejzqyz7Z3p0I1v2d6HmA07dofmS48njAiuMgAAAAASUVORK5CYII%3D)](https://discord.gg/49XNRJk)
For those interested in developement, you can also visit #forestry-dev.
@@ -21,9 +21,14 @@ The localization files reside in their own repository. It is pulled in automatic
You may want to adjust the "./gradle.properties" file to set your mc account as needed.
To setup, open a command line and run "gradlew setupDecompWorkspace" and "gradlew eclipse".
To setup, open a command line and run "gradlew setupDecompWorkspace". Then run the following depending on your IDE:
To package, open a command line and type "gradlew release".
Eclipse: "gradlew eclipse"
IntelliJ IDEA: "gradlew idea genIntellijRuns"
To package, open a command line and type "gradlew build".
For mod authors: the Forestry maven is located at http://maven.ic2.player.to/net/sengir/forestry/
### Notes
+18 -19
View File
@@ -21,11 +21,10 @@ version = version_major + '.' + version_minor + '.' + version_patch + '.' + getB
if (project.hasProperty('buildQualifier')) {
version = project.version + '-' + project.buildQualifier
}
group= "net.sengir.forestry" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
group = "net.sengir.forestry" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "forestry_" + mcversion
ext.dirDest = './build/dist'
ext.dirLang = "./lang"
// java version
sourceCompatibility = JavaVersion.VERSION_1_8
@@ -40,17 +39,9 @@ minecraft {
replace '@BUILD_NUMBER@', getBuildNumber()
}
sourceSets {
main {
resources {
srcDir project.dirLang
}
}
}
repositories {
maven {
url 'http://maven.epoxide.xyz'
url = 'http://maven.mcmoddev.com'
}
maven {
url "http://dvs1.progwml6.com/files/maven"
@@ -59,13 +50,22 @@ repositories {
name = "ic2"
url = "http://maven.ic2.player.to/"
}
maven {
name = "Modmuss50"
url = "http://maven.modmuss50.me"
}
maven {
url = 'https://mod-buildcraft.com/maven'
}
}
dependencies {
deobfCompile "net.darkhax.tesla:Tesla-${tesla_mcversion}:${tesla_version}"
deobfCompile "mezz.jei:jei_${jei_mcversion}:${jei_version}:api"
runtime "mezz.jei:jei_${jei_mcversion}:${jei_version}"
deobfCompile "net.industrial-craft:industrialcraft-2:${ic2_version}:api"
deobfProvided "net.darkhax.tesla:Tesla-${tesla_mcversion}:${tesla_version}"
deobfProvided "mezz.jei:jei_${jei_mcversion}:${jei_version}:api"
runtimeOnly "mezz.jei:jei_${jei_mcversion}:${jei_version}"
deobfProvided "net.industrial-craft:industrialcraft-2:${ic2_version}:api"
deobfProvided "TechReborn:TechReborn-${TR_mcversion}:${TR_version}:api"
deobfProvided "com.mod-buildcraft:buildcraft-api:${buildcraft_version}"
}
configurations {
@@ -84,7 +84,7 @@ processResources {
include 'mcmod.info'
// replace version and mcversion
expand 'version':project.version, 'mcversion':project.minecraft.version
expand 'version': project.version, 'mcversion': project.minecraft.version
}
// copy everything else, thats not the mcmod.info
@@ -134,7 +134,7 @@ uploadArchives {
repositories {
if (project.hasProperty('mavenDir')) {
mavenDeployer {
repository(url: "file://"+mavenDir)
repository(url: "file://" + mavenDir)
}
} else {
println 'Archives upload disabled, mavenDir in gradle.properties is missing.'
@@ -150,7 +150,7 @@ task makeChangelog(type: se.bjurr.gitchangelog.plugin.gradle.GitChangelogTask) {
filePath = "changelog.html"
untaggedName = "Current release ${project.version}"
fromCommit = "5a3850c2642e535656d090d1473054d5fa8d3331"
toRef = "HEAD"
toRef = "HEAD"
templateContent = file('changelog.mustache').getText('UTF-8')
}
@@ -161,7 +161,6 @@ curseforge {
changelog = file('changelog.html')
changelogType = 'html'
releaseType = 'beta'
addGameVersion '1.12'
}
}
Binary file not shown.
Executable → Regular
+11 -9
View File
@@ -1,14 +1,16 @@
mcversion=1.12.1
forgeversion=14.22.0.2469
mcp_mappings=snapshot_20170904
mcversion=1.12.2
forgeversion=14.23.4.2705
mcp_mappings=snapshot_20171003
curse_project_id=59751
tesla_version=1.0.60
tesla_mcversion=1.12
jei_version=4.7.8.92
jei_mcversion=1.12.1
ic2_version=2.8.24-ex112
jei_version=4.10.0.200
jei_mcversion=1.12.2
ic2_version=2.8.90-ex112
TR_mcversion=1.12.2
TR_version=2.13.2.561
buildcraft_version=7.99.17
version_major=5
version_minor=5
version_patch=3
version_minor=8
version_patch=1
Submodule lang deleted from 192d6f8584.
+46 -19
View File
@@ -15,9 +15,16 @@ import com.google.common.base.Preconditions;
import javax.annotation.Nullable;
import java.io.File;
import forestry.plugins.compat.PluginNatura;
import forestry.plugins.ForestryCompatPlugins;
import forestry.plugins.PluginBuildCraftFuels;
import forestry.plugins.PluginIC2;
import forestry.plugins.PluginNatura;
import forestry.plugins.PluginTechReborn;
import net.minecraft.item.Item;
import net.minecraftforge.client.event.ModelRegistryEvent;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.RegistryEvent;
import net.minecraftforge.fluids.FluidRegistry;
import net.minecraftforge.fml.common.Mod;
@@ -28,13 +35,16 @@ import net.minecraftforge.fml.common.event.FMLInterModComms.IMCEvent;
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
import net.minecraftforge.fml.common.event.FMLServerStartingEvent;
import net.minecraftforge.fml.common.eventhandler.EventPriority;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.common.network.NetworkRegistry;
import net.minecraftforge.fml.common.registry.GameRegistry;
import forestry.api.core.ForestryAPI;
import forestry.api.core.ForestryEvent;
import forestry.core.EventHandlerCore;
import forestry.core.climate.ClimateEventHandler;
import forestry.core.advancements.AdvancementManager;
import forestry.core.climate.ClimateStates;
import forestry.core.config.Config;
import forestry.core.config.Constants;
import forestry.core.config.GameMode;
@@ -44,9 +54,10 @@ import forestry.core.gui.GuiHandler;
import forestry.core.multiblock.MultiblockEventHandler;
import forestry.core.network.PacketHandler;
import forestry.core.proxy.Proxies;
import forestry.core.utils.MigrationHelper;
import forestry.core.worldgen.WorldGenerator;
import forestry.plugins.PluginManager;
import forestry.plugins.compat.PluginIC2;
import forestry.modules.ForestryModules;
import forestry.modules.ModuleManager;
/**
* Forestry Minecraft Mod
@@ -58,11 +69,14 @@ import forestry.plugins.compat.PluginIC2;
name = Constants.MOD_NAME,
version = Constants.VERSION,
guiFactory = "forestry.core.config.ForestryGuiConfigFactory",
acceptedMinecraftVersions = "[1.12, 1.12.1]",
dependencies = "required-after:forge@[14.21.1.2395,);"
acceptedMinecraftVersions = "[1.12.2,1.13.0)",
dependencies = "required-after:forge@[14.23.4.2705,);"
+ "after:jei@[4.7.8.91,);"
+ "after:" + PluginIC2.modId + ";"
+ "after:" + PluginNatura.modId + ";")
+ "after:" + PluginIC2.MOD_ID + ";"
+ "after:" + PluginNatura.MOD_ID + ";"
+ "after:toughasnails;"
+ "after:" + PluginTechReborn.MOD_ID + ";"
+ "after:" + PluginBuildCraftFuels.MOD_ID + ";")
public class Forestry {
@SuppressWarnings("NullableProblems")
@@ -75,16 +89,20 @@ public class Forestry {
ForestryAPI.instance = this;
ForestryAPI.forestryConstants = new Constants();
ForestryAPI.errorStateRegistry = new ErrorStateRegistry();
ForestryAPI.states = ClimateStates.INSTANCE;
EnumErrorCode.init();
FluidRegistry.enableUniversalBucket();
MinecraftForge.EVENT_BUS.register(this);
ModuleManager moduleManager = ModuleManager.getInstance();
ForestryAPI.moduleManager = moduleManager;
moduleManager.registerContainers(new ForestryModules(), new ForestryCompatPlugins());
}
@Nullable
private static PacketHandler packetHandler;
public static PacketHandler getPacketHandler() {
Preconditions.checkState(packetHandler != null);
Preconditions.checkNotNull(packetHandler);
return packetHandler;
}
@@ -96,25 +114,33 @@ public class Forestry {
EventHandlerCore eventHandlerCore = new EventHandlerCore();
MinecraftForge.EVENT_BUS.register(eventHandlerCore);
MinecraftForge.EVENT_BUS.register(new MultiblockEventHandler());
MinecraftForge.EVENT_BUS.register(new ClimateEventHandler());
MinecraftForge.EVENT_BUS.register(Config.class);
Proxies.common.registerEventHandlers();
configFolder = new File(event.getModConfigurationDirectory(), Constants.MOD_ID);
Config.load(event.getSide());
PluginManager.runSetup(event);
MinecraftForge.EVENT_BUS.post(new ForestryEvent.PreInit(this, event));
ModuleManager.runSetup(event);
ModuleManager.getInternalHandler().runSetup();
String gameMode = Config.gameMode;
Preconditions.checkState(gameMode != null);
Preconditions.checkNotNull(gameMode);
ForestryAPI.activeMode = new GameMode(gameMode);
PluginManager.runPreInit(event.getSide());
MigrationHelper.registerFixable();
ModuleManager.getInternalHandler().runPreInit(event.getSide());
}
@SubscribeEvent(priority = EventPriority.LOWEST)
public void registerItems(RegistryEvent.Register<Item> event) {
ModuleManager.getInternalHandler().runRegisterBackpacksAndCrates();
}
@SubscribeEvent
public void registerModels(ModelRegistryEvent event) {
PluginManager.runRegisterBackpacksAndCrates();
Proxies.render.registerModels();
}
@@ -123,14 +149,15 @@ public class Forestry {
// Register gui handler
NetworkRegistry.INSTANCE.registerGuiHandler(this, new GuiHandler());
PluginManager.runInit();
ModuleManager.getInternalHandler().runInit();
Proxies.render.registerItemAndBlockColors();
AdvancementManager.registerTriggers();
}
@EventHandler
public void postInit(FMLPostInitializationEvent event) {
PluginManager.runPostInit();
ModuleManager.getInternalHandler().runPostInit();
// Register world generator
WorldGenerator worldGenerator = new WorldGenerator();
@@ -140,12 +167,12 @@ public class Forestry {
Proxies.common.registerTickHandlers(worldGenerator);
// Handle IMC messages.
PluginManager.processIMCMessages(FMLInterModComms.fetchRuntimeMessages(ForestryAPI.instance));
ModuleManager.getInternalHandler().processIMCMessages(FMLInterModComms.fetchRuntimeMessages(ForestryAPI.instance));
}
@EventHandler
public void serverStarting(FMLServerStartingEvent event) {
PluginManager.serverStarting(event.getServer());
ModuleManager.serverStarting(event.getServer());
}
@Nullable
@@ -155,6 +182,6 @@ public class Forestry {
@EventHandler
public void processIMCMessages(IMCEvent event) {
PluginManager.processIMCMessages(event.getMessages());
ModuleManager.getInternalHandler().processIMCMessages(event.getMessages());
}
}
@@ -1,3 +1,8 @@
/*******************************************************************************
* Copyright 2011-2014 SirSengir
*
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
******************************************************************************/
package forestry.api.apiculture;
import net.minecraftforge.common.capabilities.Capability;
@@ -5,6 +5,7 @@
******************************************************************************/
package forestry.api.apiculture;
import javax.annotation.Nullable;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -34,26 +35,41 @@ public class BeeManager {
/**
* Convenient access to AlleleManager.alleleRegistry.getSpeciesRoot("rootBees")
*
* @implNote Only null if the "apiculture" module is not enabled.
*/
@Nullable
public static IBeeRoot beeRoot;
/**
* Used to create new bees.
*
* @implNote Only null if the "apiculture" module is not enabled.
*/
@Nullable
public static IBeeFactory beeFactory;
/**
* Used to create new bee mutations.
*
* @implNote Only null if the "apiculture" module is not enabled.
*/
@Nullable
public static IBeeMutationFactory beeMutationFactory;
/**
* Used to get Forestry's jubilance implementations.
*
* @implNote Only null if the "apiculture" module is not enabled.
*/
@Nullable
public static IJubilanceFactory jubilanceFactory;
/**
* Used to check whether a player is wearing Apiarist Armor.
*
* @implNote Only null if the "apiculture" module is not enabled.
*/
@Nullable
public static IArmorApiaristHelper armorApiaristHelper;
}
@@ -9,15 +9,19 @@ import javax.annotation.Nullable;
import java.util.List;
import java.util.Set;
import net.minecraft.block.state.IBlockState;
import net.minecraft.item.ItemStack;
import net.minecraft.util.NonNullList;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.biome.Biome;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import forestry.api.core.IErrorState;
import forestry.api.genetics.IEffectData;
import forestry.api.genetics.IIndividual;
import forestry.api.genetics.IIndividualLiving;
import net.minecraft.item.ItemStack;
import net.minecraft.util.NonNullList;
import net.minecraft.world.biome.Biome;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
/**
* Other implementations than Forestry's default one are not supported.
@@ -85,8 +89,27 @@ public interface IBee extends IIndividualLiving {
List<IBee> spawnDrones(IBeeHousing housing);
/**
* @deprecated since Forestry 5.5.4. Use {@link #plantFlowerRandom(IBeeHousing, List)}
*/
@Deprecated
void plantFlowerRandom(IBeeHousing housing);
/**
* Plants a random flower from the given list near the housing
*
* @param housing the location the bee is living
* @param potentialFlowers the flowers to choose from
* @return the position of the planted flower, or null of none were planted
* @since Forestry 5.5.4
*/
@Nullable
default BlockPos plantFlowerRandom(IBeeHousing housing, List<IBlockState> potentialFlowers) {
//noinspection deprecation
plantFlowerRandom(housing);
return null;
}
@Nullable
IIndividual retrievePollen(IBeeHousing housing);
@@ -14,6 +14,7 @@ public interface IBeeFactory {
* Automatically registered with AlleleManager.alleleRegistry.registerAllele()
* See IAlleleBeeSpeciesBuilder and IAlleleSpeciesBuilder for adding additional properties to the returned species.
*
* @param modId The modId of the mod that is creating the species
* @param uid Unique Identifier for this species
* @param dominant Whether this species is genetically dominant (false means it is recessive)
* @param authority Authority for the binomial name, e.g. "Sengir" on species of base Forestry.
@@ -24,8 +25,9 @@ public interface IBeeFactory {
* @param primaryColor The outline color of this species
* @param secondaryColor The body color of this species
* @return a new bee species allele.
* @since Forestry 5.6.0.
*/
IAlleleBeeSpeciesBuilder createSpecies(String uid, boolean dominant, String authority, String unlocalizedName, String unlocalizedDescription, IClassification branch, String binomial, int primaryColor, int secondaryColor);
IAlleleBeeSpeciesBuilder createSpecies(String modId, String uid, boolean dominant, String authority, String unlocalizedName, String unlocalizedDescription, IClassification branch, String binomial, int primaryColor, int secondaryColor);
/**
* Creates a new bee branch.
@@ -36,4 +38,10 @@ public interface IBeeFactory {
* @return a new bee branch
*/
IClassification createBranch(String uid, String scientific);
/**
* @deprecated since Forestry 5.6.0. use {@link #createSpecies(String, String, boolean, String, String, String, IClassification, String, int, int)}
*/
@Deprecated
IAlleleBeeSpeciesBuilder createSpecies(String uid, boolean dominant, String authority, String unlocalizedName, String unlocalizedDescription, IClassification branch, String binomial, int primaryColor, int secondaryColor);
}
@@ -8,16 +8,18 @@ package forestry.api.apiculture;
import java.io.IOException;
import java.util.List;
import forestry.api.core.INbtReadable;
import forestry.api.core.INbtWritable;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.network.PacketBuffer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.math.BlockPos;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import forestry.api.core.INbtReadable;
import forestry.api.core.INbtWritable;
/**
* Stores beekeeping logic for bee housings.
* Get one with BeeManager.beeRoot.createBeekeepingLogic(IBeeHousing housing)
@@ -37,10 +37,15 @@ public interface IBeekeepingMode {
*/
boolean isFatigued(IBee queen, IBeeHousing housing);
/**
* @return true if the queen is being overworked in the bee housing (with chance). will trigger a negative effect.
/**
* @return true if the queen is being overworked in the bee housing (with chance). will trigger a negative effect.
* @deprecated bees max out at 16x productivity instead of being overworked.
* TODO remove this method in 1.13
*/
boolean isOverworked(IBee queen, IBeeHousing housing);
@Deprecated
default boolean isOverworked(IBee queen, IBeeHousing housing) {
return false;
}
/**
* @return true if the genetic structure of the queen is breaking down during spawning of the offspring (with chance). will trigger a negative effect.
@@ -1,3 +1,8 @@
/*******************************************************************************
* Copyright 2011-2014 SirSengir
*
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
******************************************************************************/
package forestry.api.apiculture;
import net.minecraft.entity.player.EntityPlayer;
@@ -8,9 +8,10 @@ package forestry.api.apiculture.hives;
import java.util.List;
import java.util.Locale;
import forestry.api.apiculture.IHiveDrop;
import net.minecraft.util.IStringSerializable;
import forestry.api.apiculture.IHiveDrop;
public interface IHiveRegistry {
/* Forestry Hive Names */
@@ -1,9 +1,15 @@
/*******************************************************************************
* Copyright 2011-2014 SirSengir
*
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
******************************************************************************/
package forestry.api.arboriculture;
import forestry.api.core.IArmorNaturalist;
import net.minecraftforge.common.capabilities.Capability;
import net.minecraftforge.common.capabilities.CapabilityInject;
import forestry.api.core.IArmorNaturalist;
public class ArboricultureCapabilities {
/**
* Capability for {@link IArmorNaturalist}.
@@ -5,9 +5,10 @@
******************************************************************************/
package forestry.api.arboriculture;
import net.minecraft.util.text.translation.I18n;
import forestry.api.genetics.AlleleManager;
import forestry.api.genetics.IFruitFamily;
import forestry.core.utils.Translator;
public enum EnumFruitFamily implements IFruitFamily {
PRUNES("prunes", "Prunus domestica"),
@@ -37,12 +38,12 @@ public enum EnumFruitFamily implements IFruitFamily {
@Override
public String getName() {
return Translator.translateToLocal("for.family." + uid);
return I18n.translateToLocal("for.family." + uid);
}
@Override
public String getDescription() {
return Translator.translateToLocal("for.family." + uid + ".description");
return I18n.translateToLocal("for.family." + uid + ".description");
}
}
@@ -1,3 +1,8 @@
/*******************************************************************************
* Copyright 2011-2014 SirSengir
*
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
******************************************************************************/
package forestry.api.arboriculture;
import java.util.Locale;
@@ -19,6 +19,4 @@ public interface IAlleleFruit extends IAlleleProperty<IAlleleFruit> {
@Nullable
String getModelName();
String getModID();
}
@@ -7,15 +7,18 @@ package forestry.api.arboriculture;
import java.util.Collection;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.item.Item;
import net.minecraftforge.common.EnumPlantType;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import forestry.api.core.IModelManager;
import forestry.api.genetics.IAlleleProperty;
import forestry.api.genetics.IAlleleSpecies;
import forestry.api.genetics.IFruitFamily;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.item.Item;
import net.minecraftforge.common.EnumPlantType;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
public interface IAlleleTreeSpecies extends IAlleleSpecies, IAlleleProperty<IAlleleTreeSpecies> {
@@ -36,11 +39,6 @@ public interface IAlleleTreeSpecies extends IAlleleSpecies, IAlleleProperty<IAll
* @return Tree generator for this species.
*/
ITreeGenerator getGenerator();
/**
* @return The modid from the mod of the species.
*/
String getModID();
/**
* @return Float between 0 and 1 representing the rarity of the species, will affect spawn rate. If it's 0, it will not spawn.
@@ -0,0 +1,42 @@
/*******************************************************************************
* Copyright 2011-2014 SirSengir
*
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
******************************************************************************/
package forestry.api.arboriculture;
import java.util.Collection;
import net.minecraft.block.Block;
import net.minecraft.block.state.IBlockState;
/**
* Provides functions that are related to the forestry charcoal pile.
*/
public interface ICharcoalManager {
/**
* Registers the given block as a valid block for the charcoal pile wall and adds the given charcoal amount to it.
* <p>
* This method unlike {@link #registerWall(IBlockState, int)} ignores the metadata of the actual block and
* only compares the world block with the given block.
*/
void registerWall(Block block, int amount);
/**
* Registers the given block as a valid block for the charcoal pile wall and adds the given charcoal amount to it.
* <p>
* This method unlike {@link #registerWall(Block, int)} compares the world state with the given state and not
* only the block.
*/
void registerWall(IBlockState blockState, int amount);
/**
* Registers your implementation of the {@link ICharcoalPileWall} interface.
*/
void registerWall(ICharcoalPileWall wall);
/**
* @return A collection with all registered charcoal pile walls.
*/
Collection<ICharcoalPileWall> getWalls();
}
@@ -14,7 +14,12 @@ public interface ICharcoalPileWall {
int getCharcoalAmount();
boolean matches(IBlockState state);
NonNullList<ItemStack> getDisplyItems();
@Deprecated
default NonNullList<ItemStack> getDisplyItems(){
return getDisplayItems();
}
NonNullList<ItemStack> getDisplayItems();
}
@@ -1,6 +1,6 @@
/*******************************************************************************
* Copyright 2011-2014 SirSengir
*
*
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
******************************************************************************/
package forestry.api.arboriculture;
@@ -5,32 +5,12 @@
******************************************************************************/
package forestry.api.arboriculture;
import javax.annotation.Nullable;
import java.awt.Color;
import forestry.api.genetics.IClassification;
public interface ITreeFactory {
/**
* Creates a new tree species.
* Automatically registered with AlleleManager.alleleRegistry.registerAllele()
* See IAlleleTreeSpeciesBuilder and IAlleleSpeciesBuilder for adding additional properties to the returned species.
*
* @param uid Unique Identifier for this species
* @param unlocalizedName Unlocalized name for this species
* @param authority Authority for the binomial name, e.g. "Sengir" on species of base Forestry.
* @param unlocalizedDescription Unlocalized description for this species
* @param dominant Whether this species is genetically dominant (false means it is recessive)
* @param branch Classification of this species
* @param binomial Binomial name of the species sans genus. "humboldti" will have the bee species flavour name be "Apis humboldti". Feel free to use fun names or null.
* @param modID The modID from the mod of the species
* @param leafSpriteProvider The leaf sprite provider for this species
* @param germlingModelProvider The germling model provider for this species
* @param woodProvider The wood texture provider. It is used to get wood textures for the charcoal pile.
* @param generator The tree generator
* @return a new tree species allele.
*/
IAlleleTreeSpeciesBuilder createSpecies(String uid, String unlocalizedName, String authority, String unlocalizedDescription, boolean dominant, IClassification branch, String binomial, String modID, ILeafSpriteProvider leafSpriteProvider, IGermlingModelProvider germlingModelProvider, IWoodProvider woodProvider, ITreeGenerator generator);
/**
* Creates a new tree species.
* Automatically registered with AlleleManager.alleleRegistry.registerAllele()
@@ -48,10 +28,18 @@ public interface ITreeFactory {
* @param germlingModelProvider The germling model provider for this species
* @param woodProvider The wood texture provider. It is used to get wood textures for the charcoal pile.
* @param generator The tree generator
* @param leafProvider The leaf provider
* @return a new tree species allele.
*/
IAlleleTreeSpeciesBuilder createSpecies(String uid, String unlocalizedName, String authority, String unlocalizedDescription, boolean dominant, IClassification branch, String binomial, String modID, ILeafSpriteProvider leafSpriteProvider, IGermlingModelProvider germlingModelProvider, IWoodProvider woodProvider, ITreeGenerator generator, ILeafProvider leafProvider);
IAlleleTreeSpeciesBuilder createSpecies(String uid, String unlocalizedName, String authority, String unlocalizedDescription, boolean dominant, IClassification branch, String binomial, String modID, ILeafSpriteProvider leafSpriteProvider, IGermlingModelProvider germlingModelProvider, IWoodProvider woodProvider, ITreeGenerator generator, @Nullable ILeafProvider leafProvider);
/**
* @deprecated since Forestry 5.6.0. use {@link #createSpecies(String, String, String, String, boolean, IClassification, String, String, ILeafSpriteProvider, IGermlingModelProvider, IWoodProvider, ITreeGenerator, ILeafProvider)}
*/
@Deprecated
IAlleleTreeSpeciesBuilder createSpecies(String uid, String unlocalizedName, String authority, String unlocalizedDescription, boolean dominant, IClassification branch, String binomial, String modID, ILeafSpriteProvider leafSpriteProvider, IGermlingModelProvider germlingModelProvider, IWoodProvider woodProvider, ITreeGenerator generator);
/**
* Get one of the built-in Forestry leaf types. Default type is deciduous.
*/
@@ -5,9 +5,10 @@
******************************************************************************/
package forestry.api.arboriculture;
import forestry.api.genetics.IGenome;
import net.minecraft.item.ItemStack;
import forestry.api.genetics.IGenome;
public interface ITreeGenome extends IGenome {
@Override
@@ -37,6 +38,8 @@ public interface ITreeGenome extends IGenome {
int getGirth();
boolean getFireproof();
IAlleleLeafEffect getEffect();
/**
@@ -9,16 +9,18 @@ import javax.annotation.Nullable;
import java.util.Collection;
import java.util.List;
import com.mojang.authlib.GameProfile;
import forestry.api.genetics.IAllele;
import forestry.api.genetics.IChromosome;
import forestry.api.genetics.IFruitFamily;
import forestry.api.genetics.ISpeciesRootPollinatable;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import com.mojang.authlib.GameProfile;
import forestry.api.genetics.IAllele;
import forestry.api.genetics.IChromosome;
import forestry.api.genetics.IFruitFamily;
import forestry.api.genetics.ISpeciesRootPollinatable;
public interface ITreeRoot extends ISpeciesRootPollinatable {
@Override
@@ -5,13 +5,15 @@
******************************************************************************/
package forestry.api.arboriculture;
import forestry.api.core.ITextureManager;
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import forestry.api.core.ITextureManager;
public interface IWoodProvider {
@SideOnly(Side.CLIENT)
void registerSprites(Item item, ITextureManager manager);
@@ -29,11 +31,15 @@ public interface IWoodProvider {
/**
* The amount of charcoal dropped from a charcoal pile of this wood.
* @deprecated Will be removed in 1.13
*/
@Deprecated
int getCarbonization();
/**
* The chance that a pile has to drop a extra charcoal
* @deprecated Will be removed in 1.13
*/
@Deprecated
float getCharcoalChance(int numberOfCharcoal);
}
@@ -1,3 +1,8 @@
/*******************************************************************************
* Copyright 2011-2014 SirSengir
*
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
******************************************************************************/
package forestry.api.arboriculture;
import net.minecraft.util.IStringSerializable;
@@ -5,6 +5,7 @@
******************************************************************************/
package forestry.api.arboriculture;
import javax.annotation.Nullable;
import java.util.ArrayList;
import java.util.List;
@@ -12,7 +13,10 @@ public class TreeManager {
/**
* Convenient access to AlleleManager.alleleRegistry.getSpeciesRoot("rootTrees")
*
* @implNote Only null if the "arboriculture" module is not enabled.
*/
@Nullable
public static ITreeRoot treeRoot;
/**
@@ -22,13 +26,31 @@ public class TreeManager {
/**
* Used to create new trees.
*
* @implNote Only null if the "arboriculture" module is not enabled.
*/
@Nullable
public static ITreeFactory treeFactory;
/**
* Used to create new tree mutations.
*
* @implNote Only null if the "arboriculture" module is not enabled.
*/
@Nullable
public static ITreeMutationFactory treeMutationFactory;
/**
* Can be used to add new charcoal pile walls.
*
* @implNote Only null if the "charcoal" module is not enabled.
*/
@Nullable
public static ICharcoalManager charcoalManager;
/**
* @deprecated Please use {@link ICharcoalManager#registerWall}.
*/
@Deprecated
public static List<ICharcoalPileWall> pileWalls = new ArrayList<>();
}
@@ -1,3 +1,8 @@
/*******************************************************************************
* Copyright 2011-2014 SirSengir
*
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
******************************************************************************/
package forestry.api.arboriculture;
import com.google.common.collect.ImmutableMap;
@@ -5,10 +5,11 @@
******************************************************************************/
@ParametersAreNonnullByDefault
@MethodsReturnNonnullByDefault
@API(apiVersion = "4.2.1", owner = "ForestryAPI|core", provides = "ForestryAPI|arboriculture")
@API(apiVersion = "4.3.0", owner = "ForestryAPI|core", provides = "ForestryAPI|arboriculture")
package forestry.api.arboriculture;
import javax.annotation.ParametersAreNonnullByDefault;
import mcp.MethodsReturnNonnullByDefault;
import net.minecraftforge.fml.common.API;
import mcp.MethodsReturnNonnullByDefault;
@@ -0,0 +1,54 @@
/*******************************************************************************
* Copyright 2011-2014 SirSengir
*
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
******************************************************************************/
package forestry.api.book;
import javax.annotation.Nullable;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import forestry.api.gui.IElementGroup;
import forestry.api.gui.IGuiElement;
import forestry.api.gui.IGuiElementFactory;
/**
* The deserialized content data of a book page. It creates a gui element at the moment the entry gets opened.
*/
@SideOnly(Side.CLIENT)
public abstract class BookContent<D> {
public String type;
/**
* A data object that was deserialized from the json object of this content.
* Can be everything from an image to a crafting recipe.
*/
@Nullable
public D data = null;
/**
* The class of the data field. Used for the deserialization. If the result of this method is null the data field
* will be null too.
*/
@Nullable
public abstract Class<? extends D> getDataClass();
/**
* Called after the deserialization.
*/
public void onDeserialization() {
}
/**
* Adds the content to the page by adding a {@link IGuiElement} or at the content to the previous element.
*
* @param page The gui element that represents a book page
* @param previous The content of the previous element.
* @param previousElement The element that was previously added to the page.
* @param pageHeight The max height of the current page.
* @return True if you added an element.
*/
public abstract boolean addElements(IElementGroup page, IGuiElementFactory factory, @Nullable BookContent previous, @Nullable IGuiElement previousElement, int pageHeight);
}
@@ -0,0 +1,14 @@
/*******************************************************************************
* Copyright 2011-2014 SirSengir
*
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
******************************************************************************/
package forestry.api.book;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
public class BookManager {
@SideOnly(Side.CLIENT)
public static IBookLoader loader;
}
@@ -0,0 +1,84 @@
/*******************************************************************************
* Copyright 2011-2014 SirSengir
*
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
******************************************************************************/
package forestry.api.book;
import javax.annotation.Nullable;
import java.util.Collection;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
@SideOnly(Side.CLIENT)
public interface IBookCategory {
/**
* @return the {@link ItemStack} that represents this category at the front page.
*/
ItemStack getStack();
IBookCategory setStack(ItemStack stack);
/**
* Adds an custom entry to the category.
*/
IBookCategory addEntry(IBookEntry entry);
/**
* Adds an entry with the given name and the given icon to the category.
*
* @param name A unique name for this entry.
* @param stack The stack that will be displayed next to the entry title at the category page.
*/
IBookCategory addEntry(String name, ItemStack stack);
/**
* Creates a entry builder with the given name.
* <p>
* At the end of your creation you have to call {@link IBookEntryBuilder#addToCategory()} to add the entry to this
* category.
*
* @param name A unique name for this entry.
*/
IBookEntryBuilder createEntry(String name);
/**
* Creates a entry builder with the given name and the given icon.
* <p>
* At the end of your creation you have to call {@link IBookEntryBuilder#addToCategory()} to add the entry to this
* category.
*
* @param name A unique name for this entry.
* @param stack The stack that will be displayed next to the entry title at the category page.
*/
IBookEntryBuilder createEntry(String name, ItemStack stack);
/**
* @return a collection that contains all entries of this category.
*/
Collection<IBookEntry> getEntries();
/**
* @return the entry with the given unique name.
*/
@Nullable
IBookEntry getEntry(String name);
/**
* @return the localized name of this category.
*/
String getLocalizedName();
/**
* Currently unused
*/
String getTooltip();
/**
* @return the unique name of this category
*/
String getName();
}
@@ -0,0 +1,30 @@
package forestry.api.book;
import javax.annotation.Nullable;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import forestry.api.gui.IElementGroup;
import forestry.api.gui.IGuiElement;
import forestry.api.gui.IGuiElementFactory;
@SideOnly(Side.CLIENT)
public interface IBookContent {
/**
* Called after the deserialization.
*/
default void onDeserialization() {
}
/**
* Adds the content to the page by adding a {@link IGuiElement} or at the content to the previous element.
*
* @param page The gui element that represents a book page
* @param previous The content of the previous element.
* @param previousElement The element that was previously added to the page.
* @param pageHeight The max height of the current page.
* @return True if you added an element.
*/
boolean addElements(IElementGroup page, IGuiElementFactory factory, @Nullable BookContent previous, @Nullable IGuiElement previousElement, int pageHeight);
}
@@ -0,0 +1,60 @@
/*******************************************************************************
* Copyright 2011-2014 SirSengir
*
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
******************************************************************************/
package forestry.api.book;
import javax.annotation.Nullable;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
/**
* A entry in the {@link IForesterBook}.
* <p>
* Forestry crates them with the help of json file, but you can add you own custom ones with
* {@link IBookCategory#addEntry(IBookEntry)}.
*/
@SideOnly(Side.CLIENT)
public interface IBookEntry {
/**
* @return The stack that is displayed before the entry name.
*/
ItemStack getStack();
/**
* @return A unique string identifier for this entry.
*/
String getName();
/**
* @return the object that creates the book pages at the moment the bock opens.
*/
IBookPageFactory getPageFactory();
/**
* All sub entries of this entry are reachable over the buttons on the left side of the book.
*/
IBookEntry[] getSubEntries();
/**
* The parent of the entry if this entry is a sub entry. Null if the entry is no sub entry.
*/
@Nullable
IBookEntry getParent();
/**
* @return the localized title of this entry.
*/
String getTitle();
/**
* @return the content that was deserialized from the json file of this entry.
*/
BookContent[][] getContent();
}
@@ -0,0 +1,66 @@
/*******************************************************************************
* Copyright 2011-2014 SirSengir
*
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
******************************************************************************/
package forestry.api.book;
import javax.annotation.Nullable;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
@SideOnly(Side.CLIENT)
public interface IBookEntryBuilder {
/**
* Sets the content of the entry.
*/
IBookEntryBuilder setContent(BookContent[][] content);
/**
* Sets the localized name of entry.
*/
IBookEntryBuilder setTitle(String title);
IBookEntryBuilder setStack(ItemStack stack);
IBookEntryBuilder setLoader(IBookPageFactory loader);
/**
* Creates a sub entry.
* <p>
* Important: You not have to call {@link #addToCategory()} at the end of the creation of the sub entry
*
* @param name The unique name of the sub entry.
* @return The entry builder of the sub entry.
*/
default IBookEntryBuilder createSubEntry(String name) {
return createSubEntry(name, ItemStack.EMPTY);
}
/**
* Creates a sub entry.
* <p>
* Important: You not have to call {@link #addToCategory()} at the end of the creation of the sub entry
*
* @param name The unique name of the sub entry.
* @param stack The stack that represents the sub entry.
* @return The entry builder of the sub entry.
*/
IBookEntryBuilder createSubEntry(String name, ItemStack stack);
IBookEntry build(@Nullable IBookEntry parent);
/**
* Builds a entry with the current information.
*/
IBookEntry build();
/**
* Builds the entry and adds it to the category.
*/
IBookCategory addToCategory();
}
@@ -0,0 +1,39 @@
/*******************************************************************************
* Copyright 2011-2014 SirSengir
*
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
******************************************************************************/
package forestry.api.book;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
@SideOnly(Side.CLIENT)
public interface IBookLoader {
/**
* Adds a content type.
*
* @param name The name of the content type.
* @param contentClass The class for the deserialization of the content.
*/
void registerContentType(String name, Class<? extends BookContent> contentClass);
void registerPageFactory(String name, IBookPageFactory factory);
IBookPageFactory getPageFactory(String name);
/**
* Loads the book if it was not loaded already or if it was invalidated. Otherwise it returns the last loaded
* instance.
*
* @return The current instance of the forestry guide book.
*/
IForesterBook loadBook();
/**
* Invalidates the current instance of the book.
* The next time {@link #loadBook()} gets called a new instance of the book will be loaded.
*/
void invalidateBook();
}
@@ -0,0 +1,31 @@
/*******************************************************************************
* Copyright 2011-2014 SirSengir
*
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
******************************************************************************/
package forestry.api.book;
import java.util.Collection;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import forestry.api.gui.IGuiElement;
/**
* A factory that creates book pages for a book entry.
*/
@SideOnly(Side.CLIENT)
public interface IBookPageFactory {
/**
* Usually called at the moment the player opens the given entry.
* Creates a collection of gui elements that represent a page of the book.
*
* @param entry The opened book entry.
* @param leftPageHeight The height of a page on the left side of the book.
* @param rightPageHeight The height of a page on the right side of the book.
* @param pageWidth The width of a book page.
* @return A collection where every member represent a page of the book.
*/
Collection<IGuiElement> load(IBookEntry entry, int leftPageHeight, int rightPageHeight, int pageWidth);
}
@@ -0,0 +1,56 @@
/*******************************************************************************
* Copyright 2011-2014 SirSengir
*
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
******************************************************************************/
package forestry.api.book;
import javax.annotation.Nullable;
import java.util.Collection;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
/**
* IForesterBook is the interface that the forestry guide book class implements.
* <p>
* You can get the current instance of the guide book from {@link IBookLoader#loadBook()}.
*/
@SideOnly(Side.CLIENT)
public interface IForesterBook {
/**
* Creates a category, add it to this book and returns it.
*
* @param name A unique identifier for the category.
* @return The created category.
*/
IBookCategory addCategory(String name);
/**
* @return The category with the given unique name.
*/
@Nullable
IBookCategory getCategory(String name);
/**
* @return All categories of this book.
*/
Collection<IBookCategory> getCategories();
/**
* @return A collection that contains all unique names of the categories
*/
Collection<String> getCategoryNames();
/**
* @return A collection that contains all entries of the category with the given name.
*/
Collection<IBookEntry> getEntries(String category);
/**
* @return the entry with the given unique name.
*/
@Nullable
IBookEntry getEntry(String name);
}
@@ -0,0 +1,15 @@
/*******************************************************************************
* Copyright 2011-2014 SirSengir
*
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
******************************************************************************/
@ParametersAreNonnullByDefault
@MethodsReturnNonnullByDefault
@API(apiVersion = "5.8.1", owner = "ForestryAPI|core", provides = "ForestryAPI|book")
package forestry.api.book;
import javax.annotation.ParametersAreNonnullByDefault;
import mcp.MethodsReturnNonnullByDefault;
import net.minecraftforge.fml.common.API;
@@ -8,6 +8,7 @@ package forestry.api.circuits;
public enum CircuitSocketType implements ICircuitSocketType {
NONE("none"),
FARM("forestry.farm"),
GREENHOUSE_CLIMATISER("forestry.greenhouse.climatiser"),
ELECTRIC_ENGINE("forestry.electric.engine"),
MACHINE("forestry.machine");
@@ -7,11 +7,17 @@ package forestry.api.circuits;
import java.util.List;
import net.minecraft.util.text.translation.I18n;
public interface ICircuit {
String getUID();
String getUnlocalizedName();
default String getLocalizedName(){
return I18n.translateToLocal(getUnlocalizedName());
}
boolean isCircuitable(Object tile);
void onInsertion(int slot, Object tile);
@@ -18,6 +18,8 @@ public interface ICircuitRegistry {
void registerCircuit(ICircuit circuit);
void registerDeprecatedCircuitReplacement(String deprecatedCircuit, ICircuit replacement);
@Nullable
ICircuit getCircuit(String uid);
@@ -0,0 +1,24 @@
/*******************************************************************************
* Copyright 2011-2014 SirSengir
*
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
******************************************************************************/
package forestry.api.climate;
import net.minecraft.util.math.MathHelper;
public enum ClimateStateType {
DEFAULT(0.0F, 2.0F),
EXTENDED(-3.0F, 3.0F);
public final float boundDown, boundUp;
ClimateStateType(Float boundDown, Float boundUp) {
this.boundDown = boundDown;
this.boundUp = boundUp;
}
public float clamp(float value) {
return MathHelper.clamp(value, boundDown, boundUp);
}
}
@@ -5,14 +5,13 @@
******************************************************************************/
package forestry.api.climate;
public interface IClimatiserDefinition {
import java.util.Locale;
float getChange();
float getRange();
EnumClimatiserModes getMode();
EnumClimatiserTypes getType();
public enum ClimateType {
TEMPERATURE, HUMIDITY;
public String getName(){
return name().toLowerCase(Locale.ENGLISH);
}
}
@@ -1,7 +0,0 @@
package forestry.api.climate;
public enum EnumClimatiserModes {
POSITIVE, NEGATIVE, BOTH
}
@@ -1,7 +0,0 @@
package forestry.api.climate;
public enum EnumClimatiserTypes {
TEMPERATURE, HUMIDITY, BOTH
}
@@ -1,22 +0,0 @@
/*******************************************************************************
* Copyright 2011-2014 SirSengir
*
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
******************************************************************************/
package forestry.api.climate;
public interface IClimateControl {
IClimateInfo getControlClimate();
void setControlClimate(IClimateInfo climateInfo);
float getControlTemperature();
float getControlHumidity();
void setControlTemperature(float temperature);
void setControlHumidity(float humidity);
}
@@ -1,9 +1,16 @@
/*******************************************************************************
* Copyright 2011-2014 SirSengir
*
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
******************************************************************************/
package forestry.api.climate;
/**
* @deprecated TODO: Remove in 1.13, Use IClimateState
*/
@Deprecated
public interface IClimateInfo {
float getTemperature();
float getHumidity();
}
@@ -5,37 +5,37 @@
******************************************************************************/
package forestry.api.climate;
import javax.annotation.Nullable;
import java.util.List;
import java.util.Map;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
public interface IClimateManager {
/**
* @deprecated Use {@link IClimateStates#create(float, float, ClimateStateType)}
*/
@Deprecated
IClimateInfo createInfo(float temperature, float humidity);
/**
* @deprecated Use {@link #getClimateState(World, BlockPos)}
*/
@Deprecated
IClimateInfo getInfo(World world, BlockPos pos);
IClimateProvider getDefaultClimate(World world, BlockPos pos);
void addRegion(IClimateRegion region);
void removeRegion(IClimateRegion region);
void addSource(IClimateSourceProvider source);
void removeSource(IClimateSourceProvider source);
void onWorldUnload(World world);
/**
* Gets the current state of a container at this position or setSettings one with the datas from the biome.
* @since 5.3.4
*/
IClimateState getClimateState(World world, BlockPos pos);
@Nullable
IClimatePosition getPosition(World world, BlockPos pos);
@Nullable
IClimateRegion getRegionForPos(World world, BlockPos pos);
Map<World, List<IClimateRegion>> getRegions();
/**
* Creates a climate state with the help of the biome on this position.
* @since 5.3.4
*/
IClimateState getBiomeState(World world, BlockPos pos);
/**
* @return Create a climate manager.
*/
IClimateProvider getDefaultClimate(World world, BlockPos pos);
}
@@ -1,35 +0,0 @@
/*******************************************************************************
* Copyright 2011-2014 SirSengir
*
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
******************************************************************************/
package forestry.api.climate;
import forestry.api.core.INbtReadable;
import forestry.api.core.INbtWritable;
import net.minecraft.util.math.BlockPos;
/**
* A IClimatePosition contains the climate infos (temperature and humidity) of one position.
*/
public interface IClimatePosition extends INbtReadable, INbtWritable {
IClimateRegion getClimateRegion();
BlockPos getPos();
void setTemperature(float temperature);
void addTemperature(float temperature);
float getTemperature();
void setHumidity(float humidity);
void addHumidity(float humidity);
float getHumidity();
IClimateInfo getInfo();
}
@@ -5,9 +5,10 @@
******************************************************************************/
package forestry.api.climate;
import net.minecraft.world.biome.Biome;
import forestry.api.core.EnumHumidity;
import forestry.api.core.EnumTemperature;
import net.minecraft.world.biome.Biome;
public interface IClimateProvider {
Biome getBiome();
@@ -1,46 +0,0 @@
/*******************************************************************************
* Copyright 2011-2014 SirSengir
*
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
******************************************************************************/
package forestry.api.climate;
import java.util.Collection;
import javax.annotation.Nullable;
import forestry.api.core.INbtReadable;
import forestry.api.core.INbtWritable;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
public interface IClimateRegion extends INbtReadable, INbtWritable {
World getWorld();
int getTicksPerUpdate();
void setPosition(BlockPos pos, float temperature, float humidity);
@Nullable
IClimatePosition getPosition(BlockPos pos);
Collection<IClimatePosition> getPositions();
void addSource(IClimateSource source);
void removeSource(IClimateSource source);
Collection<IClimateSource> getSources();
void calculateAverageClimate();
float getAverageTemperature();
float getAverageHumidity();
/**
* Update the climate in a region.
*/
void updateClimate(int ticks);
}
@@ -1,30 +0,0 @@
/*******************************************************************************
* Copyright 2011-2014 SirSengir
*
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
******************************************************************************/
package forestry.api.climate;
import javax.annotation.Nullable;
/**
* A climate source is used to change the climate in a region.
*/
public interface IClimateSource {
/**
* @param tickCount The current tick count.
* @param region The climate region, in that the source stands.
* @return Return true if the the climate has changed.
*/
boolean changeClimate(int tickCount, IClimateRegion region);
/**
* @return The ticks that are required for one change.
*/
int getTicksForChange(IClimateRegion region);
@Nullable
IClimateSourceProvider getProvider();
}
@@ -0,0 +1,45 @@
/*******************************************************************************
* Copyright 2011-2014 SirSengir
*
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
******************************************************************************/
package forestry.api.climate;
import net.minecraft.world.biome.Biome;
import forestry.api.core.INbtWritable;
/**
* A {@link IClimateState} is used to store and handle temperature and humidity.
*
* The values are oriented on the values of {@link Biome#getDefaultTemperature()} and {@link Biome#getRainfall()}.
*/
public interface IClimateState extends INbtWritable {
float getTemperature();
float getHumidity();
IClimateState addTemperature(float temperature);
IClimateState addHumidity(float humidity);
IClimateState add(IClimateState state);
IClimateState scale(double factor);
IClimateState remove(IClimateState state);
default float get(ClimateType type){
return type == ClimateType.HUMIDITY ? getHumidity() : getTemperature();
}
IClimateState copy(ClimateStateType type);
IClimateState copy();
boolean isPresent();
ClimateStateType getType();
}
@@ -0,0 +1,25 @@
/*******************************************************************************
* Copyright 2011-2014 SirSengir
*
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
******************************************************************************/
package forestry.api.climate;
import net.minecraft.nbt.NBTTagCompound;
public interface IClimateStates {
IClimateState create(NBTTagCompound compound);
IClimateState create(NBTTagCompound compound, ClimateStateType type);
IClimateState create(float temperature, float humidity, ClimateStateType type);
IClimateState create(IClimateState climateState, ClimateStateType type);
IClimateState absent();
IClimateState min();
IClimateState max();
}
@@ -5,10 +5,11 @@
******************************************************************************/
@ParametersAreNonnullByDefault
@MethodsReturnNonnullByDefault
@API(apiVersion = "2.1.0", owner = "Forestry", provides = "ForestryAPI|climate")
@API(apiVersion = "5.0.0", owner = "Forestry", provides = "ForestryAPI|climate")
package forestry.api.climate;
import javax.annotation.ParametersAreNonnullByDefault;
import mcp.MethodsReturnNonnullByDefault;
import net.minecraftforge.fml.common.API;
import mcp.MethodsReturnNonnullByDefault;
@@ -1,3 +1,8 @@
/*******************************************************************************
* Copyright 2011-2014 SirSengir
*
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
******************************************************************************/
package forestry.api.core;
import java.util.HashMap;
@@ -9,12 +9,4 @@ public class CamouflageManager {
public static ICamouflageAccess camouflageAccess;
public static final String BLOCK = "block";
public static final String GLASS = "glass";
public static final String DOOR = "door";
public static final String NONE = "none";
}
@@ -20,6 +20,8 @@ public enum EnumHumidity {
*/
DAMP("Damp");
public static final EnumHumidity[] VALUES = values();
public final String name;
EnumHumidity(String name) {
@@ -5,6 +5,7 @@
******************************************************************************/
package forestry.api.core;
import forestry.api.climate.IClimateState;
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
@@ -66,14 +67,15 @@ public enum EnumTemperature {
if (BiomeHelper.isBiomeHellish(biome)) {
return HELLISH;
}
return getFromValue(biome.getTemperature());
return getFromValue(biome.getDefaultTemperature());
}
public static EnumTemperature getFromBiome(Biome biome, World world, BlockPos pos) {
if (BiomeHelper.isBiomeHellish(biome)) {
return HELLISH;
}
float temperature = ForestryAPI.climateManager.getInfo(world, pos).getTemperature();
IClimateState state = ForestryAPI.climateManager.getClimateState(world, pos);
float temperature = state.getTemperature();
return getFromValue(temperature);
}
}
@@ -7,19 +7,26 @@ package forestry.api.core;
import java.util.Set;
import forestry.api.climate.IClimateManager;
import forestry.api.farming.IFarmRegistry;
import forestry.api.farming.ISimpleFarmLogic;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import forestry.api.climate.IClimateManager;
import forestry.api.climate.IClimateStates;
import forestry.api.farming.IFarmRegistry;
import forestry.api.farming.IFarmable;
import forestry.api.farming.ISimpleFarmLogic;
import forestry.api.modules.IModuleContainer;
import forestry.api.modules.IModuleManager;
/**
* Forestry's API is divided into several subcategories to make it easier to understand.
* <p>
* If you need to distribute API files, try to only include the parts you are actually
* using to minimize conflicts due to API changes.
* <p>
* .core - Miscallenous base classes and interfaces as well as some basics for tools, armor, game modes and stuff needed by biome mods.
* .core - Miscellaneous base classes and interfaces as well as some basics for tools, armor, game modes and stuff needed by biome mods.
* .fuels - Managers and classes to facilitate adding fuels to various engines and machines.
* .recipes - Managers and helpers to facilitate adding new recipes to various machines.
* .storage - Managers, events and interfaces for defining new backpacks and handling backpack behaviour.
@@ -50,7 +57,18 @@ public class ForestryAPI {
public static IClimateManager climateManager;
/**
* A registry for register fertilizers, {@link IFarmabeles}s and {@link ISimpleFarmLogic}s
* Instance of the module manager of forestry.
* This can be used to register {@link IModuleContainer}s in the constructor of your mod.
*/
public static IModuleManager moduleManager;
/**
*
*/
public static IClimateStates states;
/**
* A registry for register fertilizers, {@link IFarmable}s and {@link ISimpleFarmLogic}s
*/
public static IFarmRegistry farmRegistry;
@@ -65,10 +83,20 @@ public class ForestryAPI {
public static IForestryConstants forestryConstants;
/**
* The currently enabled Forestry plugins.
* The currently enabled Forestry modules.
* Can be used to check if certain features are available, for example:
* ForestryAPI.enabledPlugins.contains("APICULTURE")
* ForestryAPI.enabledModules.contains(new ResourceLocation("forestry", "apiculture"))
*/
public static Set<ResourceLocation> enabledModules;
/**
* The currently enabled Forestry modules.
* Can be used to check if certain features are available, for example:
* ForestryAPI.enabledPlugins.contains("forestry.apiculture")
*
* @deprecated Use {@link #enabledModules}
*/
@Deprecated
public static Set<String> enabledPlugins;
/**
@@ -5,13 +5,17 @@
******************************************************************************/
package forestry.api.core;
import net.minecraft.entity.player.EntityPlayer;
import com.mojang.authlib.GameProfile;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
import net.minecraftforge.fml.common.eventhandler.Event;
import forestry.api.genetics.IAlleleSpecies;
import forestry.api.genetics.IBreedingTracker;
import forestry.api.genetics.IMutation;
import forestry.api.genetics.ISpeciesRoot;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraftforge.fml.common.eventhandler.Event;
public abstract class ForestryEvent extends Event {
@@ -53,6 +57,24 @@ public abstract class ForestryEvent extends Event {
this.tracker = tracker;
this.player = player;
}
}
/**
* Posted before forestry registers all items and blocks.
*
* @deprecated removed in 1.13
*/
@Deprecated
public static class PreInit extends ForestryEvent{
/**
* The main mod instance for Forestry.
*/
public Object instance;
public final FMLPreInitializationEvent event;
public PreInit(Object instance, FMLPreInitializationEvent event) {
this.instance = instance;
this.event = event;
}
}
}
@@ -7,6 +7,8 @@ package forestry.api.core;
import java.util.List;
import javax.annotation.Nullable;
import net.minecraft.item.ItemStack;
public interface ICamouflageAccess {
@@ -16,21 +18,20 @@ public interface ICamouflageAccess {
*
* @param itemHandler The handler that is to register.
*/
void registerCamouflageItemHandler(ICamouflageItemHandler itemHandler);
void registerItemHandler(ICamouflageItemHandler itemHandler);
/**
* @return A list of all item camouflage handler's that are registered for that camouflage type.
*/
List<ICamouflageItemHandler> getCamouflageItemHandler(String type);
List<ICamouflageItemHandler> getItemHandlers();
void addItemToBlackList(String type, ItemStack camouflageBlock);
void addItemToBlackList(ItemStack camouflageBlock);
void addModIdToBlackList(String type, String modID);
void addModIdToBlackList(String modID);
boolean isItemBlackListed(String type, ItemStack camouflageBlock);
ICamouflageItemHandler getNoneItemHandler();
boolean isItemBlackListed(ItemStack camouflageBlock);
ICamouflageItemHandler getHandlerFromItem(ItemStack stack);
@Nullable
ICamouflageItemHandler getHandler(ItemStack stack);
}
@@ -12,22 +12,17 @@ public interface ICamouflageHandler extends ILocatable {
/**
* @return The item of the block that is the camouflage of this handler for the type.
*/
ItemStack getCamouflageBlock(String type);
ItemStack getCamouflageBlock();
/**
* @return The default camouflage block item for the type.
*/
ItemStack getDefaultCamouflageBlock(String type);
/**
* @return True if the handler can handle this type of camouflage.
*/
boolean canHandleType(String type);
ItemStack getDefaultCamouflageBlock();
/**
* Set the camouflage block item for the type.
*
* @return True if the block has chanced.
*/
boolean setCamouflageBlock(String type, ItemStack camouflageBlock, boolean sendClientUpdate);
boolean setCamouflageBlock(ItemStack camouflageBlock, boolean sendClientUpdate);
}
@@ -5,22 +5,20 @@
******************************************************************************/
package forestry.api.core;
import org.apache.commons.lang3.tuple.Pair;
import net.minecraft.block.state.IBlockState;
import net.minecraft.client.renderer.block.model.IBakedModel;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import org.apache.commons.lang3.tuple.Pair;
public interface ICamouflageItemHandler {
boolean canHandle(ItemStack stack);
String getType();
float getLightTransmittance(ItemStack stack, ICamouflageHandler camouflageHandler);
@SideOnly(Side.CLIENT)
Pair<IBlockState, IBakedModel> getModel(ItemStack stack, ICamouflageHandler camouflageHandler, ICamouflagedTile camouflageTile);
Pair<IBlockState, IBakedModel> getModel(ItemStack stack);
}
@@ -5,12 +5,6 @@
******************************************************************************/
package forestry.api.core;
import net.minecraft.util.math.BlockPos;
public interface ICamouflagedTile {
String getCamouflageType();
BlockPos getCoordinates();
public interface ICamouflagedTile extends ILocatable {
}
@@ -5,6 +5,7 @@
******************************************************************************/
package forestry.api.core;
import javax.annotation.Nullable;
import java.util.Set;
public interface IErrorStateRegistry {
@@ -12,6 +13,7 @@ public interface IErrorStateRegistry {
void addAlias(IErrorState state, String name);
@Nullable
IErrorState getErrorState(short id);
IErrorState getErrorState(String name);
@@ -1,23 +1,20 @@
/*******************************************************************************
* Copyright (c) 2011-2014 SirSengir.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the GNU Lesser Public License v3
* which accompanies this distribution, and is available at
* http://www.gnu.org/licenses/lgpl-3.0.txt
* Copyright 2011-2014 SirSengir
*
* Various Contributors including, but not limited to:
* SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
******************************************************************************/
package forestry.api.core;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
/**
* Interface for things, that have a location.
* Must not be named "getWorld" and "getPos" to avoid
* SpecialSource issue https://github.com/md-5/SpecialSource/issues/12
*/
public interface ILocatable {
BlockPos getCoordinates();
/**
* Must not be named "getWorld" to avoid SpecialSource issue https://github.com/md-5/SpecialSource/issues/12
*/
World getWorldObj();
}
@@ -12,13 +12,17 @@ import net.minecraft.client.renderer.block.model.IBakedModel;
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.math.BlockPos;
import net.minecraftforge.common.model.IModelState;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
/**
* A model baker to make custom models
*
* @deprecated TODO Remove in 1.13: Not needed in the api
*/
@Deprecated
@SideOnly(Side.CLIENT)
public interface IModelBaker {
@@ -34,6 +38,8 @@ public interface IModelBaker {
void addBakedModel(@Nullable IBlockState state, IBakedModel model);
void addBakedModelPost(@Nullable IBlockState state, IBakedModel model);
void addFace(EnumFacing facing, TextureAtlasSprite sprite);
void setModelState(@Nullable IModelState modelState);
@@ -15,6 +15,10 @@ import net.minecraft.util.EnumFacing;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
/**
* @deprecated TODO Remove in 1.13: Not needed in the api
*/
@Deprecated
@SideOnly(Side.CLIENT)
public interface IModelBakerModel extends IBakedModel {
@@ -8,9 +8,14 @@ package forestry.api.core;
import net.minecraft.client.renderer.ItemMeshDefinition;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.item.Item;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
/**
* @deprecated TODO Remove in 1.13: Not needed in the api
*/
@Deprecated
@SideOnly(Side.CLIENT)
public interface IModelManager {
@@ -1,3 +1,8 @@
/*******************************************************************************
* Copyright 2011-2014 SirSengir
*
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
******************************************************************************/
package forestry.api.core;
import net.minecraft.nbt.NBTTagCompound;
@@ -8,6 +8,10 @@ package forestry.api.core;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
/**
* @deprecated TODO Remove in 1.13: Not needed in the api
*/
@Deprecated
public interface IStateMapperRegister {
@SideOnly(Side.CLIENT)
@@ -1,12 +1,7 @@
/*******************************************************************************
* Copyright (c) 2011-2014 SirSengir.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the GNU Lesser Public License v3
* which accompanies this distribution, and is available at
* http://www.gnu.org/licenses/lgpl-3.0.txt
* Copyright 2011-2014 SirSengir
*
* Various Contributors including, but not limited to:
* SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
******************************************************************************/
package forestry.api.core;
@@ -5,10 +5,11 @@
******************************************************************************/
@ParametersAreNonnullByDefault
@MethodsReturnNonnullByDefault
@API(apiVersion = "5.1.0", owner = "Forestry", provides = "ForestryAPI|core")
@API(apiVersion = "5.7.0", owner = "Forestry", provides = "ForestryAPI|core")
package forestry.api.core;
import javax.annotation.ParametersAreNonnullByDefault;
import mcp.MethodsReturnNonnullByDefault;
import net.minecraftforge.fml.common.API;
import mcp.MethodsReturnNonnullByDefault;
@@ -5,14 +5,16 @@
******************************************************************************/
package forestry.api.farming;
import java.util.LinkedHashMap;
import java.util.Map;
import com.google.common.collect.HashMultimap;
import com.google.common.collect.Multimap;
import java.util.LinkedHashMap;
import java.util.Map;
import net.minecraft.item.ItemStack;
//TODO: Remove this class in 1.13
@Deprecated
public class Farmables {
/**
* Can be used to add IFarmables to some of the vanilla farm logics.
@@ -0,0 +1,8 @@
package forestry.api.farming;
import forestry.api.circuits.ICircuit;
public interface IFarmCircuit extends ICircuit {
IFarmLogic getFarmLogic();
}
@@ -5,12 +5,14 @@
******************************************************************************/
package forestry.api.farming;
import forestry.api.core.IErrorLogicSource;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Vec3i;
import net.minecraft.world.World;
import net.minecraftforge.fluids.FluidStack;
import forestry.api.core.IErrorLogicSource;
public interface IFarmHousing extends IErrorLogicSource {
BlockPos getCoords();
@@ -33,10 +35,36 @@ public interface IFarmHousing extends IErrorLogicSource {
* Will remove the appropriate germling from the farm's inventory.
* It's up to the logic to only call this on a valid location.
*
* @deprecated TODO remove this method in 1.13
*
* @return true if planting was successful, false otherwise.
*/
@Deprecated
boolean plantGermling(IFarmable farmable, World world, BlockPos pos);
/**
* Callback for {@link IFarmLogic}s to plant a sapling, seed, germling, stem.
* Will remove the appropriate germling from the farm's inventory.
* It's up to the logic to only call this on a valid location.
*
* @return true if planting was successful, false otherwise.
*/
default boolean plantGermling(IFarmable farmable, World world, BlockPos pos, FarmDirection direction){
return plantGermling(farmable, world, pos);
}
default boolean isValidPlatform(World world, BlockPos pos){
return false;
}
default boolean isSquare(){
return false;
}
default boolean canPlantSoil(boolean manual){
return !manual;
}
/* INTERACTION WITH HATCHES */
IFarmInventory getFarmInventory();
@@ -27,4 +27,6 @@ public interface IFarmInventory {
IInventory getResourcesInventory();
IInventory getFertilizerInventory();
}
@@ -8,39 +8,141 @@ package forestry.api.farming;
import java.util.Collection;
import net.minecraft.block.state.IBlockState;
import net.minecraft.client.renderer.texture.TextureMap;
import net.minecraft.item.ItemStack;
import net.minecraft.util.NonNullList;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import forestry.api.core.ForestryAPI;
/**
* The IFarmLogic is used by farm blocks and multi-blocks to cultivate and harvest crops and plants.
*
* Every farm block has only ony one logic a multi-block farm has four, one for every direction.
*/
public interface IFarmLogic {
/**
* @return The amount of fertilizer that the {@link IFarmHousing} automatically removes after this logic cultivated
* a block or harvested a crop.
*/
int getFertilizerConsumption();
/**
* @param hydrationModifier A modifier that depends on the weather and the biome of the farm.
*
* @return The amount of water that the {@link IFarmHousing} automatically removes after this logic cultivated
* a block or harvested a crop.
*/
int getWaterConsumption(float hydrationModifier);
/**
* Checks if the given stack is a resource or a soil that this logic uses to grow plants on or to create other
* products like peat.
*/
boolean isAcceptedResource(ItemStack itemstack);
/**
* Checks if the given stack is a germling (plantable sapling, seed, etc.) for any {@link IFarmable} of this farm.
*/
boolean isAcceptedGermling(ItemStack itemstack);
/**
* Collects all items that are laying on the ground and are in the {@link IFarmHousing#getArea()} of the farm.
*
* @param world The world of the farm.
* @param farmHousing The farm that uses this logic.
*
* @return A collection that contains all items that were collected.
*/
NonNullList<ItemStack> collect(World world, IFarmHousing farmHousing);
/**
* Tries to cultivate one or more blocks at the given position and with the given extent.
*
* @param world The world of the farm.
* @param farmHousing The farm that uses this logic.
* @param pos The position at that the logic should start to cultivate.
* @param direction The direction of the extension.
* @param extent How many blocks this logic has to cultivate after it cultivated the block at the given position.
* The positions of the next blocks are having a offset in the given direction.
* @return True if the logic has cultivated any block.
*/
boolean cultivate(World world, IFarmHousing farmHousing, BlockPos pos, FarmDirection direction, int extent);
/**
* Tries to harvest one or more blocks at the given position and with the given extent.
*
* @param world The world of the farm.
* @param pos The position at that the logic should start to harvest.
* @param direction The direction of the extension.
* @param extent How many blocks this logic tries to harvest after it has tried to harvested the block at the given position.
* The positions of the next blocks are having a offset in the given direction.
* @return True if the logic has cultivated any block.
*/
Collection<ICrop> harvest(World world, BlockPos pos, FarmDirection direction, int extent);
IFarmLogic setManual(boolean manual);
/**
* Returns the {@link IFarmProperties} that created this logic.
*
* @since Forestry 5.8
*
* @return Returns the {@link IFarmProperties} that created this logic. Returns a fake instance from
* {@link IFarmRegistry#createFakeInstance(IFarmLogic)} if the logic is older that Forestry 5.8.
* TODO: Remove "default" from this method in 1.13
*/
default IFarmProperties getProperties(){
return ForestryAPI.farmRegistry.createFakeInstance(this);
}
void addSoil(ItemStack resource, IBlockState soilState, boolean hasMetaData);
@SideOnly(Side.CLIENT)
ResourceLocation getTextureMap();
default boolean isManual(){
return false;
}
/**
* @deprecated Since Forestry 5.8 logic instances are created at the constructor of the {@link IFarmProperties} and
* have a immutable manual state.
* TODO Remove this method in 1.13
*/
@Deprecated
default IFarmLogic setManual(boolean manual){
return this;
}
/**
* Use {@link IFarmRegistry#getProperties(String)} to get the {@link IFarmProperties} for the farm logic and register the soil
* with {@link IFarmProperties#registerSoil(ItemStack, IBlockState, boolean)}.
*/
@Deprecated
default void addSoil(ItemStack resource, IBlockState soilState, boolean hasMetaData){
//
}
default String getUnlocalizedName(){
return "";
}
/**
* @return Localized short, human-readable identifier used in the farm gui and in tooltips.
*/
String getName();
/* GUI ONLY */
/**
* @deprecated No longer needed because mc always uses the same map for blocks and items.
* TODO remove this method in 1.13
*/
@Deprecated
@SideOnly(Side.CLIENT)
default ResourceLocation getTextureMap(){
return TextureMap.LOCATION_BLOCKS_TEXTURE;
}
/**
* @return the itemStack that represents this farm logic. Used as an icon for the farm logic.
*/
@@ -0,0 +1,58 @@
package forestry.api.farming;
import java.util.Collection;
import net.minecraft.block.state.IBlockState;
import net.minecraft.item.ItemStack;
/**
* @since Forestry 5.8
*/
public interface IFarmProperties {
/**
* Can be used to register a {@link IBlockState} as a valid soil.
*/
default void registerSoil(ItemStack resource, IBlockState soilState){
registerSoil(resource, soilState, false);
}
/**
* Can be used to register a {@link IBlockState} as a valid soil.
*/
void registerSoil(ItemStack resource, IBlockState soilState, boolean hasMetaData);
void addGermlings(ItemStack... germlings);
void addGermlings(Collection<ItemStack> germlings);
void addProducts(ItemStack... products);
void addProducts(Collection<ItemStack> products);
/**
* Adds the {@link IFarmable}s that where registered with the given identifier.
*/
void registerFarmables(String identifier);
/**
* @return true if the given block state is a valid soil state.
*/
boolean isAcceptedSoil(IBlockState blockState);
/**
* @return true if the given stack is the {@link ItemStack} of a soil.
*/
boolean isAcceptedResource(ItemStack itemStack);
Collection<ISoil> getSoils();
Collection<IFarmable> getFarmables();
Collection<IFarmableInfo> getFarmableInfo();
/**
* Returns the instance of the manual or managed {@link IFarmLogic}.
*/
IFarmLogic getLogic(boolean manuel);
}
@@ -5,7 +5,9 @@
******************************************************************************/
package forestry.api.farming;
import javax.annotation.Nullable;
import java.util.Collection;
import java.util.function.BiFunction;
import net.minecraft.item.ItemStack;
@@ -13,35 +15,87 @@ public interface IFarmRegistry {
/**
* Registers farming logic in registry under given identifier
* @param identifier Valid identifiers: farmArboreal farmWheat farmGourd farmInfernal farmPoales farmSucculentes farmVegetables farmShroom
* @param identifier Valid identifiers: farmArboreal farmCrops farmGourd farmInfernal farmPoales farmSucculentes farmShroom
* @param logic corresponding instance of logic
*
* @deprecated Since Forestry 5.8. Use {@link #registerLogic(String, BiFunction, String...)} or
* {@link #registerLogic(String, IFarmProperties)}.
*/
void registerFarmLogic(String identifier, IFarmLogic logic);
@Deprecated
void registerLogic(String identifier, IFarmLogic logic);
/**
* Registers farming logic in registry
* @since Forestry 5.8
*/
IFarmProperties registerLogic(String identifier, IFarmProperties farmInstance);
/**
* Registers farming logic in registry under given identifier
*
* @param identifier Valid identifiers: farmArboreal farmCrops farmGourd farmInfernal farmPoales farmSucculentes farmShroom
* @param logicFactory factory that creates the corresponding instance of logic
* @param farmablesIdentifiers Identifiers: farmArboreal farmCrops farmGourd farmInfernal farmPoales farmSucculentes farmShroom
* @since Forestry 5.8
*/
IFarmProperties registerLogic(String identifier, BiFunction<IFarmProperties, Boolean, IFarmLogic> logicFactory, String... farmablesIdentifiers);
/**
* Can be used to add IFarmables to some of the vanilla farm logics.
* <p>
* Identifiers: farmArboreal farmWheat farmGourd farmInfernal farmPoales farmSucculentes farmVegetables farmShroom
* Identifiers: farmArboreal farmCrops farmGourd farmInfernal farmPoales farmSucculentes farmShroom
*/
void registerFarmables(String identifier, IFarmable... farmable);
Collection<IFarmable> getFarmables(String identifier);
IFarmableInfo getFarmableInfo(String identifier);
/**
* Can be used to create a simple version of a farm logic, like the vanilla vegetable or wheat farm logic.
*
* @return Null if the farming plugin is not active.
*
* @deprecated Since Forestry 5.8. Use {@link #createCropLogic(IFarmProperties, boolean, ISimpleFarmLogic)} instead.
*/
IFarmLogic createLogic(ISimpleFarmLogic simpleFarmLogic);
@Nullable
@Deprecated
default IFarmLogic createLogic(ISimpleFarmLogic simpleFarmLogic){
return null;
}
/**
*
* @param itemStack
* @param value The value of the fertitlizer.The value of the forestry fertelizer is 500.
* @param itemStack the fertilizer itemstack
* @param value The value of the fertilizer. The value of the forestry fertilizer is 500.
*/
void registerFertilizer(ItemStack itemStack, int value);
/**
* @return The value of the fertitlizer
* @return The value of the fertilizer
*/
int getFertilizeValue(ItemStack itemStack);
/**
* Returns a fake {@link IFarmProperties} that returns the given logic at {@link IFarmProperties#getLogic(boolean)}.
*
* @since Forestry 5.8
* @deprecated Only for backwards comparability.
*/
@Deprecated
IFarmProperties createFakeInstance(IFarmLogic logic);
/**
* Can be used to create a simple version of a farm logic, like the vanilla vegetable or wheat farm logic.
*
* @return Null if the farming plugin is not active.
*/
@Nullable
IFarmLogic createCropLogic(IFarmProperties instance, boolean isManual, ISimpleFarmLogic simpleFarmLogic);
/**
* @since Forestry 5.8
*/
@Nullable
IFarmProperties getProperties(String identifier);
}
@@ -20,8 +20,19 @@ public interface IFarmable {
/**
* @return true if the block at the given location is a "sapling" for this type, i.e. a non-harvestable immature version of the crop.
* @deprecated Since Forestry 5.8. Use the version below. TODO Remove this method in 1.13
*/
boolean isSaplingAt(World world, BlockPos pos);
@Deprecated
default boolean isSaplingAt(World world, BlockPos pos){
return false;
}
/**
* @return true if the block at the given location is a "sapling" for this type, i.e. a non-harvestable immature version of the crop.
*/
default boolean isSaplingAt(World world, BlockPos pos, IBlockState blockState){
return isSaplingAt(world, pos);
}
/**
* @return {@link ICrop} if the block at the given location is a harvestable and mature crop, null otherwise.
@@ -34,6 +45,9 @@ public interface IFarmable {
*/
boolean isGermling(ItemStack itemstack);
default void addInformation(IFarmableInfo info){
}
/**
* @return true if the item is something that can drop from this type without actually being harvested as a crop. (Apples or sapling from decaying leaves.)
*/
@@ -0,0 +1,40 @@
package forestry.api.farming;
import java.util.Arrays;
import java.util.Collection;
import net.minecraft.item.ItemStack;
/**
* IFarmableInfo describes the valid germlings and possible products of an IFarmable. This is mainly used by the jei farming
* category to display the valid germlings and possible products.
*/
public interface IFarmableInfo {
/***
* @return The identifier of the IFarmable.
*/
String getIdentifier();
default void addGermlings(ItemStack... germlings){
addGermlings(Arrays.asList(germlings));
}
void addGermlings(Collection<ItemStack> germlings);
/**
* @return a collection that contains all valid germlings of a farmable.
*/
Collection<ItemStack> getGermlings();
default void addProducts(ItemStack... products){
addProducts(Arrays.asList(products));
}
void addProducts(Collection<ItemStack> products);
/**
* @return a collection that contains all possible products of a farmable.
*/
Collection<ItemStack> getProducts();
}
@@ -8,7 +8,9 @@ package forestry.api.farming;
import net.minecraft.item.ItemStack;
/**
* A simple version of the IFarmLogic.
* A simple version of the IFarmLogic.
*
* @apiNote TODO Remove this in 1.13
*/
public interface ISimpleFarmLogic {
@@ -16,7 +18,11 @@ public interface ISimpleFarmLogic {
* @return the itemStack that represents this farm logic. Used as an icon for the farm logic.
*/
ItemStack getIconItemStack();
/**
* @deprecated Since 5.8
*/
@Deprecated
Iterable<IFarmable> getSeeds();
String getName();
@@ -0,0 +1,16 @@
package forestry.api.farming;
import net.minecraft.block.state.IBlockState;
import net.minecraft.item.ItemStack;
/**
* @since Forestry 5.8
*/
public interface ISoil {
ItemStack getResource();
IBlockState getSoilState();
boolean hasMetaData();
}
@@ -5,10 +5,11 @@
******************************************************************************/
@ParametersAreNonnullByDefault
@MethodsReturnNonnullByDefault
@API(apiVersion = "2.2.0", owner = "ForestryAPI|core", provides = "ForestryAPI|farming")
@API(apiVersion = "5.8.0", owner = "ForestryAPI|core", provides = "ForestryAPI|farming")
package forestry.api.farming;
import javax.annotation.ParametersAreNonnullByDefault;
import mcp.MethodsReturnNonnullByDefault;
import net.minecraftforge.fml.common.API;
@@ -26,7 +26,7 @@ public class FermenterFuel {
}
/**
* How much is fermeted per work cycle, i.e. how much biomass is produced per cycle.
* How much is fermented per work cycle, i.e. how much biomass is produced per cycle.
*/
public int getFermentPerCycle() {
return fermentPerCycle;
@@ -23,4 +23,10 @@ public class AlleleManager {
* Creates Forestry alleles.
*/
public static IAlleleFactory alleleFactory;
/**
* @since 5.8
*/
public static IFilterRegistry filterRegistry;
}
@@ -1,6 +1,10 @@
/*******************************************************************************
* Copyright 2011-2014 SirSengir
*
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
******************************************************************************/
package forestry.api.genetics;
import forestry.api.arboriculture.IAlleleFruit;
import net.minecraftforge.fml.common.eventhandler.Event;
/**
@@ -1,3 +1,8 @@
/*******************************************************************************
* Copyright 2011-2014 SirSengir
*
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
******************************************************************************/
package forestry.api.genetics;
/**
@@ -0,0 +1,7 @@
package forestry.api.genetics;
public enum DatabaseMode {
ACTIVE,
INACTIVE,
BOTH
}
@@ -0,0 +1,15 @@
package forestry.api.genetics;
/**
* Every instance of this enum represents a tab in the database.
*/
public enum EnumDatabaseTab {
//Used to display information about the active species of the individual.
ACTIVE_SPECIES,
//Used to display information about the inactive species of the individual.
INACTIVE_SPECIES,
//Used to display information about the products of the active species of the individual.
PRODUCTS,
//Used to display information about the mutations of the active species of the individual.
MUTATIONS
}
@@ -0,0 +1,17 @@
/*******************************************************************************
* Copyright 2011-2014 SirSengir
*
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
******************************************************************************/
package forestry.api.genetics;
import net.minecraftforge.common.capabilities.Capability;
import net.minecraftforge.common.capabilities.CapabilityInject;
public class GeneticCapabilities {
/**
* Capability for {@link IFilterLogic}.
*/
@CapabilityInject(IFilterLogic.class)
public static Capability<IFilterLogic> FILTER_LOGIC;
}
@@ -21,6 +21,14 @@ public interface IAllele {
*/
String getUID();
/**
* @return modId of the mod that created this allele
* @since Forestry 5.6.0
*/
default String getModID() {
return "forestry";
}
/**
* @return true if the allele is dominant, false otherwise.
*/
@@ -1,3 +1,8 @@
/*******************************************************************************
* Copyright 2011-2014 SirSengir
*
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
******************************************************************************/
package forestry.api.genetics;
import net.minecraft.util.math.Vec3i;
@@ -1,3 +1,8 @@
/*******************************************************************************
* Copyright 2011-2014 SirSengir
*
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
******************************************************************************/
package forestry.api.genetics;
public interface IAlleleProperty<A extends IAlleleProperty<A>> extends IAllele, Comparable<A> {
Loaded 100 of 1481 files, more files were not shown because too many files have changed in this diff. Show more