A Minecraft: Bedrock Script API pack that alters the Action Form UI to look & function like a chest does, without the hassle of entities or physical items.
- As fast as vanilla forms
- Java-Servers styled UIs
- Cursor-following hover text
- Easy to read
- Good for large numbers of buttons
- Supports enchanted items and isometric blocks
- Supports durability
_global_variables.json
and enable the slot layouts you want to use and disable others. It is important to only enable layouts you are using to reduce lag spikes.
- Import the form builder into a file- this example will work for any top-level file. The import path will be different for nested files.
import { ChestFormData } from './extensions/forms.js';
- Create a new chest form, like you would for other script form UIs. The size can be left out and will default to 27 slots (small chest).
const form = new ChestFormData()
- If desired, add a name to the UI to display at the top.
form.title('Form Title')
- Add buttons!
form.button(0, 'Button Name', ['Button Lore'], 'minecraft:diamond', 10, 0, true)
form.button(2, 'Button Name', ['Button Lore'], 'textures/items/my_custom_item', 6, 60)
- The parameters for the button are as follows:
- Location: The sl 8000 ot that the item will display in, starting from zero. Max of 26 for a small chest, or 53 for a large.
- Name: The text of the button.
- Lore: An array of strings which will display below the item's name. Can be
undefined
or[]
to omit this. - Texture: Item/block type id or path to the texture. Can be entered as
minecraft:cake
orminecraft:acacia_log
. For custom textures, specify the path of the texture (Must includetextures/
at the start of the path).⚠️ If you don't know the amount of custom items your other add-ons have, it is recommended to usetextures/path_to_texture
and avoid using type id! - Stack size: This is an optional parameter, and will default to 1. Displays a small number in the lower right-hand corner- useful for shops selling multiple of an item at once!
- Durability: This is an optional parameter, and will default to 0. Supports values between 0 and 99. Displays the durability that can set using the form interface- useful for tools and in general for looks.
- Enchanted: This is an optional parameter, and will default to false. Displays the enchant glint effect on the item/block rendered if using the type id. This parameter will not work if using a direct texture path (e.g.
textures/...
).
-
The pattern function can also be used for defining many buttons at once. See the example in
index.js
! -
Show the form to the player & get a response for further scripting logic.
form.show(player).then(response)
FurnaceFormData
allows to create Action Form UIs with a furnace design!
See index.js
for example.
The inventory section of the UI can be toggled by a boolean value in RP/ui/_global_variables.json
and in BP/scripts/extensions/constants.js
. Make sure to disable or enable this for both.
Set it to true/false depending on what you want the UI to show as!
Example pack usage: index.js
.
Find a list of item/block type ids here.
See an in-game generated list of raw IDs here. Useful for updating the pack for new versions of Minecraft. Also can display custom item IDs! Note that the names are predicted based on the contained typeIds file and are not reflective of actual names.
If your other enabled packs contain custom items and blocks, and you want type ids to work, list them as follows:
- Navigate to
BP/scripts/extensions/constants.js
- Add the relevant item information into the
custom_content
constant at the top of the file!
If you want custom chest slots sizes, you have to add controls to "chest_panel"
in chest_server_form.json
in the format like the ones that already exist. Then you have to edit forms.js
, and add your condition and identifier to sizes
map/array following the format using which how pre-defined sizes are added.
Open _global_variables.json
and search and change $border_and_background_texture
(ninesliced) variable.
Functioning inventory section (it’s just for looks at the moment) (feels impossible to do)Done.Dynamic sizing based on number of buttons, in rows of 9 at a time (complex and probably have to rewrite everything)Done.Rawtext component support for form text (useful for translations to other languages)Done.
Original pack created by LeGend077.
Maintained by Herobrine64 & LeGend077.
Pattern function created by Aex66.