SoL:Classic_v2.15+1.21.1 (Fabric)
Curse Maven Snippet
What's new
Added
- Ported the
basketBlacklistsetting from the 1.20.1 branch. Food items listed here cannot be put into the Basket or the Wicker Basket, and are skipped by the Wicker Basket's automatic food selection. This is a separate setting fromfoodBlacklist, which excludes items from decay tracking. The check is only applied on the paths that put new items in (FoodSlot.mayPlace(),FoodContainer.canPlaceItem()/addItem()/canAddItem()), never onFoodContainer.setItem(), so items already inside a basket can still be taken out after an item is added to the blacklist. On NeoForge the value is declared withdefineListAllowEmptyrather thandefineList, becausedefineListbinds aNON_EMPTY(>= 1) size range that does not fit a setting whose default is an empty list. Requested in #52. - Ported the Chinese (
zh_cn) localization from the 1.20.1 branch.
Fixed
- Fixed cake not being subject to food decay and not being recorded in the food history.
CakeBlock.eat()does not go throughPlayer.eat(Level, ItemStack, FoodProperties); it callsFoodData.eat(int, float)directly, soPlayerMixin's@Redirectnever fired. AddedCakeBlockMixinon both platforms with the shared logic inCakeEatHandler. Candle cakes go through the sameCakeBlock.eat()and are covered as well. Reported in #3. - Fixed items disappearing from a Basket after roughly three stacks were inserted. The menu was opened with the vanilla
MenuType.GENERIC_9x1, so the client built a vanillaChestMenu+SimpleContainerwith no food validation while the server usedFoodChestMenu+FoodContainer+FoodSlot. The mismatch desynced slot contents. Registered a customMenuType(solclassic:food_chest) via Architectury'sMenuRegistry.ofExtended()so both sides build the same menu, and added the missingFoodContainer.canPlaceItem()override. Reported in #51.
Changed
- Ported the consumption-count cache from the 1.20.1 branch. Food history is now held in a
FoodHistoryobject that keeps aMap<Item, Integer>counter alongside the queue, making the total-count lookup used by long-term decay O(1) instead of a linear scan of up to 300 entries.IFoodEventHandlernow passesFoodHistoryinstead ofLinkedList<ItemStack>.
This mod has no additional files

