added furniture variables authored by Lxlp's avatar Lxlp
...@@ -19,6 +19,7 @@ You can also use `Type: ARMOR_STAND` to use Armor Stands instead ...@@ -19,6 +19,7 @@ You can also use `Type: ARMOR_STAND` to use Armor Stands instead
- [Drops](#drops) - [Drops](#drops)
- [Furniture Skills](#furniture-skills) - [Furniture Skills](#furniture-skills)
- [Furniture States](#furniture-states) - [Furniture States](#furniture-states)
- [Furniture Variables](#furniture-variables)
- [Examples](#examples) - [Examples](#examples)
## Furniture Options ## Furniture Options
...@@ -203,6 +204,46 @@ If multiple seats are created, when a player right clicks on a furniture the clo ...@@ -203,6 +204,46 @@ If multiple seats are created, when a player right clicks on a furniture the clo
- 0,1,0,0,0 # A seat will be placed on block above the base of the Furniture - 0,1,0,0,0 # A seat will be placed on block above the base of the Furniture
``` ```
#### Drops
Furniture drops are defined under the furniture `Drops` section. This uses the standard MythicMobs drop table format.
By default the furniture will drop itself when broken if there is no Drops field defined. You can make the furniture drop nothing by setting `Drops: []` or `DropSelf: false`.
<br>If `DropSelf` is set to `true` and some `Drops` have been specified, then both the Furniture and the Drops will be dropped.
```yaml
Furniture:
Drops:
- oak_planks 4
- oak_log 2
```
#### Tracked
Whether the furniture should be actively tracked by the plugin. Only relevant if you want the furniture to be able to hold [Variables](#furniture-variables).
Defaults to `true` if either there are `Furniture.Variables` or `Furniture.KeepVariablesOnDrop` is set to true, and `false` otherwise
```yaml
Furniture:
Tracked: true
```
#### KeepVariablesOnDrop
Whether the [furniture's variables](#furniture-variables) should be keep once the furniture drops when `DropSelf` is `true`. This happens by writing the variables onto the dropped item, and reading them from it once the furniture is placed again.
```yaml
Furniture:
KeepVariablesOnDrop: true
```
#### Variables
The furniture's default variables. They work exactly as [MythicMob's Mob Default Variables](), with the exact same syntax and all
```yaml
Furniture:
Variables:
hello: world
cost: int/10
```
## ##
### **Type-Specific Options** ### **Type-Specific Options**
...@@ -227,18 +268,7 @@ If multiple seats are created, when a player right clicks on a furniture the clo ...@@ -227,18 +268,7 @@ If multiple seats are created, when a player right clicks on a furniture the clo
#### Item_Frame #### Item_Frame
- `GlowingFrame` - Whether the frame should be a glowing frame which renders the furniture at 100% brightness at all times. Defaults to false. - `GlowingFrame` - Whether the frame should be a glowing frame which renders the furniture at 100% brightness at all times. Defaults to false.
## Drops
Furniture drops are defined under the furniture `Drops` section. This uses the standard MythicMobs drop table format.
By default the furniture will drop itself when broken if there is no Drops field defined. You can make the furniture drop nothing by setting `Drops: []` or `DropSelf: false`.
<br>If `DropSelf` is set to `true` and some `Drops` have been specified, then both the Furniture and the Drops will be dropped.
```yaml
Furniture:
Drops:
- oak_planks 4
- oak_log 2
```
## Furniture Skills ## Furniture Skills
...@@ -275,10 +305,33 @@ States are placed under a `States` section like so: ...@@ -275,10 +305,33 @@ States are placed under a `States` section like so:
``` ```
Each state can use the `Model`furniture options, and also `Lights: false` to turn light blocks off and `GlowingItem: false` to turn the glowing itemframe off, if present. When the `furnitureState` mechanic is called, the furniture will morph into the given state. Each state can use the `Model`furniture options, and also `Lights: false` to turn light blocks off and `GlowingItem: false` to turn the glowing itemframe off, if present. When the `furnitureState` mechanic is called, the furniture will morph into the given state.
The `DefaultState` (defaults to "DEFAULT") allows you to set the name of the base version of the furniture for referencing in mecahnics. The `DefaultState` (defaults to "DEFAULT") allows you to set the name of the base version of the furniture for referencing in mechanics.
**Please Note** Using `ON` and `OFF` are not valid for state names due to something with YAML. You can solve this by using `'ON'` and `'OFF'` instead. **Please Note** Using `ON` and `OFF` are not valid for state names due to something with YAML. You can solve this by using `'ON'` and `'OFF'` instead.
## Furniture Variables
Furnitures can hold variables, too!
To set them, you will need to use the special [furniturevariableset](/Skills/Mechanics/FurnitureVariableSet) mechanic, and to fetch their value you will need to use the [<furniture.var.{VariableName}>](/Placeholders#furniture-placeholders) placeholder
```yaml
ExampleVariableFurniture:
Id: IRON_NUGGET
Type: FURNITURE
Model: 5
Furniture:
Material: GOLD_NUGGET
Model: 6
Tracked: true # needs to either be set to true or default to true for Variables to properly work on this furniture
KeepVariablesOnDrop: true
# Default Variables for the furniture
Variables:
hello: world
cost: int/10
```
## Examples ## Examples
```yaml ```yaml
TestFurniture: TestFurniture:
... ...
......