KubeJS (Old)

KubeJS (Old)

3M Downloads

REI Item Hiding won't work

szunakabeats opened this issue ยท 6 comments

commented

Minecraft Version

1.19.2

KubeJS Version

1902.6.0-build.86

Rhino Version

1902.2.1-build.242

Architectury Version

6.2.46

Forge/Fabric Version

Fabric 0.14.9

Describe your issue

I took the REI Hiding script from the kubejs wiki page and included all unimportant items in the script. I put the script in the client_scripts folder and reloaded it ingame with F3+T. there are no errors ingame but unfortunately the items are still in the REI list..

My Script:


onEvent('rei.hide.items', event => {
    event.hide([
        'minecraft:barrier',
        'minecraft:water',
        'minecraft:lava',
        'minecraft:jigsaw',
        'minecraft:light',
        'minecraft:structure_block',
        'minecraft:structure_void',
        'minecraft:debug_stick',
        'bosses_of_mass_destruction:void_blossom_block',
        'charm:totem_of_preserving_holder',
        'charm:atlas',
        'fwaystones:waystone_debugger',
        'interactic:item_filter',
        'libraryferret:iron_coins_jtl',
        'libraryferret:emerald_coins_jtl',
        'libraryferret:gold_coins_jtl',
        'libraryferret:diamond_coins_jtl',
        'libraryferret:netherite_coins_jtl',
        'libraryferret:fake_iron_block',
        'libraryferret:fake_gold_block',
        'libraryferret:fake_emerald_block',
        'libraryferret:fake_diamond_block',
        'libraryferret:fake_netherite_block',
        'libraryferret:unbreakable_iron_beacon',
        'libraryferret:unbreakable_gold_beacon',
        'libraryferret:unbreakable_emerald_beacon',
        'libraryferret:unbreakable_diamond_beacon',
        'libraryferret:unbreakable_netherite_beacon',
        'everycomp:all_woods',
        'supplementaries:sconce_nether_brass',
        'everycomp:mcd/betternether/nether_reed_bark_glass_door',
        'everycomp:mcd/betternether/nether_reed_barn_door',
        'everycomp:mcd/betternether/nether_reed_barn_glass_door',
        'everycomp:mcd/betternether/nether_reed_beach_door',
        'everycomp:mcd/betternether/nether_reed_classic_door',
        'everycomp:mcd/betternether/nether_reed_cottage_door',
        'everycomp:mcd/betternether/nether_reed_four_panel_door',
        'everycomp:mcd/betternether/nether_reed_glass_door',
        'everycomp:mcd/betternether/nether_reed_modern_door',
        'everycomp:mcd/betternether/nether_reed_mystic_door',
        'everycomp:mcd/betternether/nether_reed_nether_door',
        'everycomp:mcd/betternether/nether_reed_paper_door',
        'everycomp:mcd/betternether/nether_reed_japanese_door',
        'everycomp:mcd/betternether/nether_reed_japanese2_door',
        'everycomp:mcd/betternether/nether_reed_stable_door',
        'everycomp:mcd/betternether/nether_reed_stable_head_door',
        'everycomp:mcd/betternether/nether_reed_tropical_door',
        'everycomp:mcd/betternether/nether_reed_western_door',
        'everycomp:mcd/betternether/nether_reed_planks_path',
        'everycomp:mcd/betternether/nether_reed_picket_fence',
        'everycomp:mcd/betternether/nether_reed_stockade_fence',
        'everycomp:mcd/betternether/nether_reed_horse_fence',
        'everycomp:mcd/betternether/nether_reed_wired_fence',
        'everycomp:mcd/betternether/nether_reed_pyramid_gate',
        'everycomp:mcd/betternether/nether_reed_highley_gate',
        'everycomp:mcd/betternether/nether_reed_planter_box',
        'everycomp:mcd/betternether/nether_reed_shutter',
        'everycomp:mcd/betternether/nether_reed_table',
        'everycomp:mcd/betternether/nether_reed_chair',
        'everycomp:mcd/betternether/nether_reed_shelf',
        'everycomp:mcd/betternether/nether_reed_cabinet'

    ])
  })

Crash report/logs

No response

commented

KubeJS (6) for 1.19 is quite a bit different from 1.18, but the only thing you'll need to change here is onEvent.

Try replacing it with

REIEvents.hide('item', e => {
    //script here
})```
commented

you mean like so ? because it still does not work :(

  REIEvents.hide('item', e => {
    'minecraft:barrier',
    'minecraft:water',
    'minecraft:lava',
    'minecraft:jigsaw',
    'minecraft:light',
    'minecraft:structure_block',
    'minecraft:structure_void',
    'minecraft:debug_stick',
    'bosses_of_mass_destruction:void_blossom_block',
    'charm:totem_of_preserving_holder',
    'charm:atlas',
    'fwaystones:waystone_debugger',
    'interactic:item_filter',
    'libraryferret:iron_coins_jtl',
    'libraryferret:emerald_coins_jtl',
    'libraryferret:gold_coins_jtl',
    'libraryferret:diamond_coins_jtl',
    'libraryferret:netherite_coins_jtl',
    'libraryferret:fake_iron_block',
    'libraryferret:fake_gold_block',
    'libraryferret:fake_emerald_block',
    'libraryferret:fake_diamond_block',
    'libraryferret:fake_netherite_block',
    'libraryferret:unbreakable_iron_beacon',
    'libraryferret:unbreakable_gold_beacon',
    'libraryferret:unbreakable_emerald_beacon',
    'libraryferret:unbreakable_diamond_beacon',
    'libraryferret:unbreakable_netherite_beacon',
    'everycomp:all_woods',
    'supplementaries:sconce_nether_brass',
    'everycomp:mcd/betternether/nether_reed_bark_glass_door',
    'everycomp:mcd/betternether/nether_reed_barn_door',
    'everycomp:mcd/betternether/nether_reed_barn_glass_door',
    'everycomp:mcd/betternether/nether_reed_beach_door',
    'everycomp:mcd/betternether/nether_reed_classic_door',
    'everycomp:mcd/betternether/nether_reed_cottage_door',
    'everycomp:mcd/betternether/nether_reed_four_panel_door',
    'everycomp:mcd/betternether/nether_reed_glass_door',
    'everycomp:mcd/betternether/nether_reed_modern_door',
    'everycomp:mcd/betternether/nether_reed_mystic_door',
    'everycomp:mcd/betternether/nether_reed_nether_door',
    'everycomp:mcd/betternether/nether_reed_paper_door',
    'everycomp:mcd/betternether/nether_reed_japanese_door',
    'everycomp:mcd/betternether/nether_reed_japanese2_door',
    'everycomp:mcd/betternether/nether_reed_stable_door',
    'everycomp:mcd/betternether/nether_reed_stable_head_door',
    'everycomp:mcd/betternether/nether_reed_tropical_door',
    'everycomp:mcd/betternether/nether_reed_western_door',
    'everycomp:mcd/betternether/nether_reed_planks_path',
    'everycomp:mcd/betternether/nether_reed_picket_fence',
    'everycomp:mcd/betternether/nether_reed_stockade_fence',
    'everycomp:mcd/betternether/nether_reed_horse_fence',
    'everycomp:mcd/betternether/nether_reed_wired_fence',
    'everycomp:mcd/betternether/nether_reed_pyramid_gate',
    'everycomp:mcd/betternether/nether_reed_highley_gate',
    'everycomp:mcd/betternether/nether_reed_planter_box',
    'everycomp:mcd/betternether/nether_reed_shutter',
    'everycomp:mcd/betternether/nether_reed_table',
    'everycomp:mcd/betternether/nether_reed_chair',
    'everycomp:mcd/betternether/nether_reed_shelf',
    'everycomp:mcd/betternether/nether_reed_cabinet'
})
commented

that is not valid java script, there will be errors in the client logs about it not being able to load.
You still need the event.hide, the only thing that changed was the event line

commented

ok i found out that this should work via discord and i even looked into some modpacks in 1.19.2 but it still wont work ...

REIEvents.hide('item', event => {
    event.hide([
        'minecraft:barrier',
        'minecraft:jigsaw',
        'minecraft:light',
        'minecraft:structure_block',
        'minecraft:structure_void',
        'charm:atlas'
    ])
})
commented

Do other, slightly more normal things work?
(like diamonds, or logs)

commented

i got it working now :)... idk what i did wrong tho. i put //priority 0 at the top and then sorted the script in alphabetical order..

the only thing which is not working are the 'everycomp' ones.. maybe because they have a certain nbt to them