mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-04-24 07:43:37 +00:00
29 lines
642 B
C++
29 lines
642 B
C++
#pragma once
|
|
|
|
#include "../Entities/Entity.h"
|
|
|
|
class DamageSource;
|
|
|
|
class DelayedRelease : public Entity {
|
|
public:
|
|
virtual eINSTANCEOF GetType() { return eTYPE_DELAYEDRELEASE; }
|
|
|
|
private:
|
|
std::shared_ptr<Entity> toRelease;
|
|
int delay;
|
|
|
|
public:
|
|
DelayedRelease(Level* level, std::shared_ptr<Entity> toRelease, int delay);
|
|
|
|
protected:
|
|
virtual bool makeStepSound();
|
|
|
|
public:
|
|
virtual void tick();
|
|
virtual bool hurt(DamageSource* source, float damage);
|
|
|
|
protected:
|
|
virtual void defineSynchedData();
|
|
virtual void readAdditionalSaveData(CompoundTag* tag);
|
|
virtual void addAdditonalSaveData(CompoundTag* tag);
|
|
}; |