Started by
RiverCape919073
on
Topic category: Help with Minecraft modding (Java Edition)
I want to make a staff that teleports the nearest entity within a 5-block range in front of the player, but now it just keeps teleporting the player forward. This is cool, but not what I want. How do I NOT choose the player?
What does your current procedure look like? I imagine all that will be needed is an "if" check for [ "not" ] [ Sub type = player ]
Couldn't figure out how to add an image so here it is:
Set Local: Nearest to NULL Get nearest entity at x: x y: y z: z in square cube with size 5 of type Ambient entity
if NULL Get Local: Nearest = NULL No entity
do:
Set Local: Nearest to NULL Get nearest entity at x: x y: y z: z in square cube with size 5 of type Ambient entity
if NULL Get Local: Nearest = NULL No entity
do:
{do something if nothing is there}
else:
Set location of NULL Get Local: Nearest to {location}
else:
Set location of NULL Get Local: Nearest to {location}
I don't think an if statement would work since I'm running it at a player.
Oh, I figured it out! The 'mob' type is everything BUT players!