Files
MinecraftConsoles/Minecraft.World/Boat.h
daoge b3feddfef3 feat: TU19 (Dec 2014) Features & Content (#155)
* try to resolve merge conflict

* feat: TU19 (Dec 2014) Features & Content (#32)

* December 2014 files

* Working release build

* Fix compilation issues

* Add sound to Windows64Media

* Add DLC content and force Tutorial DLC

* Revert "Add DLC content and force Tutorial DLC"

This reverts commit 97a4399472.

* Disable broken light packing

* Disable breakpoint during DLC texture map load

Allows DLC loading but the DLC textures are still broken

* Fix post build not working

* ...

* fix vs2022 build

* fix cmake build

---------

Co-authored-by: Loki <lokirautio@gmail.com>
2026-03-03 03:04:10 +08:00

84 lines
1.9 KiB
C++

#pragma once
using namespace std;
#include "Entity.h"
class Player;
class Level;
class CompoundTag;
class DamageSource;
class Boat : public Entity
{
public:
eINSTANCEOF GetType() { return eTYPE_BOAT; };
static Entity *create(Level *level) { return new Boat(level); }
private:
// 4J - added for common ctor code
void _init();
public:
static const int serialVersionUID = 0;
private:
static const int DATA_ID_HURT = 17;
static const int DATA_ID_HURTDIR = 18;
static const int DATA_ID_DAMAGE = 19;
static const double MAX_SPEED;
static const double MAX_COLLISION_SPEED;
static const double MIN_ACCELERATION;
static const double MAX_ACCELERATION;
bool doLerp;
double acceleration;
public:
Boat(Level *level);
protected:
virtual bool makeStepSound();
virtual void defineSynchedData();
public:
virtual AABB *getCollideAgainstBox(shared_ptr<Entity> entity);
virtual AABB *getCollideBox();
virtual bool isPushable();
Boat(Level *level, double x, double y, double z);
virtual double getRideHeight();
virtual bool hurt(DamageSource *source, float damage);
virtual void animateHurt();
virtual bool isPickable();
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 positionRider();
protected:
virtual void addAdditonalSaveData(CompoundTag *base);
virtual void readAdditionalSaveData(CompoundTag *base);
public:
virtual float getShadowHeightOffs();
wstring getName();
virtual bool interact(shared_ptr<Player> player);
virtual void setDamage(float damage);
virtual float getDamage();
virtual void setHurtTime(int hurtTime);
virtual int getHurtTime();
virtual void setHurtDir(int hurtDir);
virtual int getHurtDir();
bool getDoLerp();
void setDoLerp(bool doLerp);
};