Vibe coded#70
Open
LotusRPG wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Copied from copilot:
1. Fuel System (NEW)
FuelManager.java– Global server fuel counter with persistent storage (fuel.yml)addFuel()/consumeFuel()/setFuel()methodsaddFuelFromInventory()– consume fuel items from player inventory, get return items[0, max]rangeFuelItem.java– Represents one fuel type (coal, coal_block, blaze_rod, etc.)createDisplayItem()for GUI renderingFuelGUI.java(NEW) – Interactive GUI to add fuel from inventoryCfg.javawith defaults for coal, coal_block, blaze_rod/craft fuel [add|remove|set|check|gui]with admin-only access2. Divinity Module Items (Major Enhancement)
Added comprehensive support for Divinity's module-prefixed items (not just plain DIVINITY_):
DIV_ITEMGEN_,DIV_GEM_,DIV_ESSENCE_,DIV_RUNE_,DIV_EXTRACTOR_,DIV_ARROW_,DIV_CONSUMABLE_,DIV_CUSTOM_,DIV_FORTIFY_,DIV_IDENTIFY_,DIV_DUST_,DIV_REPAIR_,DIV_DISMANTLE_,DIV_REFINE_DivinityModuleItemType.java(NEW) – Wraps module items with optional enchantment stripping (_NOENCHsuffix for generators)RecipeItem.java– Massively refactored to parse DIV_ formats:~level:N:AMTformatDIV_MODULE_ID:AMT[:LVL[:TYPE]]with flexible parameter parsinglvl=-1) for items without level constraintsRecipeCustomItem.java– AddedoriginalKeyanddisplayCacheto avoid re-generating random stats on every GUI renderRecipeTagItem.java(NEW) – Support for Bukkit tags (e.g.,TAG_PLANKS:4) – accept any material in a tag3. Recipe Station & Fuel Cost (NEW Recipe Conditions)
ProfessionConditions.java– AddedstationandfuelCostfieldsRecipe.java– AddedstationfieldCalculatedRecipe.java– Integrated station check:StationChecker.hasStation()– validates player has access to required stationCraftingRequirementsCfg.java– NewgetStationLine()method with station-specific formattingFusionEditorCommand.java– Two new editor criteria:Profession_Recipe_Edit_Station– command to set stationProfession_Recipe_Edit_FuelCost– command to set fuel cost4. Recipe Ingredient Matching (Smart Item Comparison)
CalculatedRecipe.java– Refactored ingredient checking:IngredientFingerprint.forRequired()– build fingerprints for Divinity items without forcing a level generation-1) allows matching any level version of the same itemsumMatchingEntries()/drainFromMap()– handle wildcard matching across inventoryCommandMechanics.java– FixedshowIngredientUsage()andforceShow()to detect DIV module items correctly (don't useisSimilar()for generated items)5. Category & Editor Improvements
Category.java– Addedslotfield for explicit category positioning in GUIserialize()/deserialization updatedgetDisplayIcon()– usedisplayNameif present, else fall back to category nameCategoryGui.java– Rewritten slot logic to handle explicit slots + auto-placementslot >= 0placed at that indexCraftingTable.java– NewcopyForEditor()method to deduplicate ItemGen pseudo-recipes (name::materialformat) for faster editor loadingEditorRegistry.java– AddedInventory → Editormapping to track which inventory is openregisterInventory()/unregisterInventory()/getEditorByInventory()FusionEditorCommand.java– Major refactoring:/craft editor itemgen)buildItemConfigString()helper to construct full config strings6. Bug Fixes & Quality of Life
PlayerLoader.java– ChangedTreeMap→ConcurrentHashMap(thread-safe)containsKey+putwithcomputeIfAbsent()FusionPlayer.java– Fixed shutdown save race condition:!isEnabled()to run save synchronously during plugin disablefinallyblock to unlock player even if save failsShowRecipesCfg.java– Fixed template placeholder replacement:MessageUtil.getReplacement()calls to direct$<placeholder>and<placeholder>replacementRecipeEditorCfg.java– Safe null check for recipe result itemsProfessionLevelCfg.java– Safe map access withgetOrDefault()BrowseProfessionCfg.java– Fixed variable name bug (item→patternItem)Cfg.java– Fixed auto-join profession logic:FusionAPIservice instead of deprecatedBrowseGUImethodProfessionsCfg.java– CallTabCacher.clearAllCaches()after reloadingProfessionResults.java– FixedhasCommandsOrItems()to NOT require exp (only commands/items)CraftingTable.java– Better error messages for duplicate category names and unknown category references7. Dependency Update
pom.xml– Updated Divinity dependency:1.0.2-R0.47-SNAPSHOT→1.0.2-R0.57-SNAPSHOT