From 1d1fa914012125126d1a3656edc428859696f54f Mon Sep 17 00:00:00 2001 From: KingCol13 <48412633+KingCol13@users.noreply.github.com> Date: Sat, 10 Jul 2021 21:05:00 +0100 Subject: Chorus fruit teleport (#5259) * Outline function for teleporting. * Created new handler for chorus fruit. * Fixed AttemptTeleport failing. * Better names, working sound effect. * Corrected naming. * Remove stray LOGD. * Offset teleport to middle of block. * Style Fixes Co-authored-by: x12xx12x <44411062+12xx12@users.noreply.github.com> * Style Fixes 2 Co-authored-by: x12xx12x <44411062+12xx12@users.noreply.github.com> * Move FindTeleportDestination to static cPawn method. * cBoundingBox interface. * Cleanup includes. * Maybe exported to API? * Change a_World to reference, add to APIDesc. Co-authored-by: x12xx12x <44411062+12xx12@users.noreply.github.com> --- Server/Plugins/APIDump/APIDesc.lua | 85 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) (limited to 'Server/Plugins/APIDump/APIDesc.lua') diff --git a/Server/Plugins/APIDump/APIDesc.lua b/Server/Plugins/APIDump/APIDesc.lua index 634202782..6055ff8f1 100644 --- a/Server/Plugins/APIDump/APIDesc.lua +++ b/Server/Plugins/APIDump/APIDesc.lua @@ -9587,6 +9587,91 @@ a_Player:OpenWindow(Window); { Notes = "Removes all currently applied entity effects", }, + FindTeleportDestination = + { + { + Params = + { + { + Name = "World", + Type = "cWorld", + }, + { + Name = "HeightRequired", + Type = "number", + }, + { + Name = "NumTries", + Type = "number", + }, + { + Name = "Destination", + Type = "Vector3d", + }, + { + Name = "MinBoxCorner", + Type = "Vector3i", + }, + { + Name = "MaxBoxCorner", + Type = "Vector3i", + }, + }, + Notes = "Function to find suitable teleport destination in or below box. Returns true and places result in Destination if found, otherwise returns false. Details at: https://minecraft.fandom.com/wiki/Enderman#Teleportation.", + }, + { + Params = + { + { + Name = "World", + Type = "cWorld", + }, + { + Name = "HeightRequired", + Type = "number", + }, + { + Name = "NumTries", + Type = "number", + }, + { + Name = "Destination", + Type = "Vector3d", + }, + { + Name = "BoundingBox", + Type = "cBoundingBox", + }, + }, + Notes = "Function to find suitable teleport destination in or below box. Returns true and places result in Destination if found, otherwise returns false. Details at: https://minecraft.fandom.com/wiki/Enderman#Teleportation.", + }, + { + Params = + { + { + Name = "World", + Type = "cWorld", + }, + { + Name = "HeightRequired", + Type = "number", + }, + { + Name = "NumTries", + Type = "number", + }, + { + Name = "Centre", + Type = "Vector3i", + }, + { + Name = "HalfCubeWidth", + Type = "number", + }, + }, + Notes = "Function to find suitable teleport destination in or below box. Returns true and places result in Destination if found, otherwise returns false. Details at: https://minecraft.fandom.com/wiki/Enderman#Teleportation.", + }, + }, HasEntityEffect = { Params = -- cgit v1.2.3