Skip to main content

Fast Crafting

Server-side crafting menu with quick-craft, profession catalogue, search and optional 3x3 grid.

Privatev0.1.1Economy & crafting
RequiresTypeWriter0.9BasicRPG CoreGUIMMOItemsoptional

Built for the BornToCraft network. This extension is documented for reference and is not distributed.

Overview​

Fast Crafting replaces the vanilla crafting table with a menu that lists the recipes a player can make and crafts them in one click. The recipes are read from the server's recipe catalogue, and what a player can craft is recomputed from their own inventory, on the server. Players choose a quantity, or shift-click to craft the maximum, and the ingredients are taken from their inventory.

The integrated menu uses a single 54-slot inventory with two tabs. Crafting has a quick-craft row of currently available recipes and a manual 3x3 grid. Recipes is a catalogue sorted into the RPG Core professions (combat, mining, farming, crafting and so on), with available and total counters, filters, sorting and a search dialog. Clicking a recipe in the catalogue crafts it immediately; a recipe is never placed in the grid for you.

The extension runs on the BTC build of TypeWriter (BTC Core, Paper/Folia) and is documented here for reference. It reads recipe metadata from RPG Core and applies its level lock to the recipes.

Features​

  • One-click crafting — click a recipe to craft the selected quantity (1, 4, 8, 16, 32, 64 by default, or auto), shift-click for the maximum.
  • Quick-craft row — shows available recipes, only for players holding a permission.
  • Profession catalogue — nine categories with available / total counters, from the RPG Core profession of each recipe.
  • Search, sort and filter — a Paper dialog search over name, identifier and profession, alphabetical or availability sorting, and all, available or missing filters.
  • Manual 3x3 grid — an optional grid with an output slot, where the player places ingredients by hand; leftover items go back to them when the menu closes.
  • Crafting table replacement — right-clicking a crafting table can open this menu instead.
  • Recipe sources — vanilla recipes, a single namespace such as custom, or MMOItems station recipes.
  • Level lock — RPG Core's recipe level gate is applied, and other plugins can refuse a craft through an event.
  • Safe results — overflow drops at the player's feet or blocks the craft, and an optional cooldown limits spam.

Installation​

  1. Install RPG Core (the RPGBundle extension), the TypeWriter Basic extension and the GUI extension (GuiAndDialogs). Fast Crafting will not load without them.
  2. Optional: install MMOItems if you want its station recipes (useMMOItemsRecipes).
  3. Put the Fast Crafting JAR in plugins/Typewriter/extensions/ and restart the server.
  4. Give the permission fastcrafting.quickcraft to the players who may see the quick-craft row.

Getting started​

Open the integrated menu from a command:

  1. In the TypeWriter web panel, open a manifest page and add a Fast Crafting action.
  2. Set inventoryTitle, leave inventoryRows at 6, and turn on integratedMenu.enabled.
  3. Leave categoryIds with the nine RPG Core professions, or keep only those you use. Turn classicCrafting.enabled on if you want the manual 3x3 grid.
  4. If you only want your own recipes, set recipeNamespace to the namespace of your recipes, for example custom.
  5. Add a custom command entry (for example fastcrafting) and put the Fast Crafting action in its triggers. NPCs, items and dialogues can trigger the action too.
  6. To replace the vanilla crafting table, turn on replaceCraftingTable and, if needed, set replaceCraftingTablePermission.
  7. Publish, give yourself some ingredients and run the command.
Two layouts

With integratedMenu.enabled off (the default) the action opens the older layout built from layoutPool, recipeGrid and fastcraft_button: markers. Turn it on for the single-inventory menu described here. The integrated menu ignores the legacy open and close buttons and the SELECTION_INFO button.

In the older layout, the markers are OPEN_GRID, REFRESH, PAGE_PREV, PAGE_NEXT, CRAFT_AMOUNT, SELECTION_INFO and CLOSE. Left click on a recipe crafts it, shift + left click crafts the maximum and right click selects it. SELECTION_INFO shows the recipe selected with a right click (or crafted last) with texts taken from the selectionInfo field: name, result amount, number of possible crafts and one line per ingredient. See Fast Crafting for the keys.

How it works​

The catalogue is built once per entry configuration from Bukkit recipes: crafting recipes only, filtered by recipeNamespace and disableVanillaRecipes. Each recipe's profession comes from RPG Core, and recipes without one go to crafting. What is craftable is recalculated from the player's inventory, which refreshes when they move items, pick up, drop or consume items.

Results that are vanilla items are converted to their BTC equivalents when RPG Core has a replacement. Without a recipeNamespace, recipes whose result is a CraftEngine or BTC item are hidden from the catalogue, so set recipeNamespace (for example custom) to list your custom recipes.

The integrated menu has six rows:

RowCrafting tabRecipes tab
1The Crafting and Recipes tabs.The Crafting and Recipes tabs.
2Quick-craft recipes (up to quickRecipesPerPage, hidden without the quick-craft permission), with paging.The profession categories with their available / total counters.
3 to 5The manual 3x3 grid, the output slot and the quantity button.The recipes of the chosen category (recipesPerPage, 27 by default).
6Menu controls.Search, sort, filter and page controls.

Left click on a recipe crafts the selected quantity. Shift click crafts the maximum when allowShiftCraftAll is on. The quantity button cycles through craftAmountButton.values, with an Auto option when includeAuto is on. The search dialog looks in the recipe name, identifier and profession. The default sorting is defaultSort (AVAILABLE_FIRST or ALPHABETICAL) and the default filter is defaultFilter (ALL, AVAILABLE or MISSING). Menu texts are in French.

The manual grid is placed with classicCrafting. Players put items in it by hand, and the result is crafted when they click the output slot, with shift click for the maximum. Items left in the grid return to their inventory when the menu closes.

Configuration​

Everything is set in the Fast Crafting entry. The main settings that are not about the layout:

SettingPurpose
fastCraftPermissionPermission needed to open the menu and craft (empty for everyone).
recipeNamespaceOnly list recipes of this namespace.
disableVanillaRecipesHide minecraft: recipes.
useMMOItemsRecipesAdd MMOItems station recipes when MMOItems is enabled, and hide vanilla recipes.
dropWhenInventoryFullDrop the result at the player's feet when the inventory is full. Off means the craft is refused when the result does not fit.
craftCooldownTicksCooldown between crafts in ticks (0 for none).
autoRefreshTicksRefresh the open menu every N ticks (0 for none).
replaceCraftingTableOpen this menu instead of the vanilla crafting table. Players who sneak keep the vanilla table.

Permissions​

PermissionGrants
fastcrafting.quickcraftShows the quick-craft row of the integrated menu. The name is the default of integratedMenu.quickCraftPermission; leave it empty to show the row to everyone.
fastCraftPermission valueA permission of your choice to open the menu and craft.
replaceCraftingTablePermission valueA permission of your choice to get the menu when using a crafting table.

The extension has no command of its own and no placeholders. Menu clicks use an internal fastcraft: channel that is bound to the player's open menu and cannot be typed.

Entries​

1 entries, generated from the extension source.

Actions1

Troubleshooting​

The menu is the old layout. integratedMenu.enabled is off, which is the default. Turn it on to get the tabs, catalogue and quick-craft row.

The catalogue is empty. Check recipeNamespace: only recipes of that namespace are listed. Without a namespace, recipes whose result is a CraftEngine or BTC item are hidden. With disableVanillaRecipes or useMMOItemsRecipes, the minecraft: recipes are removed.

The quick-craft row is missing. The player lacks the quick-craft permission (fastcrafting.quickcraft by default). Empty the field to show the row to everyone.

A recipe is greyed out or refuses to craft. The player may lack ingredients, be under the RPG Core level for the recipe (the message appears on the action bar), or another plugin may have cancelled the craft. The craft is also refused while the cooldown runs, and when the result does not fit and dropWhenInventoryFull is off.

A recipe is in the wrong category. The category comes from the profession registered in RPG Core for the recipe key. Recipes without one go to crafting. A category in categoryIds that RPG Core does not define still shows, with a generic name and icon.

The vanilla crafting table is not replaced. replaceCraftingTable must be on, the player must hold replaceCraftingTablePermission if set, and sneaking players keep the vanilla table. The first entry with the option on is used.

The search button does nothing. integratedMenu.searchEnabled must be on. The search opens a Paper dialog, so it needs a server that supports Paper dialogs.

  • RPG Core — professions and recipe level lock used by the catalogue.
  • GUI — menu engine.
  • MMOItems — station recipes with useMMOItemsRecipes.