how do i test if the player is inside

Started by theboss102007 on

Topic category: Help with modding (Java Edition)

Last seen on 16:03, 6. Apr 2020
Joined Mar 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
how do i test if the player is inside

for a mod im making, I need to test if the player is inside, so how do I do that.

Last seen on 03:23, 11. Apr 2020
Joined Mar 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Have a friend, I think what…
Wed, 04/01/2020 - 18:20

Have a friend, I think what you are trying to say is that how to test the mod inside minecraft .. if so, go to the tools that come out to the right and there is one that says "Run", press it several times until it turns green and then press again until you have the minecraft

Last seen on 16:03, 6. Apr 2020
Joined Mar 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
no I mean test if the player…
Thu, 04/02/2020 - 02:09

no I mean test if the player is inside a building like a house

Last seen on 02:50, 28. Mar 2024
Joined Mar 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
emm even Mojang can't do…
Thu, 04/02/2020 - 03:47

emm even Mojang can't do that

that explain why the music is random because they can detect if the player enter inside a house and add a house song

Last seen on 16:03, 6. Apr 2020
Joined Mar 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
oh ok thanks
Thu, 04/02/2020 - 16:03

oh ok thanks

Last seen on 23:55, 15. Mar 2023
Joined Oct 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Well, you might be able to…
Thu, 04/02/2020 - 17:44

Well, you might be able to check if the block the player is standing on can see the sky. There are procedures to check if blocks can see the sky, the only thing I'm not sure on is if you could check if the specific block the PLAYER is on can see the sky.

Last seen on 23:55, 15. Mar 2023
Joined Oct 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
emm even Mojang can't do…
Thu, 04/02/2020 - 17:55

emm even Mojang can't do that

that explain why the music is random because they can detect if the player enter inside a house and add a house song

This is actually incorrect. They would need to do something similar to this to make the ambient cave sounds play. Therefore, it is possible. All that would be needed really is to see if the block the player is on can see the sun or not. Although that would cause the music to play at the wrong times there should be ways around that. Ways, for example, that check if the block over the player is a certain type, like say wood or some other common block for a roof/ceiling. 

Last seen on 23:51, 22. Jun 2021
Joined Mar 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
how about to detect the…
Fri, 04/03/2020 - 12:57

how about to detect the nearest blocks around lining up like a square and if it's all planks except one which is the door(or two).

Last seen on 23:55, 15. Mar 2023
Joined Oct 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Yes, this is also possible,…
Fri, 04/03/2020 - 14:55

Yes, this is also possible, although it would be quite the tedious procedure to make. You would need to make an if loop that gets the block at each position relative to the player. This would mean something like Get block at x+2 y+1 z+2 = grass. This process would have to then be repeated for each individual block in the shape of a square.

Last seen on 15:21, 21. Feb 2024
Joined Feb 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Actually considering 'move…
Thu, 02/15/2024 - 02:06

Actually considering 'move inside' is a procedure for normal AI in Minecraft (Villagers) I'd say it is possible to detect a 'Inside' location but I believe the base of MCreator doesn't have that available to use normally.