Add better support for turning mods on/off
* Make the Minecraft "mod" enabled at all times * Sort the list of mods to move required mods to the top * Automatically enable a mod which has a recipe selected (e.g., from a query param)
This commit is contained in:
@@ -26,13 +26,15 @@ module.exports = class CraftingTable extends BaseModel
|
||||
# Public Methods ###############################################################################
|
||||
|
||||
craft: ->
|
||||
if not @name?.length
|
||||
if not @catalog.hasRecipe @name
|
||||
@plan = null
|
||||
return
|
||||
|
||||
toolPhrase = if @includingTools then ' includingTools' else ''
|
||||
logger.verbose "calculating build plan for #{@quantity} #{@name}#{toolPhrase} with inventory: #{@have}"
|
||||
|
||||
@catalog.enableBooksForRecipe @name
|
||||
|
||||
plan = new CraftingPlan @catalog, @includingTools
|
||||
plan.includingTools = @includingTools
|
||||
plan.craft @name, @quantity, @have
|
||||
|
||||
Reference in New Issue
Block a user