aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.World/OcelotAttackGoal.h
diff options
context:
space:
mode:
Diffstat (limited to 'Minecraft.World/OcelotAttackGoal.h')
-rw-r--r--Minecraft.World/OcelotAttackGoal.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/Minecraft.World/OcelotAttackGoal.h b/Minecraft.World/OcelotAttackGoal.h
new file mode 100644
index 00000000..8efabe32
--- /dev/null
+++ b/Minecraft.World/OcelotAttackGoal.h
@@ -0,0 +1,25 @@
+#pragma once
+
+#include "Goal.h"
+
+class OcelotAttackGoal : public Goal
+{
+private:
+ Level *level;
+ Mob *mob;
+ weak_ptr<LivingEntity> target;
+ int attackTime;
+ float speed;
+ bool trackTarget;
+
+public:
+ OcelotAttackGoal(Mob *mob);
+
+ virtual bool canUse();
+ virtual bool canContinueToUse();
+ virtual void stop();
+ virtual void tick();
+
+ // 4J Added override to update ai elements when loading entity from schematics
+ virtual void setLevel(Level *level) { this->level = level; }
+}; \ No newline at end of file