#Need help with a server script please.

28 messages · Page 1 of 1 (latest)

agile spade
#

So I'm trying to setup a script to sort of make the mod "create" and the mod "secret rooms" compatible, by making all the secret rooms blocks unmoveable by adding the tag "create:non_moveable" to them. However, I have never used this mod before and I have barely any experience with java. After reading through some of the wiki posts I made a few tests trying to copy and change up the server script example script, switching out the names with the ones I assume I needed but I kept getting errors.

I managed NOT to get any errors with my current script. HOWEVER the block is still moveable, so the tag did not get added to it.
( knowing me I'm probably just stupid or something or missing something completely obvious )

My current script is:

ServerEvents.recipes(event => {
// Change recipes here
})

ServerEvents.tags('item', event => {
// Get the #secretroomsmod:ghost_block tag collection and add create:non_moveable to it
event.add('secretroomsmod:ghost_block'),('create:non_movable')
})

keen hazelBOT
#

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

hot ice
#

you are tagging the items, not the blocks

agile spade
#

ooooooooooooooooooooooooooh

#

so I'd need to switch out the "items" in the top for "blocks", right?

hot ice
#

singular, not plural. so 'item' for 'block'

#

your add line also looks a bit odd

#

event.add('mod:tag_to_be_added_to', '#othermod:tag_to_be_taken_from')

#

you need to specify a # if its a tag in the second arg, as usually its item/block ids

agile spade
#

so '#create:non_moveable'

hot ice
#

yest

#

if you want to add all the blocks in non_moveable to ghost_block

agile spade
#

it didn't seem to work 😅
it's weird to me that I don't get an error but the tag doesn't seem to get added to the block.

#

I'm gonna keep trying, thank you so much for your input though

hot ice
#

look at the blocks with f3, on the right side

#

it will show the tags

agile spade
#

oh, I didn't know that

#

should be here if it worked, shouldn't it? let me check if I spelled the tag right.

hot ice
#

i think you have the tags the wrong way around

#

at the moment you are taking everything in the non moveable tag, and adding it to the ghost block tag

#

so nothing gets added to the non moveable tag

agile spade
#

oh

hot ice
#

if you just want to add one block to a tag then its event.add('create:non_moveable', 'secretroomsmod:ghost_block')

#

where the first one is the tag, and the second the block to add

agile spade
#

yeah...

#

xD

#

knowing me I'm probably just stupid or something
yeah...

#

thank you. that solved that problem 😅
thank you so much! hope you have a great day!