Files
MinecraftConsoles/Minecraft.World/ThrownPotion.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

45 lines
1.1 KiB
C++

#pragma once
#include "Throwable.h"
class HitResult;
class ThrownPotion : public Throwable
{
public:
eINSTANCEOF GetType() { return eTYPE_THROWNPOTION; }
static Entity *create(Level *level) { return new ThrownPotion(level); }
public:
static const double SPLASH_RANGE;
private:
static const double SPLASH_RANGE_SQ;
shared_ptr<ItemInstance> potionItem;
void _init();
public:
ThrownPotion(Level *level);
ThrownPotion(Level *level, shared_ptr<LivingEntity> mob, int potionValue);
ThrownPotion(Level *level, shared_ptr<LivingEntity> mob, shared_ptr<ItemInstance> potion);
ThrownPotion(Level *level, double x, double y, double z, int potionValue);
ThrownPotion(Level *level, double x, double y, double z, shared_ptr<ItemInstance> potion);
protected:
virtual float getGravity();
virtual float getThrowPower();
virtual float getThrowUpAngleOffset();
public:
void setPotionValue(int potionValue);
int getPotionValue();
protected:
virtual void onHit(HitResult *res);
public:
void readAdditionalSaveData(CompoundTag *tag);
void addAdditonalSaveData(CompoundTag *tag);
};