This page is only shown you the way to create a template for a lootchest type, this mean if there is multiple lootchest type, there should be multiple template like this in 1 template file!
I. OVERVIEW
Below is an example for you!
Template Structure
A template consists of the following main sections:
settings → General settings for the loot chest.
buttons → Buttons for interaction and animations.
rewards-location → Locations where rewards will appear.
Material list: here
Sound list: here
Note: the usable part is the enum name (e.g. ACACIA_BOAT)
player-location → The player's position when interacting with the loot chest. (This will be the main position of this template for this lootchest type)
location → The main location of the loot chest.
rotations → Defines how the chest rotates at specific positions
decoration → Additional objects of this chest. (built-in objects)
click-to-open → Determines if the chest opens when clicked.
2. Configuring Buttons (buttons)
Explanation:
location → The button’s position.
icon → Defines the material and texture for the button (e.g., PLAYER_HEAD).
click-sound / hover-sound → Sounds when clicking or hovering over the button.
name → Defines the button's display name, with options for visibility, dynamic colors, and refresh interval.
delay → Delay before the button would be spawned after the session start.
permission → Required permission to interact with this button.
holding-icon→ Set this to false to hide the icon of this button
rotate-on-spawn → Determines if the button rotates when it spawns. (if this option enable, the yaw above will be the initial yaw, and it will spin to the final yaw)
actions → Defines what happens when the button is clicked .
3. Adding Rewards Locations (rewards-location)
Explanation:
Defines where rewards will appear when a player opens a loot chest.
Each entry consists of a world, x, y, z coordinates, and optional rotation (yaw, pitch).
4. Additional Customization Options
Child Elements (Sub-Buttons)
Child Elements add some visual effects to the button, it has no execution and always rely on its parent.
Here is some available options for a sub-button:
Location
Name
Icon
Rotations
Example:
location-offset → Defines the position relative to the parent button.
display-name → The name of this child.
This is just the overview, if you want further information please go to next part!
II. Details
1. Location
HLootChest provides 2 location modes: location and location-offset
You can set the exactly location using this mode.
Example:
location: world, 182.5, 73.2, 193.5
You can defines the position relative to the parent button. (Note: this mode only works for child elements)
Example:
location-offset: 0.5, 0.5, 0.5, 90, 45Explaination:
If the button location is 0, 70, 0, 180, 0
This child will be summon at 0.5, 70.5, 0.5, -90, 45
This location mode support math expression, but there just a few variable, custom variable coming soon!
2. Rotations
With this option, you can determine the rotation of the Armorstand.
There are different rotation modes:
HEAD
BODY
RIGHT_ARM
LEFT_ARM
RIGHT_LEG
LEFT_LEG
You can set the rotation for almost all elements (box, buttons, sub-buttons)
Example:
3. Icon
HLootChest provides two icon displaying mode: static and dynamic
Use this option for performance purpose!
Example:
Use this mode for more impressive buttons!
Example:
4. Name
Same with Icon, HLootChest provides two name displaying mode: static and dynamic
Use this option for performance purpose!
Note: If you use this mode, it is necessary to put name in a line (not a list!)Example:
Use this mode for more impressive buttons!
Example:
5. Actions
With this option, you can set the actions will be called on button click
buttons:
'1':
location: world, 181, 69.9, 194, 148.5, 0
icon:
material: PLAYER_HEAD
data: 3 (This data value should be custom model data if you use 1.14+)
head_value: <custom_texture>
click-sound:
sound: UI_BUTTON_CLICK
yaw: 10
pitch: 10
hover-sound:
sound: ENTITY_CHICKEN_EGG
yaw: 5
pitch: 5
name:
enable: true
visible-mode: hover (There are 2 modes: "always" and "hover". You can delete this option to set it to "always")
dynamic: true
refresh-interval: 5
display-name:
- '<#FF6600>Close!</#9DFF8A>' (Hex & Gradient Support 1.17+, PlaceholderAPI Support)
delay: 30
permission: 'button.test'
holding-icon: true
rotate-on-spawn:
enable: true
final-yaw: -31.5
reverse: true
actions:
- '[close]'
icon:
dynamic: true (I said static and dynamic but it actually no option for static mode. Just turn off this)
refresh-interval: 5
dynamic-icons: (add more and more...!)
'1':
material: PLAYER_HEAD
data: 3
head_value: <custom_texture>