#JEIEvents.hideItems() doesn't hide items from a certain mod on first load

11 messages · Page 1 of 1 (latest)

broken verge
#

in startup_scripts i add an item id list to the global object like this:

global["ITEMS_TO_REMOVE"] = [
  "minecraft:diamond_ore",
  "minecraft:deepslate_diamond_ore",
  "vs_tournament:gift_bag",
  "minecraft:acacia_boat",
  "create_connected:copycat_beam",
  "create_connected:copycat_block",
  "create_connected:copycat_board",
  "create_connected:copycat_box",
  "create_connected:copycat_catwalk",
  "create_connected:copycat_fence",
  "create_connected:copycat_fence_gate",
  "create_connected:copycat_slab",
  "create_connected:copycat_stairs",
  "create_connected:copycat_vertical_step",
  "create_connected:copycat_wall",
  "create_connected:bamboo_window",
];```
and then i use that list in `server_scripts` to remove the items recipes with `ServerEvents.recipes()`, and that works fine, all recipes of the items from the list are removed correctly

i also use this list in `client_scripts` to hide the items from JEI with `JEIEevents.hideItems()` like this:
```js
JEIEvents.hideItems((e) => {
  console.log(
    "create_connected LOADED: " + Platform.isLoaded("create_connected")
  );
  console.log("HIDING " + global.ITEMS_TO_REMOVE.toString());
  e.hide(global.ITEMS_TO_REMOVE);
});```
first log logs true
second log correctly logs the item array
the issue is that after launcing up minecraft and entering a world, none of the items from `create_connected`  mod are hidden from JEI, other items in that list are hidden correctly
running the `/reload` command fixes the issue
restarting minecraft, entering a world again results in the mod's items not being hidden, but `/reload` re-runs the client script so the items get hidden correctly, but i would like them to be hidden on the first script run like the other items

i suspect that the `hideItems()` function is being called before the mod items are loaded or something like that? but `Platform.isLoaded("create_connected")` returns true, so what could be the issue?
stray patrolBOT
#

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

broken verge
#

JEIEvents.hideItems() doesn't hide items from a certain mod on first load

broken verge
#

update: i have added items from multiple other mods to this list and create_connected is still the only mod that doesnt get its items hidden

broken verge
#

still no solution to this

ionic oracle
#

Same bug here. I manually disabled them from EMI.

noble vapor
#

I did remove the recipes from create connected so they no longer conflict with copycats and they don't show up in the creative menu, but otherwise it's still annoying having it in JEI

broken verge
#

still not sure how youd do it with kubejs tho

noble vapor
#

ah damn
thanks tho!