#I don't understand why adding items doesn't work

43 messages · Page 1 of 1 (latest)

solar shard
#

I wrote this, but nothing was added after the re-entry, I don't see an error, I output it using console.log() and everything seems to be correct, please help

onEvent("block.registry", (event) => {
  const all_information = [
    { id: "aluminium", pach: "aluminium", name: "Алюминия" },
    { id: "allthemodium", pach: "allthemodium", name: "Оллземодиума" },
    { id: "bronza", pach: "bronza", name: "Бронзы" },
    { id: "copper", pach: "copper", name: "Меди" },
    { id: "electrium", pach: "electrium", name: "Электриума" },
    { id: "iesnium", pach: "iesnium", name: "Иесния" },
    { id: "constantan", pach: "constantan", name: "Константаниума" },
    { id: "lead", pach: "lead", name: "Свинца" },
    { id: "lumium", pach: "lumium", name: "Люмия" },
    { id: "arcane_gold", pach: "arcane_gold", name: "Волшебного Золота" },
    { id: "nickel", pach: "nickel", name: "Никеля" },
    { id: "osmium", pach: "osmium", name: "Осмия" },
    { id: "silver", pach: "silver", name: "Серебра" },
    { id: "steel", pach: "steel", name: "Стали" },
    { id: "tin", pach: "tin", name: "Олова" },
    { id: "unobtainium", pach: "unobtainium", name: "Унобтаниума" },
    { id: "uranium", pach: "uranium", name: "Урана" },
    { id: "vibranium", pach: "vibranium", name: "Вибраниума" },
    { id: "enderium", pach: "enderium", name: "Эндериума" },
  ];

  let blocks = [];

  all_information.forEach((element) => {
    for (let i = 1; i < 10; i++) {
      blocks.push([
        `compressium_custom:${element.id}_${i}`,
        `kubejs:block/block_XX/${element.pach}/x${i}`,
        `Сжатый Блок ${element.name} (х${i})`,
      ]);
    }
  });

  blocks.forEach((block) => {
    event
      .create(block[0])
      .textureAll(block[1])
      .material("metal")
      .requiresTool(true)
      .resistance(8)
      .hardness(5)
      .harvestTool("pickaxe", 2)
      .displayName(block[2]);
  });
});

icy axleBOT
#

Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!

zinc hawk
#

well

#

did you restart your game?

solar shard
grave lakeBOT
#

Please send your startup.txt log file.
You can find it here: minecraft/logs/kubejs/startup.txt

north magnet
#

bronza

#

xD

zinc hawk
north magnet
#

sounds funny

zinc hawk
#

oh yea

north magnet
#

o.o

solar shard
grave lakeBOT
#

Paste version of startup.txt from @solar shard

north magnet
#

you have multiple erroring files

#

o.o

zinc hawk
#

two heh

#

and they are completely not related to this hmmm

north magnet
#

why do people never check logs SCWWcrying

zinc hawk
zinc hawk
# solar shard

either way:

  1. you can't use console.table with rhino
  2. it's not texture for fluids
grave lakeBOT
#

You can make custom fluids with KubeJS, and the wiki has a page on that!

solar shard
zinc hawk
#

in another one

#

like I said

grave lakeBOT
#

[Quote ➤](#1126183080323993620 message) two heh

#

[Quote ➤](#1126183080323993620 message) and they are completely not related to this hmmm

zinc hawk
#

just read logs the next time heh

solar shard
#
onEvent("fluid.registry", (event) => {
  event.create("tempriche").displayName("Температура").bucketColor(0xffbb00);

  let constant = event
    .create("mekanism_custom:constant")
    .displayName("Расплавленный констант")
    .bucketColor(0xed7f69)
    .textureStill("kubejs:block/konstunt_still")
    .textureFlowing("kubejs:block/konstunt_still")
    .luminosity(5);

  constant.bucketItem.texture("kubejs:item/konst_bucket");
});
```file with fluids
zinc hawk
#

it's erroing about the bucketItem line

solar shard
#

but bucketItem works

#

with it, I applied a texture and it was displayed

zinc hawk
#

but it's erroring about texture being undefined

grave lakeBOT
#

[Quote ➤](#1028053509792333926 message) so you can do stuff like ```js
.bucketItem(item => {
item.glow(true).rarity('rare')
})

solar shard
#

kubejs\assets\kubejs\textures\item\konst_bucket
is this the full path to it, is there a mistake in it?

zinc hawk
#

no

#

but there is in the script

zinc hawk
north magnet
#

just delete the bucket line completely, you dont need it

zinc hawk
#

^

#

or comment it out

solar shard
# north magnet xD

bronze is written like this in Russian in English letters, I don’t know how bronze will be in English, so I wrote like this

#

sorry, I really didn't know that console.table doesn't work in kubejs and causes an error, so the file wasn't read after this line