Find a safe spot to spawn a player

Started by Acb on

Topic category: Help with modding (Java Edition)

Last seen on 20:24, 25. Aug 2020
Joined Jul 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Find a safe spot to spawn a player

So I made a dimension with a horizontal portal(using a custom block), and I was wondering how to have it spawn a player and exit portal in the nearest safe spot, because I keep spawning in walls and becoming stuck.

Select random X and Z and…
Wed, 05/13/2020 - 17:56

Select random X and Z and then start at say 200 and go down in a loop and check until you find enough air blocks to safely spawn.

Last seen on 20:24, 25. Aug 2020
Joined Jul 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
nope   it gave me this error…
Wed, 05/13/2020 - 18:31

nope

 

it gave me this error

also I can't seem to copy text from the console

Last seen on 20:24, 25. Aug 2020
Joined Jul 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
correct image:
Wed, 05/13/2020 - 18:31

correct image:

Last seen on 20:24, 25. Aug 2020
Joined Jul 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
nope. still spawn in walls…
Wed, 05/13/2020 - 18:40

nope. still spawn in walls. also I'm using the when player enters dimension trigger.

Then your procedure is not…
Wed, 05/13/2020 - 18:50

Then your procedure is not set up properly. Use print block so see what your loops are doing.

Last seen on 20:24, 25. Aug 2020
Joined Jul 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
already did that. here's my…
Wed, 05/13/2020 - 18:56

already did that. here's my code:

 

 

it only prints one x and z before saying sucess

 

Last seen on 20:24, 25. Aug 2020
Joined Jul 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
also this is happening
Wed, 05/13/2020 - 19:10

also this is happening

why are overworld entities loaded

This is due to a smaller RAM…
Wed, 05/13/2020 - 19:28

This is due to a smaller RAM amount in test client while the chunk gen is running. But your procedure is fine, would you mind sending me your workspace (eg. putting it on mediafire and linking to dl here). This might be a bug.

Last seen on 20:24, 25. Aug 2020
Joined Jul 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
btw, to get the portal block…
Wed, 05/13/2020 - 19:45

btw, to get the portal block, do 

/give @p extendedprogression:coreportal

 

I can confirm move entity to…
Thu, 05/14/2020 - 14:43

I can confirm move entity to procedure blocks is not working as it should. It works a bit better in 1.14.4, but still not properly.

I will fix this in 2020.3.

Last seen on 20:24, 25. Aug 2020
Joined Jul 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Ok, but I can't use 1.12.2…
Wed, 05/20/2020 - 21:18

Ok, but I can't use 1.12.2 in 2020.3, even if I copy the generator plugin file. I'm making a modpack based around it, and now I can't really support it. The code works just fine now(aside from the need to check if there is ground where you're spawning).