diff options
| author | daoge_cmd <3523206925@qq.com> | 2026-03-01 12:16:08 +0800 |
|---|---|---|
| committer | daoge_cmd <3523206925@qq.com> | 2026-03-01 12:16:08 +0800 |
| commit | b691c43c44ff180d10e7d4a9afc83b98551ff586 (patch) | |
| tree | 3e9849222cbc6ba49f2f1fc6e5fe7179632c7390 /Minecraft.World/FishingHook.h | |
| parent | def8cb415354ac390b7e89052a50605285f1aca9 (diff) | |
Initial commit
Diffstat (limited to 'Minecraft.World/FishingHook.h')
| -rw-r--r-- | Minecraft.World/FishingHook.h | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/Minecraft.World/FishingHook.h b/Minecraft.World/FishingHook.h new file mode 100644 index 00000000..ec91e630 --- /dev/null +++ b/Minecraft.World/FishingHook.h @@ -0,0 +1,63 @@ +#pragma once +using namespace std; + +#include "Entity.h" + +class Player; + +class FishingHook : public Entity +{ +public: + eINSTANCEOF GetType() { return eTYPE_FISHINGHOOK; } + +private: + int xTile; + int yTile; + int zTile; + int lastTile; + bool inGround; + +public: + int shakeTime; + shared_ptr<Player> owner; + +private: + int life; + int flightTime; + int nibble; + +public: + shared_ptr<Entity> hookedIn; + +private: + void _init(); + +public: + FishingHook(Level *level); + FishingHook(Level *level, double x, double y, double z, shared_ptr<Player> owner); + FishingHook(Level *level, shared_ptr<Player> mob); + +protected: + virtual void defineSynchedData(); + +public: + bool shouldRenderAtSqrDistance(double distance); + void shoot(double xd, double yd, double zd, float pow, float uncertainty); + +private: + int lSteps; + double lx, ly, lz, lyr, lxr; + double lxd, lyd, lzd; + +public: + virtual void lerpTo(double x, double y, double z, float yRot, float xRot, int steps); + virtual void lerpMotion(double xd, double yd, double zd); + virtual void tick(); + virtual void addAdditonalSaveData(CompoundTag *tag); + virtual void readAdditionalSaveData(CompoundTag *tag); + virtual float getShadowHeightOffs(); + int retrieve(); + + // 4J Stu - Brought forward from 1.4 + virtual void remove(); +}; |
