#Immersive Engineering Mineral Vein
14 messages · Page 1 of 1 (latest)
Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!
So I did some digging and the recipes responsible for this is in ImmersiveEngineering-1.18.2-8.4.0-161.jar/data/immersiveengineering/recipes/mineral/ and the JSONs look like this:
{
"type": "immersiveengineering:mineral_mix",
"ores": [
{
"chance": 0.4,
"output": {
"tag": "forge:ores/lead"
}
},
{
"chance": 0.4,
"output": {
"tag": "forge:dusts/sulfur"
}
},
{
"chance": 0.2,
"output": {
"tag": "forge:ores/silver"
}
}
],
"spoils": [
{
"chance": 0.2,
"output": {
"item": "minecraft:gravel"
}
},
{
"chance": 0.5,
"output": {
"item": "minecraft:cobblestone"
}
},
{
"chance": 0.3,
"output": {
"item": "minecraft:cobbled_deepslate"
}
}
],
"dimensions": [
"minecraft:overworld"
],
"weight": 15,
"fail_chance": 0.05
}
Possible to use event.custom() for this?
Anyone please? I know this kind of modification is possible with CraftTweaker but what about KubeJS?
If it's located in recipe then it's possible to modify it with recipe events. You just need to try it and see.
Managed to get it to work! Here's some example code:
const sphalerite = {
"type": "immersiveengineering:mineral_mix",
"ores": [
{ "chance": 0.4, "output": { "tag": "forge:ores/zinc" } },
{ "chance": 0.2, "output": { "tag": "forge:dusts/sulfur" } },
{ "chance": 0.2, "output": { "tag": "forge:ores/fluorite" } },
{ "chance": 0.2, "output": { "tag": "forge:ores/iron" } }
],
"spoils": [
{ "chance": 0.2, "output": { "item": "minecraft:gravel" } },
{ "chance": 0.5, "output": { "item": "minecraft:cobblestone" } },
{ "chance": 0.3, "output": { "item": "minecraft:cobbled_deepslate" } }
],
"dimensions": ["minecraft:overworld"],
"weight": 15,
"fail_chance": 0.05
};
event.custom(sphalerite).id('immersiveengineering:mineral/sphalerite');
Realistically I can close the ticket now, but there's just one more thing I want to ask.
Is there a way to set localization strings using KubeJS? Currently it's spitting out the translation key in place of the name of the mineral vein.
(I know, I know, it should be done with a resource pack, but is it possible with KubeJS?)
you can use ClientEvents.lang to add new entries of translation. Check this wiki page.
https://kubejs.com/wiki/events/ClientEvents/lang
Thanks. What's the equivalent of this in KubeJS for MC 1.18.2?
Oh, my bad, I forgot it's 1.18. I don't see an equivalent in the event list, so you probably need to do it by creating a file at kubejs/assets/kubejs/lang/zh_cn.json with contents being {"desc.immersiveengineering.info.mineral.sphalerite": "闪锌矿"}
btw you can find list of event for 1.18 here
https://wiki.latvian.dev/books/kubejs-legacy/page/list-of-all-events
This is a list of all events. It's possible that not all events are listed here, but this list will...
Yesss it works! Thank you so much! ❤️