@@ -65,6 +65,12 @@ mod:item {
65
65
tiles = " stone_shovel.png" ,
66
66
mining_speed = 4 ,
67
67
harvest_capability = 2 ,
68
+
69
+ on_item_activated = function (pos , block , player , world , client , server , screen_width , screen_height , gui_scale )
70
+ if block :string_id () == " default:grass" then
71
+ world :set_block_from_str (pos .x , pos .y , pos .z , " default:grass_path" )
72
+ end
73
+ end
68
74
}
69
75
70
76
mod :item {
@@ -133,6 +139,12 @@ mod:item {
133
139
tiles = " wooden_shovel.png" ,
134
140
mining_speed = 2 ,
135
141
harvest_capability = 2 ,
142
+
143
+ on_item_activated = function (pos , block , player , world , client , server , screen_width , screen_height , gui_scale )
144
+ if block :string_id () == " default:grass" then
145
+ world :set_block_from_str (pos .x , pos .y , pos .z , " default:grass_path" )
146
+ end
147
+ end
136
148
}
137
149
138
150
mod :item {
@@ -204,7 +216,13 @@ mod:item {
204
216
name = " Iron Shovel" ,
205
217
tiles = " iron_shovel.png" ,
206
218
mining_speed = 6 ,
207
- harvest_capability = 2
219
+ harvest_capability = 2 ,
220
+
221
+ on_item_activated = function (pos , block , player , world , client , server , screen_width , screen_height , gui_scale )
222
+ if block :string_id () == " default:grass" then
223
+ world :set_block_from_str (pos .x , pos .y , pos .z , " default:grass_path" )
224
+ end
225
+ end
208
226
}
209
227
210
228
mod :item {
@@ -246,7 +264,13 @@ mod:item {
246
264
name = " Diamond Shovel" ,
247
265
tiles = " diamond_shovel.png" ,
248
266
mining_speed = 8 ,
249
- harvest_capability = 2
267
+ harvest_capability = 2 ,
268
+
269
+ on_item_activated = function (pos , block , player , world , client , server , screen_width , screen_height , gui_scale )
270
+ if block :string_id () == " default:grass" then
271
+ world :set_block_from_str (pos .x , pos .y , pos .z , " default:grass_path" )
272
+ end
273
+ end
250
274
}
251
275
252
276
mod :item {
@@ -288,5 +312,11 @@ mod:item {
288
312
name = " Golden Shovel" ,
289
313
tiles = " golden_shovel.png" ,
290
314
mining_speed = 10 ,
291
- harvest_capability = 2
315
+ harvest_capability = 2 ,
316
+
317
+ on_item_activated = function (pos , block , player , world , client , server , screen_width , screen_height , gui_scale )
318
+ if block :string_id () == " default:grass" then
319
+ world :set_block_from_str (pos .x , pos .y , pos .z , " default:grass_path" )
320
+ end
321
+ end
292
322
}
0 commit comments