summaryrefslogtreecommitdiffstats
path: root/MCServer
diff options
context:
space:
mode:
Diffstat (limited to 'MCServer')
-rw-r--r--MCServer/Plugins/APIDump/APIDesc.lua30
-rw-r--r--MCServer/Plugins/APIDump/main.lua34
-rw-r--r--MCServer/items.ini14
3 files changed, 53 insertions, 25 deletions
diff --git a/MCServer/Plugins/APIDump/APIDesc.lua b/MCServer/Plugins/APIDump/APIDesc.lua
index 210ddc1ae..450bc9f28 100644
--- a/MCServer/Plugins/APIDump/APIDesc.lua
+++ b/MCServer/Plugins/APIDump/APIDesc.lua
@@ -2666,7 +2666,10 @@ end
Vector3d =
{
Desc = [[
- A Vector3d object uses double precision floating point values to describe a point in 3D space.
+ A Vector3d object uses double precision floating point values to describe a point in 3D space.</p>
+ <p>
+ See also {{Vector3f}} for single-precision floating point 3D coords and {{Vector3i}} for integer
+ 3D coords.
]],
Functions =
{
@@ -2711,7 +2714,7 @@ end
A Vector3f object uses floating point values to describe a point in space.</p>
<p>
See also {{Vector3d}} for double-precision floating point 3D coords and {{Vector3i}} for integer
- point 3D coords.
+ 3D coords.
]],
Functions =
{
@@ -2749,13 +2752,30 @@ end
Vector3i =
{
- Desc = [[A Vector3i object uses integer values to describe a point in space. Vector3i is part of the {{vector3|vector3}} family.
-]],
+ Desc = [[
+ A Vector3i object uses integer values to describe a point in space.</p>
+ <p>
+ See also {{Vector3d}} for double-precision floating point 3D coords and {{Vector3f}} for
+ single-precision floating point 3D coords.
+ ]],
Functions =
{
+ constructor =
+ {
+ { Params = "", Return = "Vector3i", Notes = "Creates a new Vector3i object with zero coords." },
+ { Params = "x, y, z", Return = "Vector3i", Notes = "Creates a new Vector3i object with the specified coords." },
+ { Params = "{{Vector3d}}", Return = "Vector3i", Notes = "Creates a new Vector3i object with coords copied and floor()-ed from the specified {{Vector3d}}." },
+ },
+ Equals = { Params = "Vector3i", Return = "bool", Notes = "Returns true if this vector is exactly the same as the specified vector." },
+ Length = { Params = "", Return = "number", Notes = "Returns the (euclidean) length of this vector." },
+ Set = { Params = "x, y, z", Return = "", Notes = "Sets all the coords of the vector at once" },
+ SqrLength = { Params = "", Return = "number", Notes = "Returns the (euclidean) length of this vector, squared. This operation is slightly less computationally expensive than Length(), while it conserves some properties of Length(), such as comparison." },
},
- Constants =
+ Variables =
{
+ x = { Type = "number", Notes = "The X coord of the vector." },
+ y = { Type = "number", Notes = "The Y coord of the vector." },
+ z = { Type = "number", Notes = "The Z coord of the vector." },
},
}, -- Vector3i
diff --git a/MCServer/Plugins/APIDump/main.lua b/MCServer/Plugins/APIDump/main.lua
index ab154dc45..fa9d29423 100644
--- a/MCServer/Plugins/APIDump/main.lua
+++ b/MCServer/Plugins/APIDump/main.lua
@@ -740,14 +740,14 @@ function WriteHtmlClass(a_ClassAPI, a_AllAPI)
end
if (a_InheritedName ~= nil) then
- cf:write(" <h2>Functions inherited from " .. a_InheritedName .. "</h2>\n");
+ cf:write(" <h2>Functions inherited from ", a_InheritedName, "</h2>\n");
end
cf:write(" <table>\n <tr>\n <th>Name</th>\n <th>Parameters</th>\n <th>Return value</th>\n <th>Notes</th>\n </tr>\n");
for i, func in ipairs(a_Functions) do
cf:write(" <tr>\n <td>" .. func.Name .. "</td>\n");
- cf:write(" <td>" .. LinkifyString(func.Params or "", (a_InheritedName or a_ClassAPI.Name)).. "</td>\n");
- cf:write(" <td>" .. LinkifyString(func.Return or "", (a_InheritedName or a_ClassAPI.Name)).. "</td>\n");
- cf:write(" <td>" .. LinkifyString(func.Notes or "<i>(undocumented)</i>", (a_InheritedName or a_ClassAPI.Name)) .. "</td>\n </tr>\n");
+ cf:write(" <td>", LinkifyString(func.Params or "", (a_InheritedName or a_ClassAPI.Name)), "</td>\n");
+ cf:write(" <td>", LinkifyString(func.Return or "", (a_InheritedName or a_ClassAPI.Name)), "</td>\n");
+ cf:write(" <td>", LinkifyString(func.Notes or "<i>(undocumented)</i>", (a_InheritedName or a_ClassAPI.Name)), "</td>\n </tr>\n");
end
cf:write(" </table>\n\n");
end
@@ -758,14 +758,14 @@ function WriteHtmlClass(a_ClassAPI, a_AllAPI)
end
if (a_InheritedName ~= nil) then
- cf:write(" <h2>Constants inherited from " .. a_InheritedName .. "</h2>\n");
+ cf:write(" <h2>Constants inherited from ", a_InheritedName, "</h2>\n");
end
cf:write(" <table>\n <tr>\n <th>Name</th>\n <th>Value</th>\n <th>Notes</th>\n </tr>\n");
for i, cons in ipairs(a_Constants) do
- cf:write(" <tr>\n <td>" .. cons.Name .. "</td>\n");
- cf:write(" <td>" .. cons.Value .. "</td>\n");
- cf:write(" <td>" .. LinkifyString(cons.Notes or "", a_InheritedName or a_ClassAPI.Name) .. "</td>\n </tr>\n");
+ cf:write(" <tr>\n <td>", cons.Name, "</td>\n");
+ cf:write(" <td>", cons.Value, "</td>\n");
+ cf:write(" <td>", LinkifyString(cons.Notes or "", a_InheritedName or a_ClassAPI.Name), "</td>\n </tr>\n");
end
cf:write(" </table>\n\n");
end
@@ -776,14 +776,14 @@ function WriteHtmlClass(a_ClassAPI, a_AllAPI)
end
if (a_InheritedName ~= nil) then
- cf:write(" <h2>Member variables inherited from " .. a_InheritedName .. "</h2>\n");
+ cf:write(" <h2>Member variables inherited from ", a_InheritedName, "</h2>\n");
end
cf:write(" <table>\n <tr>\n <th>Name</th>\n <th>Type</th>\n <th>Notes</th>\n </tr>\n");
for i, var in ipairs(a_Variables) do
- cf:write(" <tr>\n <td>" .. var.Name .. "</td>\n");
- cf:write(" <td>" .. LinkifyString(var.Type or "<i>(undocumented)</i>", a_InheritedName or a_ClassAPI.Name) .. "</td>\n");
- cf:write(" <td>" .. LinkifyString(var.Notes or "", a_InheritedName or a_ClassAPI.Name) .. "</td>\n </tr>\n");
+ cf:write(" <tr>\n <td>", var.Name, "</td>\n");
+ cf:write(" <td>", LinkifyString(var.Type or "<i>(undocumented)</i>", a_InheritedName or a_ClassAPI.Name), "</td>\n");
+ cf:write(" <td>", LinkifyString(var.Notes or "", a_InheritedName or a_ClassAPI.Name), "</td>\n </tr>\n");
end
cf:write(" </table>\n\n");
end
@@ -794,7 +794,7 @@ function WriteHtmlClass(a_ClassAPI, a_AllAPI)
end
cf:write("<ul>");
for i, desc in ipairs(a_Descendants) do
- cf:write("<li><a href=\"".. desc.Name .. ".html\">" .. desc.Name .. "</a>");
+ cf:write("<li><a href=\"", desc.Name, ".html\">", desc.Name, "</a>");
WriteDescendants(desc.Descendants);
cf:write("</li>\n");
end
@@ -814,7 +814,7 @@ function WriteHtmlClass(a_ClassAPI, a_AllAPI)
cf:write([[<!DOCTYPE html>
<html>
<head>
- <title>MCServer API - ]] .. a_ClassAPI.Name .. [[ Class</title>
+ <title>MCServer API - ]], a_ClassAPI.Name, [[ Class</title>
<link rel="stylesheet" type="text/css" href="main.css" />
<link rel="stylesheet" type="text/css" href="prettify.css" />
<script src="prettify.js"></script>
@@ -823,7 +823,7 @@ function WriteHtmlClass(a_ClassAPI, a_AllAPI)
<body>
<div id="content">
<header>
- <h1>]] .. a_ClassAPI.Name .. [[</h1>
+ <h1>]], a_ClassAPI.Name, [[</h1>
<hr />
</header>
<h1>Contents</h1>
@@ -857,7 +857,7 @@ function WriteHtmlClass(a_ClassAPI, a_AllAPI)
end
if (a_ClassAPI.AdditionalInfo ~= nil) then
for i, additional in ipairs(a_ClassAPI.AdditionalInfo) do
- cf:write(" <li><a href=\"#additionalinfo_" .. i .. "\">" .. (additional.Header or "<i>(No header)</i>").. "</a></li>\n");
+ cf:write(" <li><a href=\"#additionalinfo_", i, "\">", (additional.Header or "<i>(No header)</i>"), "</a></li>\n");
end
end
cf:write(" </ul>\n\n");
@@ -920,7 +920,7 @@ function WriteHtmlClass(a_ClassAPI, a_AllAPI)
-- Write the additional infos:
if (a_ClassAPI.AdditionalInfo ~= nil) then
for i, additional in ipairs(a_ClassAPI.AdditionalInfo) do
- cf:write(" <a name=\"additionalinfo_" .. i .. "\"><h1>" .. additional.Header .. "</h1></a>\n");
+ cf:write(" <a name=\"additionalinfo_", i, "\"><h1>", additional.Header, "</h1></a>\n");
cf:write(LinkifyString(additional.Contents, ClassName));
end
end
diff --git a/MCServer/items.ini b/MCServer/items.ini
index 812168297..c09b32f17 100644
--- a/MCServer/items.ini
+++ b/MCServer/items.ini
@@ -119,10 +119,18 @@ redwool=35:14
blackwool=35:15
dandelion=37
-; Obsolete, use "dandelion" instead (kept for compatibility, will be removed)
-flower=37
-
+; Renamed in 1.7, use "poppy" instead; kept for compatibility reasons, will be removed later on.
rose=38
+
+flower=38
+poppy=38
+blueorchid=38:1
+allium=38:2
+redtulip=38:4
+orangetulip=38:5
+whitetulip=38:6
+pinktulip=38:7
+oxeyedaisy=38:8
brownmushroom=39
redmushroom=40
gold=41