Custom Block files, multiple Interactions, Display settings, integration of WorldGuard and more
Added:
New Custom Block Format
●
Beginning with this update, each Custom Block will require a separate .yml file located in the custom-blocks folder, named according to the block's designated name.
●
During plugin startup, all existing Custom Blocks from
config.yml
will be
automatically migrated
to the new file format while maintaining their functionality. After that, their presence in config.yml will no longer be required, and they can be removed if desired.
Multiple Interactions and Offset
●
Starting with this update, you can create multiple Interactions by defining them as subsections within the interactions section.
Interactions are highlighted in blue.
● To add a new Interaction, create a subsection within interactions and assign it any desired name.
WARNING!
Be cautious: if you rename an Interaction linked to a command, it may disrupt the functionality of existing Custom Blocks, as their commands are stored in association with the Interaction name.
● A new offset section has been added to Interaction settings, featuring the x, y, and z parameters. These define the displacement applied to the Interaction Entity after spawning.
●
The offset will adjust according to the block’s rotation and change dynamically with it.
New Display Settings
● Added the
billboard parameter, which controls whether Block Display entities should face the player during rendering. It can be set to fixed (both vertical and horizontal angles remain static), vertical (orients toward the player around the vertical axis), horizontal (rotates around the horizontal axis), or center (rotates around the central point). The default setting is fixed.
● Added the
brightness parameter with sky and block subsections, allowing manual override of lighting values used for rendering.
● Added the
shadow-strength parameter, which controls the opacity of shadows based on the distance to the block below. The default value is 1
● Added the
shadow-radius parameter, which defines the shadow radius for Displays. The value ranges from 0 to 64. If set to 0 or lower, the entity will have no s
hadow. The default value is 0.
● Added the
translation section with parameters
x,
y, and
z, which control the displacement of the Display to the specified coordinates. Unlike
offset, this transformation does not take the block's rotation into account.
Note: Previously, a default translation of -0.5, 0, -0.5 was automatically applied to blocks. This will no longer happen, but when migrating old models to separate files, this translation will be added automatically to preserve their positioning.
● The glow-color-override parameter can now be specified using a named format (e.g., RED, BLUE), decimal ABGR (e.g., 234543), or hexadecimal (e.g., 3134F5, c8c4c2).
Permissions
● Added the ability to define permissions for accessing a block and customize messages in messages.yml.
Code (Text):
permission:
break:
- "perm1"
- "perm2"
place:
- "perm1"
- "perm2"
interact:
- "perm1"
- "perm2"
Example of permissions
Integration of WorldGuard
●
New WorldGuard region flags have been introduced to control access to Custom Blocks:
- place-cb – Controls the right to place a custom block in a region
- break-cb – Controls the right to place a custom block in a region
- interact-cb – Controls the right to interact with custom block in a region
● Added the
bdc.bypass.wg
permission, allowing unrestricted access to Custom Blocks regardless of region flags. By default, this permission is granted to administrators.
Command arguments
●
It is now possible to specify the recipient and quantity after selecting the desired block to receive.
Limiting the number of entities per chunk
●
On some servers, due to kernel limitations, Display Entities could disappear in chunks with a high entity count. To prevent this, a new max-entities-per-chunk parameter has been added to config.yml. It restricts block placement if the number of entities in a chunk exceeds the specified limit.
● If set to a value below 0, no entity limit checks will be performed.
● Default value: -1.
● The warning message for exceeding the entity limit can be customized in
messages.yml.
Texture for head item
● The
skullmeta.url parameter can now be specified as either a direct texture URL or a Base64-encoded string.
● Added the
skullmeta.name parameter, allowing you to specify a player's name as the owner of the skull texture. This option has the lowest priority compared to
skullmeta.url.
Model Loading from BDEngine by ID
- Added the ability to load block models directly from BDEngine using an ID. The ID should be specified in the same spawn-command field.
Note: Loading models by ID may cause various issues:
- Some models, including animated ones, may not support command retrieval.
- The retrieved command version may not match the server version, potentially leading to errors when spawning Displays.
- Fetching commands via requests can be highly resource-intensive and may even cause server crashes.
To avoid these problems, it is
recommended that users specify commands manually whenever possible.