summaryrefslogtreecommitdiffstats
path: root/MCServer
diff options
context:
space:
mode:
Diffstat (limited to 'MCServer')
-rw-r--r--MCServer/Plugins/APIDump/APIDesc.lua38
-rw-r--r--MCServer/monsters.ini11
2 files changed, 43 insertions, 6 deletions
diff --git a/MCServer/Plugins/APIDump/APIDesc.lua b/MCServer/Plugins/APIDump/APIDesc.lua
index f8e201244..ebe284ad6 100644
--- a/MCServer/Plugins/APIDump/APIDesc.lua
+++ b/MCServer/Plugins/APIDump/APIDesc.lua
@@ -2395,6 +2395,44 @@ World:ForEachEntity(
},
}, -- HTTPRequest
+ ItemCategory =
+ {
+ Desc = [[
+ This class contains static functions for determining item categories. All of the functions are
+ called directly on the class table, unlike most other object, which require an instance first.
+ ]],
+ Functions =
+ {
+ IsArmor = { Params = "ItemType", Return = "bool", Notes = "(STATIC) Returns true if the specified item type is any kind of an armor." },
+ IsAxe = { Params = "ItemType", Return = "bool", Notes = "(STATIC) Returns true if the specified item type is any kind of an axe." },
+ IsBoots = { Params = "ItemType", Return = "bool", Notes = "(STATIC) Returns true if the specified item type is any kind of boots." },
+ IsChestPlate = { Params = "ItemType", Return = "bool", Notes = "(STATIC) Returns true if the specified item type is any kind of a chestplate." },
+ IsHelmet = { Params = "ItemType", Return = "bool", Notes = "(STATIC) Returns true if the specified item type is any kind of a helmet." },
+ IsHoe = { Params = "ItemType", Return = "bool", Notes = "(STATIC) Returns true if the specified item type is any kind of a hoe." },
+ IsLeggings = { Params = "ItemType", Return = "bool", Notes = "(STATIC) Returns true if the specified item type is any kind of a leggings." },
+ IsPickaxe = { Params = "ItemType", Return = "bool", Notes = "(STATIC) Returns true if the specified item type is any kind of a pickaxe." },
+ IsShovel = { Params = "ItemType", Return = "bool", Notes = "(STATIC) Returns true if the specified item type is any kind of a shovel." },
+ IsSword = { Params = "ItemType", Return = "bool", Notes = "(STATIC) Returns true if the specified item type is any kind of a sword." },
+ IsTool = { Params = "ItemType", Return = "bool", Notes = "(STATIC) Returns true if the specified item type is any kind of a tool (axe, hoe, pickaxe, shovel or FIXME: sword)" },
+ },
+ AdditionalInfo =
+ {
+ {
+ Header = "Code example",
+ Contents = [[
+ The following code snippet checks if the player holds a shovel.
+<pre class="prettyprint lang-lua">
+-- a_Player is a {{cPlayer}} object, possibly received as a hook param
+local HeldItem = a_Player:GetEquippedItem();
+if (cItemCategory:IsShovel(HeldItem.m_ItemType)) then
+ -- It's a shovel
+end
+</pre>
+ ]],
+ }
+ },
+ }, -- ItemCategory
+
TakeDamageInfo =
{
Desc = [[The TakeDamageInfo is a struct that contains the amount of damage, and the entity that caused the damage. It is used in the {{OnTakeDamage|OnTakeDamage}}() hook and in the {{cEntity|cEntity}}'s TakeDamage() function.
diff --git a/MCServer/monsters.ini b/MCServer/monsters.ini
index efd801a62..94454c355 100644
--- a/MCServer/monsters.ini
+++ b/MCServer/monsters.ini
@@ -69,10 +69,10 @@ SightDistance=25.0
MaxHealth=20
[Ghast]
-AttackRange=5.0
+AttackRange=50.0
AttackRate=1
AttackDamage=0.0
-SightDistance=25.0
+SightDistance=50.0
MaxHealth=10
[Silverfish]
@@ -83,10 +83,9 @@ SightDistance=25.0
MaxHealth=8
[Skeleton]
-AttackRange=5.0
+AttackRange=15.0
AttackRate=1
-AttackDamage=3.0
-SightDistance=25.0
+SightDistance=40.0
MaxHealth=20
[Slime]
@@ -111,7 +110,7 @@ SightDistance=25.0
MaxHealth=20
[Blaze]
-AttackRange=5.0
+AttackRange=15.0
AttackRate=1
AttackDamage=6.0
SightDistance=25.0