Check if entity is near/exist within specific block?

Started by Red-Eyed_Fairace on Wed, 12/08/2021 - 22:51

Topic category: Help with modding (Java Edition)

Last seen on 09:54, 12. Jan 2022
Joined Nov 2021

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Check if entity is near/exist within specific block?
Wed, 12/08/2021 - 22:51

I know there's a procedure that checks if an entity is near or exist. 

But is it possible to make it check to block instead of another Entity?

Currently for my titans mod, I've made them have custom spawning condition, it does work, they spawn only on day when not raining but custom spawning conditions like that bypasses mod like "no Hostile around campfire". I know how to check for a block, but is it possible to combine the two in that way they wont spawn near campifre?

Currently I use ItemFrame as an alternative to prevent titans spawning inside my walled City (It's classified as entity on Mcreator somehow, same goes for ArmorStand)

I dont mind editing the code itself if procedures dont work for it if anyone has any idea.