1
0
cuberite-2a/src/Entities/EnderCrystal.h
12xx12 36a67df105
Ender Crytal Fix and report proper cmake file for luabindingscheck fail (#5017)
* fixed network
fixed explosion
fixed ticking

added network broadcast to Setter method

added nullptr protection

using macros in 1.10 Protocol_1_10.cpp

revealed functions to LUA API

small fixups, typos, less functions used

fixed more doc

readded info that saving is done only if the beam is displayed

made the constructor transfer all needed members

fixed wrong commit

removed default parameters on SpawnEnderCrystal

fixed wrong metadata

moved call to destroy in the right place

fixed some typos

Fixed Ender Crystal

* fixed documentation

* fixed doc and added proper error message

* Parameters, arrows

* Parameters

Co-authored-by: 12xx12 <12xx12100@gmail.com>
Co-authored-by: Tiger Wang <ziwei.tiger@outlook.com>
2020-11-06 15:00:59 +00:00

56 lines
1.1 KiB
C++

#pragma once
#include "Entity.h"
// tolua_begin
class cEnderCrystal :
public cEntity
{
// tolua_end
using Super = cEntity;
public:
CLASS_PROTODEF(cEnderCrystal)
cEnderCrystal(Vector3d a_Pos, bool a_ShowBottom);
cEnderCrystal(Vector3d a_Pos, Vector3i a_BeamTarget, bool a_DisplayBeam, bool a_ShowBottom);
// tolua_begin
Vector3i GetBeamTarget() const { return m_BeamTarget; }
void SetBeamTarget(Vector3i a_BeamTarget);
/** If the EnderCrystal should send it's beam to the client and save it. */
bool DisplaysBeam() const { return m_DisplayBeam; }
void SetDisplayBeam(bool a_DisplayBeam);
bool ShowsBottom() const { return m_ShowBottom; }
void SetShowBottom(bool a_ShowBottom);
// tolua_end
private:
Vector3i m_BeamTarget;
bool m_DisplayBeam;
// If the bedrock base should be displayed.
bool m_ShowBottom;
// cEntity overrides:
virtual void SpawnOn(cClientHandle & a_ClientHandle) override;
virtual void Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk) override;
virtual void KilledBy(TakeDamageInfo & a_TDI) override;
}; // tolua_export