#hiya would anyone know the correct regex for gtceu tools?

94 messages · Page 1 of 1 (latest)

tawdry hamlet
#

this works for farmers/nethers delight but the same regex doesn't work for gtceu tools

#

i've also tried .* as well, it only seems to work if i list all the tools directly but that obviously uses a ton of space and time to load

stable palm
#

AFAIK GT uses NBT tags to store the material type - so all pick axes are the same item

tawdry hamlet
#

(dw im adding all gtceu mats to silentgear and balancing it so it will still be a good pack)

radiant lily
#

Have you tried * instead of +?

tawdry hamlet
twilit oxide
deep wolf
#

Wait I'll just send what my pack has hold on

#

just do this but recipes instead of hiding idk

#

this just hides any item from those tags that arent iron

tawdry hamlet
tawdry hamlet
#

oh duh

deep wolf
#

this is a clientside script for hiding

#

ServeEvents.recipes(event => {
    let tags = [
        Ingredient.of("#forge:tools").itemIds,
        Ingredient.of("#forge:tools/scythes").itemIds,
        Ingredient.of("#forge:tools/saws").itemIds,
        Ingredient.of("#forge:tools/hammers").itemIds,
        Ingredient.of("#forge:tools/mining_hammers").itemIds,
        Ingredient.of("#forge:tools/mortars").itemIds,
        Ingredient.of("#forge:tools/drills").itemIds,
        Ingredient.of("#forge:tools/wire_cutters").itemIds,
        Ingredient.of("#forge:tools/files").itemIds,
        Ingredient.of("#forge:tools/screwdrivers").itemIds,
        Ingredient.of("#forge:tools/wrenches").itemIds,
        Ingredient.of("#forge:tools/knives").itemIds,
        Ingredient.of("#forge:tools/butchery_knives").itemIds,
        Ingredient.of("#forge:tools/crowbars").itemIds,
        Ingredient.of("#forge:tools/spades").itemIds,
        Ingredient.of("#forge:tools/mallets").itemIds,
        Ingredient.of("#forge:tools/chainsaws").itemIds,
    ]

    tags.forEach(itemList => {
        let gtItemsList = itemList.filter((i) => Ingredient.of(/^gtceu:.*/).itemIds.toArray().includes(i))
        event.remove(gtItemsList)
    })
    
})```
#

just like this ig

#

did not test

#

🔥

tawdry hamlet
#

haha i test

deep wolf
#

if you want to remove and hide them you can just like copy this to client scripts or figure out some evil global var startup stuff

#

or you can do both in server by also adding them to the hidden tag which apparently exists

tawdry hamlet
#

i do need to globally hide them for all players in emi as well

tawdry hamlet
#

ill test more later

deep wolf
#

what happens

tawdry hamlet
#

just doesnt hide the recipes

#

the only thing ive been able to find that works is literally just

deep wolf
#

I sent one to remove recipes not hide them

#

oh wait

tawdry hamlet
#
  const lv_material_drills = [
    'gtceu:lv_flint_drill',
    'gtceu:lv_aluminium_drill',
    'gtceu:lv_iron_drill',
    'gtceu:lv_titanium_drill',
    'gtceu:lv_neutronium_drill',
    'gtceu:lv_duranium_drill',
    'gtceu:lv_bronze_drill',
    'gtceu:lv_diamond_drill',
    'gtceu:lv_invar_drill',
    'gtceu:lv_sterling_silver_drill',
    'gtceu:lv_rose_gold_drill',
    'gtceu:lv_stainless_steel_drill',
    'gtceu:lv_steel_drill',
    'gtceu:lv_ultimet_drill',
    'gtceu:lv_wrought_iron_drill',
    'gtceu:lv_tungsten_carbide_drill',
    'gtceu:lv_damascus_steel_drill',
    'gtceu:lv_tungsten_steel_drill',
    'gtceu:lv_cobalt_brass_drill',
    'gtceu:lv_vanadium_steel_drill',
    'gtceu:lv_naquadah_alloy_drill',
    'gtceu:lv_red_steel_drill',
    'gtceu:lv_blue_steel_drill',
    'gtceu:lv_hsse_drill'
  ];
  lv_material_drills.forEach(lv_material_drill => {
    event.remove({ output: lv_material_drill });
  });```
deep wolf
#

Ik why it didnt

#

im dumb

tawdry hamlet
#

thats it thats the only thing ive found that works

deep wolf
#

event.remove({output: gtItemsList})

#

er try that

#

replace event.remove with that

tawdry hamlet
#

ok sure

deep wolf
#

wait no that wouldnt work

#

what am I talking abt

#

1s LOL

tawdry hamlet
#

haha i gtg for a bit but when im back ill try it

#

ty for the help ❤️

deep wolf
#

can just foreach it

#
tags.forEach(itemList => {
    let gtItemsList = itemList.filter((i) => Ingredient.of(/^gtceu:.*/).itemIds.toArray().includes(i))
    gtItemsList.forEach(item => {
        event.remove({output: item})
    })
})```
#

for each in a for each splendid

tawdry hamlet
deep wolf
#

this i think

#

wait im missing smtn

#
ServerEvents.recipes(event => {
    let tags = [
        Ingredient.of("#forge:tools").itemIds,
        Ingredient.of("#forge:tools/scythes").itemIds,
        Ingredient.of("#forge:tools/saws").itemIds,
        Ingredient.of("#forge:tools/hammers").itemIds,
        Ingredient.of("#forge:tools/mining_hammers").itemIds,
        Ingredient.of("#forge:tools/mortars").itemIds,
        Ingredient.of("#forge:tools/drills").itemIds,
        Ingredient.of("#forge:tools/wire_cutters").itemIds,
        Ingredient.of("#forge:tools/files").itemIds,
        Ingredient.of("#forge:tools/screwdrivers").itemIds,
        Ingredient.of("#forge:tools/wrenches").itemIds,
        Ingredient.of("#forge:tools/knives").itemIds,
        Ingredient.of("#forge:tools/butchery_knives").itemIds,
        Ingredient.of("#forge:tools/crowbars").itemIds,
        Ingredient.of("#forge:tools/spades").itemIds,
        Ingredient.of("#forge:tools/mallets").itemIds,
        Ingredient.of("#forge:tools/chainsaws").itemIds,
    ]

    tags.forEach(itemList => {
        let gtItemsList = itemList.filter((i) => Ingredient.of(/^gtceu:.*/).itemIds.toArray().includes(i))
        gtItemsList.forEach(item => {
            event.remove({ output: item })
        })

    })

})```
tawdry hamlet
#

ok cool give me a sec to eat then i wiil test ty again

tawdry hamlet
#

nice that worked!! no comma on chainsaw line was only issue

#

thank u billions my /reload command thanks u

deep wolf
#

awesome

#

theres a more performant way to do it I think

#

but eh

#

if you dont care about stopping it from hiding any specific tools,

ServerEvents.recipes(event => {
    let tags = [
        Ingredient.of("#forge:tools").itemIds,
        Ingredient.of("#forge:tools/scythes").itemIds,
        Ingredient.of("#forge:tools/saws").itemIds,
        Ingredient.of("#forge:tools/hammers").itemIds,
        Ingredient.of("#forge:tools/mining_hammers").itemIds,
        Ingredient.of("#forge:tools/mortars").itemIds,
        Ingredient.of("#forge:tools/drills").itemIds,
        Ingredient.of("#forge:tools/wire_cutters").itemIds,
        Ingredient.of("#forge:tools/files").itemIds,
        Ingredient.of("#forge:tools/screwdrivers").itemIds,
        Ingredient.of("#forge:tools/wrenches").itemIds,
        Ingredient.of("#forge:tools/knives").itemIds,
        Ingredient.of("#forge:tools/butchery_knives").itemIds,
        Ingredient.of("#forge:tools/crowbars").itemIds,
        Ingredient.of("#forge:tools/spades").itemIds,
        Ingredient.of("#forge:tools/mallets").itemIds,
        Ingredient.of("#forge:tools/chainsaws").itemIds,
    ]

    tags.forEach(itemList => {
        event.remove({output: itemList})
    })
})```
#

I think that works

tawdry hamlet
#

the first one is perfect bc i need to keep tools tag for silentgear

deep wolf
#

alr

tawdry hamlet
#

ty so much

deep wolf
# tawdry hamlet ty so much

ok so ive found for hiding items this solution is a bit problematic as tags seem to load after jei hiding events or something? so for client hiding id recommend regex

#
JEIEvents.hideItems(event => {
    event.hide([
        // misc
        Ingredient.of(/emi:.*repairing.*/),
        // gt ore related
        Ingredient.of(/gtceu:.*ore/),
        Ingredient.of(/gtceu:.*indicator/),
        Ingredient.of(/gtceu:.*raw.*block/),
        // gt tools
        Ingredient.of(/gtceu:(?!iron(_|$)).*_scythe/),
        Ingredient.of(/gtceu:(?!iron(_|$)).*saw/),
        Ingredient.of(/gtceu:(?!iron(_|$))(?!.*forge).*_hammer/),
        Ingredient.of(/gtceu:(?!iron(_|$)).*_mortar/),
        Ingredient.of(/gtceu:(?!iron(_|$)).*_drill/),
        Ingredient.of(/gtceu:(?!iron(_|$)).*_wir.*utter/),
        Ingredient.of(/gtceu:(?!iron(_|$)).*_file/),
        Ingredient.of(/gtceu:(?!iron(_|$)).*_screwdriver/),
        Ingredient.of(/gtceu:(?!iron(_|$)).*_wrench/),
        Ingredient.of(/gtceu:(?!iron(_|$)).*_knife/),
        Ingredient.of(/gtceu:(?!iron(_|$)).*_crowbar/),
        Ingredient.of(/gtceu:(?!iron(_|$)).*_spade/),
        Ingredient.of(/gtceu:(?!iron(_|$)).*_mallet/),
        Ingredient.of(/gtceu:(?!iron(_|$)).*_plunger/),
        // vanilla gt tools
        Ingredient.of(/gtceu:(?!iron(_|$)).*_sword/),
        Ingredient.of(/gtceu:(?!iron(_|$)).*_pickaxe/),
        Ingredient.of(/gtceu:(?!iron(_|$)).*_axe/),
        Ingredient.of(/gtceu:(?!iron(_|$)).*_shovel/),
        Ingredient.of(/gtceu:(?!iron(_|$)).*_hoe/),
        Ingredient.of(/gtceu:(?!iron(_|$)).*_sword/)
    ])
})```
tawdry hamlet
#

ok cool thank you, ill put this in

deep wolf
#

working on improving it

deep wolf
#

yea ok

deep wolf
# tawdry hamlet ok cool thank you, ill put this in
JEIEvents.hideItems(event => {
    event.hide([
        // misc
        Ingredient.of(/emi:.*repairing.*/),
        // gt ore related
        Ingredient.of(/gtceu:.*ore/),
        Ingredient.of(/gtceu:.*indicator/),
        Ingredient.of(/gtceu:.*raw.*block/),
        // gt tools
        Ingredient.of(/gtceu:(?!iron(_|$)).*_scythe/),
        Ingredient.of(/^gtceu:(?!([a-z]?v_)?iron).*saw$/),
        Ingredient.of(/gtceu:(?!iron(_|$))(?!.*forge).*_hammer/),
        Ingredient.of(/gtceu:(?!iron(_|$)).*_mortar/),
        Ingredient.of(/^gtceu:(?!([a-z]?v_)?iron).*_drill$/),
        Ingredient.of(/^gtceu:(?!([a-z]?v_)?iron).*_wirecutter$/),
        Ingredient.of(/gtceu:(?!iron(_|$)).*_wire_cutter/),
        Ingredient.of(/gtceu:(?!iron(_|$)).*_file/),
        Ingredient.of(/^gtceu:(?!([a-z]?v_)?iron).*_screwdriver$/),
        Ingredient.of(/^gtceu:(?!([a-z]?v_)?iron).*_wrench$/),
        Ingredient.of(/gtceu:(?!iron(_|$)).*_knife/),
        Ingredient.of(/gtceu:(?!iron(_|$)).*_crowbar/),
        Ingredient.of(/gtceu:(?!iron(_|$)).*_spade/),
        Ingredient.of(/gtceu:(?!rubber(_|$)).*_mallet/),
        Ingredient.of(/gtceu:(?!rubber(_|$)).*_plunger/),
        // vanilla gt tools
        Ingredient.of(/gtceu:.*_sword/),
        Ingredient.of(/gtceu:.*_pickaxe/),
        Ingredient.of(/gtceu:.*_axe/),
        Ingredient.of(/gtceu:.*_shovel/),
        Ingredient.of(/gtceu:.*_hoe/),
        Ingredient.of(/gtceu:.*_sword/)
    ])
})```
#

had to do more regex for the power tools

#

if you wanna unhide more than just iron you can replace iron with (iron|steel|diamond)

#

etc

tawdry hamlet
#

ur so cool

#

ty haha

deep wolf
#

I hate chatgpt

#

it took like an hour of instructions

#

I hate regex more than chatgpt fortunately

tawdry hamlet
#

did u use chat gpt to figure it out?

#

it can be real silly sometimes

deep wolf
#

yea bc I am NOT learning regex

deep wolf
tawdry hamlet
#

haha that is fair

deep wolf
#

i had to give it a list of instructions then 5 fixes

tawdry hamlet
#

well ty i rlly appreciate it

deep wolf
#

I was running unit tests on the slop it output

tawdry hamlet
#

this looks really annoying lol

deep wolf
#

the shit ill do to not understand these runes

#

unfortunately im starting to understand some of them

tawdry hamlet
#

it happens