Jump to content

how to test for player in a specific dimension


Recommended Posts

so I am trying to set up a sword with a withering effect on left click or attack, but the idea is that the effect will be stronger or weaker depending on the dimension. so I want it to see which dimension the player is in if it is the right one then test for living entity and if both are true then add withering. I have the living entity tester, but I can't figure out how to add the dimension checker. I am on Minecraft version 1.20.1 and Forge version 47.2.0, with parchment mappings version 2023.09.03-1.20.1

Thanks in advance for any help!

 

Link to comment
Share on other sites

Posted (edited)

SOLVED

With the help of some people on Discord I got this solved. it's

if (entity.level().dimension() == Level.OVERWORLD)

to test if your player is in the overworld, and you would change that depending on need.

Thanks for the help!

Edited by LoneWolf58
adding "solved"
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.