ForestryMC
33 merged pull requests.
New Features
- #122 Added default method IArmorApiarist#getProtectionCount returning 1. ArmorApiaristHelper#wearsItems now sums it per armor slot and caps the result at 4. Also rewrote isArmorApiarist with a pattern-matching instanceof. - @FourIsTheNumber
- Added: protection count API on apiarist armor
- #120 Registered pollenFertile item under 'itemPollenFertile' OreDict entry with wildcard to cover all NBT variants. - @Eldrinn-Elantey
- Added: OreDictionary entry for fertile tree pollen
- #112 Added IFarmFertilizerRegistry, FarmFertilizerRegistry and MultiblockManager.farmFertilizerRegistry. InventoryFarm#acceptsAsFertilizer now asks the registry. PluginFarming registers the fertilizer compound with a wildcard meta, and PluginIC2 registers IC2 fertilizer when the farming module is enabled. - @C0bra5
- Added: multi farm fertilizer registry API
- #106 Added .title suffix support for machine GUI titles in localization; enabled color override system in FontColour and StringUtil; moved override file location for better organization. - @Ranzuu
- Added: GUI title customization via localization, color override for resource packs
- #105 Refactored backpack opening logic to support opening items from anywhere in the inventory. Added ItemLocation tracking and modified GuiHandler, ContainerItemInventory, and all item analyzers/imprinters to work with items not in hand. - @Erixonich
- Added: ItemLocation class, ContainerItemInventory support, NoHotbarNeeded mod support
- #104 Added PluginEtFuturumRequiem compatibility layer to register Et Futurum flowers with Forestry's flower type system (vanilla, nether, end). - @CN132DAS
- Added: Et Futurum Requiem flower support for bees
- Fixed: bees not recognizing EFR flowers
- Closes GTNH#22435
- #102 Modified AlvearyController and InventoryBeeHousing to drop items when the multiblock is broken. - @DarkShadow44
- Added: item dropping on Alveary destruction
- Fixed: item loss on Alveary break
- #101 Added durability bar rendering for ItemBackpack based on inventory fullness percentage. Added Config.java option to toggle the feature on/off. Added language string for the option. - @querns
- Added: backpack fullness durability bar display
Changes
- #125 Removed getProtectionCount from IArmorApiarist and added IArmorApiaristMulti extending it, with a default returning 1. ArmorApiaristHelper#wearsItems checks instanceof IArmorApiaristMulti and otherwise counts 1. - @FourIsTheNumber
- Added: IArmorApiaristMulti interface
- Removed: getProtectionCount on IArmorApiarist
- Fixed: asm transformers broken by the change to IArmorApiarist
- #115 Added missing items to GuiWorktable color properties and registered them in colour.properties configuration file. - @Ranzuu
- Added: color localization for worktable items
Bug Fixes
- #134 AlvearyController overrides detachBlock and only dumps the inventory when chunkUnloading is false. The dump was removed from onBlockRemoved. - @Worive
- Fixed: alveary bee duplication on chunk unload
- Closes Dupes-Exploits-GTNH#346
- #129 BlockSlab.getIcon returns the plank icon for the wood type at the given meta instead of always EnumWoodType.LARCH. - @Cardinalstars
- Fixed: Double slabs all displayed as larch in NEI
- #128 ja_JP.lang entries for tile.for.planks, fences, stairs, apiculture.0/.1/.2, arboriculture.0 and lepidopterology.0 are converted to the .name key format used by en_US.lang, with translations from GTNH-Translations. - @sivaDog
- Fixed: Japanese Forestry block names shown as unlocalized keys
- Closes GTNH#26145
- #127 BlockSlab.createStackedBlock returns two of the block's own item instead of Blocks.wooden_slab, and a new onBlockPlacedBy sets the TileWood wood type from the stack damage. Needed for MatterManipulator PR 74. - @vermz99
- Fixed: Forestry double slabs turning into vanilla wooden slabs when stacked
- #124 CustomOverlayHandler overrides requireShiftForOverlayRecipe to return false, working around an NEI change from the 2.9 dev cycle. The NEI dev dependency goes to 2.8.107-GTNH and mavenLocal() is added to repositories.gradle. - @YannickMG
- Fixed: Worktable NEI fill needing shift held
- #123 Adds IGridRecipeHandler, implemented by NEIHandlerCarpenter and NEIHandlerFabricator, and generalises CustomOverlayHandler, SetRecipeCommandHandler (now takes an array of container classes) and the packet (PacketWorktableNEISelect renamed to PacketNEISelect, WORKTABLE_NEI_SELECT to NEI_SELECT). The handler is registered for GuiCarpenter and GuiFabricator, and the NEI dev dependency goes to 2.8.104-GTNH. - @tiffit
- Added: NEI overlay for the Carpenter, NEI overlay for the Fabricator
- Fixed: Game freeze when using the NEI overlay for the Diamond Compartment recipe in the Carpenter
- Closes GTNH#25009
- #121 GuiHandler.openGui calls for backpacks now pass the hotbar slot, and ItemInventory.isParentItemEquipped checks the stack in that slot for PLAYER_INVENTORY locations instead of returning true. ItemInventoryBackpackPaged.flipPage passes the slot index when reopening the naturalist backpack page. - @Algent
- Fixed: Duplication exploit with Forestry backpacks
- Closes Dupes-Exploits-GTNH#96
- #119 RenderButterflyItem.initButterfly drops the null-check fallback and returns entity.getButterfly() instead of the local butterfly, so the entity's own handling of a null individual applies. - @Alexdoru
- Removed: Default butterfly fallback in item rendering
- Fixed: Wrong butterfly shown when rendering butterfly items
- #118 RenderButterflyItem.initButterfly falls back to a default-template individual from butterflyRoot when getMember returns null. - @Yoshy2002
- Fixed: Crash when opening the Forestry creative tab
- Closes GTNH#24505
- #117 In Bee.produceStacks, the secondary product chance is divided by 2f instead of the integer 2. - @Faltsolph
- Fixed: Apiary secondary product rounding error
- Closes GTNH#24462
- #116 Updated RenderAnalyzer, RenderMill, EntityButterfly, and RenderButterflyItem to properly release WorldClient references after rendering. - @Alexdoru
- Fixed: WorldClient memory leaks in multiple renderers
- #114 TileWood.getPickBlock returns null when the created ItemStack has no item. The slab check was also converted to pattern matching instanceof. - @Alexdoru
- Fixed: Crash in TileWood pick block with a null block
- Closes GTNH#24296
- #113 Refactored RenderButterflyItem to properly manage WorldClient lifecycle references, preventing retained memory in the renderer. - @Alexdoru
- Fixed: WorldClient memory leak in butterfly rendering
- #109 AlvearyController.applyChange, getExactTemperature and getExactHumidity round to two decimals to remove floating point error. - @TweksTY
- Fixed: Alveary climatiser floating point error in temperature and humidity
- #103 BlockUtil now skips the GregTech check when gregapi is loaded, and null-checks the reflected BartWorks and GregTech classes and blocks before calling isInstance in getItemStackFromBlockBelow. - @Teteros
- Fixed: NullPointerException in BlockUtil.getItemStackFromBlockBelow with GregTech 6
Performance
- #133 Genome.getChromosomes fetches speciesRoot.getDefaultTemplate() once and reuses it in the invalid-allele repair loop instead of calling it per chromosome. - @boubou19
- Fixed: excess memory allocation when parsing genome NBT
- #131 BlockSlab.getIcon uses EnumWoodType.VALUES instead of calling values() on every call. - @boubou19
- #130 LetterProperties caches State.values() and Size.values() in static VALUES arrays and uses them in getSubItems, getState and getSize. - @boubou19
- #111 Deleted LeafDecayHelper and made BlockForestryLeaves#updateTick call BFSLeafDecay.handleDecayChecked with radius 4 when the decay flag is set and the player-placed flag is not. Added GTNHLib 0.9.41 as a dependency and as required-after in the Forestry mod annotation. - @Alexdoru
- Added: GTNHLib 0.9.41 dependency
- Removed: Forestry LeafDecayHelper
- #110 Added World#checkChunksExist guards to updateTick in BlockFruitPod, BlockSoil (humus and bog earth), BlockMushroom and BlockForestryFluid (lava fire spread, 4 block range). Also renamed parameters and inlined helper methods. - @Alexdoru
- Fixed: Forestry blocks loading chunks while ticking
- #107 Added cached public static VALUES arrays to the chromosome, humidity, temperature and FarmDirection enums (EnumBeeType already had one) and switched callers from values() to them. Added fromOrdinal to EnumBeeType and FarmDirection, made some enum fields final or private, and rewrote FarmDirection#getFarmDirection as a switch expression. - @Alexdoru
- Added: cached VALUES arrays on Forestry enums, fromOrdinal helpers
Documentation
- #126 Deleted CONTRIBUTING.md. - @UltraProdigy
- Removed: CONTRIBUTING.md
Chores
- #135 Added getBlockRequired() (returns a copy of the ItemStack) to MutationConditionRequiresResource and getOreDictId() to MutationConditionRequiresResourceOreDict. - @ABKQPO
- Added: getters for mutation resource condition block and ore dict id
Contributors
Everyone who authored, reviewed or co-authored a change on this page, with how many of them:
@Alexdoru (8), @boubou19 (8), @Dream-Master (7), @UltraProdigy (6), @Algent (3), @DarkShadow44 (3), @koolkrafter5 (3), @Luca-Guettinger (3), @FourIsTheNumber (2), @Ranzuu (2), @tiffit (2), @Worive (2), @ABKQPO (1), @ah-OOG-ah (1), @AshVz (1), @C0bra5 (1), @Caedis (1), @Cardinalstars (1), @CN132DAS (1), @cursoragent (1), @Eldrinn-Elantey (1), @Erixonich (1), @Faltsolph (1), @Kogepan229 (1), @MalTeeez (1), @Miklebe (1), @Nana-Sakura (1), @Nikolay-Sitnikov (1), @querns (1), @RecursivePineapple (1), @sisyphussy (1), @sivaDog (1), @Teteros (1), @TweksTY (1), @vermz99 (1), @YannickMG (1), @Yoshy2002 (1)