#Can i run this script on a specific dimension?
20 messages · Page 1 of 1 (latest)
Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!
event.player.level.dimension should give you what you need
so, if (event.player.level.dimension != "some_resource_id_for_dimension") return
the thing is ive tried this and it appears to work in every dimension for some reason
Then, I suggest doing console.log(event.player.level.dimension) somewhere in your right click code, to see what that variable actually is
You can then just check in the logs what's happening
just seems to say this
and script proceeds to work in the overworld when it shouldnt
show me the code you have so far
const { player } = event
console.log(event.player.level.dimension)
if (event.player.level.dimension != "steamsmith:the_nether")
if (player.getItemInHand(event.hand).id != "minecraft:water_bucket") return
if (player.y > 128) return
event.cancel()
})
not sure if am doing it right
you forgot the return
tysm
took me an hour to find what was wrong
absolute tragedy
ill close it now