[HELP] Keep player out of a biome / Teleport player out of a biome

Started by RandomDrago on

Topic category: Help with Minecraft modding (Java Edition)

Joined Feb 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
[HELP] Keep player out of a biome / Teleport player out of a biome

I'm basically making a city and the city has it's own biome, The player can't enter it unless they got boolean variable "cityperm" is true

Is there a way to keep the player out of the city biome?

What I thought was something like teleporting the player a block away if they are in the biome or like teleporting them to the entrance or something but I don't know how to detect that.

Can someone please lend a hand?

Joined Aug 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Hello, I found a close…
Fri, 08/12/2022 - 22:12

Hello, I found a close alternative, I have made a procedure that will strike you with lightning if you do not have an emerald in your offhand. .

Joined Feb 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Well- That's a way to detect…
Sat, 08/13/2022 - 12:51

Well- That's a way to detect if player is in biome thank you for that!

But- Lightning will end up harming the nearby entities as well- Plus I don't want player to get harmed since it might lead to their death- I might just end up teleporting player to entrance of city as worst case scenario

Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
you could always do the…
Sun, 08/28/2022 - 18:36

you could always do the twilight forest approach and give the player a negative potion effect if a player is in the biome, which unlike lightning does not damage non-player entities