Making A Horror Mod

Started by Creativeman312 on

Topic category: Help with Minecraft modding (Java Edition)

Joined Mar 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Making A Horror Mod

So I'm making a mob that spawns behind trees when a player is in any forest and stalks them. If the player doesn't look the entity will de-spawn and after a while it will spawn again. If the player looks at it it will disappear and TP to a different tree and play a sound. I need some help with it, I don't expect you to make the entire thing, but it would be nice if you could help me add a few things. Sorry for the gigantic yap session, I don't expect anyone to see this anytime soon.

Joined Feb 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Very simple, but not to be…
Sat, 07/12/2025 - 11:46

Very simple, but not to be explained :)

Create an "On Your Horror Entity Tick Update" procedure.  Check to see if there is a player within 80 blocks, then see if the closest player is looking at the Horror entity. To do this you will need this procedure block "For each entity as entity iterator at <playerX + playerVx * radius> <playerY + playerVy * radius> <playerZ + playerVz * radius> in square of 2". Put this procedure block in a "Repeat 100 times" block, create the local variable "radius" and increase it by one each time". Check if there is a solid block at <playerX + playerVx * radius> <playerY + playerVy * radius> <playerZ + playerVz * radius>, and if so break the loop.

Now you've done the bulk of the work.

All you have to do is move the entity when it is looked at. Create a boolean variable "found" and set it to true when in a square of 2 the your entity is detected. Outside the "Repeat" block, if "found" is true teleport your entity. Get the "Check for block 6x6x6 box" template. Remove the found blocks of the template, and increase the number of repits to 20.

Now you just need to check if there is air in a position of the square and teleport your entity there.