summaryrefslogtreecommitdiffstats
path: root/src/Defines.cpp
diff options
context:
space:
mode:
authorPersson-dev <66266021+Persson-dev@users.noreply.github.com>2021-12-29 20:28:41 +0100
committerGitHub <noreply@github.com>2021-12-29 20:28:41 +0100
commitfec64bb91c03c5e872a8f6fbc1a253f341373072 (patch)
tree74eca1320f61b93cae672a0d9def7abea2ab80ef /src/Defines.cpp
parentUpdate solid and transparent blocks (#5353) (diff)
downloadcuberite-fec64bb91c03c5e872a8f6fbc1a253f341373072.tar
cuberite-fec64bb91c03c5e872a8f6fbc1a253f341373072.tar.gz
cuberite-fec64bb91c03c5e872a8f6fbc1a253f341373072.tar.bz2
cuberite-fec64bb91c03c5e872a8f6fbc1a253f341373072.tar.lz
cuberite-fec64bb91c03c5e872a8f6fbc1a253f341373072.tar.xz
cuberite-fec64bb91c03c5e872a8f6fbc1a253f341373072.tar.zst
cuberite-fec64bb91c03c5e872a8f6fbc1a253f341373072.zip
Diffstat (limited to '')
-rw-r--r--src/Defines.cpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/Defines.cpp b/src/Defines.cpp
index 02b9f28d5..aa5e46995 100644
--- a/src/Defines.cpp
+++ b/src/Defines.cpp
@@ -623,3 +623,29 @@ bool ItemCategory::IsHorseArmor(short a_ItemType)
}
}
}
+
+
+
+
+
+bool ItemCategory::IsVillagerFood(short a_ItemType)
+{
+ switch (a_ItemType)
+ {
+ case E_ITEM_CARROT:
+ case E_ITEM_POTATO:
+ case E_ITEM_BREAD:
+ case E_ITEM_BEETROOT:
+ case E_ITEM_SEEDS:
+ case E_ITEM_BEETROOT_SEEDS:
+ case E_ITEM_WHEAT:
+ {
+ return true;
+ }
+
+ default:
+ {
+ return false;
+ }
+ }
+}