Behaviours
What are behaviours?
Behaviours are an already coded set of actions the item will do and which are not vanilla. These behaviours are already included in the plugin and will allow you to add some already coded functionality to your item.

List of behaviours included in the plugin

  • block_trade_machine
  • furniture_trade_machine
  • fuel
  • furniture
  • furniture_sit
  • gun
  • hat
  • keep_on_death
  • liquid_analyzer
  • liquid_bucket
  • mob_animation
  • mob
  • music_disc
  • sapling
  • spawn_egg
  • vehicle
You can get suggestions how how to use the behaviours using the official editor:
1
# This behaviour allows you to open a trade GUI with the following items
2
# For example black_fishing_rod and red_fishing_rod
3
block_trade_machine:
4
title: "Your title"
5
permission: "mypermission.trade.example" # <--- this is optional
6
gui_texture: ###THIS IS OPTIONAL, use it only to retexture the GUI
7
left: customization_table_left
8
right: customization_table_right
9
trades_list:
10
black_fishing_rod:
11
ingredients:
12
slot1:
13
item: FISHING_ROD
14
amount: 1
15
slot2:
16
item: BLACK_DYE
17
amount: 1
18
result:
19
item: black_fishing_rod
20
amount: 1
21
red_fishing_rod:
22
ingredients:
23
slot1:
24
item: FISHING_ROD
25
amount: 1
26
slot2:
27
item: RED_DYE
28
amount: 1
29
result:
30
item: red_fishing_rod
31
amount: 1
32
33
furniture_trade_machine:
34
# ....... it's the same as block_trade_machine
35
โ€‹
36
37
# When you rightclick with that item it will be placed on the ground with an
38
# armorstand. The armorstand will have the item as helmet and will be invisible.
39
furniture:
40
entity: armor_stand # you can also use item_frame (works better on 1.16+)
41
small: true
42
gravity: true
43
fixed_rotation: false
44
light_level: 7
45
solid: false
46
opposite_direction: false #makes the model rotate 180 when placed
47
hitbox:
48
length: 2
49
width: 2.3
50
height: 1
51
length_offset: 0.5
52
width_offset: 0.5
53
height_offset: 0.5
54
placeable_on:
55
walls: false
56
ceiling: false
57
floor: true
58
โ€‹
59
# If you add this behaviour and "furniture" behaviour you will be able to sit
60
# on the furniture at the defined height.
61
furniture_sit:
62
sit_height: 0.9
63
opposite_direction: true #default is true
64
# Sit on every BARRIER block of the furniture (for multi-seats chairs)
65
sit_all_solid_blocks: false
66
67
โ€‹
68
# Allows you to use this item as a gun. You can decide which projectile must
69
# be hold on left hand in order to shot.
70
gun:
71
projectile: itemsadder:clip
72
73
โ€‹
74
# Allows you to use the current item as hat (same vanilla helmet behaviour)
75
hat: true
76
โ€‹
77
# Allows you to make the item stay in player inventory on death
78
keep_on_death: true
79
โ€‹
80
# Allows you to use the current item as a vanilla music disc.
81
# Remember that you will have to create a custom sound to be able
82
# to play something.
83
music_disc:
84
song:
85
name: "itemsadder:music_disc.cdk_sunday"
86
description: "Cdk - Sunday"
87
88
โ€‹
89
# Allows you to use the current item as a ridable vehicle
90
vehicle:
91
fixed_rotation: false
92
small: true
93
sit_height: 0
94
step_height: 0.1
95
hitbox:
96
length: 2
97
width: 1.7
98
height: 1
99
speed:
100
drive: 1
101
jump: 0.3
102
fly: 0
103
fuel:
104
start: 150
105
max: 300
106
items:
107
COAL: 1
108
CHARCOAL: 1
109
COAL_BLOCK: 9
110
"itemsadder:banana": 1
111
smoke:
112
amount: 2
113
offset:
114
x: 0
115
y: 0
116
z: -0.8
Copied!
โ€‹
โ€‹
โ€‹
Last modified 11mo ago
Copy link
Edit on GitHub