summaryrefslogtreecommitdiffstats
path: root/Server
diff options
context:
space:
mode:
Diffstat (limited to 'Server')
-rw-r--r--Server/Plugins/APIDump/APIDesc.lua30
-rw-r--r--Server/Plugins/APIDump/Classes/Projectiles.lua1
-rw-r--r--Server/Plugins/Debuggers/Debuggers.lua28
-rw-r--r--Server/Plugins/Debuggers/Info.lua6
4 files changed, 65 insertions, 0 deletions
diff --git a/Server/Plugins/APIDump/APIDesc.lua b/Server/Plugins/APIDump/APIDesc.lua
index 800396b4e..43e805a50 100644
--- a/Server/Plugins/APIDump/APIDesc.lua
+++ b/Server/Plugins/APIDump/APIDesc.lua
@@ -2965,6 +2965,28 @@ end
},
Constants =
{
+ BLOCK_FACE_XM = { Notes = "Interacting with the X- face of the block" },
+ BLOCK_FACE_XP = { Notes = "Interacting with the X+ face of the block" },
+ BLOCK_FACE_YM = { Notes = "Interacting with the Y- face of the block" },
+ BLOCK_FACE_YP = { Notes = "Interacting with the Y+ face of the block" },
+ BLOCK_FACE_ZM = { Notes = "Interacting with the Z- face of the block" },
+ BLOCK_FACE_ZP = { Notes = "Interacting with the Z+ face of the block" },
+ BLOCK_FACE_NONE = { Notes = "Interacting with no block face - swinging the item in the air" },
+ BLOCK_FACE_EAST = { Notes = "(<b>DEPRECATED!</b>) Please use BLOCK_FACE_XM instead. Interacting with the eastern face of the block." },
+ BLOCK_FACE_WEST = { Notes = "(<b>DEPRECATED!</b>) Please use BLOCK_FACE_XP instead. Interacting with the western face of the block." },
+ BLOCK_FACE_BOTTOM = { Notes = "(<b>DEPRECATED!</b>) Please use BLOCK_FACE_YM instead. Interacting with the bottom face of the block." },
+ BLOCK_FACE_TOP = { Notes = "(<b>DEPRECATED!</b>) Please use BLOCK_FACE_YP instead. Interacting with the top face of the block." },
+ BLOCK_FACE_NORTH = { Notes = "(<b>DEPRECATED!</b>) Please use BLOCK_FACE_ZM instead. Interacting with the northern face of the block." },
+ BLOCK_FACE_SOUTH = { Notes = "(<b>DEPRECATED!</b>) Please use BLOCK_FACE_ZP instead. Interacting with the southern face of the block." },
+ BLOCK_FACE_MAX = { Notes = "Used for range checking - highest legal value for an {{Globals#BlockFaces|eBlockFace}}" },
+ BLOCK_FACE_MIN = { Notes = "Used for range checking - lowest legal value for an {{Globals#BlockFaces|eBlockFace}}" },
+ DIG_STATUS_STARTED = { Notes = "The player has started digging" },
+ DIG_STATUS_CANCELLED = { Notes = "The player has let go of the mine block key before finishing mining the block" },
+ DIG_STATUS_FINISHED = { Notes = "The player thinks that it has finished mining a block" },
+ DIG_STATUS_DROP_HELD = { Notes = "The player has dropped a single item using the Drop Item key (default: Q)" },
+ DIG_STATUS_DROP_STACK = { Notes = "The player has dropped a full stack of items using the Drop Item key (default: Q) while holding down a specific modifier key (in windows, control)" },
+ DIG_STATUS_SHOOT_EAT = { Notes = "The player has finished shooting a bow or finished eating" },
+ DIG_STATUS_SWAP_ITEM_IN_HAND = { Notes = "The player has swapped their held item with the item in their offhand slot (1.9)" },
esBed = { Notes = "A bed explosion. The SourceData param is the {{Vector3i|position}} of the bed." },
esEnderCrystal = { Notes = "An ender crystal entity explosion. The SourceData param is the {{cEntity|ender crystal entity}} object." },
esGhastFireball = { Notes = "A ghast fireball explosion. The SourceData param is the {{cGhastFireballEntity|ghast fireball entity}} object." },
@@ -3048,6 +3070,14 @@ end
{{TakeDamageInfo}} structure, as well as in {{cEntity}}'s damage-related API functions.
]],
},
+ DigStatuses =
+ {
+ Include = "^DIG_STATUS_.*",
+ TextBefore = [[
+ These constants are used to describe digging statuses, but in reality cover several more cases.
+ They are used with {{OnPlayerLeftClick|HOOK_PLAYER_LEFT_CLICK}}.
+ ]],
+ },
GameMode =
{
Include = { "^gm.*", "^eGameMode_.*" },
diff --git a/Server/Plugins/APIDump/Classes/Projectiles.lua b/Server/Plugins/APIDump/Classes/Projectiles.lua
index 748f58b71..e6d347313 100644
--- a/Server/Plugins/APIDump/Classes/Projectiles.lua
+++ b/Server/Plugins/APIDump/Classes/Projectiles.lua
@@ -131,6 +131,7 @@ return
GetEntityEffect = { Params = "", Return = "{{cEntityEffect}}", Notes = "Returns the entity effect in this potion" },
GetEntityEffectType = { Params = "", Return = "{{cEntityEffect|Entity effect type}}", Notes = "Returns the effect type of this potion" },
GetPotionColor = { Params = "", Return = "number", Notes = "Returns the color index of the particles emitted by this potion" },
+ GetItem = { Params = "", Return = "{{cItem}}", Notes = "Gets the potion item that was thrown." },
SetEntityEffect = { Params = "{{cEntityEffect}}", Return = "", Notes = "Sets the entity effect for this potion" },
SetEntityEffectType = { Params = "{{cEntityEffect|Entity effect type}}", Return = "", Notes = "Sets the effect type of this potion" },
SetPotionColor = { Params = "number", Return = "", Notes = "Sets the color index of the particles for this potion" },
diff --git a/Server/Plugins/Debuggers/Debuggers.lua b/Server/Plugins/Debuggers/Debuggers.lua
index 422993932..c11052071 100644
--- a/Server/Plugins/Debuggers/Debuggers.lua
+++ b/Server/Plugins/Debuggers/Debuggers.lua
@@ -2156,3 +2156,31 @@ end
+
+function HandleBlkCmd(a_Split, a_Player)
+ -- Gets info about the block the player is looking at.
+ local World = a_Player:GetWorld();
+
+ local Callbacks = {
+ OnNextBlock = function(a_BlockX, a_BlockY, a_BlockZ, a_BlockType, a_BlockMeta)
+ if (a_BlockType ~= E_BLOCK_AIR) then
+ a_Player:SendMessage("Block at " .. a_BlockX .. ", " .. a_BlockY .. ", " .. a_BlockZ .. " is " .. a_BlockType .. ":" .. a_BlockMeta)
+ return true;
+ end
+ end
+ };
+
+ local EyePos = a_Player:GetEyePosition();
+ local LookVector = a_Player:GetLookVector();
+ LookVector:Normalize();
+
+ local End = EyePos + LookVector * 50;
+
+ cLineBlockTracer.Trace(World, Callbacks, EyePos.x, EyePos.y, EyePos.z, End.x, End.y, End.z);
+
+ return true;
+end
+
+
+
+
diff --git a/Server/Plugins/Debuggers/Info.lua b/Server/Plugins/Debuggers/Info.lua
index 99d3ebe74..51406c27c 100644
--- a/Server/Plugins/Debuggers/Info.lua
+++ b/Server/Plugins/Debuggers/Info.lua
@@ -202,6 +202,12 @@ g_PluginInfo =
Handler = HandleRemoveXp,
HelpString = "Remove all xp"
},
+ ["/blk"] =
+ {
+ Permission = "debuggers",
+ Handler = HandleBlkCmd,
+ HelpString = "Gets info about the block you are looking at"
+ },
}, -- Commands
ConsoleCommands =