Compare commits

..
369 Commits
Author SHA1 Message Date
mezz 00504d4096 Version 5.4.1 2017-07-02 00:51:29 -07:00
mezz ed0c5e1a7e Move away from deprecated JEI classes 2017-07-02 00:51:06 -07:00
mezz ddf90f4ee0 Update Forge to Recommended Build 2017-07-02 00:47:37 -07:00
mezz 39290512cf Fix GUIs drawing without the black background 2017-06-26 20:02:45 -07:00
mezz bbe1f539dd Update cursegradle plugin 2017-06-24 22:22:42 -07:00
mezz 1fcaacd41b Stop using some deprecated methods and classes 2017-06-24 22:10:55 -07:00
mezz 7306764c51 Initial update to Minecraft 1.12 2017-06-24 21:49:47 -07:00
Nedelosk d3c7280f3f Fix #1712 1.11.2 Ferementer does not work when sappinessHigh 2017-06-23 20:23:38 +02:00
Nedelosk 2c6ed06574 More Recipe Clean Up 2017-06-23 18:56:30 +02:00
Nedelosk 81e2e18089 Clean Up Carpenter and Fabricator RecipeManagers 2017-06-23 18:50:51 +02:00
Nedelosk 7b7e7eb7e7 Update formatting-settings to 1.11.2
Changed IMPORT_LAYOUT cpw.mods.fml to net.minecraftforge.fml
2017-06-23 18:30:39 +02:00
Nedelosk 944aaf3297 Fix #1715 Forestry 1.11.2 trees spawn even when disabled in config 2017-06-22 14:57:47 +02:00
Nedelosk 5a5793f243 Fix forestry slab brightness 2017-06-22 14:54:40 +02:00
Nedelosk 5e41a4d2c0 Fix #1676 Soldering Iron usage has insufficient server-side validation 2017-06-21 22:01:46 +02:00
Nedelosk c4ac0bc7a5 Fix #1685 1.11.2 crashing when rendering item 2017-06-21 21:53:11 +02:00
Nedelosk 5549cfaaa1 Fix #1674 Forestry logs do not triggers Getting Wood Achievement 2017-06-21 21:45:56 +02:00
Nedelosk ae4d246c59 Fix #1690 Backpack does not resupply the offhand 2017-06-21 21:45:22 +02:00
Nedelosk 2622557a00 Fix #1702 Slabs not blocking light 2017-06-21 20:58:42 +02:00
Nedelosk 339abedeee Fix 1.11 Bees do damage on peaceful mode 2017-06-21 20:47:03 +02:00
Nedelosk 149b35224a Fix #1714 Wax cast negative durability 2017-06-21 20:34:38 +02:00
Nedelosk d148279224 Fix Bottler JEI integration 2017-06-18 01:45:53 +02:00
Nedelosk 554fe8bad1 Add tintindex to the door models 2017-06-17 13:59:00 +02:00
Nedelosk 27e8259ff6 Move the bee allele register event to the preInit 2017-06-15 19:50:48 +02:00
mezz 3a51df154a Update JEI integration 2017-06-06 23:50:11 -07:00
mezz a3c79c0427 Fix leaves spawning near 0,0,0 2017-06-04 13:34:59 -07:00
mezz f569a04797 Fix backpack pickup handler 2017-05-10 15:27:01 -07:00
mezz 610ddfed12 Update dependencies 2017-05-10 15:18:53 -07:00
mezz 438883bb8e Change IAllele.getName to IAllele.getAlleleName to fix obfuscation bugs 2017-05-10 00:06:30 -07:00
mezz 828dd63acd Fix #1681 Worldgen leaves are not decaying 2017-05-07 17:40:31 -07:00
mezz f7cc35d949 Add new default leaf block without tile entity for worldgen trees #1661 2017-05-03 17:15:58 -07:00
AlexIIL ec9004b50b Fix names in BC|Transport compat
As with the update to 1.11 BC|Transport now has a modid of "buildcrafttransport", and the pipeWaterproof has been renamed to "waterproof".

You *might* want to rename this plugin from "BuildCraft 6 Transport" to "BuildCraft 8 Transport" - but that's minor.

The api for getting BC items is [here](https://github.com/BuildCraft/BuildCraftAPI/blob/8.0.x/api/buildcraft/api/BCItems.java#L123), so thet's where the registry names came from (and they won't be changed in 8.0.x or 7.99.x) in case I've made a mistake.
2017-04-29 13:19:25 -07:00
Nedelosk 8b4c1a5dab Fix #1667 Unable to open Electrical Engine GUI 2017-04-22 00:18:02 +02:00
Nedelosk 853355062e Fix #1666 Crash 1.11.2 2017-04-21 22:34:00 +02:00
Nedelosk 834e3ed55a Readd Ic2 Integration 2017-04-21 22:30:37 +02:00
Nedelosk 5b2b0bfc95 Fix #1657 Charcoal Pit - Silk Touch 2017-04-11 21:35:02 +02:00
Nedelosk 4fae8c26d9 Allow other mods to register fruit blocks 2017-04-10 01:19:49 +02:00
Nedelosk 0aa4a0f794 Add AlleleRegisterEvent 2017-04-10 00:23:39 +02:00
Nedelosk ac0864303c Clean Up Climate Region 2017-04-08 20:46:57 +02:00
Nedelosk 8811b24811 Merge branch 'mc-1.11' of https://github.com/ForestryMC/ForestryMC into mc-1.11 2017-04-08 19:37:15 +02:00
Nedelosk 904293f407 Move go home to get getBlockPathWeight 2017-04-08 19:37:07 +02:00
mezz 3e175aa8e6 Use improved Forge LootTableLoadEvent, remove hacky LootTableLoader 2017-04-07 22:09:44 -07:00
Nedelosk c4ecdde110 Fix #1426 A way to change how much sand an tree multifarm gives when a tree grows 2017-04-07 21:44:20 +02:00
Nedelosk 4aa978023d Fix #1539 Immersive engineering Ethanol doesn’t work with Bio Generator 2017-04-07 19:46:46 +02:00
Nedelosk 50009786d8 Fix #1546 Electric Engine via MFSU 2017-04-07 19:10:19 +02:00
Nedelosk 032d706fc4 Fix #1594 EnderLillySeeds not accept for farm 2017-04-07 18:37:52 +02:00
Nedelosk dcd9e90898 Fix butterfly pollen 2017-04-07 18:29:03 +02:00
Nedelosk bab3479cde Add Cache to greenhouse nursery and clean up 2017-04-07 17:45:45 +02:00
Nedelosk a5b79c97d2 Improve greenhouse recipes 2017-04-07 14:12:42 +02:00
Nedelosk 05d6dc3d4a Fix greenhouse door model 2017-04-07 13:29:25 +02:00
Nedelosk 6e2ed37e80 Fix #1652 A way to make Cobwebs out of Silk Wisps and fix greenhouse item models 2017-04-07 13:21:39 +02:00
Nedelosk c840945706 Add missing changes 2017-04-07 13:10:28 +02:00
Nedelosk ca7d6dbc66 Add honey comb blocks and improve greenhouse nursery 2017-04-07 12:55:34 +02:00
Nedelosk 81ef5d536f Add missing changes 2017-04-06 01:11:27 +02:00
Nedelosk f911100c3d Clean Up and update version 2017-04-06 00:17:41 +02:00
Nedelosk 386f0645a5 Fix #627 Make a simpler API interface for IFarmLogic and improve the farm api 2017-04-06 00:13:15 +02:00
Nedelosk 91d46d1331 Fix #1440 Chisel Blocks do not render when used as Camo for Forestry Greenhouse blocks 2017-04-05 20:57:19 +02:00
Nedelosk e1eb4d25fb Fix Biogas Engine not noticing its generated power is being used 2017-04-05 15:54:57 +02:00
Nedelosk 72234d9b5d Fix #1537 Peat Engine not noticing its generated power is being used 2017-04-05 15:52:39 +02:00
Nedelosk 97f21bfda8 Fix #1643 gave wrong comb and now world wont load 2017-04-05 13:58:41 +02:00
Nedelosk c8c30073a2 Fix #1647 Method canDrain always returns true 2017-04-05 13:48:49 +02:00
mezz dc27154c1f Update JEI integration 2017-04-03 17:20:38 -07:00
SirSengir 5b15e6f405 Allow short mead cans/capsules to be drunk. 2017-03-26 20:51:20 +02:00
SirSengir 2530a7fb15 Remove mead as well. 2017-03-26 16:18:48 +02:00
SirSengir 4ec1381fbe Merge branch 'mc-1.11' of https://github.com/ForestryMC/ForestryMC into mc-1.11 2017-03-26 16:10:26 +02:00
SirSengir d97f6f69b0 Remove the infuser and associated gui. Port recipes to potions. 2017-03-26 16:10:12 +02:00
mezz c8fcb292d4 Fix sided config options 2017-03-26 06:20:21 -07:00
Nedelosk e075fe8fbf Fix #1640 Clientside crash when trying to access Statistics "Items" screen 2017-03-26 14:26:23 +02:00
Nedelosk 5ce9b9f65b Fix #1639 Thermionic Fabricator & Glass Pane 2017-03-26 14:22:54 +02:00
Nedelosk 2c9a30db73 Fix #1639 Thermionic Fabricator & Glass Pane 2017-03-26 14:21:31 +02:00
Nedelosk 4a31215ce1 Fix #1624 Crashing 2017-03-17 21:15:52 +01:00
Nedelosk 4da5e86813 Remove butterfly hatch and add butterfly nursery 2017-03-17 20:26:43 +01:00
Nedelosk 66bdedd65b Fix #1621 Some Butterflies have missing textures 2017-03-10 23:37:08 +01:00
mezz 0149013579 Use TileUtil for getting tiles from the world 2017-03-10 00:16:44 -08:00
mezz bebf5b3aec Fix canNurse because butterflies cannot convert vanilla leaves 2017-03-09 23:26:37 -08:00
mezz 0356a3f479 Prevent butterflies from converting vanilla leaves to Forestry leaves 2017-03-09 22:32:43 -08:00
Nedelosk d29aa13377 Fix #1616 Smarter tree generation 2017-03-07 22:25:18 +01:00
Nedelosk c2313c7569 Fix cocoon 2017-03-07 21:19:37 +01:00
Nedelosk bb28a6db48 Fix #1592 Carpenter recipe for Portable Analyzer asks for Magenta Stained Glass Pane 2017-03-06 19:55:12 +01:00
Nedelosk f61f7a0aff Remove walnut and chestnut from the tree generation list 2017-03-06 17:53:36 +01:00
Nedelosk 84f01de7f9 Improve cocoon positions 2017-03-06 16:45:08 +01:00
Nedelosk ced6f3cbf2 Fix #872 Clean Up and add tree generaton 2017-03-06 15:49:12 +01:00
Nedelosk bbec31fc6e Fix #1573 Butterfly shift stats don't match analyzer stats 2017-03-05 16:37:11 +01:00
Nedelosk 67024ffb2b Fix #1394 Add podzol as an alternative to mycelium 2017-03-05 16:27:28 +01:00
Nedelosk 1945c4ff70 Fix #1484 Add podzol recipe to the moistener 2017-03-05 15:57:15 +01:00
Nedelosk 7a1e35e05f Fix #1569 Can't See Capsule/Can Recipes 2017-03-05 14:55:35 +01:00
Nedelosk 06adb53944 Fix #1610 1.11.2 - Multiblocks not assembling? 2017-03-03 22:14:43 +01:00
Nedelosk 919ce8238b Fix #1590 [1.11.2] Tin tubes creating in the carpenter without tin. 2017-02-26 20:54:48 +01:00
Nedelosk 6f285d1c88 Fix #1608 Thermionic Fabricator crash 2017-02-26 20:26:51 +01:00
Nedelosk af9ddb4928 Fix server packets on singeplayer 2017-02-26 20:17:52 +01:00
Nedelosk 1d2f3f16ab Fix #1582 Error in log related to forestry 2017-02-25 20:53:31 +01:00
Nedelosk 7f63ae8450 Fix #1600 backpackt2.png not found 2017-02-25 20:33:01 +01:00
Nedelosk 77ecd03416 Fix #1607 Wrong calculation for stamps in letters 2017-02-25 19:48:37 +01:00
Nedelosk 56a907dbec Fix Cocoon 2017-02-19 21:59:28 +01:00
mezz e93633d999 Add proper @SideOnly(Side.CLIENT) annotations
with help from Minecraft Dev Plugin
https://plugins.jetbrains.com/idea/plugin/8327-minecraft-development
2017-02-14 21:12:09 -08:00
mezz fc0d144508 Fix #1595 DataParameter ID issue caused by Forestry carts 2017-02-12 17:05:22 -08:00
mezz 252dd8ab22 Add IAlleleRegistry#addValidAlleleTypes 2017-02-08 22:51:46 -08:00
mezz 6ef41d4cd8 Allow IWoodTypes besides EnumForestryWoodType to use Forestry models 2017-02-08 22:31:40 -08:00
mezz 0b08780964 Fix pipetting small amounts of liquid 2017-02-08 22:31:40 -08:00
Nedelosk 1cf24982fd Merge pull request #1588 from Ellpeck/mc-1.11
fix Actually Additions integration
2017-02-04 17:03:17 +01:00
Ellpeck 9555005ac0 fix actually additions integration 2017-02-04 16:59:56 +01:00
Nedelosk 00b4b6552c Fix #1568 Oredict carpenter problem 2017-01-31 14:23:22 +01:00
Nedelosk 23a9af3020 Fix TreeFactory 2017-01-24 11:13:34 +01:00
Nedelosk 84a14811d8 Merge branch 'mc-1.11' of https://github.com/ForestryMC/ForestryMC into mc-1.11 2017-01-24 11:11:32 +01:00
Nedelosk 7b340fdb49 Add ILeafProvider 2017-01-24 11:11:24 +01:00
mezz 9044a72aee Fix #1572 All trees have apple oak leaves 2017-01-21 19:35:17 -08:00
mezz cc40bd1cc3 Expose WoodAccess registration to the API 2017-01-20 23:00:33 -08:00
mezz a13e63cb2d Fix #1566 Incompatibility with Schematica 2017-01-14 11:08:47 -08:00
Nedelosk 6cb3b73200 Add minecraft curseforge link 2017-01-12 16:34:25 +01:00
Nedelosk 7c8d81470d Add issue template and clean up .gitignore 2017-01-12 16:01:26 +01:00
Nedelosk ef3f64fdd9 Upadate README.md to 1.11 2017-01-12 15:51:07 +01:00
Nedelosk fdd6d75d0e Improve cocoons 2017-01-12 15:44:30 +01:00
Nedelosk 46bb2cdccd Add missing code 2017-01-12 15:37:41 +01:00
Nedelosk aa21b31392 Clean Up Wood Textures 2017-01-12 15:19:21 +01:00
Nedelosk 6a12e19798 Clean Up Wood Model Loader 2017-01-12 13:29:31 +01:00
mezz 81dd20b41c Prevent exception from accessing tile entities from ChunkCache 2017-01-09 12:25:33 -08:00
mezz 0b491f26fc Fix #1561 Crash when using the carpenter 2017-01-08 03:36:43 -08:00
mezz bb0a0343c1 Fix #1563 Crash when viewing bee trades with a villager 2017-01-08 03:20:40 -08:00
mezz 17e38e7c5e Fix #1565 Farm crash when farmland on at least one side is missing 2017-01-08 03:01:06 -08:00
Nedelosk 0ad3baecda Fix #1564 Gamecrash while trying to craft golden electron tube 2017-01-08 01:06:26 +01:00
mezz a72971e042 Fix #1562 Carpenter recipes not showing properly in JEI 2017-01-07 01:10:16 -08:00
mezz b5e24e84cb Fix #1560 network sync issue for genome tracker when player logs in 2017-01-06 23:53:24 -08:00
Nedelosk c210886400 Fix #1559 2017-01-05 16:16:10 +01:00
Nedelosk 1bdbb7e9f8 Clean Up Models, Jei and IInduvidual translators 2017-01-04 23:26:47 +01:00
Nedelosk f91c0574ad Clean Up 2017-01-03 17:01:30 +01:00
Nedelosk 50f0efb7a0 Update Module 2017-01-03 02:35:57 +01:00
Nedelosk 3d932700cd Fix carpenter and thermionic fabricator recipes 2017-01-03 02:32:45 +01:00
Nedelosk 6a00a65aac Update lang Module 2017-01-02 23:22:06 +01:00
Nedelosk 1b781684a0 Improve charcoal pile 2017-01-02 23:21:48 +01:00
mezz f2d280a861 Clean up backpack resupply handler 2017-01-02 12:08:11 -08:00
Nedelosk 87ce642235 Make that the multiblocks error renderers are only work with naturalist eyes 2017-01-01 20:19:15 +01:00
Nedelosk b297bbb2c4 Fix #1556 Log Piles Missing Models 2017-01-01 20:15:13 +01:00
Nedelosk 931e518ca2 Add multiblock tooltips and error game overlay renderer 2017-01-01 04:09:29 +01:00
Nedelosk 7ff4944281 Clean Up greenhouse 2017-01-01 03:06:36 +01:00
mezz 9d8c616b67 Add block and item migration from 1.10 to 1.11 names 2016-12-31 01:14:13 -08:00
mezz 17afceab6a Fix fruit allele registration 2016-12-31 00:51:16 -08:00
mezz 306bae490c Move away from deprecated methods 2016-12-31 00:08:02 -08:00
mezz d8e735ef3b API javadoc cleanup, use NonNullList for ItemStack lists 2016-12-30 23:39:42 -08:00
Nedelosk 55919a135e Add GreenhouseLogicTerrain and adding multiblock error renderer 2016-12-30 03:44:41 +01:00
Nedelosk 02f5c7121d Merge branch 'mc-1.11' of https://github.com/ForestryMC/ForestryMC into mc-1.11 2016-12-30 00:21:18 +01:00
mezz ed1907ddea Update to 1.11.2 2016-12-29 10:44:26 -08:00
mezz 0a0bdfa978 Fix networking for worktable and escritoire 2016-12-29 00:15:25 -08:00
mezz 4abbc92472 Clean up more null issues 2016-12-28 23:55:10 -08:00
Nedelosk 1fa461430e Fix #1554 1.10.2 Game Crash and Ticking Block Exception when using Reanimation effect on Skeleton and Zombie Drops 2016-12-28 18:35:40 -08:00
Nedelosk d60bdd5f93 Merge branch 'mc-1.11' of https://github.com/ForestryMC/ForestryMC into mc-1.11 2016-12-29 00:01:04 +01:00
Nedelosk f39ff51ca8 Fix #1554 1.10.2 Game Crash and Ticking Block Exception when using Reanimation effect on Skeleton and Zombie Drops 2016-12-28 23:57:57 +01:00
mezz 35f9b95f37 Clean up more null/nonnull, refactor gui ledgers 2016-12-26 08:08:08 -08:00
Nedelosk b2d4e6eaba Fix greenhouse lang 2016-12-26 04:10:29 +01:00
Nedelosk 5bd4ba3cd5 Add an climate pillar on the left side of the greenhouse gui 2016-12-25 15:54:41 +01:00
Nedelosk d4f9c69538 Improve greenhouse and add new greenhouse gui texture 2016-12-25 02:20:44 +01:00
Nedelosk ea976ebb2f Remove unloaded climate regions 2016-12-24 03:14:14 +01:00
Nedelosk c5798af241 Clean Up 2016-12-24 02:57:15 +01:00
Nedelosk e0bff8ec64 Clean Up and improve greenhouse climate system 2016-12-24 02:54:12 +01:00
mezz 8bf6b19a63 Remove redundant Nonnull annotations (everything is Nonnull by default) 2016-12-22 19:45:08 -08:00
mezz abf6ccb3ed Fix slot backgrounds 2016-12-22 19:26:19 -08:00
mezz d55b91df48 Fix error Ledger texture 2016-12-22 19:26:09 -08:00
mezz 1b865a0589 Update lang keys 2016-12-22 19:25:57 -08:00
mezz a2c12f3841 Fix missing resources 2016-12-22 19:18:00 -08:00
Nedelosk 08c99cb0ca Clean Up ModelBaker and start to clean up greenhouse 2016-12-23 03:44:30 +01:00
mezz 8cfafec6f9 Automatic code reformatting 2016-12-22 16:53:55 -08:00
mezz 9611ae08ae Update for 1.11. Missing assets, unstable. 2016-12-22 16:47:56 -08:00
Nedelosk 30d7365518 Fix #1508 Bee buildup during pause 2016-12-22 13:24:12 +01:00
Nedelosk 56800af94d Fix #1477 Electrical Engine places backwards 2016-12-22 03:17:35 +01:00
Nedelosk 043571b659 Improve farm control 2016-12-22 02:56:55 +01:00
Nedelosk 7fd2776147 Fix gamemode commit 2016-12-22 02:50:44 +01:00
Nedelosk d4c2d7220d Fix #580, Fix #1479 Add a way to register items to work as fertilizer in farms in a config 2016-12-22 02:47:00 +01:00
Nedelosk d392666dc4 Add missing methods 2016-12-20 06:48:35 +01:00
mezz 07b88d36fc Check that fluids are not null when auto-dumping from bottler 2016-12-19 16:33:33 -08:00
Nedelosk 408d1dc7c3 Fix #1521 IC2 + Foresty crash 2016-12-19 19:20:47 +01:00
Nedelosk 7b1aead339 Fix #1509 Alveary ignores rain 2016-12-19 19:15:28 +01:00
Nedelosk 21969649a2 Fix #1542 SidedInvWrapper used when facing is null 2016-12-19 17:12:06 +01:00
Nedelosk f9b8b89340 Adding a debug message 2016-12-12 14:21:12 +01:00
Nedelosk 65712adcb3 Delete 9864a84a13 2016-12-10 10:26:42 +01:00
Nedelosk 9864a84a13 Make that the climate event handler only work on the server thread 2016-12-10 10:24:46 +01:00
Nedelosk 8f9ae45147 Fix greenhouse climate info 2016-12-10 10:20:45 +01:00
mezz 2965f28403 Fix #1522 log spam with Reliquary void tear 2016-12-01 21:28:37 -08:00
Nirek-K cb93c217e0 Fix #1520 Add Chorus flower/plant to End flower. 2016-11-30 11:53:04 -06:00
mezz 219e9bf355 Fix EntityItemPickupEvent when there are multiple modded handlers 2016-11-29 12:44:13 -08:00
mezz 43a2f0ae76 Fix farm picking up items off Immersive Engineering conveyors 2016-11-25 12:24:15 -08:00
mezz 098b739dca Fix crash with TOP looking at new papaya fruit pods 2016-11-16 21:57:17 -08:00
mezz 4dfa29b1ad Add more null annotations 2016-11-16 21:56:31 -08:00
mezz 60d2820ed6 Update Forge and MCP 2016-11-12 19:12:57 -08:00
Nedelosk 91ec6cff9b Fix #1504 [1.10.2] [5.2.15.296] Butterflies gravitating towards 0,0 where huge swarms are found 2016-11-13 00:30:11 +01:00
mezz 1775e59880 Fix #1507 Crash with Energy Transfer to Mekanism 2016-11-11 20:38:59 -08:00
mezz f62745b233 Clean up bottler updateServerSide 2016-11-11 20:38:59 -08:00
mezz 1d6293c788 Clean up bottler canDump 2016-11-11 20:38:58 -08:00
mezz 3fd07f2a7a Clean up bottler JEI recipes 2016-11-11 20:38:58 -08:00
marcin212 856e800e0e Add Immersive Engineering compat (#1506) 2016-11-11 13:11:58 -08:00
Nirek-K d9561fd7af Re-Add Harvestcraft plugin, covers everything it did in 1.7 (new things will have to be suggested/added later) 2016-11-11 03:07:27 -06:00
Nirek-K e0623f7d57 Minor logic fixes for orchard, to get it to see crops again. 2016-11-07 18:31:12 -06:00
Nirek-K d48b979ac3 Add Actuallly Additions crops also to orchard.
Add Actuallly Additions crops also to orchard.
2016-11-07 10:25:27 -06:00
mezz 63494c40a7 Fix #1497 Chisel integration with digging backpack 2016-11-06 17:15:18 -08:00
mezz 2c57aef3b3 Fix backpack IMC handling 2016-11-06 17:14:06 -08:00
mezz 1392823fae Fix #1498 Crash when Arboriculture plugin is disabled 2016-11-06 16:55:12 -08:00
mezz 67693961ac Change address texture back to 32x32 to avoid breaking texture packs 2016-11-06 16:42:25 -08:00
mezz 8ad8597ff0 Fix #1499 Server Error when trying to access a GUI 2016-11-06 13:59:42 -08:00
mezz 4c8d5e2f43 Move Forestry GUI icons to a new TextureMap 2016-11-06 01:51:43 -08:00
mezz d04713339c Fix the build 2016-11-04 18:40:58 -07:00
Nedelosk 844aea7431 Improve butterfly item texture atlas and model, Fix #1312 2016-11-05 02:26:59 +01:00
mezz 53a9bf458e Update JEI version 2016-11-03 22:44:45 -07:00
mezz 2ae52451b2 Implement JEI lookups on fluid tanks 2016-11-03 21:24:42 -07:00
Speiger d3054c33e7 Improve Crate Renderer (#1493) 2016-11-01 15:43:03 -07:00
mezz bf61462a2a Rename centrifuge gui texture for compat with older texture packs 2016-10-31 20:59:42 -07:00
marcin212 41f3ae4b1f Allow multipass rendering for sapling 2016-10-30 17:21:13 -07:00
mezz b1d7c1721d Add strict null checking for ActuallyAdditions plugin 2016-10-30 15:01:33 -07:00
Ellpeck 2944165741 Added Actually Additions compatibility 2016-10-30 15:01:33 -07:00
Nedelosk e316526675 Fix Charcoal Pile 2016-10-30 13:35:09 +01:00
Nedelosk 411cbd913c Fix #1473 New Bottler issues 2016-10-30 13:32:55 +01:00
Nedelosk 2191d00f3d Fix #1487 Random crash in WeightedRandomModel 2016-10-30 12:54:25 +01:00
Nedelosk a02af0ddf2 Fix #1490 Crash in 1.10.2 when trying to render a Hill Cherry sapling 2016-10-30 12:51:58 +01:00
Nedelosk a8e4f5dde7 Fix #1476 Wood Pile processes instantly 2016-10-30 12:40:22 +01:00
mezz 85718b1df8 Fix and improve Bottler JEI integration 2016-10-29 18:22:40 -07:00
mezz 781b4d883b Fix #1486 Crash from candle block 2016-10-26 13:55:55 -07:00
Nedelosk c5c056750a Fix butterfly 2016-10-25 00:50:58 +02:00
Nedelosk 3b8af4e4c9 Fix IPollinatable and New Version 2016-10-25 00:47:49 +02:00
Nedelosk f58938ff32 Improve IPollinatable 2016-10-25 00:27:26 +02:00
Nedelosk a05bc13852 Fix Climate Handler and add climate test mod for devs 2016-10-22 17:37:49 +02:00
Nedelosk 1cd3e15ef9 Make climate update to a Runnable 2016-10-20 02:44:57 +02:00
Nedelosk 1ac7a7de42 Add Fluid Container Output and processing Slots to the Bottler 2016-10-19 18:58:55 +02:00
Nedelosk 90ed57c742 Merge branch 'mc-1.10' of https://github.com/ForestryMC/ForestryMC into mc-1.10 2016-10-19 13:01:26 +02:00
Nedelosk 94b0b44f51 Fix inverted climate infos 2016-10-19 13:00:56 +02:00
mezz c0fafc20da Improve bee hive performance (#1470) 2016-10-18 17:35:03 -07:00
mezz 4f85236475 Fix #1470 Prevent bees from loading new chunks 2016-10-18 16:15:44 -07:00
Nedelosk 41ab1ea374 Update Version 2016-10-19 00:34:11 +02:00
Nedelosk 52b8d56ff0 Make that the ash drop of the kiln is never 0 2016-10-19 00:04:17 +02:00
Nedelosk a61879daff Fix Alveary 2016-10-18 23:25:20 +02:00
Nedelosk e71edd5855 Fix #1469 Wrong climate info when apiary is placed in greenhouse. 2016-10-18 23:18:15 +02:00
Nedelosk 321e316665 Fix #1456 Breaking a Swarm Hive with Botania's Bore Lens crashes the game 2016-10-18 22:05:44 +02:00
Nedelosk aca6ed1fd8 Add CircuitBoard to colour.properties and Fix #1468 [1.10.2-5.2.14.283] Server side crash 2016-10-18 21:00:16 +02:00
Nedelosk b135593733 Fix #1466 Add Malisis Doors to camouflage Blacklist 2016-10-18 20:31:14 +02:00
Nedelosk ac7fe4b2d2 Fix #1467 Green House Camouflage Glitch 2016-10-18 19:58:01 +02:00
Nedelosk 5e0e045053 Fix #1465 1.10.2-5.2.14.276 - Electrical Engines no longer allow levers to attach to the back 2016-10-18 17:53:23 +02:00
Nedelosk f01dab6f58 Fix #1420 Tweak the effects of three placed fluids 2016-10-18 17:47:07 +02:00
Nedelosk 9385a4caca Fix and Add model caches and Fix #1102Invisible butterflies in itemframes 2016-10-18 17:27:24 +02:00
Nedelosk 582c8d64df Fix greenhouse tiles 2016-10-18 16:20:30 +02:00
Nedelosk 26c40b2006 Fix #1447 Flickering Greenhouse 2016-10-18 16:15:49 +02:00
Nedelosk b7eaaf6804 Fix #1460 Empty bucket can't be pulled out of (i.e.) Biogas engine 2016-10-18 15:56:09 +02:00
Nedelosk 3f07e68952 Fix #1071 Butterflies spread out of control 2016-10-18 15:42:12 +02:00
Nedelosk 2b40762934 Fix #1459 Greenhouse Door Crash w/ Malisis' Doors Mod Doors 2016-10-18 15:28:36 +02:00
Nedelosk dcaf6e144f Fix #1294 JEI Integration for Thermionic Fab and Carpenter 2016-10-18 15:12:59 +02:00
Nedelosk 413e1b9a0d Fix #1439 Cocoons config bug in 1.10.2 2016-10-18 14:13:28 +02:00
Nedelosk 64f64f2b5c Fix #1441 Centrifuge preview slot should show item being centrifuged, not its result 2016-10-18 14:10:30 +02:00
Nedelosk 2d25754731 Fix 1444 Apiarist's Chest collision box is acting weird., Fix # 1422 Cacoons cause suffocation if you walk into them 2016-10-18 13:58:47 +02:00
Nedelosk 2df6cfb7f7 Fix #1455 Igniting a Wood Pile built by a fake player crashes the game 2016-10-18 13:40:11 +02:00
Nedelosk 2d0ca49359 Fix 1408 Floating desert acacia "trees" appear in the middle of nowere 2016-10-18 13:04:54 +02:00
Nedelosk d567138365 Fix #1463, Fix #1457 Make charcoal drop with % chance, remove custom charcoals. 2016-10-18 11:57:27 +02:00
Nedelosk 72380251f3 Fix #1432 multiblock.error.small.x when right-clicking Wood Piles 2016-10-10 10:17:55 +02:00
Nedelosk 05a263826e Fix #1438 Crash after Breaking Chest 2016-10-10 10:13:17 +02:00
Nedelosk 61aa8bdcf0 Fix #1437 Drone in the analyzer 2016-10-10 10:06:53 +02:00
Nedelosk e0694842b6 Improve Camouflage Packet 2016-10-10 10:00:58 +02:00
mezz ff9942d0bc Fix "upper half" wood slabs having the wrong wood type 2016-10-08 20:05:43 -07:00
mezz dcf7776cc1 Fix #1451 Crash when placing decorative leaf blocks 2016-10-08 19:55:20 -07:00
mezz a0d355d0aa Fix some nullable annotation errors 2016-10-07 21:49:54 -07:00
mezz 649a061b6e Fix ModelBlockCached not resetting after a texture remap 2016-10-07 21:28:57 -07:00
mezz 2ca743a931 Clean up ModelBlockCached slightly 2016-10-07 21:28:25 -07:00
mezz 76a34a603b Update ApicultureJeiPlugin to stop using deprecated methods 2016-10-07 17:22:19 -07:00
mezz 68651939e7 Fix crash when getting wood blocks with invalid variants 2016-10-07 15:42:20 -07:00
Adrian Siekierka 9dcc818a17 Add model caching (#1449) 2016-10-07 15:10:09 -07:00
mezz 5e3c23e4eb Bump version 2016-10-02 17:52:43 -07:00
mezz d8ffc5c4b8 Fix #1403 worktable bug with items it can't craft 2016-10-02 17:52:35 -07:00
mezz 737f64eeab Fix uppercase variable name 2016-10-02 15:18:11 -07:00
mezz 0db27d83b0 Add worktable to JEI's Crafting Table items 2016-10-02 15:17:59 -07:00
mezz f57de19b06 Fix #1442 Let BeeHousings detect biome changes 2016-10-02 15:17:32 -07:00
mezz 1fed58fae5 Bump version 2016-09-30 23:29:41 -07:00
mezz 1d8d61daf1 Fix missing Squeezer recipes in JEI 2016-09-30 23:29:15 -07:00
mezz 65bd93749c Fix missing itemHandler capability for Farm hatch 2016-09-28 21:49:58 -07:00
mezz ac48b4b5c6 Update JEI integration 2016-09-27 02:53:06 -07:00
Nedelosk 3be3ecfc8a Fix #1436 Placing lit candles does not cause a lighting update, Fix #1435 Freshly crafted candle items are not the same as just-broken candle items. 2016-09-24 15:48:56 +02:00
mezz 10aae6b6bc Clean up IBeeHousing slightly 2016-09-19 21:12:58 -07:00
mezz d84560926c Make IArmorNaturalist into a capability 2016-09-19 21:12:58 -07:00
mezz ab3de49198 Make IArmorApiarist into a capability 2016-09-19 21:12:57 -07:00
Nedelosk b2b743398c Adding a preview slot to the centrifuge 2016-09-19 20:28:52 +02:00
Nedelosk 52f233e84a Fix the clockwork engine 2016-09-18 01:30:58 +02:00
Nedelosk 2f2ec91670 Fix #1253 2016-09-18 00:20:11 +02:00
Nedelosk 2e2fa8e6df Removed a comment because it is not true anymore 2016-09-17 23:41:02 +02:00
Nedelosk 3de6e0c5b7 Bump version 2016-09-17 23:27:51 +02:00
Nedelosk 0f4ba8d8fa Clean Up 2016-09-17 23:26:58 +02:00
Nedelosk 9570d26c83 Fix #1429 [API-TreeManager] TreeManager doesn't work properly 2016-09-17 23:19:39 +02:00
Nedelosk 01dc4f2bfe Fix the alyzer plugin api 2016-09-17 23:18:53 +02:00
Nedelosk 80de4d6490 Fix #1427 Engines do not show RF/t output properly 2016-09-17 22:50:46 +02:00
Nedelosk 253e9f18ed Fix #1078 Adding a work Cycle for every pending product 2016-09-17 22:23:11 +02:00
Nedelosk bbda5c8ba9 Fix #1419 Disabled greenhouse in plugins (as they're buggy) and having crash with 'cocoon's 2016-09-17 22:00:53 +02:00
mezz c289590740 Bump version 2016-09-15 14:53:26 -07:00
mezz 714858be99 Fix cable connections with Engines 2016-09-15 14:53:19 -07:00
mezz 5bb60cad8a Bump version 2016-09-14 14:24:24 -07:00
mezz b8cf4ef1cf Update zh_CN.lang 2016-09-14 14:24:23 -07:00
mezz d35075d681 Prevent farms on a chunk edge from loading unloaded chunks 2016-09-14 14:23:06 -07:00
mezz 79c56311c2 Refactor Energy systems and make RF optional 2016-09-13 00:37:39 -07:00
mezz 77cea8a645 Add support for new Forge energy capability 2016-09-12 16:07:47 -07:00
Nedelosk ed00ca3158 Merge pull request #1407 from ForestryMC/Greenhouse
Adding Greenhouse Window, Climate Control,  Camouflage Spray Can and Improve Recipes
2016-09-12 18:00:45 +02:00
Nedelosk 418f00abf2 Merge branch 'mc-1.10' of https://github.com/ForestryMC/ForestryMC into mc-1.10 2016-09-12 14:47:01 +02:00
mezz 0fa8fdad39 Remove access-related hints and the power-required hint 2016-09-11 22:23:38 -07:00
Aroma1997 0a110eb761 Fix #1414 greenhouse climate blocks crash (#1418) 2016-09-11 13:27:27 -07:00
Nedelosk 9feb5cb114 Merge branch 'mc-1.10' of https://github.com/ForestryMC/ForestryMC into mc-1.10 2016-09-11 10:51:16 +02:00
Nirek-K 7aa44fb1fa Fix #1413 phospor should give lava 2016-09-03 22:36:33 -05:00
Nedelosk 84fa956ce4 Improve greenhouse glass 2016-08-24 14:38:54 +02:00
Nedelosk 0c14a85c31 Adding new recipes and improve other recipes 2016-08-24 14:03:09 +02:00
Nedelosk a20fbbe60f Adding Greenhouse windows and climate control and improve recipes 2016-08-24 00:33:53 +02:00
mezz 27d932ee34 Do not allow rain tanks to be filled from the bottom 2016-08-18 18:47:32 -07:00
mezz 52b1784f25 Close #1400 Reduce frequency of End Hives 2016-08-17 21:11:24 -07:00
mezz 154f4f2712 Close #1398 Make wild bees friendlier to endermen 2016-08-17 21:03:35 -07:00
mezz 806ca2cf7b Bump version 2016-08-16 16:50:19 -07:00
mezz 9f171977bb Add some more tooltips and JEI description pages 2016-08-16 16:50:00 -07:00
mezz 2031f7fe02 Unify the way item and itemBlock tooltips are added 2016-08-16 16:49:28 -07:00
mezz 4259a55e7a Close #955 Automatically output water from the bottom of the Rain Tank 2016-08-15 00:12:47 -07:00
mezz 065344ba5e Clean up Rain Tank implementation 2016-08-14 22:52:53 -07:00
mezz d0c9a77528 Update dependencies 2016-08-14 21:40:39 -07:00
Nedelosk 604429f267 Fix #1388 Rendering Crash in Inventory and a climate crash 2016-08-14 13:27:12 +02:00
Nedelosk f5a9dcccb8 Fix #1387 Crash when creating a new world 2016-08-14 00:42:20 +02:00
Nedelosk b056cce707 Fix the woodTextures 2016-08-13 17:47:23 +02:00
Nedelosk 1497aada57 Improve the woodtextures class. 2016-08-13 17:24:26 +02:00
Nedelosk fb8ddf54b7 Adding a way to add costum wood models 2016-08-13 17:16:38 +02:00
Nedelosk 9a05322d45 Fix a mistake 2016-08-12 21:57:47 +02:00
Nedelosk 8c2008b06c Bump version 2016-08-12 21:54:08 +02:00
Nedelosk e3cc08a624 Fix #1382 Crash on load wood models and clean up 2016-08-12 21:46:41 +02:00
Nedelosk 36cd4663d9 Fix a cocoon bug and add a default cocoon loot 2016-08-12 13:59:05 +02:00
Nedelosk a014ef6d14 Fix #1381 Greenhouse climate switches between normal and very high levels and fix a cocoon bug 2016-08-12 13:48:19 +02:00
Nedelosk 34fa218c38 Try to fix the greengouse climate ledget and fix the greenhouse sprinklers 2016-08-12 13:18:08 +02:00
Nedelosk f422b577fe Fix model baker models 2016-08-12 12:42:52 +02:00
Nedelosk e379465227 Fix #1380 Forestry camoflaged blocks do not render the same as regular blocks 2016-08-12 12:36:10 +02:00
Nedelosk eb63e75200 Add new Wood Model Loader (#1367) 2016-08-11 21:22:02 -07:00
Nedelosk b5faab51c3 Update greenhouse climate system and improve camouflage system (#1334) 2016-08-11 20:53:04 -07:00
mezz ddffe5d4ce Bump version 2016-08-11 02:45:57 -07:00
mezz f59e57aa6a Fix loot table for storage plugin 2016-08-11 02:44:47 -07:00
mezz ae8cbf2ff2 Update Forge 2016-08-11 02:44:34 -07:00
mezz 305f3f78ec Update JEI 2016-08-11 02:44:25 -07:00
mezz 98e506cc4a Close #1269 Buff Peat balance vs Charcoal 2016-08-03 03:15:48 -07:00
mezz ecfb11c096 Encapsulate fields of fuels in the API 2016-08-03 02:52:18 -07:00
mezz 6b59736ffe Fix #1369 Add button click noise to various buttons 2016-08-03 02:36:28 -07:00
mezz a3a1f7720e Fix #1371 IC2 Rubber farm does not harvest rubber properly 2016-08-03 02:21:27 -07:00
bdew 89cfbfca9c Allow overriding climate when checking for mutations (#1373)
* Allow overriding climate when checking for mutations
2016-08-02 14:22:05 -07:00
mezz e0676030d6 Update Forge 2016-08-01 18:17:28 -07:00
mezz 0c76e22b8a Fix #1368 Update Tesla API 2016-08-01 18:16:51 -07:00
mezz 1a8f1751d9 Fix #1366 Alveary in the Nether does not have Hellish temperature 2016-07-31 17:24:18 -07:00
Nedelosk b95bb8315f Fix #1363 [MC 1.10.2] Crash on camouflaging greenhouse bricks 2016-07-24 12:49:17 +02:00
mezz 2cc2540bdc Fix #1362 Crash on Startup when disabling Lepidopterology module 2016-07-23 03:43:42 -07:00
Nedelosk 84af238d82 Fix #1298 Bio Generator has incorrect hitbox 2016-07-23 01:50:11 +02:00
Nedelosk 89960db2bd Fix #1251 Sprinkler's and cocoons's bounding box is not visable 2016-07-23 01:32:16 +02:00
Nedelosk c5f53bda3e Fix #1288 Broken Cocoon texture when colliding with player 2016-07-23 01:08:42 +02:00
Nedelosk 2e1b62e58d Fix #1223 Suvirvalist's Pickaxe 2016-07-23 00:50:49 +02:00
Nedelosk 982aefa165 Add a way to add custom crate content models 2016-07-22 23:14:14 +02:00
Nedelosk 2cccf95775 Fix #1360 1.10 Some items crash rendering when NBT data is missing 2016-07-22 22:34:09 +02:00
mezz 1969ed8b09 Close #1358 Change "Portable Alyzer" to "Portable Analyzer" 2016-07-21 23:44:03 -07:00
mezz c3fc490fac Fix #1355 Crash from Boggy bees 2016-07-21 22:53:58 -07:00
mezz 59687329fb Replace IBackpackFilter with Predicate<ItemStack> 2016-07-20 15:24:05 -07:00
mezz 94f751d78a Improve backpack API and add backpack config blacklists 2016-07-20 02:25:32 -07:00
mezz f6feca096f Remove unused icons from TextureManager 2016-07-19 17:41:50 -07:00
mezz 649f38efb8 Fix Escritoire renderer leaking the world object by keeping a reference 2016-07-19 16:03:30 -07:00
mezz e4e221b9fd Fix butterfly items rendering too low 2016-07-19 16:03:08 -07:00
Nedelosk d7f063eec8 Update EntityButterfly.java 2016-07-17 12:40:47 +02:00
mezz aa988a3be7 Make honeyed slice more appetizing looking 2016-07-15 17:10:40 -07:00
mezz 18f2a027bc Remove unused bucket icons 2016-07-13 22:24:33 -07:00
mezz 7ca34e52d6 Update icons that use cans or capsules 2016-07-13 22:23:26 -07:00
mezz 7f83b5b909 Change portable alyzer icon to 16x 2016-07-13 22:09:44 -07:00
mezz 641f763d05 Add tooltips and JEI descriptions for CircuitBoard, SolderingIron, Tubes 2016-07-13 21:35:27 -07:00
mezz 0df85063a1 Remove "requires discovery" and limits from electron tubes 2016-07-13 21:34:37 -07:00
mezz 550b0dc3f5 Add zombie villager textures 2016-07-13 21:34:37 -07:00
Nedelosk 96a7b688c0 Fix the jar 2016-07-13 19:34:56 +02:00
Nedelosk 8f6c2baba6 Update README.md 2016-07-13 19:20:30 +02:00
mezz 523a8da908 Fix #1348 support for IC2 in 1.10.2 2016-07-10 18:43:58 -07:00
mezz cd10500a17 Fix crash when there is snow in the way of the farm 2016-07-10 18:34:31 -07:00
mezz 6d9211ada1 Remove block access restrictions 2016-07-06 02:00:02 -07:00
mezz 003ca9273d Fix beekeeper vaillager's collar color 2016-07-05 22:13:58 -07:00
mezz 28f65f13a5 Fix worktable bug that could delete container items 2016-07-05 21:57:23 -07:00
mezz 21ee0947d7 Fix isOp permissions check 2016-07-05 21:01:54 -07:00
mezz 1e11992de2 Fix #1333 Stop wild hive bees from attacking passive animals 2016-07-03 23:05:46 -07:00
mezz d690a38fa2 Fix #1340 Rare NPE from BeekeepingLogic.queenWorkTick 2016-07-03 22:16:12 -07:00
mezz 46eb29cf28 Fix #1342 Crash when giving multifarm control a redstone signal 2016-07-03 20:59:26 -07:00
mezz fb01d3ffaa Update IC2 2016-07-03 12:38:47 -07:00
mezz e676a73a7c Fix doors not showing correctly in TheOneProbe 2016-07-01 22:41:29 -07:00
3196 changed files with 34793 additions and 40037 deletions

No files matched your search

+5
View File
@@ -0,0 +1,5 @@
Thank you for reporting!
For issues:
* Try the latest version, it may have fixed the issue already.
* If you crashed, please paste the crash log to [gist](https://gist.github.com/) and link it here.
+3 -3
View File
@@ -2,11 +2,10 @@
/*
# folders
!/.github
!/forestry_techne
!/gradle/wrapper
!/src
!/api
!/test
# files
!/.gitignore
@@ -21,4 +20,5 @@
!/build.xml
!/gradlew
!/gradlew.bat
.DS_Store
!/cla-signatures.txt
!/formatting-settings.jar
+3 -3
View File
@@ -1,4 +1,4 @@
Forestry
[Forestry](https://minecraft.curseforge.com/projects/forestry/files)
====================================
### What is it?
@@ -9,7 +9,7 @@ Forestry is a modification for the game Minecraft and known primarily for its fa
[Wiki](http://forestry.sengir.net/)
[Latest Builds for 1.9](http://jenkins.ic2.player.to/job/Forestry_5/)
[Latest Builds for 1.11 / 1.11.2](http://jenkins.ic2.player.to/job/Forestry_1.11/)
[IRC #forestry on esper.net](http://webchat.esper.net/?nick=ForestryGithub...&channels=forestry&prompt=1)
@@ -17,7 +17,7 @@ For those interested in developement, you can also visit #forestry-dev.
### Building
The API and localization files reside in their own repository. It is pulled in automatically.
The localization files reside in their own repository. It is pulled in automatically.
You may want to adjust the "./gradle.properties" file to set your mc account as needed.
+13 -23
View File
@@ -1,26 +1,18 @@
buildscript {
repositories {
jcenter()
maven {
name = "forge"
url = "http://files.minecraftforge.net/maven"
}
maven {
name = "sonatype"
url = "https://oss.sonatype.org/content/repositories/snapshots/"
}
maven { url = "http://files.minecraftforge.net/maven" }
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:2.2-SNAPSHOT'
classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT'
}
}
plugins {
id "net.minecraftforge.gradle.forge" version "2.0.2"
id "com.matthewprenger.cursegradle" version "1.0.7"
id "com.matthewprenger.cursegradle" version "1.0.9"
id "se.bjurr.gitchangelog.git-changelog-gradle-plugin" version "1.32"
}
apply plugin: 'net.minecraftforge.gradle.forge'
apply plugin: 'maven'
version = version_major + '.' + version_minor + '.' + version_patch + '.' + getBuildNumber()
@@ -34,8 +26,8 @@ ext.dirDest = './build/dist'
ext.dirLang = "./lang"
// java version
sourceCompatibility = 1.8
targetCompatibility = 1.8
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
minecraft {
version = mcversion + "-" + forgeversion
@@ -68,7 +60,7 @@ repositories {
}
dependencies {
deobfCompile "net.darkhax.tesla:Tesla:${tesla_version}"
deobfCompile "net.darkhax.tesla:Tesla-${mcversion}:${tesla_version}"
deobfCompile "mezz.jei:jei_${mcversion}:${jei_version}:api"
runtime "mezz.jei:jei_${mcversion}:${jei_version}"
deobfCompile "net.industrial-craft:industrialcraft-2:${ic2_version}:api"
@@ -98,6 +90,9 @@ processResources {
exclude 'mcmod.info'
exclude '**/*.md'
}
// Move access transformers to META-INF
rename '(.+_at.cfg)', 'META-INF/$1'
}
// prevent java 8's strict doclint for javadocs from failing builds
@@ -108,12 +103,8 @@ allprojects {
}
jar {
// Copy redstone api into the jar, should shade this as a maven dep...
from (sourceSets.api.allSource) {
include 'cofh/**/*.txt'
}
from (sourceSets.api.output.classesDir) {
include 'cofh/**/*.*'
manifest {
attributes 'FMLAT': 'forestry_at.cfg'
}
}
@@ -159,8 +150,7 @@ task makeChangelog(type: se.bjurr.gitchangelog.plugin.gradle.GitChangelogTask) {
fromCommit = "5a3850c2642e535656d090d1473054d5fa8d3331"
toRef = "HEAD"
templateContent = """
Alpha version, still buggy. Do not create a world you care about with this version, it can and will break things severely.<br/>
Please help the project by trying it out and <a href="https://github.com/ForestryMC/ForestryMC/issues">reporting issues here.</a><br/>
Please help the Forestry project by <a href="https://github.com/ForestryMC/ForestryMC/issues">reporting issues here.</a><br/>
{{#tags}}
<h3>{{name}}</h3>
<ul>
Binary file not shown.
Regular → Executable
+8 -8
View File
@@ -1,11 +1,11 @@
mcversion=1.10.2
forgeversion=12.18.0.2005-1.10.0
mcp_mappings=snapshot_20160525
mcversion=1.12
forgeversion=14.21.1.2387
mcp_mappings=snapshot_20170702
tesla_version=1.9.4-1.1.0.24
jei_version=3.7.3.221
ic2_version=2.5.5-ex19
tesla_version=1.0.60
jei_version=4.7.0.67
ic2_version=2.7.30-ex111
version_major=5
version_minor=1
version_patch=8
version_minor=4
version_patch=1
+6 -6
View File
@@ -1,6 +1,6 @@
#Mon Sep 14 12:28:28 PDT 2015
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.7-bin.zip
#Sat Jun 24 19:47:39 PDT 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.7-all.zip
+1 -1
Submodule lang updated: 2d88011e4a...f5300f059b.
-165
View File
@@ -1,165 +0,0 @@
GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
This version of the GNU Lesser General Public License incorporates
the terms and conditions of version 3 of the GNU General Public
License, supplemented by the additional permissions listed below.
0. Additional Definitions.
As used herein, "this License" refers to version 3 of the GNU Lesser
General Public License, and the "GNU GPL" refers to version 3 of the GNU
General Public License.
"The Library" refers to a covered work governed by this License,
other than an Application or a Combined Work as defined below.
An "Application" is any work that makes use of an interface provided
by the Library, but which is not otherwise based on the Library.
Defining a subclass of a class defined by the Library is deemed a mode
of using an interface provided by the Library.
A "Combined Work" is a work produced by combining or linking an
Application with the Library. The particular version of the Library
with which the Combined Work was made is also called the "Linked
Version".
The "Minimal Corresponding Source" for a Combined Work means the
Corresponding Source for the Combined Work, excluding any source code
for portions of the Combined Work that, considered in isolation, are
based on the Application, and not on the Linked Version.
The "Corresponding Application Code" for a Combined Work means the
object code and/or source code for the Application, including any data
and utility programs needed for reproducing the Combined Work from the
Application, but excluding the System Libraries of the Combined Work.
1. Exception to Section 3 of the GNU GPL.
You may convey a covered work under sections 3 and 4 of this License
without being bound by section 3 of the GNU GPL.
2. Conveying Modified Versions.
If you modify a copy of the Library, and, in your modifications, a
facility refers to a function or data to be supplied by an Application
that uses the facility (other than as an argument passed when the
facility is invoked), then you may convey a copy of the modified
version:
a) under this License, provided that you make a good faith effort to
ensure that, in the event an Application does not supply the
function or data, the facility still operates, and performs
whatever part of its purpose remains meaningful, or
b) under the GNU GPL, with none of the additional permissions of
this License applicable to that copy.
3. Object Code Incorporating Material from Library Header Files.
The object code form of an Application may incorporate material from
a header file that is part of the Library. You may convey such object
code under terms of your choice, provided that, if the incorporated
material is not limited to numerical parameters, data structure
layouts and accessors, or small macros, inline functions and templates
(ten or fewer lines in length), you do both of the following:
a) Give prominent notice with each copy of the object code that the
Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the object code with a copy of the GNU GPL and this license
document.
4. Combined Works.
You may convey a Combined Work under terms of your choice that,
taken together, effectively do not restrict modification of the
portions of the Library contained in the Combined Work and reverse
engineering for debugging such modifications, if you also do each of
the following:
a) Give prominent notice with each copy of the Combined Work that
the Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the Combined Work with a copy of the GNU GPL and this license
document.
c) For a Combined Work that displays copyright notices during
execution, include the copyright notice for the Library among
these notices, as well as a reference directing the user to the
copies of the GNU GPL and this license document.
d) Do one of the following:
0) Convey the Minimal Corresponding Source under the terms of this
License, and the Corresponding Application Code in a form
suitable for, and under terms that permit, the user to
recombine or relink the Application with a modified version of
the Linked Version to produce a modified Combined Work, in the
manner specified by section 6 of the GNU GPL for conveying
Corresponding Source.
1) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (a) uses at run time
a copy of the Library already present on the user's computer
system, and (b) will operate properly with a modified version
of the Library that is interface-compatible with the Linked
Version.
e) Provide Installation Information, but only if you would otherwise
be required to provide such information under section 6 of the
GNU GPL, and only to the extent that such information is
necessary to install and execute a modified version of the
Combined Work produced by recombining or relinking the
Application with a modified version of the Linked Version. (If
you use option 4d0, the Installation Information must accompany
the Minimal Corresponding Source and Corresponding Application
Code. If you use option 4d1, you must provide the Installation
Information in the manner specified by section 6 of the GNU GPL
for conveying Corresponding Source.)
5. Combined Libraries.
You may place library facilities that are a work based on the
Library side by side in a single library together with other library
facilities that are not Applications and are not covered by this
License, and convey such a combined library under terms of your
choice, if you do both of the following:
a) Accompany the combined library with a copy of the same work based
on the Library, uncombined with any other library facilities,
conveyed under the terms of this License.
b) Give prominent notice with the combined library that part of it
is a work based on the Library, and explaining where to find the
accompanying uncombined form of the same work.
6. Revised Versions of the GNU Lesser General Public License.
The Free Software Foundation may publish revised and/or new versions
of the GNU Lesser General Public License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the
Library as you received it specifies that a certain numbered version
of the GNU Lesser General Public License "or any later version"
applies to it, you have the option of following the terms and
conditions either of that published version or of any later version
published by the Free Software Foundation. If the Library as you
received it does not specify a version number of the GNU Lesser
General Public License, you may choose any version of the GNU Lesser
General Public License ever published by the Free Software Foundation.
If the Library as you received it specifies that a proxy can decide
whether future versions of the GNU Lesser General Public License shall
apply, that proxy's public statement of acceptance of any version is
permanent authorization for you to choose that version for the
Library.
-11
View File
@@ -1,11 +0,0 @@
Redstone Flux API
====================================
This is the standalone CoFH Energy API - also known as the "Redstone Flux" API.
Make great use of it.
You are of course free to modify any/all of this code and even repackage it, but then it wouldn't be an awesome crossmod API anymore, now would it?
Don't be a jerk.
~Team CoFH
-11
View File
@@ -1,11 +0,0 @@
package cofh.api;
public class CoFHAPIProps {
private CoFHAPIProps() {
}
public static final String VERSION = "1.8.9R1.2.0B1";
}
@@ -1,162 +0,0 @@
package cofh.api.energy;
import net.minecraft.nbt.NBTTagCompound;
/**
* Reference implementation of {@link IEnergyStorage}. Use/extend this or implement your own.
*
* @author King Lemming
*
*/
public class EnergyStorage implements IEnergyStorage {
protected int energy;
protected int capacity;
protected int maxReceive;
protected int maxExtract;
public EnergyStorage(int capacity) {
this(capacity, capacity, capacity);
}
public EnergyStorage(int capacity, int maxTransfer) {
this(capacity, maxTransfer, maxTransfer);
}
public EnergyStorage(int capacity, int maxReceive, int maxExtract) {
this.capacity = capacity;
this.maxReceive = maxReceive;
this.maxExtract = maxExtract;
}
public EnergyStorage readFromNBT(NBTTagCompound nbt) {
this.energy = nbt.getInteger("Energy");
if (energy > capacity) {
energy = capacity;
}
return this;
}
public NBTTagCompound writeToNBT(NBTTagCompound nbt) {
if (energy < 0) {
energy = 0;
}
nbt.setInteger("Energy", energy);
return nbt;
}
public EnergyStorage setCapacity(int capacity) {
this.capacity = capacity;
if (energy > capacity) {
energy = capacity;
}
return this;
}
public EnergyStorage setMaxTransfer(int maxTransfer) {
setMaxReceive(maxTransfer);
setMaxExtract(maxTransfer);
return this;
}
public EnergyStorage setMaxReceive(int maxReceive) {
this.maxReceive = maxReceive;
return this;
}
public EnergyStorage setMaxExtract(int maxExtract) {
this.maxExtract = maxExtract;
return this;
}
public int getMaxReceive() {
return maxReceive;
}
public int getMaxExtract() {
return maxExtract;
}
/**
* This function is included to allow for server to client sync. Do not call this externally to the containing Tile Entity, as not all IEnergyHandlers
* are guaranteed to have it.
*
* @param energy
*/
public void setEnergyStored(int energy) {
this.energy = energy;
if (this.energy > capacity) {
this.energy = capacity;
} else if (this.energy < 0) {
this.energy = 0;
}
}
/**
* This function is included to allow the containing tile to directly and efficiently modify the energy contained in the EnergyStorage. Do not rely on this
* externally, as not all IEnergyHandlers are guaranteed to have it.
*
* @param energy
*/
public void modifyEnergyStored(int energy) {
this.energy += energy;
if (this.energy > capacity) {
this.energy = capacity;
} else if (this.energy < 0) {
this.energy = 0;
}
}
/* IEnergyStorage */
@Override
public int receiveEnergy(int maxReceive, boolean simulate) {
int energyReceived = Math.min(capacity - energy, Math.min(this.maxReceive, maxReceive));
if (!simulate) {
energy += energyReceived;
}
return energyReceived;
}
@Override
public int extractEnergy(int maxExtract, boolean simulate) {
int energyExtracted = Math.min(energy, Math.min(this.maxExtract, maxExtract));
if (!simulate) {
energy -= energyExtracted;
}
return energyExtracted;
}
@Override
public int getEnergyStored() {
return energy;
}
@Override
public int getMaxEnergyStored() {
return capacity;
}
}
@@ -1,22 +0,0 @@
package cofh.api.energy;
import net.minecraft.util.EnumFacing;
/**
* Implement this interface on TileEntities which should connect to energy transportation blocks. This is intended for blocks which generate energy but do not
* accept it; otherwise just use IEnergyHandler.
* <p>
* Note that {@link IEnergyHandler} is an extension of this.
*
* @author King Lemming
*
*/
public interface IEnergyConnection {
/**
* Returns TRUE if the TileEntity can connect on a given side.
*/
boolean canConnectEnergy(EnumFacing from);
}
@@ -1,52 +0,0 @@
package cofh.api.energy;
import net.minecraft.item.ItemStack;
/**
* Implement this interface on Item classes that support external manipulation of their internal energy storages.
* <p>
* A reference implementation is provided {@link ItemEnergyContainer}.
*
* @author King Lemming
*
*/
public interface IEnergyContainerItem {
/**
* Adds energy to a container item. Returns the quantity of energy that was accepted. This should always return 0 if the item cannot be externally charged.
*
* @param container
* ItemStack to be charged.
* @param maxReceive
* Maximum amount of energy to be sent into the item.
* @param simulate
* If TRUE, the charge will only be simulated.
* @return Amount of energy that was (or would have been, if simulated) received by the item.
*/
int receiveEnergy(ItemStack container, int maxReceive, boolean simulate);
/**
* Removes energy from a container item. Returns the quantity of energy that was removed. This should always return 0 if the item cannot be externally
* discharged.
*
* @param container
* ItemStack to be discharged.
* @param maxExtract
* Maximum amount of energy to be extracted from the item.
* @param simulate
* If TRUE, the discharge will only be simulated.
* @return Amount of energy that was (or would have been, if simulated) extracted from the item.
*/
int extractEnergy(ItemStack container, int maxExtract, boolean simulate);
/**
* Get the amount of energy currently stored in the container item.
*/
int getEnergyStored(ItemStack container);
/**
* Get the max amount of energy that can be stored in the container item.
*/
int getMaxEnergyStored(ItemStack container);
}
@@ -1,27 +0,0 @@
package cofh.api.energy;
import net.minecraft.util.EnumFacing;
/**
* Implement this interface on Tile Entities which should handle energy, generally storing it in one or more internal {@link IEnergyStorage} objects.
* <p>
* A reference implementation is provided {@link TileEnergyHandler}.
* <p>
* Note that {@link IEnergyReceiver} and {@link IEnergyProvider} are extensions of this.
*
* @author King Lemming
*
*/
public interface IEnergyHandler extends IEnergyConnection {
/**
* Returns the amount of energy currently stored.
*/
int getEnergyStored(EnumFacing from);
/**
* Returns the maximum amount of energy that can be stored.
*/
int getMaxEnergyStored(EnumFacing from);
}
@@ -1,29 +0,0 @@
package cofh.api.energy;
import net.minecraft.util.EnumFacing;
/**
* Implement this interface on Tile Entities which should provide energy, generally storing it in one or more internal {@link IEnergyStorage} objects.
* <p>
* A reference implementation is provided {@link TileEnergyHandler}.
*
* @author King Lemming
*
*/
public interface IEnergyProvider extends IEnergyHandler {
/**
* Remove energy from an IEnergyProvider, internal distribution is left entirely to the IEnergyProvider.
*
* @param from
* Orientation the energy is extracted from.
* @param maxExtract
* Maximum amount of energy to extract.
* @param simulate
* If TRUE, the extraction will only be simulated.
* @return Amount of energy that was (or would have been, if simulated) extracted.
*/
int extractEnergy(EnumFacing from, int maxExtract, boolean simulate);
}
@@ -1,29 +0,0 @@
package cofh.api.energy;
import net.minecraft.util.EnumFacing;
/**
* Implement this interface on Tile Entities which should receive energy, generally storing it in one or more internal {@link IEnergyStorage} objects.
* <p>
* A reference implementation is provided {@link TileEnergyHandler}.
*
* @author King Lemming
*
*/
public interface IEnergyReceiver extends IEnergyHandler {
/**
* Add energy to an IEnergyReceiver, internal distribution is left entirely to the IEnergyReceiver.
*
* @param from
* Orientation the energy is received from.
* @param maxReceive
* Maximum amount of energy to receive.
* @param simulate
* If TRUE, the charge will only be simulated.
* @return Amount of energy that was (or would have been, if simulated) received.
*/
int receiveEnergy(EnumFacing from, int maxReceive, boolean simulate);
}
@@ -1,46 +0,0 @@
package cofh.api.energy;
/**
* An energy storage is the unit of interaction with Energy inventories.<br>
* This is not to be implemented on TileEntities. This is for internal use only.
* <p>
* A reference implementation can be found at {@link EnergyStorage}.
*
* @author King Lemming
*
*/
public interface IEnergyStorage {
/**
* Adds energy to the storage. Returns quantity of energy that was accepted.
*
* @param maxReceive
* Maximum amount of energy to be inserted.
* @param simulate
* If TRUE, the insertion will only be simulated.
* @return Amount of energy that was (or would have been, if simulated) accepted by the storage.
*/
int receiveEnergy(int maxReceive, boolean simulate);
/**
* Removes energy from the storage. Returns quantity of energy that was removed.
*
* @param maxExtract
* Maximum amount of energy to be extracted.
* @param simulate
* If TRUE, the extraction will only be simulated.
* @return Amount of energy that was (or would have been, if simulated) extracted from the storage.
*/
int extractEnergy(int maxExtract, boolean simulate);
/**
* Returns the amount of energy currently stored.
*/
int getEnergyStored();
/**
* Returns the maximum amount of energy that can be stored.
*/
int getMaxEnergyStored();
}
@@ -1,113 +0,0 @@
package cofh.api.energy;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
/**
* Reference implementation of {@link IEnergyContainerItem}. Use/extend this or implement your own.
*
* @author King Lemming
*
*/
public class ItemEnergyContainer extends Item implements IEnergyContainerItem {
protected int capacity;
protected int maxReceive;
protected int maxExtract;
public ItemEnergyContainer() {
}
public ItemEnergyContainer(int capacity) {
this(capacity, capacity, capacity);
}
public ItemEnergyContainer(int capacity, int maxTransfer) {
this(capacity, maxTransfer, maxTransfer);
}
public ItemEnergyContainer(int capacity, int maxReceive, int maxExtract) {
this.capacity = capacity;
this.maxReceive = maxReceive;
this.maxExtract = maxExtract;
}
public ItemEnergyContainer setCapacity(int capacity) {
this.capacity = capacity;
return this;
}
public ItemEnergyContainer setMaxTransfer(int maxTransfer) {
setMaxReceive(maxTransfer);
setMaxExtract(maxTransfer);
return this;
}
public ItemEnergyContainer setMaxReceive(int maxReceive) {
this.maxReceive = maxReceive;
return this;
}
public ItemEnergyContainer setMaxExtract(int maxExtract) {
this.maxExtract = maxExtract;
return this;
}
/* IEnergyContainerItem */
@Override
public int receiveEnergy(ItemStack container, int maxReceive, boolean simulate) {
if (!container.hasTagCompound()) {
container.setTagCompound(new NBTTagCompound());
}
int energy = container.getTagCompound().getInteger("Energy");
int energyReceived = Math.min(capacity - energy, Math.min(this.maxReceive, maxReceive));
if (!simulate) {
energy += energyReceived;
container.getTagCompound().setInteger("Energy", energy);
}
return energyReceived;
}
@Override
public int extractEnergy(ItemStack container, int maxExtract, boolean simulate) {
if (container.getTagCompound() == null || !container.getTagCompound().hasKey("Energy")) {
return 0;
}
int energy = container.getTagCompound().getInteger("Energy");
int energyExtracted = Math.min(energy, Math.min(this.maxExtract, maxExtract));
if (!simulate) {
energy -= energyExtracted;
container.getTagCompound().setInteger("Energy", energy);
}
return energyExtracted;
}
@Override
public int getEnergyStored(ItemStack container) {
if (container.getTagCompound() == null || !container.getTagCompound().hasKey("Energy")) {
return 0;
}
return container.getTagCompound().getInteger("Energy");
}
@Override
public int getMaxEnergyStored(ItemStack container) {
return capacity;
}
}
@@ -1,70 +0,0 @@
package cofh.api.energy;
import javax.annotation.Nonnull;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.EnumFacing;
/**
* Reference implementation of {@link IEnergyReceiver} and {@link IEnergyProvider}. Use/extend this or implement your own.
*
* This class is really meant to summarize how each interface is properly used.
*
* @author King Lemming
*
*/
public class TileEnergyHandler extends TileEntity implements IEnergyReceiver, IEnergyProvider {
protected EnergyStorage storage = new EnergyStorage(32000);
@Override
public void readFromNBT(NBTTagCompound nbt) {
super.readFromNBT(nbt);
storage.readFromNBT(nbt);
}
@Nonnull
@Override
public NBTTagCompound writeToNBT(NBTTagCompound nbt) {
nbt = super.writeToNBT(nbt);
storage.writeToNBT(nbt);
return nbt;
}
/* IEnergyConnection */
@Override
public boolean canConnectEnergy(EnumFacing from) {
return true;
}
/* IEnergyReceiver */
@Override
public int receiveEnergy(EnumFacing from, int maxReceive, boolean simulate) {
return storage.receiveEnergy(maxReceive, simulate);
}
/* IEnergyProvider */
@Override
public int extractEnergy(EnumFacing from, int maxExtract, boolean simulate) {
return storage.extractEnergy(maxExtract, simulate);
}
/* IEnergyHandler */
@Override
public int getEnergyStored(EnumFacing from) {
return storage.getEnergyStored();
}
@Override
public int getMaxEnergyStored(EnumFacing from) {
return storage.getMaxEnergyStored();
}
}
@@ -1,10 +0,0 @@
/**
* (C) 2014-2016 Team CoFH / CoFH / Cult of the Full Hub
* http://www.teamcofh.com
*/
@API(apiVersion = CoFHAPIProps.VERSION, owner = "CoFHAPI", provides = "CoFHAPI|energy")
package cofh.api.energy;
import net.minecraftforge.fml.common.API;
import cofh.api.CoFHAPIProps;
-9
View File
@@ -1,9 +0,0 @@
/**
* (C) 2014-2016 Team CoFH / CoFH / Cult of the Full Hub
* http://www.teamcofh.com
*/
@API(apiVersion = CoFHAPIProps.VERSION, owner = "CoFHLib", provides = "CoFHAPI")
package cofh.api;
import net.minecraftforge.fml.common.API;
+43 -9
View File
@@ -10,9 +10,16 @@
******************************************************************************/
package forestry;
import com.google.common.base.Preconditions;
import javax.annotation.Nullable;
import java.io.File;
import net.minecraft.block.Block;
import net.minecraft.item.Item;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.RegistryEvent;
import net.minecraftforge.fluids.FluidRegistry;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.Mod.EventHandler;
@@ -27,6 +34,7 @@ import net.minecraftforge.fml.common.registry.GameRegistry;
import forestry.api.core.ForestryAPI;
import forestry.core.EventHandlerCore;
import forestry.core.climate.ClimateEventHandler;
import forestry.core.config.Config;
import forestry.core.config.Constants;
import forestry.core.config.GameMode;
@@ -36,8 +44,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;
/**
* Forestry Minecraft Mod
@@ -46,16 +56,19 @@ import forestry.plugins.PluginManager;
*/
@Mod(
modid = Constants.MOD_ID,
name = "Forestry",
name = Constants.MOD_NAME,
version = Constants.VERSION,
guiFactory = "forestry.core.config.ForestryGuiConfigFactory",
acceptedMinecraftVersions = "[1.10]",
dependencies = "required-after:Forge@[12.18.0.1989,);"
+ "after:JEI@[3.7.0,);")
acceptedMinecraftVersions = "[1.12]",
dependencies = "required-after:forge@[14.21.0.2363,);"
+ "after:JEI@[4.7.0,);"
+ "after:" + PluginIC2.modId + ";")
public class Forestry {
@SuppressWarnings("NullableProblems")
@Mod.Instance(Constants.MOD_ID)
public static Forestry instance;
@Nullable
private File configFolder;
public Forestry() {
@@ -66,7 +79,13 @@ public class Forestry {
FluidRegistry.enableUniversalBucket();
}
public static PacketHandler packetHandler;
@Nullable
private static PacketHandler packetHandler;
public static PacketHandler getPacketHandler() {
Preconditions.checkState(packetHandler != null);
return packetHandler;
}
@EventHandler
public void preInit(FMLPreInitializationEvent event) {
@@ -76,16 +95,20 @@ public class Forestry {
EventHandlerCore eventHandlerCore = new EventHandlerCore();
MinecraftForge.EVENT_BUS.register(eventHandlerCore);
MinecraftForge.EVENT_BUS.register(new MultiblockEventHandler());
MinecraftForge.EVENT_BUS.register(new ClimateEventHandler());
Proxies.common.registerEventHandlers();
configFolder = new File(event.getModConfigurationDirectory(), Constants.MOD_ID);
Config.load();
Config.load(event.getSide());
PluginManager.runSetup(event);
ForestryAPI.activeMode = new GameMode(Config.gameMode);
String gameMode = Config.gameMode;
Preconditions.checkState(gameMode != null);
ForestryAPI.activeMode = new GameMode(gameMode);
PluginManager.runPreInit(event.getSide());
PluginManager.runPreInit();
Proxies.render.registerModels();
}
@@ -119,6 +142,7 @@ public class Forestry {
PluginManager.serverStarting(event.getServer());
}
@Nullable
public File getConfigFolder() {
return configFolder;
}
@@ -127,4 +151,14 @@ public class Forestry {
public void processIMCMessages(IMCEvent event) {
PluginManager.processIMCMessages(event.getMessages());
}
@EventHandler
public void onMissingBlockMappings(RegistryEvent.MissingMappings<Block> event) {
MigrationHelper.onMissingBlockMappings(event);
}
@EventHandler
public void onMissingItemMappings(RegistryEvent.MissingMappings<Item> event) {
MigrationHelper.onMissingItemMappings(event);
}
}
@@ -0,0 +1,13 @@
package forestry.api.apiculture;
import net.minecraftforge.common.capabilities.Capability;
import net.minecraftforge.common.capabilities.CapabilityInject;
public class ApicultureCapabilities {
/**
* Capability for {@link IArmorApiarist}.
* The {@link Capability#getDefaultInstance()} will always protect the wearer with no side effects.
*/
@CapabilityInject(IArmorApiarist.class)
public static Capability<IArmorApiarist> ARMOR_APIARIST;
}
@@ -5,7 +5,6 @@
******************************************************************************/
package forestry.api.apiculture;
import javax.annotation.Nonnull;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -13,7 +12,6 @@ import java.util.Map;
import net.minecraft.item.ItemStack;
/**
*
* Some miscellaneous lists and settings for bees.
*
* @author SirSengir
@@ -32,7 +30,6 @@ public class BeeManager {
/**
* List of items that can induce swarming. Integer denotes x in 1000 chance.
*/
@Nonnull
public static final Map<ItemStack, Integer> inducers = new HashMap<>();
/**
@@ -5,6 +5,8 @@
******************************************************************************/
package forestry.api.apiculture;
import javax.annotation.Nullable;
/**
* Easily extendable default IBeeModifier.
* By itself, this IBeeModifier does nothing.
@@ -23,7 +25,7 @@ public class DefaultBeeModifier implements IBeeModifier {
}
@Override
public float getLifespanModifier(IBeeGenome genome, IBeeGenome mate, float currentModifier) {
public float getLifespanModifier(IBeeGenome genome, @Nullable IBeeGenome mate, float currentModifier) {
return 1.0f;
}
@@ -75,9 +75,9 @@ public enum EnumBeeChromosome implements IChromosomeType {
* Determines the bee's effect.
*/
EFFECT(IAlleleBeeEffect.class);
private final Class<? extends IAllele> alleleClass;
EnumBeeChromosome(Class<? extends IAllele> alleleClass) {
this.alleleClass = alleleClass;
}
@@ -14,7 +14,7 @@ public enum EnumBeeType implements ISpeciesType {
public static final EnumBeeType[] VALUES = values();
String name;
private final String name;
EnumBeeType() {
this.name = this.toString().toLowerCase(Locale.ENGLISH);
@@ -7,15 +7,17 @@ package forestry.api.apiculture;
import forestry.api.genetics.IAlleleEffect;
import forestry.api.genetics.IEffectData;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
public interface IAlleleBeeEffect extends IAlleleEffect {
/**
* Called by apiaries to cause an effect in the world. (server)
*
* @param genome Genome of the bee queen causing this effect
* @param genome Genome of the bee queen causing this effect
* @param storedData Object containing the stored effect data for the apiary/hive the bee is in.
* @param housing {@link IBeeHousing} the bee currently resides in.
* @param housing {@link IBeeHousing} the bee currently resides in.
* @return storedData, may have been manipulated.
*/
IEffectData doEffect(IBeeGenome genome, IEffectData storedData, IBeeHousing housing);
@@ -23,11 +25,12 @@ public interface IAlleleBeeEffect extends IAlleleEffect {
/**
* Is called to produce visual bee effects. (client)
*
* @param genome Genome of the bee queen causing this effect
* @param genome Genome of the bee queen causing this effect
* @param storedData Object containing the stored effect data for the apiary/hive the bee is in.
* @param housing {@link IBeeHousing} the bee currently resides in.
* @param housing {@link IBeeHousing} the bee currently resides in.
* @return storedData, may have been manipulated.
*/
@SideOnly(Side.CLIENT)
IEffectData doFX(IBeeGenome genome, IEffectData storedData, IBeeHousing housing);
}
@@ -7,14 +7,13 @@ package forestry.api.apiculture;
import java.util.Map;
import forestry.api.core.IModelManager;
import forestry.api.genetics.IAlleleSpecies;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
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.IModelManager;
import forestry.api.genetics.IAlleleSpecies;
public interface IAlleleBeeSpecies extends IAlleleSpecies {
@@ -41,13 +40,14 @@ public interface IAlleleBeeSpecies extends IAlleleSpecies {
/**
* Only jubilant bees produce specialities.
*
* @return true if the bee is jubilant, false otherwise.
*/
boolean isJubilant(IBeeGenome genome, IBeeHousing housing);
@SideOnly(Side.CLIENT)
ModelResourceLocation getModel(EnumBeeType type);
@SideOnly(Side.CLIENT)
void registerModels(Item item, IModelManager manager);
}
@@ -5,9 +5,8 @@
******************************************************************************/
package forestry.api.apiculture;
import net.minecraft.item.ItemStack;
import forestry.api.genetics.IAlleleSpeciesBuilder;
import net.minecraft.item.ItemStack;
public interface IAlleleBeeSpeciesBuilder extends IAlleleSpeciesBuilder {
@@ -38,9 +37,13 @@ public interface IAlleleBeeSpeciesBuilder extends IAlleleSpeciesBuilder {
*/
IAlleleBeeSpeciesBuilder setNocturnal();
/** Use this if you have custom icons for bees. */
/**
* Use this if you have custom icons for bees.
*/
IAlleleBeeSpeciesBuilder setCustomBeeModelProvider(IBeeModelProvider beeIconProvider);
/** Use this if you have custom icon colours for bees (other than the default static primary + secondary colours). */
/**
* Use this if you have custom icon colours for bees (other than the default static primary + secondary colours).
*/
IAlleleBeeSpeciesBuilder setCustomBeeSpriteColourProvider(IBeeSpriteColourProvider beeIconColourProvider);
}
@@ -18,8 +18,7 @@ public interface IApiaristTracker extends IBreedingTracker {
/**
* Register the birth of a queen. Will mark species as discovered.
*
* @param queen
* Created queen.
* @param queen Created queen.
*/
void registerQueen(IIndividual queen);
@@ -31,8 +30,7 @@ public interface IApiaristTracker extends IBreedingTracker {
/**
* Register the birth of a princess. Will mark species as discovered.
*
* @param princess
* Created princess.
* @param princess Created princess.
*/
void registerPrincess(IIndividual princess);
@@ -44,8 +42,7 @@ public interface IApiaristTracker extends IBreedingTracker {
/**
* Register the birth of a drone. Will mark species as discovered.
*
* @param drone
* Created drone.
* @param drone Created drone.
*/
void registerDrone(IIndividual drone);
@@ -5,21 +5,25 @@
******************************************************************************/
package forestry.api.apiculture;
import javax.annotation.Nullable;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.item.ItemStack;
/**
* When implemented by armor piece items, allows them to act as apiarist's armor.
* When implemented as a capability by armor items, protects the wearer from negative bee effects.
*
* @see ApicultureCapabilities#ARMOR_APIARIST
*/
public interface IArmorApiarist {
/**
* Called when the apiarist's armor acts as protection against an attack.
*
* @param entity Entity being attacked
* @param armor Armor item
* @param cause Optional cause of attack, such as a bee effect identifier
* @param entity Entity being attacked
* @param armor Armor item
* @param cause Optional cause of attack, such as a bee effect identifier
* @param doProtect Whether or not to actually do the side effects of protection
* @return Whether or not the armor should protect the player from that attack
*/
boolean protectEntity(EntityLivingBase entity, ItemStack armor, String cause, boolean doProtect);
boolean protectEntity(EntityLivingBase entity, ItemStack armor, @Nullable String cause, boolean doProtect);
}
@@ -17,9 +17,10 @@ public interface IArmorApiaristHelper {
/**
* Called when the apiarist's armor acts as protection against an attack.
* @param stack ItemStack to check
* @param entity Entity being attacked
* @param cause Optional cause of attack, such as a bee effect identifier
*
* @param stack ItemStack to check
* @param entity Entity being attacked
* @param cause Optional cause of attack, such as a bee effect identifier
* @param doProtect Whether or not to actually do the side effects of protection
* @return Whether or not the item is valid Apiarist Armor and should protect the player from that attack
* @since Forestry 4.2
@@ -28,11 +29,12 @@ public interface IArmorApiaristHelper {
/**
* Called when the apiarist's armor acts as protection against an attack.
* @param entity Entity being attacked
* @param cause Optional cause of attack, such as a bee effect identifier
*
* @param entity Entity being attacked
* @param cause Optional cause of attack, such as a bee effect identifier
* @param doProtect Whether or not to actually do the side effects of protection
* @return The number of valid Apiarist Armor pieces the player is wearing that are actually protecting.
* 4 means full protection, but it can go higher if they are holding items like the smoker.
* 4 means full protection, but it can go higher if they are holding items like the smoker.
* @since Forestry 4.2
*/
int wearsItems(EntityLivingBase entity, String cause, boolean doProtect);
+16 -13
View File
@@ -5,18 +5,19 @@
******************************************************************************/
package forestry.api.apiculture;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import java.util.List;
import java.util.Set;
import net.minecraft.item.ItemStack;
import net.minecraft.world.biome.Biome;
import forestry.api.arboriculture.ITree;
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.
@@ -28,7 +29,6 @@ public interface IBee extends IIndividualLiving {
/**
* @return Bee's genetic information.
*/
@Nonnull
@Override
IBeeGenome getGenome();
@@ -51,12 +51,12 @@ public interface IBee extends IIndividualLiving {
/**
* Set the natural flag on this bee.
* @param flag
*/
void setIsNatural(boolean flag);
IEffectData[] doEffect(IEffectData[] storedData, IBeeHousing housing);
@SideOnly(Side.CLIENT)
IEffectData[] doFX(IEffectData[] storedData, IBeeHousing housing);
/**
@@ -66,6 +66,7 @@ public interface IBee extends IIndividualLiving {
/**
* Determines whether the queen can work.
*
* @param housing the {@link IBeeHousing} the bee currently resides in.
* @return an empty set if the queen can work, a set of error states if the queen can not work
*/
@@ -73,20 +74,22 @@ public interface IBee extends IIndividualLiving {
List<Biome> getSuitableBiomes();
ItemStack[] getProduceList();
NonNullList<ItemStack> getProduceList();
ItemStack[] getSpecialtyList();
NonNullList<ItemStack> getSpecialtyList();
ItemStack[] produceStacks(IBeeHousing housing);
NonNullList<ItemStack> produceStacks(IBeeHousing housing);
@Nullable
IBee spawnPrincess(IBeeHousing housing);
IBee[] spawnDrones(IBeeHousing housing);
List<IBee> spawnDrones(IBeeHousing housing);
void plantFlowerRandom(IBeeHousing housing);
ITree retrievePollen(IBeeHousing housing);
@Nullable
IIndividual retrievePollen(IBeeHousing housing);
boolean pollinateRandom(IBeeHousing housing, ITree pollen);
boolean pollinateRandom(IBeeHousing housing, IIndividual pollen);
}
@@ -14,15 +14,15 @@ public interface IBeeFactory {
* Automatically registered with AlleleManager.alleleRegistry.registerAllele()
* See IAlleleBeeSpeciesBuilder and IAlleleSpeciesBuilder for adding additional properties to the returned 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.
* @param unlocalizedName Unlocalized name for this 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.
* @param unlocalizedName Unlocalized name for this species
* @param unlocalizedDescription Unlocalized description for this species
* @param branch Classification of this species
* @param binomial Binomial name of the species sans genus ("Apis"). "humboldti" will have the bee species flavour name be "Apis humboldti". Feel free to use fun names or null.
* @param primaryColor The outline color of this species
* @param secondaryColor The body color of this species
* @param branch Classification of this species
* @param binomial Binomial name of the species sans genus ("Apis"). "humboldti" will have the bee species flavour name be "Apis humboldti". Feel free to use fun names or null.
* @param primaryColor The outline color of this species
* @param secondaryColor The body color of this species
* @return a new bee species allele.
*/
IAlleleBeeSpeciesBuilder createSpecies(String uid, boolean dominant, String authority, String unlocalizedName, String unlocalizedDescription, IClassification branch, String binomial, int primaryColor, int secondaryColor);
@@ -31,7 +31,7 @@ public interface IBeeFactory {
* Creates a new bee branch.
* Must be registered with AlleleManager.alleleRegistry.getClassification("family.apidae").addMemberGroup();
*
* @param uid Unique Identifier for this branch
* @param uid Unique Identifier for this branch
* @param scientific approximates a "genus" in real life. Real life examples: "Micrapis", "Megapis"
* @return a new bee branch
*/
@@ -5,23 +5,21 @@
******************************************************************************/
package forestry.api.apiculture;
import net.minecraft.util.math.Vec3i;
import forestry.api.genetics.EnumTolerance;
import forestry.api.genetics.IFlowerProvider;
import forestry.api.genetics.IGenome;
import net.minecraft.util.math.Vec3i;
/**
* Only the default implementation is supported.
*
* @author SirSengir
*
*/
public interface IBeeGenome extends IGenome {
@Override
IAlleleBeeSpecies getPrimary();
@Override
IAlleleBeeSpecies getSecondary();
@@ -5,29 +5,29 @@
******************************************************************************/
package forestry.api.apiculture;
import net.minecraft.util.math.Vec3d;
import net.minecraft.world.World;
import net.minecraft.world.biome.Biome;
import javax.annotation.Nullable;
import com.mojang.authlib.GameProfile;
import forestry.api.core.EnumHumidity;
import forestry.api.core.EnumTemperature;
import forestry.api.climate.IClimateProvider;
import forestry.api.core.IErrorLogicSource;
import forestry.api.core.ILocatable;
import forestry.api.genetics.IHousing;
import net.minecraft.util.math.Vec3d;
public interface IBeeHousing extends IHousing, IErrorLogicSource {
public interface IBeeHousing extends IHousing, IErrorLogicSource, IClimateProvider, ILocatable {
/**
* Used by BeeManager.beeRoot.createBeeHousingModifier(IBeeHousing housing)
* Used by {@link IBeeRoot#createBeeHousingModifier(IBeeHousing)}
* to combine bee modifiers from several sources that can change over time.
*
* @return IBeeModifiers from the housing, frames, etc.
*/
Iterable<IBeeModifier> getBeeModifiers();
/**
* Used by BeeManager.beeRoot.createBeeHousingListener(IBeeHousing housing)
* Used by {@link IBeeRoot#createBeeHousingListener(IBeeHousing)}
* to combine bee listeners from several sources that can change over time.
*
* @return IBeeListeners from the housing, multiblock parts, etc.
*/
Iterable<IBeeListener> getBeeListeners();
@@ -36,24 +36,18 @@ public interface IBeeHousing extends IHousing, IErrorLogicSource {
IBeekeepingLogic getBeekeepingLogic();
EnumTemperature getTemperature();
EnumHumidity getHumidity();
int getBlockLightValue();
boolean canBlockSeeTheSky();
/** Must not be named "getWorld" to avoid SpecialSource issue https://github.com/md-5/SpecialSource/issues/12 */
World getWorldObj();
Biome getBiome();
boolean isRaining();
@Nullable
GameProfile getOwner();
/**
* @return exact coordinates where bee particle FX should spawn from
* @since Forestry 4.2
* @return exact coordinates where bee FX should spawn from
*/
Vec3d getBeeFXCoordinates();
}
@@ -21,7 +21,7 @@ public interface IBeeHousingInventory {
* Adds products to the housing's inventory.
*
* @param product ItemStack with the product to add.
* @param all if true, success requires that all products are added
* @param all if true, success requires that all products are added
* @return boolean indicating success or failure.
*/
boolean addProduct(ItemStack product, boolean all);
@@ -11,6 +11,7 @@ public interface IBeeListener {
/**
* Called when the bees wear out the housing's equipment.
*
* @param amount Integer indicating the amount worn out.
*/
void wearOutEquipment(int amount);
@@ -22,6 +23,7 @@ public interface IBeeListener {
/**
* Called when the bees have retrieved some pollen.
*
* @return true if this bee listener handled the pollen.
*/
boolean onPollenRetrieved(IIndividual pollen);
@@ -5,14 +5,12 @@
******************************************************************************/
package forestry.api.apiculture;
import forestry.api.core.IModelManager;
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;
import forestry.api.core.IModelManager;
public interface IBeeModelProvider {
@SideOnly(Side.CLIENT)
void registerModels(Item item, IModelManager manager);
@@ -5,31 +5,33 @@
******************************************************************************/
package forestry.api.apiculture;
import javax.annotation.Nullable;
public interface IBeeModifier {
/**
* @param genome Genome of the bee this modifier is called for.
* @param genome Genome of the bee this modifier is called for.
* @param currentModifier Current modifier.
* @return Float used to modify the base territory.
*/
float getTerritoryModifier(IBeeGenome genome, float currentModifier);
/**
* @param genome Genome of the bee this modifier is called for.
* @param mate Genome of the bee mate this modifier is called for.
* @param genome Genome of the bee this modifier is called for.
* @param mate Genome of the bee mate this modifier is called for.
* @param currentModifier Current modifier.
* @return Float used to modify the base mutation chance.
*/
float getMutationModifier(IBeeGenome genome, IBeeGenome mate, float currentModifier);
/**
* @param genome Genome of the bee this modifier is called for.
* @param genome Genome of the bee this modifier is called for.
* @param currentModifier Current modifier.
* @return Float used to modify the life span of queens.
*/
float getLifespanModifier(IBeeGenome genome, IBeeGenome mate, float currentModifier);
float getLifespanModifier(IBeeGenome genome, @Nullable IBeeGenome mate, float currentModifier);
/**
* @param genome Genome of the bee this modifier is called for.
* @param genome Genome of the bee this modifier is called for.
* @param currentModifier Current modifier.
* @return Float modifying the production speed of queens.
*/
@@ -8,10 +8,10 @@ package forestry.api.apiculture;
import forestry.api.genetics.IMutation;
public interface IBeeMutation extends IMutation {
@Override
IBeeRoot getRoot();
/**
* @return float representing the chance for mutation to occur. note that this is 0 - 100 based, since it was an integer previously!
*/
@@ -15,8 +15,8 @@ public interface IBeeMutationFactory {
*
* @param parentBee0 A parent bee for this mutation
* @param parentBee1 A parent bee for this mutation
* @param result The resulting alleles for this mutation
* @param chance The chance that breeding the two parent bees will result in this mutation
* @param result The resulting alleles for this mutation
* @param chance The chance that breeding the two parent bees will result in this mutation
* @return a new bee mutation.
*/
IBeeMutationBuilder createMutation(IAlleleBeeSpecies parentBee0, IAlleleBeeSpecies parentBee1, IAllele[] result, int chance);
@@ -6,7 +6,6 @@
package forestry.api.apiculture;
import javax.annotation.Nullable;
import java.util.ArrayList;
import java.util.List;
import com.mojang.authlib.GameProfile;
@@ -19,15 +18,16 @@ import net.minecraft.world.World;
public interface IBeeRoot extends ISpeciesRoot {
/**
* @return true if passed item is a Forestry bee. Equal to getType(ItemStack stack) != EnumBeeType.NONE
* @return true if passed item is a Forestry bee. Equal to getType(ItemStack stack) != null
*/
@Override
boolean isMember(ItemStack stack);
/**
* @return {@link IBee} pattern parsed from the passed stack's nbt data.
* @return {@link IBee} pattern parsed from the passed stack's nbt data. Null if the ItemStack is not a valid member.
*/
@Override
@Nullable
IBee getMember(ItemStack stack);
@Override
@@ -49,16 +49,15 @@ public interface IBeeRoot extends ISpeciesRoot {
/* BREEDING TRACKER */
/**
* @param world
* @return {@link IApiaristTracker} associated with the passed world.
*/
@Override
IApiaristTracker getBreedingTracker(World world, GameProfile player);
IApiaristTracker getBreedingTracker(World world, @Nullable GameProfile player);
/* BEE SPECIFIC */
/**
* @return type of bee encoded on the itemstack. EnumBeeType.NONE if it isn't a bee.
* @return type of bee encoded on the itemstack. null if it isn't a bee.
*/
@Nullable
@Override
@@ -75,8 +74,7 @@ public interface IBeeRoot extends ISpeciesRoot {
boolean isMated(ItemStack stack);
/**
* @param genome
* Valid {@link IBeeGenome}
* @param genome Valid {@link IBeeGenome}
* @return {@link IBee} from the passed genome
*/
IBee getBee(IBeeGenome genome);
@@ -84,17 +82,16 @@ public interface IBeeRoot extends ISpeciesRoot {
/**
* Creates an IBee suitable for a queen containing the necessary second genome for the mate.
*
* @param genome
* Valid {@link IBeeGenome}
* @param mate
* Valid {@link IBee} representing the mate.
* @param genome Valid {@link IBeeGenome}
* @param mate Valid {@link IBee} representing the mate.
* @return Mated {@link IBee} from the passed genomes.
*/
IBee getBee(World world, IBeeGenome genome, IBee mate);
/* TEMPLATES */
@Override
ArrayList<IBee> getIndividualTemplates();
List<IBee> getIndividualTemplates();
/* MUTATIONS */
@Override
@@ -103,15 +100,16 @@ public interface IBeeRoot extends ISpeciesRoot {
/* GAME MODE */
void resetBeekeepingMode();
ArrayList<IBeekeepingMode> getBeekeepingModes();
List<IBeekeepingMode> getBeekeepingModes();
IBeekeepingMode getBeekeepingMode(World world);
@Nullable
IBeekeepingMode getBeekeepingMode(String name);
void registerBeekeepingMode(IBeekeepingMode mode);
void setBeekeepingMode(World world, String name);
void setBeekeepingMode(World world, IBeekeepingMode mode);
/* MISC */
@@ -5,16 +5,16 @@
******************************************************************************/
package forestry.api.apiculture;
import javax.annotation.Nonnull;
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.tileentity.TileEntity;
import net.minecraft.util.math.BlockPos;
import forestry.api.core.INbtReadable;
import forestry.api.core.INbtWritable;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
/**
* Stores beekeeping logic for bee housings.
@@ -27,6 +27,7 @@ public interface IBeekeepingLogic extends INbtWritable, INbtReadable {
/**
* Checks that the bees can work, setting error conditions on the housing where needed
*
* @return true if no errors are present and doWork should be called
*/
boolean canWork();
@@ -63,18 +64,19 @@ public interface IBeekeepingLogic extends INbtWritable, INbtReadable {
* Whether bee fx should be active.
* Internally, this is automatically synced to the client.
*/
@SideOnly(Side.CLIENT)
boolean canDoBeeFX();
/**
* Display bee fx. Calls IBee.doFX(IEffectData[] storedData, IBeeHousing housing) on the queen.
* Internally, the queen is automatically synced to the client for the fx.
*/
@SideOnly(Side.CLIENT)
void doBeeFX();
/**
* Used by bee fx to direct bees to nearby flowers.
* These positions are synced to the client from the server.
*/
@Nonnull
List<BlockPos> getFlowerPositions();
}
@@ -5,7 +5,7 @@
******************************************************************************/
package forestry.api.apiculture;
import java.util.ArrayList;
import java.util.List;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
@@ -20,7 +20,7 @@ public interface IBeekeepingMode {
/**
* @return Localized list of strings outlining the behaviour of this beekeeping mode.
*/
ArrayList<String> getDescription();
List<String> getDescription();
/**
* @return Float used to modify the wear on comb frames.
@@ -28,41 +28,31 @@ public interface IBeekeepingMode {
float getWearModifier();
/**
* @param queen
* @return fertility taking into account the birthing queen and surroundings.
*/
int getFinalFertility(IBee queen, World world, BlockPos pos);
/**
* @param queen
* @return true if the queen is genetically "fatigued" and should not be reproduced anymore.
*/
boolean isFatigued(IBee queen, IBeeHousing housing);
/**
* @param queen
* @param housing
* @return true if the queen is being overworked in the bee housing (with chance). will trigger a negative effect.
*/
boolean isOverworked(IBee queen, IBeeHousing housing);
/**
*
* @param queen
* @param offspring
* @param housing
* @return true if the genetic structure of the queen is breaking down during spawning of the offspring (with chance). will trigger a negative effect.
*/
boolean isDegenerating(IBee queen, IBee offspring, IBeeHousing housing);
/**
* @param queen
* @return true if an offspring of this queen is considered a natural
*/
boolean isNaturalOffspring(IBee queen);
/**
* @param queen
* @return true if this mode allows the passed queen or princess to be multiplied
*/
boolean mayMultiplyPrincess(IBee queen);
@@ -5,15 +5,14 @@
******************************************************************************/
package forestry.api.apiculture;
import java.util.Collection;
import net.minecraft.item.ItemStack;
import net.minecraft.util.NonNullList;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess;
/**
* Bees can be seeded either as hive drops or as mutation results.
*
* <p>
* Add IHiveDrops with HiveManager.get___Hive.addDrop
*
* @author SirSengir
@@ -22,13 +21,13 @@ public interface IHiveDrop {
IBee getBeeType(IBlockAccess world, BlockPos pos);
Collection<ItemStack> getExtraItems(IBlockAccess world, BlockPos pos, int fortune);
NonNullList<ItemStack> getExtraItems(IBlockAccess world, BlockPos pos, int fortune);
/**
* Chance to drop a bee or extra items. Default drops have 0.80 (= 80 %).
*
* @param world Minecraft world this is called for.
* @param pos Coordinates of the broken hive.
* @param pos Coordinates of the broken hive.
* @return Chance for drop as a float of 0.0 - 1.0.
*/
double getChance(IBlockAccess world, BlockPos pos, int fortune);
@@ -37,7 +36,7 @@ public interface IHiveDrop {
* Chance for the princess to be ignoble. Default is around 0.4 to 0.7 (40% - 70%).
*
* @param world Minecraft world this is called for.
* @param pos Coordinates of the broken hive.
* @param pos Coordinates of the broken hive.
* @return Chance for ignoble as a float of 0.0 - 1.0.
*/
double getIgnobleChance(IBlockAccess world, BlockPos pos, int fortune);
@@ -13,10 +13,10 @@ public interface IHiveFrame {
* Wears out a frame.
*
* @param housing IBeeHousing the frame is contained in.
* @param frame ItemStack containing the actual frame.
* @param queen Current queen in the caller.
* @param wear Integer denoting the amount worn out. The wear modifier of the current beekeeping mode has already been taken into account.
* @return ItemStack containing the actual frame with adjusted damage, or null if it has been broken.
* @param frame ItemStack containing the actual frame.
* @param queen Current queen in the caller.
* @param wear Integer denoting the amount worn out. The wear modifier of the current beekeeping mode has already been taken into account.
* @return ItemStack containing the actual frame with adjusted damage, or Empty ItemStack if it has been broken.
*/
ItemStack frameUsed(IBeeHousing housing, ItemStack frame, IBee queen, int wear);
@@ -8,9 +8,13 @@ package forestry.api.apiculture;
import net.minecraft.block.state.IBlockState;
public interface IJubilanceFactory {
/** The default Jubilance Provider is satisfied when the humidity and temperature are ideal for the bee. */
/**
* The default Jubilance Provider is satisfied when the humidity and temperature are ideal for the bee.
*/
IJubilanceProvider getDefault();
/** The Requires Resource Jubilance Provider is satisfied when a specific block is under the hive. */
/**
* The Requires Resource Jubilance Provider is satisfied when a specific block is under the hive.
*/
IJubilanceProvider getRequiresResource(IBlockState... acceptedBlockStates);
}
@@ -7,14 +7,13 @@ package forestry.api.apiculture.hives;
import java.util.Random;
import forestry.api.core.EnumHumidity;
import forestry.api.core.EnumTemperature;
import net.minecraft.block.state.IBlockState;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import net.minecraft.world.biome.Biome;
import forestry.api.core.EnumHumidity;
import forestry.api.core.EnumTemperature;
public interface IHiveDescription {
/**
@@ -5,13 +5,11 @@
******************************************************************************/
package forestry.api.apiculture.hives;
import javax.annotation.Nonnull;
import java.util.List;
import java.util.Locale;
import net.minecraft.util.IStringSerializable;
import forestry.api.apiculture.IHiveDrop;
import net.minecraft.util.IStringSerializable;
public interface IHiveRegistry {
@@ -25,25 +23,23 @@ public interface IHiveRegistry {
SNOW("forestry:snow", "forestry.speciesWintry"),
SWAMP("forestry:swamp", "forestry.speciesMarshy"),
SWARM("forestry:swarm", "forestry.speciesForest");
public static final HiveType[] VALUES = values();
@Nonnull
private final String hiveUid;
@Nonnull
private final String speciesUid;
HiveType(@Nonnull String hiveUid, @Nonnull String speciesUid) {
HiveType(String hiveUid, String speciesUid) {
this.hiveUid = hiveUid;
this.speciesUid = speciesUid;
}
@Nonnull
public String getHiveUid() {
return hiveUid;
}
@Nonnull
public String getSpeciesUid() {
return speciesUid;
}
@@ -56,7 +52,6 @@ public interface IHiveRegistry {
public int getMeta() {
return ordinal();
}
}
/**
@@ -3,7 +3,12 @@
*
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
******************************************************************************/
@ParametersAreNonnullByDefault
@MethodsReturnNonnullByDefault
@API(apiVersion = "4.1.0", owner = "ForestryAPI|apiculture", provides = "ForestryAPI|hives")
package forestry.api.apiculture.hives;
import javax.annotation.ParametersAreNonnullByDefault;
import mcp.MethodsReturnNonnullByDefault;
import net.minecraftforge.fml.common.API;
@@ -3,7 +3,12 @@
*
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
******************************************************************************/
@API(apiVersion = "4.8.0", owner = "ForestryAPI|core", provides = "ForestryAPI|apiculture")
@ParametersAreNonnullByDefault
@MethodsReturnNonnullByDefault
@API(apiVersion = "5.0.0", owner = "ForestryAPI|core", provides = "ForestryAPI|apiculture")
package forestry.api.apiculture;
import javax.annotation.ParametersAreNonnullByDefault;
import mcp.MethodsReturnNonnullByDefault;
import net.minecraftforge.fml.common.API;
@@ -0,0 +1,14 @@
package forestry.api.arboriculture;
import forestry.api.core.IArmorNaturalist;
import net.minecraftforge.common.capabilities.Capability;
import net.minecraftforge.common.capabilities.CapabilityInject;
public class ArboricultureCapabilities {
/**
* Capability for {@link IArmorNaturalist}.
* The {@link Capability#getDefaultInstance()} will always show pollination with no side effects.
*/
@CapabilityInject(IArmorNaturalist.class)
public static Capability<IArmorNaturalist> ARMOR_NATURALIST;
}
@@ -5,58 +5,55 @@
******************************************************************************/
package forestry.api.arboriculture;
import javax.annotation.Nonnull;
import java.util.Locale;
import java.util.Random;
public enum EnumForestryWoodType implements IWoodType {
LARCH(4, 20),
TEAK(4, 20),
ACACIA(4, 20),
LIME(4, 19),
CHESTNUT(4, 21),
WENGE(4, 20),
BAOBAB(4, 20),
SEQUOIA(3, 18, 4.0f),
LARCH(4),
TEAK(4),
ACACIA(4),
LIME(4),
CHESTNUT(4),
WENGE(4),
BAOBAB(4),
SEQUOIA(3, 4.0f),
KAPOK(4, 20),
EBONY(4, 20),
MAHOGANY(4, 20),
BALSA(4, 20, 1.0f),
WILLOW(4, 20),
WALNUT(4, 21),
GREENHEART(4, 20, 7.5f),
CHERRY(4, 20),
KAPOK(4),
EBONY(4),
MAHOGANY(4),
BALSA(4, 1.0f),
WILLOW(4),
WALNUT(4),
GREENHEART(4, 7.5f),
CHERRY(4),
MAHOE(4, 20),
POPLAR(4, 20),
PALM(4, 20),
PAPAYA(4, 20),
PINE(4, 20, 3.0f),
PLUM(4, 20),
MAPLE(4, 20),
CITRUS(4, 20),
MAHOE(4),
POPLAR(4),
PALM(4),
PAPAYA(4),
PINE(4, 3.0f),
PLUM(4),
MAPLE(4),
CITRUS(4),
GIGANTEUM(3, 18, 4.0f),
IPE(4, 20),
PADAUK(4, 20),
COCOBOLO(4, 20),
ZEBRAWOOD(4, 20);
GIGANTEUM(3, 4.0f),
IPE(4),
PADAUK(4),
COCOBOLO(4),
ZEBRAWOOD(4);
public static final float DEFAULT_HARDNESS = 2.0f;
public static final EnumForestryWoodType[] VALUES = values();
private final int carbonization;
private final int combustability;
private final float hardness;
EnumForestryWoodType(int carbonization, int combustability) {
this(carbonization, combustability, DEFAULT_HARDNESS);
EnumForestryWoodType(int carbonization) {
this(carbonization, DEFAULT_HARDNESS);
}
EnumForestryWoodType(int carbonization, int combustability, float hardness) {
EnumForestryWoodType(int carbonization, float hardness) {
this.carbonization = carbonization;
this.combustability = combustability;
this.hardness = hardness;
}
@@ -64,7 +61,7 @@ public enum EnumForestryWoodType implements IWoodType {
public float getHardness() {
return hardness;
}
public static EnumForestryWoodType getRandom(Random random) {
return VALUES[random.nextInt(VALUES.length)];
}
@@ -73,7 +70,7 @@ public enum EnumForestryWoodType implements IWoodType {
public String toString() {
return super.toString().toLowerCase(Locale.ENGLISH);
}
@Override
public String getName() {
return toString();
@@ -84,7 +81,6 @@ public enum EnumForestryWoodType implements IWoodType {
return ordinal();
}
@Nonnull
public static EnumForestryWoodType byMetadata(int meta) {
if (meta < 0 || meta >= VALUES.length) {
meta = 0;
@@ -92,11 +88,45 @@ public enum EnumForestryWoodType implements IWoodType {
return VALUES[meta];
}
@Override
public int getCarbonization() {
return carbonization;
}
public int getCombustability() {
return combustability;
@Override
public float getCharcoalChance(int numberOfCharcoal) {
if (numberOfCharcoal == 3) {
return 0.75F;
} else if (numberOfCharcoal == 4) {
return 0.5F;
} else if (numberOfCharcoal == 5) {
return 0.25F;
}
return 0.15F;
}
@Override
public String getPlankTexture() {
return "forestry:blocks/wood/planks." + getName();
}
@Override
public String getDoorLowerTexture() {
return "forestry:blocks/doors/" + getName() + "_lower";
}
@Override
public String getDoorUpperTexture() {
return "forestry:blocks/doors/" + getName() + "_upper";
}
@Override
public String getBarkTexture() {
return "forestry:blocks/wood/bark." + getName();
}
@Override
public String getHeartTexture() {
return "forestry:blocks/wood/heart." + getName();
}
}
@@ -5,16 +5,16 @@
******************************************************************************/
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"),
POMES("pomes", "Pomum"),
JUNGLE("jungle", "Tropicus"),
NUX("nuts", "Nux");
NUX("nuts", "Nux"),
NONE("none", "None");
private final String uid;
private final String scientific;
@@ -37,12 +37,12 @@ public enum EnumFruitFamily implements IFruitFamily {
@Override
public String getName() {
return I18n.translateToLocal("for.family." + uid);
return Translator.translateToLocal("for.family." + uid);
}
@Override
public String getDescription() {
return I18n.translateToLocal("for.family." + uid + ".description");
return Translator.translateToLocal("for.family." + uid + ".description");
}
}
@@ -11,7 +11,7 @@ public enum EnumGermlingType implements ISpeciesType {
SAPLING("sapling"), POLLEN("pollen");
public static final EnumGermlingType[] VALUES = values();
private final String name;
EnumGermlingType(String name) {
@@ -5,10 +5,10 @@
******************************************************************************/
package forestry.api.arboriculture;
public enum EnumPileType{
public enum EnumPileType {
WOOD,
DIRT,
ASH;
public static final EnumPileType[] VALUES = values();
}
@@ -8,11 +8,9 @@ package forestry.api.arboriculture;
import java.util.Locale;
import forestry.api.genetics.IAllele;
import forestry.api.genetics.IAlleleArea;
import forestry.api.genetics.IAlleleBoolean;
import forestry.api.genetics.IAlleleFloat;
import forestry.api.genetics.IAlleleInteger;
import forestry.api.genetics.IAllelePlantType;
import forestry.api.genetics.IChromosomeType;
import forestry.api.genetics.IFruitFamily;
import forestry.api.genetics.ISpeciesRoot;
@@ -25,12 +23,6 @@ public enum EnumTreeChromosome implements IChromosomeType {
* will actually yield fruit with this species. - Native {@link EnumPlantType} for this tree. Combines with the PLANT chromosome.
*/
SPECIES(IAlleleTreeSpecies.class),
/**
* {@link IGrowthProvider}, determines conditions required by the tree to grow.
* @deprecated unused
*/
@Deprecated
GROWTH(IAlleleGrowth.class),
/**
* A float modifying the height of the tree. Taken into account at worldgen.
*/
@@ -47,22 +39,10 @@ public enum EnumTreeChromosome implements IChromosomeType {
* Chance for fruit leaves and/or drops.
*/
YIELD(IAlleleFloat.class),
/**
* May add additional tolerances for {@link EnumPlantType}.
* @deprecated this is tied to species directly
*/
@Deprecated
PLANT(IAllelePlantType.class),
/**
* Determines the speed at which fruit will ripen on this tree.
*/
SAPPINESS(IAlleleFloat.class),
/**
* Territory for leaf effects.
* @deprecated unused
*/
@Deprecated
TERRITORY(IAlleleArea.class),
/**
* Leaf effect. Unused.
*/
@@ -71,27 +51,15 @@ public enum EnumTreeChromosome implements IChromosomeType {
* Amount of random ticks which need to elapse before a sapling will grow into a tree.
*/
MATURATION(IAlleleInteger.class),
GIRTH(IAlleleInteger.class),
/**
* The combustibility of the wood, when it burn to charcoal and the combustibility of the charcoal.
* @deprecated this is tied to species directly
*/
@Deprecated
COMBUSTIBILITY(IAlleleInteger.class),
/**
* The amount of charcoal that a wood pile ash drop;
* @deprecated this is tied to species directly
*/
@Deprecated
CARBONIZATION(IAlleleInteger.class),
/**
* Determines if the tree can burn.
*/
FIREPROOF(IAlleleBoolean.class),;
Class<? extends IAllele> alleleClass;
private final Class<? extends IAllele> alleleClass;
EnumTreeChromosome(Class<? extends IAllele> alleleClass) {
this.alleleClass = alleleClass;
}
@@ -1,18 +1,17 @@
package forestry.api.arboriculture;
import javax.annotation.Nonnull;
import java.util.Locale;
import java.util.Random;
import net.minecraft.block.BlockPlanks;
public enum EnumVanillaWoodType implements IWoodType {
OAK(BlockPlanks.EnumType.OAK, 5, 20),
SPRUCE(BlockPlanks.EnumType.SPRUCE, 4, 19),
BIRCH(BlockPlanks.EnumType.BIRCH, 4, 19),
JUNGLE(BlockPlanks.EnumType.JUNGLE, 5, 20),
ACACIA(BlockPlanks.EnumType.ACACIA, 4, 20),
DARK_OAK(BlockPlanks.EnumType.DARK_OAK, 5, 20);
OAK(BlockPlanks.EnumType.OAK, 5),
SPRUCE(BlockPlanks.EnumType.SPRUCE, 4),
BIRCH(BlockPlanks.EnumType.BIRCH, 4),
JUNGLE(BlockPlanks.EnumType.JUNGLE, 5),
ACACIA(BlockPlanks.EnumType.ACACIA, 4),
DARK_OAK(BlockPlanks.EnumType.DARK_OAK, 5);
public static final EnumVanillaWoodType[] VALUES = values();
@@ -22,12 +21,10 @@ public enum EnumVanillaWoodType implements IWoodType {
private final BlockPlanks.EnumType vanillaType;
private final int carbonization;
private final int combustability;
EnumVanillaWoodType(BlockPlanks.EnumType vanillaType, int carbonization, int combustability) {
EnumVanillaWoodType(BlockPlanks.EnumType vanillaType, int carbonization) {
this.vanillaType = vanillaType;
this.carbonization = carbonization;
this.combustability = combustability;
}
public BlockPlanks.EnumType getVanillaType() {
@@ -49,7 +46,6 @@ public enum EnumVanillaWoodType implements IWoodType {
return ordinal();
}
@Nonnull
public static EnumVanillaWoodType byMetadata(int meta) {
if (meta < 0 || meta >= VALUES.length) {
meta = 0;
@@ -68,7 +64,54 @@ public enum EnumVanillaWoodType implements IWoodType {
}
@Override
public int getCombustability() {
return combustability;
public float getCharcoalChance(int numberOfCharcoal) {
if (numberOfCharcoal == 3) {
return 0.75F;
} else if (numberOfCharcoal == 4) {
return 0.5F;
} else if (numberOfCharcoal == 5) {
return 0.25F;
}
return 0.15F;
}
@Override
public String getPlankTexture() {
if (this == DARK_OAK) {
return "blocks/planks_big_oak";
}
return "blocks/planks_" + getName();
}
@Override
public String getDoorLowerTexture() {
if (this == OAK) {
return "blocks/door_wood_lower";
}
return "blocks/door_wood_lower";
}
@Override
public String getDoorUpperTexture() {
if (this == OAK) {
return "blocks/door_wood_upper";
}
return "blocks/door_" + getName() + "_upper";
}
@Override
public String getBarkTexture() {
if (this == DARK_OAK) {
return "blocks/log_big_oak";
}
return "blocks/log_" + getName();
}
@Override
public String getHeartTexture() {
if (this == DARK_OAK) {
return "blocks/log_big_oak_top";
}
return "blocks/log_" + getName() + "_top";
}
}
@@ -5,7 +5,6 @@
******************************************************************************/
package forestry.api.arboriculture;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import forestry.api.genetics.IAlleleProperty;
@@ -15,13 +14,11 @@ import forestry.api.genetics.IAlleleProperty;
*/
public interface IAlleleFruit extends IAlleleProperty<IAlleleFruit> {
@Nonnull
IFruitProvider getProvider();
@Nullable
String getModelName();
@Nonnull
String getModID();
}
@@ -5,11 +5,10 @@
******************************************************************************/
package forestry.api.arboriculture;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import forestry.api.genetics.IAlleleEffect;
import forestry.api.genetics.IEffectData;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
/**
* Simple allele encapsulating a leaf effect. (Not implemented)
@@ -5,65 +5,64 @@
******************************************************************************/
package forestry.api.arboriculture;
import javax.annotation.Nonnull;
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> {
@Nonnull
@Override
ITreeRoot getRoot();
/**
* @return Native plant type of this species.
*/
@Nonnull
EnumPlantType getPlantType();
/**
* @return List of all {@link IFruitFamily}s which can grow on leaves generated by this species.
*/
@Nonnull
Collection<IFruitFamily> getSuitableFruit();
/**
* @return Tree generator for this species.
*/
@Nonnull
ITreeGenerator getGenerator();
/**
* @return The modid from the mod of the species.
*/
@Nonnull
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.
*/
float getRarity();
IWoodProvider getWoodProvider();
ILeafProvider getLeafProvider();
IGrowthProvider getGrowthProvider();
/* MODELS AND OVERRIDES */
@SideOnly(Side.CLIENT)
@Nonnull
ILeafSpriteProvider getLeafSpriteProvider();
@SideOnly(Side.CLIENT)
int getGermlingColour(EnumGermlingType type, int renderPass);
@SideOnly(Side.CLIENT)
@Nonnull
ModelResourceLocation getGermlingModel(EnumGermlingType type);
@SideOnly(Side.CLIENT)
void registerModels(Item item, IModelManager manager, EnumGermlingType type);
@@ -5,20 +5,33 @@
******************************************************************************/
package forestry.api.arboriculture;
import net.minecraftforge.common.EnumPlantType;
import forestry.api.genetics.IAlleleSpeciesBuilder;
import forestry.api.genetics.IFruitFamily;
import net.minecraftforge.common.EnumPlantType;
public interface IAlleleTreeSpeciesBuilder extends IAlleleSpeciesBuilder {
@Override
IAlleleTreeSpecies build();
/** Add a fruit family for this tree. Trees can have multiple fruit families. */
/**
* Add a fruit family for this tree. Trees can have multiple fruit families.
*/
IAlleleTreeSpeciesBuilder addFruitFamily(IFruitFamily family);
/** Set the minecraft plant type for this tree. Default is Plains. */
/**
* Set the minecraft plant type for this tree. Default is Plains.
*/
IAlleleTreeSpeciesBuilder setPlantType(EnumPlantType type);
/**
* Set rarity of the species, will affect spawn rate in the world. Must be a float between 0 and 1. If it's 0, it will not spawn.
*/
IAlleleTreeSpeciesBuilder setRarity(float rarity);
/**
* Set the growth provider.
*/
IAlleleTreeSpeciesBuilder setGrowthProvider(IGrowthProvider growthProvider);
}
@@ -5,13 +5,16 @@
******************************************************************************/
package forestry.api.arboriculture;
import forestry.api.genetics.IAllele;
import net.minecraft.block.state.IBlockState;
import net.minecraft.item.ItemStack;
import net.minecraft.util.NonNullList;
/**
* Simple allele encapsulating an {@link IGrowthProvider}.
*/
public interface IAlleleGrowth extends IAllele {
IGrowthProvider getProvider();
public interface ICharcoalPileWall {
int getCharcoalAmount();
boolean matches(IBlockState state);
NonNullList<ItemStack> getDisplyItems();
}
@@ -5,30 +5,28 @@
******************************************************************************/
package forestry.api.arboriculture;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import java.util.List;
import java.util.Map;
import java.util.Random;
import forestry.api.genetics.IFruitFamily;
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.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import forestry.api.genetics.IFruitFamily;
public interface IFruitProvider {
IFruitFamily getFamily();
int getColour(ITreeGenome genome, IBlockAccess world, BlockPos pos, int ripeningTime);
/** return the color to use for decorative leaves. Usually the ripe color. */
/**
* return the color to use for decorative leaves. Usually the ripe color.
*/
int getDecorativeColor();
boolean isFruitLeaf(ITreeGenome genome, World world, BlockPos pos);
@@ -36,15 +34,12 @@ public interface IFruitProvider {
int getRipeningPeriod();
// / Products, Chance
@Nonnull
Map<ItemStack, Float> getProducts();
// / Specialty, Chance
@Nonnull
Map<ItemStack, Float> getSpecialty();
@Nonnull
List<ItemStack> getFruits(ITreeGenome genome, World world, BlockPos pos, int ripeningTime);
NonNullList<ItemStack> getFruits(ITreeGenome genome, World world, BlockPos pos, int ripeningTime);
/**
* @return Short, human-readable identifier used in the treealyzer.
@@ -54,7 +49,6 @@ public interface IFruitProvider {
@Nullable
String getModelName();
@Nonnull
String getModID();
/* TEXTURE OVERLAY */
@@ -66,7 +60,9 @@ public interface IFruitProvider {
@Nullable
ResourceLocation getSprite(ITreeGenome genome, IBlockAccess world, BlockPos pos, int ripeningTime);
/** return the ResourceLocation to display on decorative leaves */
/**
* return the ResourceLocation to display on decorative leaves
*/
@Nullable
ResourceLocation getDecorativeSprite();
@@ -5,16 +5,12 @@
******************************************************************************/
package forestry.api.arboriculture;
import javax.annotation.Nonnull;
import forestry.api.core.IModelManager;
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;
import forestry.api.core.IModelManager;
/**
* Provides icons for saplings, pollen, etc.
* You must implement this yourself to use TreeManager.treeFactory.createSpecies()
@@ -24,6 +20,15 @@ public interface IGermlingModelProvider {
@SideOnly(Side.CLIENT)
void registerModels(Item item, IModelManager manager, EnumGermlingType type);
@Nonnull
@SideOnly(Side.CLIENT)
ModelResourceLocation getModel(EnumGermlingType type);
/**
* Provides color for sapling. See {@link ILeafSpriteProvider} for pollen color.
*
* @param type the germling type to render
* @param renderPass renderPass of rendering
* @return sapling color for renderPass
*/
int getSpriteColor(EnumGermlingType type, int renderPass);
}
@@ -1,42 +1,18 @@
/*******************************************************************************
* Copyright 2011-2014 SirSengir
*
*
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
******************************************************************************/
package forestry.api.arboriculture;
import javax.annotation.Nullable;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import net.minecraft.world.biome.Biome;
/**
* @deprecated this is being removed to simplify trees
*/
@Deprecated
public interface IGrowthProvider {
/**
* Check to see whether a sapling at the given location with the given genome can grow into a tree.
*
* @param genome Genome of the tree this is called for.
* @param world Minecraft world the tree will inhabit.
* @param pos Coordinates to attempt growth at.
* @param expectedGirth Trunk size of the tree to generate.
* @param expectedHeight Height of the tree to generate.
* @return position that the tree can grow, null otherwise.
*/
@Nullable
BlockPos canGrow(ITreeGenome genome, World world, BlockPos pos, int expectedGirth, int expectedHeight);
/**
* @return Short, human-readable identifier used in the treealyzer.
*/
String getDescription();
/**
* @return Detailed description of growth behaviour used in the treealyzer.
*/
String[] getInfo();
boolean canSpawn(ITree tree, World world, BlockPos pos);
boolean isBiomeValid(ITree tree, Biome biome);
}
@@ -5,6 +5,12 @@
******************************************************************************/
package forestry.api.arboriculture;
public enum EnumGrowthConditions {
HOSTILE, PALTRY, NORMAL, GOOD, EXCELLENT
}
import net.minecraft.item.ItemStack;
public interface ILeafProvider {
void init(IAlleleTreeSpecies treeSpecies);
ItemStack getDecorativeLeaves();
}
@@ -5,19 +5,16 @@
******************************************************************************/
package forestry.api.arboriculture;
import javax.annotation.Nonnull;
import net.minecraft.util.ResourceLocation;
/**
* Provides icons for leaves. Used by TreeManager.treeFactory.createSpecies()
* Get a default Forestry implementation from TreeManager.treeFactory.getLeafIconProvider() or implement your own.
*
* <p>
* If you implement your own, be sure to register the icons.
* Icon registration is not done here because these icons are heavily reused.
*/
public interface ILeafSpriteProvider {
@Nonnull
ResourceLocation getSprite(boolean pollinated, boolean fancy);
int getColor(boolean pollinated);
@@ -16,7 +16,7 @@ public interface IToolGrafter {
*
* @param stack ItemStack containing the grafter.
* @param world Minecraft world the player and the target block inhabit.
* @param pos Coordinate of the broken leaf block.
* @param pos Coordinate of the broken leaf block.
* @return Float representing the factor the usual drop chance is to be multiplied by.
*/
float getSaplingModifier(ItemStack stack, World world, EntityPlayer player, BlockPos pos);
@@ -5,7 +5,6 @@
******************************************************************************/
package forestry.api.arboriculture;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import java.util.List;
import java.util.Map;
@@ -15,10 +14,13 @@ import forestry.api.genetics.IEffectData;
import forestry.api.genetics.IIndividual;
import forestry.api.world.ITreeGenData;
import net.minecraft.item.ItemStack;
import net.minecraft.util.NonNullList;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraft.world.gen.feature.WorldGenerator;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
public interface ITree extends IIndividual, ITreeGenData {
@@ -26,29 +28,27 @@ public interface ITree extends IIndividual, ITreeGenData {
IEffectData[] doEffect(IEffectData[] storedData, World world, BlockPos pos);
@SideOnly(Side.CLIENT)
IEffectData[] doFX(IEffectData[] storedData, World world, BlockPos pos);
@Nonnull
@Override
ITreeGenome getGenome();
@Nullable
ITreeGenome getMate();
/**
* @since Forestry 4.0
*/
ITree[] getSaplings(World world, GameProfile playerProfile, BlockPos pos, float modifier);
List<ITree> getSaplings(World world, @Nullable GameProfile playerProfile, BlockPos pos, float modifier);
// Products, Chance
@Nonnull
Map<ItemStack, Float> getProducts();
// Specialties, Chance
@Nonnull
Map<ItemStack, Float> getSpecialties();
@Nonnull
List<ItemStack> produceStacks(World world, BlockPos pos, int ripeningTime);
NonNullList<ItemStack> produceStacks(World world, BlockPos pos, int ripeningTime);
/**
* @return Boolean indicating whether a sapling can stay planted at the given position.
@@ -72,7 +72,7 @@ public interface ITree extends IIndividual, ITreeGenData {
* @return Integer denoting how resilient leaf blocks are against adverse influences (i.e. caterpillars).
*/
int getResilience();
/**
* @return Integer denoting the size of the tree trunk.
*/
@@ -5,12 +5,32 @@
******************************************************************************/
package forestry.api.arboriculture;
import javax.annotation.Nonnull;
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()
@@ -30,8 +50,10 @@ public interface ITreeFactory {
* @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, @Nonnull IWoodProvider woodProvider, ITreeGenerator generator);
/** Get one of the built-in Forestry leaf types. Default type is deciduous. */
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);
/**
* Get one of the built-in Forestry leaf types. Default type is deciduous.
*/
ILeafSpriteProvider getLeafIconProvider(EnumLeafType enumLeafType, Color color, Color colorPollinated);
}
@@ -5,15 +5,15 @@
******************************************************************************/
package forestry.api.arboriculture;
import javax.annotation.Nullable;
import com.mojang.authlib.GameProfile;
import forestry.api.world.ITreeGenData;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import net.minecraft.world.gen.feature.WorldGenerator;
import com.mojang.authlib.GameProfile;
import forestry.api.world.ITreeGenData;
/**
* Implements the tree generation for a tree species.
*/
@@ -22,5 +22,5 @@ public interface ITreeGenerator {
boolean setLogBlock(ITreeGenome genome, World world, BlockPos pos, EnumFacing facing);
boolean setLeaves(ITreeGenome genome, World world, GameProfile owner, BlockPos pos);
boolean setLeaves(ITreeGenome genome, World world, @Nullable GameProfile owner, BlockPos pos);
}
@@ -5,9 +5,8 @@
******************************************************************************/
package forestry.api.arboriculture;
import javax.annotation.Nonnull;
import forestry.api.genetics.IGenome;
import net.minecraft.item.ItemStack;
public interface ITreeGenome extends IGenome {
@@ -17,7 +16,6 @@ public interface ITreeGenome extends IGenome {
@Override
IAlleleTreeSpecies getSecondary();
@Nonnull
IFruitProvider getFruitProvider();
float getHeight();
@@ -26,7 +24,7 @@ public interface ITreeGenome extends IGenome {
/**
* @return Determines either a) how many fruit leaves there are or b) the chance for any fruit leave to drop a sapling. Exact usage determined by the
* IFruitProvider
* IFruitProvider
*/
float getYield();
@@ -40,4 +38,15 @@ public interface ITreeGenome extends IGenome {
int getGirth();
IAlleleLeafEffect getEffect();
/**
*
* @return A ItemStack that is used in getPickBlock of the leave block.
*/
ItemStack getDecorativeLeaves();
/**
* @return true if this genome matches one of the default template genomes
*/
boolean matchesTemplateGenome();
}
@@ -8,36 +8,26 @@ package forestry.api.arboriculture;
public interface ITreeModifier {
/**
*
* @param genome
* @return Float used to modify the height.
*/
float getHeightModifier(ITreeGenome genome, float currentModifier);
/**
*
* @param genome
* @return Float used to modify the yield.
*/
float getYieldModifier(ITreeGenome genome, float currentModifier);
/**
*
* @param genome
* @return Float used to modify the sappiness.
*/
float getSappinessModifier(ITreeGenome genome, float currentModifier);
/**
*
* @param genome
* @return Float used to modify the maturation.
*/
float getMaturationModifier(ITreeGenome genome, float currentModifier);
/**
* @param genome0
* @param genome1
* @return Float used to modify the base mutation chance.
*/
float getMutationModifier(ITreeGenome genome0, ITreeGenome genome1, float currentModifier);
@@ -5,14 +5,13 @@
******************************************************************************/
package forestry.api.arboriculture;
import forestry.api.genetics.IMutation;
import forestry.api.genetics.ISpeciesRoot;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import forestry.api.genetics.IMutation;
import forestry.api.genetics.ISpeciesRoot;
public interface ITreeMutation extends IMutation {
/**
* @return {@link ISpeciesRoot} this mutation is associated with.
*/
@@ -15,8 +15,8 @@ public interface ITreeMutationFactory {
*
* @param parentTree0 A parent tree for this mutation
* @param parentTree1 A parent tree for this mutation
* @param result The resulting alleles for this mutation
* @param chance The chance that breeding the two parent trees will result in this mutation
* @param result The resulting alleles for this mutation
* @param chance The chance that breeding the two parent trees will result in this mutation
* @return a new tree mutation.
*/
ITreeMutationBuilder createMutation(IAlleleTreeSpecies parentTree0, IAlleleTreeSpecies parentTree1, IAllele[] result, int chance);
@@ -6,25 +6,25 @@
package forestry.api.arboriculture;
import javax.annotation.Nullable;
import java.util.ArrayList;
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.ISpeciesRoot;
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;
public interface ITreeRoot extends ISpeciesRoot {
public interface ITreeRoot extends ISpeciesRootPollinatable {
@Override
boolean isMember(ItemStack itemstack);
@Override
@Nullable
ITree getMember(ItemStack itemstack);
@Override
@@ -43,16 +43,16 @@ public interface ITreeRoot extends ISpeciesRoot {
ITreeGenome templateAsGenome(IAllele[] templateActive, IAllele[] templateInactive);
/**
* @param world
* @return {@link IArboristTracker} associated with the passed world.
*/
@Override
IArboristTracker getBreedingTracker(World world, GameProfile player);
IArboristTracker getBreedingTracker(World world, @Nullable GameProfile player);
/* TREE SPECIFIC */
/**
* Register a leaf tick handler.
*
* @param handler the {@link ILeafTickHandler} to register.
*/
void registerLeafTickHandler(ILeafTickHandler handler);
@@ -66,6 +66,7 @@ public interface ITreeRoot extends ISpeciesRoot {
@Override
EnumGermlingType getType(ItemStack stack);
@Nullable
ITree getTree(World world, BlockPos pos);
ITree getTree(World world, ITreeGenome genome);
@@ -78,22 +79,24 @@ public interface ITreeRoot extends ISpeciesRoot {
@Override
IChromosome[] templateAsChromosomes(IAllele[] templateActive, IAllele[] templateInactive);
boolean setFruitBlock(World world, IAlleleFruit allele, float sappiness, BlockPos pos);
boolean setFruitBlock(World world, ITreeGenome genome, IAlleleFruit allele, float sappiness, BlockPos pos);
/* GAME MODE */
List<ITreekeepingMode> getTreekeepingModes();
ITreekeepingMode getTreekeepingMode(World world);
@Nullable
ITreekeepingMode getTreekeepingMode(String name);
void registerTreekeepingMode(ITreekeepingMode mode);
void setTreekeepingMode(World world, String name);
void setTreekeepingMode(World world, ITreekeepingMode mode);
/* TEMPLATES */
@Override
ArrayList<ITree> getIndividualTemplates();
List<ITree> getIndividualTemplates();
/* MUTATIONS */
@Override
@@ -5,7 +5,7 @@
******************************************************************************/
package forestry.api.arboriculture;
import java.util.ArrayList;
import java.util.List;
public interface ITreekeepingMode extends ITreeModifier {
@@ -17,6 +17,6 @@ public interface ITreekeepingMode extends ITreeModifier {
/**
* @return Localized list of strings outlining the behaviour of this treekeeping mode.
*/
ArrayList<String> getDescription();
List<String> getDescription();
}
@@ -5,6 +5,8 @@
******************************************************************************/
package forestry.api.arboriculture;
import java.util.List;
import net.minecraft.block.state.IBlockState;
import net.minecraft.item.ItemStack;
@@ -23,4 +25,7 @@ public interface IWoodAccess {
IBlockState getBlock(IWoodType woodType, WoodBlockKind kind, boolean fireproof);
List<IWoodType> getRegisteredWoodTypes();
void register(IWoodType woodType, WoodBlockKind woodBlockKind, boolean fireproof, IBlockState blockState, ItemStack itemStack);
}
@@ -0,0 +1,19 @@
/*******************************************************************************
* 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.client.renderer.ItemMeshDefinition;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
@SideOnly(Side.CLIENT)
public interface IWoodItemMeshDefinition extends ItemMeshDefinition {
ResourceLocation getDefaultModelLocation(ItemStack stack);
}
@@ -5,8 +5,6 @@
******************************************************************************/
package forestry.api.arboriculture;
import javax.annotation.Nonnull;
import forestry.api.core.ITextureManager;
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import net.minecraft.item.Item;
@@ -19,25 +17,23 @@ public interface IWoodProvider {
void registerSprites(Item item, ITextureManager manager);
/**
*
* @return The texture sprite of the wood.
*/
@SideOnly(Side.CLIENT)
@Nonnull
TextureAtlasSprite getSprite(boolean isTop);
/**
* @return A stack of wood from the tree to craft wood pile's or other things.
*/
ItemStack getWoodStack();
/**
* @return how long this wood's charcoal burns / 1000
*/
int getCombustibility();
/**
* The amount of charcoal dropped from a charcoal pile of this wood.
*/
int getCarbonization();
/**
* The chance that a pile has to drop a extra charcoal
*/
float getCharcoalChance(int numberOfCharcoal);
}
@@ -0,0 +1,21 @@
/*******************************************************************************
* 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.block.state.IBlockState;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.client.renderer.block.statemap.IStateMapper;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
@SideOnly(Side.CLIENT)
public interface IWoodStateMapper extends IStateMapper {
ModelResourceLocation getModelLocation(IBlockState state);
ModelResourceLocation getDefaultModelResourceLocation(IBlockState state);
}
@@ -13,5 +13,15 @@ public interface IWoodType extends IStringSerializable {
int getCarbonization();
int getCombustability();
float getCharcoalChance(int numberOfCharcoal);
String getPlankTexture();
String getDoorLowerTexture();
String getDoorUpperTexture();
String getBarkTexture();
String getHeartTexture();
}
@@ -5,6 +5,9 @@
******************************************************************************/
package forestry.api.arboriculture;
import java.util.ArrayList;
import java.util.List;
public class TreeManager {
/**
@@ -26,4 +29,6 @@ public class TreeManager {
* Used to create new tree mutations.
*/
public static ITreeMutationFactory treeMutationFactory;
public static List<ICharcoalPileWall> pileWalls = new ArrayList<>();
}
+51 -1
View File
@@ -1,12 +1,62 @@
package forestry.api.arboriculture;
import com.google.common.collect.ImmutableMap;
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;
import net.minecraftforge.client.model.IModel;
public enum WoodBlockKind {
LOG, PLANKS, SLAB, FENCE, FENCE_GATE, STAIRS, DOOR;
public String getName(){
return super.toString().toLowerCase(Locale.ENGLISH);
}
@Override
public String toString() {
return super.toString().toLowerCase(Locale.ENGLISH);
return getName();
}
public IModel retextureModel(IModel model, IWoodType type, ImmutableMap<String, String> customTextures) {
Map<String, String> textures = new HashMap<>();
switch (this) {
case SLAB:
case STAIRS:
String textureLocation = type.getPlankTexture();
textures.put("particle", textureLocation);
textures.put("side", textureLocation);
textures.put("top", textureLocation);
textures.put("bottom", textureLocation);
textures.put("all", textureLocation);
break;
case PLANKS:
textures.put("particle", type.getPlankTexture());
textures.put("all", type.getPlankTexture());
break;
case FENCE_GATE:
case FENCE:
textures.put("particle", type.getPlankTexture());
textures.put("side", type.getPlankTexture());
textures.put("texture", type.getPlankTexture());
break;
case DOOR:
textures.put("particle", type.getDoorLowerTexture());
textures.put("bottom", type.getDoorLowerTexture());
textures.put("top", type.getDoorUpperTexture());
break;
case LOG:
textures.put("particle", type.getBarkTexture());
textures.put("side", type.getBarkTexture());
textures.put("all", type.getBarkTexture());
textures.put("end", type.getHeartTexture());
break;
default:
break;
}
textures.putAll(customTextures);
return model.retexture(new ImmutableMap.Builder<String, String>().putAll(textures).build());
}
}
@@ -3,7 +3,12 @@
*
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
******************************************************************************/
@ParametersAreNonnullByDefault
@MethodsReturnNonnullByDefault
@API(apiVersion = "4.2.1", owner = "ForestryAPI|core", provides = "ForestryAPI|arboriculture")
package forestry.api.arboriculture;
import javax.annotation.ParametersAreNonnullByDefault;
import mcp.MethodsReturnNonnullByDefault;
import net.minecraftforge.fml.common.API;
@@ -10,10 +10,6 @@ import java.util.List;
public interface ICircuit {
String getUID();
boolean requiresDiscovery();
int getLimit();
String getUnlocalizedName();
boolean isCircuitable(Object tile);
@@ -5,17 +5,20 @@
******************************************************************************/
package forestry.api.circuits;
import javax.annotation.Nonnull;
import java.util.List;
import forestry.api.core.INbtWritable;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
public interface ICircuitBoard extends INbtWritable {
@SideOnly(Side.CLIENT)
int getPrimaryColor();
@SideOnly(Side.CLIENT)
int getSecondaryColor();
@SideOnly(Side.CLIENT)
void addTooltip(List<String> list);
void onInsertion(Object tile);
@@ -26,13 +29,11 @@ public interface ICircuitBoard extends INbtWritable {
void onTick(Object tile);
@Nonnull
ICircuit[] getCircuits();
/**
* Specifies where a circuit can be used.
*/
@Nonnull
ICircuitSocketType getSocketType();
}
@@ -5,26 +5,26 @@
******************************************************************************/
package forestry.api.circuits;
import javax.annotation.Nonnull;
public interface ICircuitLayout {
/** unique ID for this circuit layout */
@Nonnull
/**
* unique ID for this circuit layout
*/
String getUID();
/** localized name for this circuit layout */
@Nonnull
/**
* localized name for this circuit layout
*/
String getName();
/** localized string for how this circuit layout is used */
@Nonnull
/**
* localized string for how this circuit layout is used
*/
String getUsage();
/**
* Specifies where a circuit layout is used.
*/
@Nonnull
ICircuitSocketType getSocketType();
}
@@ -5,6 +5,7 @@
******************************************************************************/
package forestry.api.circuits;
import javax.annotation.Nullable;
import java.util.Map;
import net.minecraft.item.ItemStack;
@@ -17,6 +18,7 @@ public interface ICircuitRegistry {
void registerCircuit(ICircuit circuit);
@Nullable
ICircuit getCircuit(String uid);
ICircuitLibrary getCircuitLibrary(World world, String playerName);
@@ -26,10 +28,12 @@ public interface ICircuitRegistry {
void registerLayout(ICircuitLayout layout);
@Nullable
ICircuitLayout getLayout(String uid);
ICircuitLayout getDefaultLayout();
@Nullable
ICircuitBoard getCircuitBoard(ItemStack itemstack);
boolean isChipset(ItemStack itemstack);
@@ -10,9 +10,13 @@ package forestry.api.circuits;
* See CircuitSocketType for Forestry's uses.
*/
public interface ICircuitSocketType {
/** unique identifier for this socket type */
/**
* unique identifier for this socket type
*/
String getUid();
/** comparison using uid */
/**
* comparison using uid
*/
boolean equals(ICircuitSocketType socketType);
}
@@ -3,7 +3,12 @@
*
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
******************************************************************************/
@ParametersAreNonnullByDefault
@MethodsReturnNonnullByDefault
@API(apiVersion = "3.1.0", owner = "ForestryAPI|core", provides = "ForestryAPI|circuits")
package forestry.api.circuits;
import javax.annotation.ParametersAreNonnullByDefault;
import mcp.MethodsReturnNonnullByDefault;
import net.minecraftforge.fml.common.API;
@@ -0,0 +1,7 @@
package forestry.api.climate;
public enum EnumClimatiserModes {
POSITIVE, NEGATIVE, BOTH
}
@@ -0,0 +1,7 @@
package forestry.api.climate;
public enum EnumClimatiserTypes {
TEMPERATURE, HUMIDITY, BOTH
}
@@ -0,0 +1,22 @@
/*******************************************************************************
* 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);
}
@@ -3,10 +3,14 @@
*
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
******************************************************************************/
package forestry.api.greenhouse;
package forestry.api.climate;
public enum EnumGreenhouseEventType {
import forestry.api.core.ILocatable;
CAMOUFLAGE
public interface IClimateControlProvider extends ILocatable {
IClimateInfo getControlClimate();
void setControlClimate(IClimateInfo climateControl);
}
@@ -1,14 +1,9 @@
/*******************************************************************************
* 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;
package forestry.api.climate;
public interface IClimateControlled {
/**
Loaded 100 of 3196 files, more files were not shown because too many files have changed in this diff. Show more