mirror of
https://github.com/pyrollo/display_modpack.git
synced 2025-01-10 00:50:19 +01:00
Updated API with new group
This commit is contained in:
parent
e46ece5ec6
commit
4d8dec3b79
@ -41,15 +41,13 @@ This is a helper to register entities used for display.
|
|||||||
|
|
||||||
* Register node with :
|
* Register node with :
|
||||||
- `on_place`, `on_construct`, `on_destruct` and `on_rotate` callbacks using display_api callbacks.
|
- `on_place`, `on_construct`, `on_destruct` and `on_rotate` callbacks using display_api callbacks.
|
||||||
|
- `display_api` group. This will make this node have their entities updated as soon as the mapblock is loaded (Useful after /clearobjects).
|
||||||
- `display_modpack_node` group. This will make this node have their entities updated as soon as the mapblock is loaded (Useful after /clearobjects).
|
|
||||||
|
|
||||||
- a `display_entities` field in node definition containing a entity name indexed table. See below for description of each display_entities fields.
|
- a `display_entities` field in node definition containing a entity name indexed table. See below for description of each display_entities fields.
|
||||||
|
|
||||||
### Display_entities fields
|
### Display_entities fields
|
||||||
`on_display_update` is a callback in charge of setting up entity texture. If not set, entity will have no texture and will be displayed as unknown item.
|
`on_display_update` is a callback in charge of setting up entity texture. If not set, entity will have no texture and will be displayed as unknown item.
|
||||||
|
|
||||||
`depth`, `right` and `height` : Entity position regarding to node facedir/wallmounted main axis.
|
`depth`, `right` and `height`: Entity position regarding to node facedir/wallmounted main axis.
|
||||||
Values for these fields can be any number between -1.5 and 1.5 (default value is 0).
|
Values for these fields can be any number between -1.5 and 1.5 (default value is 0).
|
||||||
Position 0,0,0 is the center of the node.
|
Position 0,0,0 is the center of the node.
|
||||||
`depth` goes from front (-0.5) to rear (0.5), `height` goes from bottom (-0.5) to top (0.5) and `right` goes from left (-0.5) to right (0.5).
|
`depth` goes from front (-0.5) to rear (0.5), `height` goes from bottom (-0.5) to top (0.5) and `right` goes from left (-0.5) to right (0.5).
|
||||||
@ -75,7 +73,7 @@ In order to avoid flickering text, it's better to have text a little behind node
|
|||||||
...
|
...
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
...
|
...
|
||||||
groups = { display_modpack_node = 1, ... },
|
groups = { display_api = 1, ... },
|
||||||
...
|
...
|
||||||
display_entities = {
|
display_entities = {
|
||||||
["mymod:entity1"] = {
|
["mymod:entity1"] = {
|
||||||
|
Loading…
Reference in New Issue
Block a user