Unable to remove or reference item/block tags with KubeJS
Vextin opened this issue ยท 1 comments
Checked for existing issues
- I have checked for existing issues, and have found none.
Tested latest version
- I have checked that this occurs on the latest version.
GregTech CEu Version
1.1.3
Recipe Viewer Installed
JEI
Environment
Singleplayer
Cross-Mod Interaction
Yes
Other Installed Mods
Architectury 9.2.14
Better Tag Tips 1.20.1-1.1
JEI 1.20.1-15.3.0.4
KubeJS 2001.6.4 build 138
Rhino 2001.2.2 build 18
Expected Behavior
The KubeJS code
ServerEvents.tags('block', event =>
{
event.remove('minecraft:needs_stone_tool', 'gtceu:tetrahedrite_ore')
}
)
should remove gtceu:tetrahedrite_ore
from the minecraft:needs_stone_tool
tag.
The KubeJS code
ServerEvents.recipes(event =>
{
event.remove({ output: '#minecraft:pickaxes' })
}
)
should remove all recipes that result in pickaxes, including those from GTCEu,
See the successful removal of recipes for the vanilla wooden pickaxe:
Actual Behavior
The previously mentioned KubeJS scripts do not work for GTCEu items or blocks, despite working for vanilla content and content from other mods.
See that the recipe for the GTCEu titanium pickaxe (as well as all other GTCEu pickaxes) remains in JEI:
Steps to Reproduce
- Install GTCEu, JEI, Better Tag Tips, and KubeJS, as well as their dependencies.
- Launch the game to generate directories
- create the following scripts in
/kubejs/server_scripts/
:
/kubejs/server_scripts/Ore_Test.js
ServerEvents.tags('block', event =>
{
event.remove('minecraft:needs_stone_tool', 'gtceu:tetrahedrite_ore')
}
)
/kubejs/server_scripts/Tool_Test.js
ServerEvents.recipes(event =>
{
event.remove({ output: '#minecraft:pickaxes' })
}
)
- Launch the game and create a new world
- Hover over GTCEu's Tetrahedrite Ore in JEI. Hold the shift key to view the tags. See that the
#minecraft:needs_stone_tool
tag still exists on the block. - View the recipe for any GTCEu pickaxe. See that the recipe still exists.
Additional Information
It seems that GTCEu might be creating its tags after KubeJS does its work. This would explain why tag removal doesn't work (Tetrahedrite ore didn't have the minecraft:needs_stone_tool
tag when the KubeJS script ran) and why recipe removal doesn't work (none of the GTCEu pickaxes had the minecraft:pickaxes
tag when the KubeJS script ran). Just a guess, of course.