Files
MinecraftConsoles/Minecraft.World/FishingHook.h
void_17 7074f35e4b shared_ptr -> std::shared_ptr
This is one of the first commits in a plan to remove all `using namespace std;` lines in the entire codebase as it is considered anti-pattern today.
2026-03-02 15:58:20 +07:00

64 lines
1.2 KiB
C++

#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;
std::shared_ptr<Player> owner;
private:
int life;
int flightTime;
int nibble;
public:
std::shared_ptr<Entity> hookedIn;
private:
void _init();
public:
FishingHook(Level *level);
FishingHook(Level *level, double x, double y, double z, std::shared_ptr<Player> owner);
FishingHook(Level *level, std::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();
};