Skip to main content

ItemsAdder

ItemsAdder blocks, furniture, crops, HUDs and items in TypeWriter events, objectives and facts.

Paidv1.7Integrations
RequiresTypeWriter0.9ItemsAdderQuest (TypeWriter extension)Basic (TypeWriter extension)

Overview​

ItemsAdder lets you add custom blocks, furniture, items, crops, HUDs and entities to your server with a resource pack. This extension makes all of them usable in TypeWriter. A quest can ask players to break a custom ore or place a custom lamp, a dialogue can react to a player sitting at your furniture, and a criteria can check that the player holds your custom sword.

Everything uses the ItemsAdder namespaced id (namespace:id, for example my_pack:ruby_ore). Nothing here creates content: you still define blocks, furniture and items in ItemsAdder, then use their ids in TypeWriter entries.

Features​

  • Block and furniture events — triggers when a custom block or furniture is broken, placed or interacted with.
  • Pre-place event — a trigger that fires just before furniture is spawned.
  • Custom entity death — a trigger when a player kills an ItemsAdder custom entity.
  • Counting objectives — break or place custom blocks and furniture as a quest objective.
  • Item inventory tools — give or remove ItemsAdder items, and react to picking up, dropping or consuming them.
  • Item and world facts — held item, item count, uses and durability left, block looked at or stood on, furniture looked at.
  • Crop and HUD facts — crop growth stage, whether a crop is ripe, and whether a named HUD is visible.
  • Variables — ids and properties of held items, blocks and furniture, font image glyphs, and registry lists, ready for any text.
  • Sound entry — use an ItemsAdder sound id wherever TypeWriter asks for a sound.

Installation​

  1. Install ItemsAdder and let it generate its resource pack. This extension does not load without it.
  2. Make sure the TypeWriter Quest and Basic extensions are installed.
  3. Download the extension from the stores (see the buttons in the panel above) and put the JAR in plugins/Typewriter/extensions/.
  4. Restart the server.

Getting started​

This walkthrough makes a quest that asks the player to break three custom ore blocks.

  1. In the web panel, create a quest with the Quest extension and a fact to store the progress (a permanent fact is a good choice).
  2. On a manifest page, add a Break Block objective.
  3. Set quest to your quest and fact to the progress fact. Set item to the block id, for example my_pack:ruby_ore, and amount to 3. Leave item empty to count any custom block.
  4. Set display to the line shown in the quest tracker, for example Mine ruby ore. The progress (1/3) is added automatically.
  5. Optionally link onComplete to a sequence that gives a reward, for example with Give Item and itemId my_pack:ruby_pendant.
  6. Publish, start the quest, and break the block.

To react once instead of counting, use an event: add an On Custom Block Break entry to a sequence page, fill blockId, and link its triggers to the entries to run.

Block ids

List what ItemsAdder has loaded with the Registry IDs variable, or in game with the ItemsAdder commands, and copy the exact namespaced id.

How it works​

Events carry data about what happened. The triggered entries can read the block or furniture id and its position, the click used (for block interact) and the item in hand.

Objectives count each position once per player. Breaking and placing the same block again at the same spot does not add to the count. They only count while the player has the linked quest active. Cancelled actions (for example in a protected region) do not count and do not trigger events.

Configuration​

The objective lines in the quest tracker are built from two TypeWriter snippets that you can change in the TypeWriter snippets file:

SnippetDefault
advancedQuest.display<display> <dark_gray>(<gray><current><dark_gray>/<gray><required><dark_gray>)
advancedQuest.completed<green>✔</green> <st><display></st> <dark_gray>(<gray><current><dark_gray>/<gray><required><dark_gray>)

Entries​

35 entries, generated from the extension source.

Actions2
Events11
Objectives4
Facts10
Variables7
Sounds1

Troubleshooting​

The extension does not appear in the panel. ItemsAdder is not installed or did not enable. Every entry calls the ItemsAdder API, so the extension refuses to load without the plugin.

An event never fires. Check the id: it must be the full namespace:id, not only the id. An empty id matches anything. If you filled location, only that exact block position matches. Events that another plugin cancelled (a protection plugin for example) are ignored.

The objective does not move. The player must have the linked quest active, and a fact must be set on the objective. The same block position counts only once per player.

A fact always returns 0. The held item or the block is not an ItemsAdder one. The facts that look at blocks only check the first block within range blocks (5 by default). Facts for uses and durability return 0 when the item has no usages or custom durability.

The Registry IDs variable is empty. ItemsAdder loads its content in the background. The variable returns nothing until ItemsAdder reports that its items are loaded, so do not read it during startup.

Give Item gives nothing. The itemId is unknown to ItemsAdder, so no item is built and nothing is given. The action reports 0 given. Leftovers that do not fit are dropped at the player's feet unless dropOverflow is off.

The HUD fact is always 0. The HUD id must exist in ItemsAdder and the player must have it. ItemsAdder cannot list HUDs, so the fact checks only the one you name.

  • Nexo and Craft Engine — the same integration for the other custom content plugins.