11# Grinding Ball Modification Event
22
3- This event allows you to add Grinding Balls, which can be used in the [ Sag Mill] ( ../machine/sagmill.md ) .
3+ This event allows you to add, modify, and remove Grinding Balls, which can be used in the [ Sag Mill] ( ../machine/sagmill.md ) .
44
5- ** It is a startup event and not reloadable!**
6- Keep in mind that startup events have to be located inside the ` kubejs/startup_scripts ` folder.
5+ ** It is a server event and reloadable!**
6+ Keep in mind that server events have to be located inside the ` kubejs/server_scripts ` folder.
77
88> [ !WARNING] NOTE
9- > The Grinding Ball system is currently being reworked by the EnderIO team. This event may change in future versions and become fully reloadable .
9+ > The Grinding Ball system has been reworked by the EnderIO team in version 8.2.0. Previously, this was a startup event .
1010
1111## Overview
1212
@@ -16,24 +16,28 @@ the chance of a byproduct, and the energy consumption of the recipe.
1616- access in a server script via: ` EnderIOEvents.grindingBalls `
1717- supported operations
1818 - add new entries
19+ - remove existing entries
20+ - clear all entries
1921
2022## Event Listener
2123
22- To access the event, the first thing you need to do is to open an event listener for the ` grindingBalls ` event in a startup script.
24+ To access the event, the first thing you need to do is to open an event listener for the ` grindingBalls ` event in a server script.
2325
2426``` js
2527EnderIOEvents .grindingBalls (event => {
2628 // ...
2729})
2830```
2931
32+ After that, use one of the following methods to modify the Vat Reagents.
33+
3034## Adding
3135
3236- access in the event via: ` event.add(...) `
3337- properties:
3438 - ` item `
35- - description: specifies the item
36- - type: ` Item `
39+ - description: specifies the item or tag
40+ - type: ` Ingredient `
3741 - ` outputMultiplier `
3842 - description: specifies the output multiplier value
3943 - type: ` float `
@@ -47,12 +51,51 @@ EnderIOEvents.grindingBalls(event => {
4751 - ` durability `
4852 - description: specifies the durability of the Grinding Ball item
4953 - type: ` int `
54+ - notes:
55+ - the ` item ` property can take a single item or a tag (prefixed with ` # ` )
56+ - if a tag has been used for ` item ` and you add another entry with a single item, which is part of the tag, the tag entry takes priority
5057
5158``` js
5259EnderIOEvents .grindingBalls (event => {
5360 // registers an iron ingot as a Grinding Ball
5461 // it has a 1.5x output multiplier, the default 1.0x bonus multiplier,
5562 // a 0.75x energy multiplier and a durability of 500
5663 event .add (" minecraft:iron_ingot" , 1.5 , 1.0 , 0.75 , 500 )
64+
65+ // this is also possible to cover all kinds of ingots
66+ event .add (" #c:ingots" , 1.5 , 1.0 , 0.75 , 500 )
67+ })
68+ ```
69+
70+ ### Removing
71+
72+ - access in the event via: ` event.remove(...) `
73+ - properties:
74+ - ` item `
75+ - description: specifies the item or tag
76+ - type: ` Ingredient `
77+ - notes:
78+ - the ` item ` property can take a single item or a tag (prefixed with ` # ` )
79+ - if a tag is used, all items, which are part of the tag, will have their data removed
80+ - removing refers to deleting the Grinding Ball data, the item still exists in the game
81+
82+ ``` js
83+ EnderIOEvents .grindingBalls (event => {
84+ // remove whole tag
85+ event .remove (" #c:crops" )
86+
87+ // remove single item
88+ event .remove (" enderio:energetic_alloy_grinding_ball" )
89+ })
90+ ```
91+
92+ ### Clearing
93+
94+ - access in the event via: ` event.clear() `
95+ - description: removes all existing Grinding Balls
96+
97+ ``` js
98+ EnderIOEvents .grindingBalls (event => {
99+ event .clear ()
57100})
58101```
0 commit comments