Add beam target, configurable base visibility to Ender Crystals (#5010)
* Fixes #4990 Co-authored-by: 12xx12 <12xx12100@gmail.com>
This commit is contained in:
@@ -28,6 +28,7 @@ Implements the 1.9 protocol classes:
|
||||
|
||||
#include "../WorldStorage/FastNBT.h"
|
||||
|
||||
#include "../Entities/EnderCrystal.h"
|
||||
#include "../Entities/ExpOrb.h"
|
||||
#include "../Entities/Minecart.h"
|
||||
#include "../Entities/FallingBlock.h"
|
||||
@@ -1727,6 +1728,21 @@ void cProtocol_1_9_0::WriteEntityMetadata(cPacketizer & a_Pkt, const cEntity & a
|
||||
break;
|
||||
} // case etItemFrame
|
||||
|
||||
case cEntity::etEnderCrystal:
|
||||
{
|
||||
const auto & EnderCrystal = static_cast<const cEnderCrystal &>(a_Entity);
|
||||
a_Pkt.WriteBEUInt8(7);
|
||||
a_Pkt.WriteBEUInt8(METADATA_TYPE_OPTIONAL_POSITION);
|
||||
a_Pkt.WriteBool(EnderCrystal.DisplaysBeam());
|
||||
if (EnderCrystal.DisplaysBeam())
|
||||
{
|
||||
a_Pkt.WriteXYZPosition64(EnderCrystal.GetBeamTarget());
|
||||
}
|
||||
a_Pkt.WriteBEUInt8(8);
|
||||
a_Pkt.WriteBEUInt8(METADATA_TYPE_BOOL);
|
||||
a_Pkt.WriteBool(EnderCrystal.ShowsBottom());
|
||||
break;
|
||||
} // case etEnderCrystal
|
||||
default:
|
||||
{
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user