Track player position for a custom event
This commit is contained in:
parent
4eee51709c
commit
b01d45f9ab
8 changed files with 214 additions and 3 deletions
|
@ -6,6 +6,7 @@ import net.minecraft.nbt.CompoundTag;
|
|||
import net.minecraft.nbt.NbtUtils;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.server.level.ServerLevel;
|
||||
import net.minecraft.server.level.ServerPlayer;
|
||||
|
||||
public class WorldPosition
|
||||
{
|
||||
|
@ -36,6 +37,11 @@ public class WorldPosition
|
|||
calcDimSafe();
|
||||
}
|
||||
|
||||
public WorldPosition(ServerPlayer player)
|
||||
{
|
||||
this(new Vector3(player.position()), player.getLevel());
|
||||
}
|
||||
|
||||
public WorldPosition(Vector3 pos, ServerLevel lvl)
|
||||
{
|
||||
Position=pos;
|
||||
|
|
Reference in a new issue