#client_scripts
75 messages · Page 1 of 1 (latest)
wouldnt it be better to add a tooltip instead 
no, you forgot to tell it what item to add it to
it would also be event.add(linebanned, ['BANNED']) I believe
^
besides that it looks correct to me
oh you should also use const for the array instead of var
tooltip version:
onEvent('item.tooltip', e => {
let ban = []
ban.forEach(item => e.add(item, Text.red('BANNED'))
})
Info version:
onEvent('jei.information', e => {
let ban = []
ban.forEach(item => e.add(item, 'BANNED')
})
yall hijacking my thread 
..your?

something like that i think
if you add the items to the ban list, yes
and either choose the one from me, or the one from you
one will show when you press R and see the info tab
the tooltip will show up when you hover over the item
tooltip also allows for colors, like red
no
F3+T
yes, its a client reload
has nothing to do with server
let me see what you wrote
delete line 8
you are resetting the list to have no elements
does let reset var
yes
both let and var can be changed at any time
const cannot be changed directly, unless you change the items inside a list or object
yeah but will a variable defined by let be the same as a var one (i guess yes)
for instance if you have a const list, you can add and remove from the list, but you cannot assign it a different list or value
yes
more or less
yeah i figured
i cant think of the word right now
since otherwise it couldnt know which one you mean when you use the name somewhere ig
let only works on the "level" its on (i forgot the word, its pissing me off) and deeper
var should work globally even outside
outside of where it was created
yeah i know
im assuming rhino does the same as JS
Scope.
hmmm send me your client.txt
locally
client things are always local
dedicated servers only have server and startup
/logs/kubejs/client.txt
Paste version of client.txt from @onyx plume
hm theres nothing there 
try to use Text.of('BANNED').red()
archives?

no, i told you server doesnt have client scripts
you do it locally
in your own KJS
you need to give it to everyone
thats the only way
xD
try it like this
the one with the banned
rewrite it like mine :P
also
you are resetting the ban list again...
line 8
_>
youre not setting the tooltip to anything, cuz your list is empty
ok hold on..
i'll rewrite everything for you
replace EVERYTHING with this
onEvent('item.tooltip', e => {
let ban = [
'ftbic:nuke',
'create:cart_assembler'
]
ban.forEach(item => e.add(item, Text.of('BANNED').red()))
})
its alright :P
got it working
