Add beam target, configurable base visibility to Ender Crystals (#5010)
* Fixes #4990 Co-authored-by: 12xx12 <12xx12100@gmail.com>
This commit is contained in:
@@ -12,6 +12,7 @@ Implements the 1.13 protocol classes:
|
||||
#include "Protocol_1_13.h"
|
||||
|
||||
#include "../Entities/Boat.h"
|
||||
#include "../Entities/EnderCrystal.h"
|
||||
#include "../Entities/Minecart.h"
|
||||
#include "../Entities/Pickup.h"
|
||||
#include "../Entities/Player.h"
|
||||
@@ -887,6 +888,20 @@ void cProtocol_1_13::WriteEntityMetadata(cPacketizer & a_Pkt, const cEntity & a_
|
||||
break;
|
||||
} // case etItemFrame
|
||||
|
||||
case cEntity::etEnderCrystal:
|
||||
{
|
||||
const auto & EnderCrystal = static_cast<const cEnderCrystal &>(a_Entity);
|
||||
WriteEntityMetadata(a_Pkt, EntityMetadata::EnderCrystalBeamTarget, EntityMetadataType::OptPosition);
|
||||
a_Pkt.WriteBool(EnderCrystal.DisplaysBeam());
|
||||
if (EnderCrystal.DisplaysBeam())
|
||||
{
|
||||
a_Pkt.WriteXYZPosition64(EnderCrystal.GetBeamTarget());
|
||||
}
|
||||
WriteEntityMetadata(a_Pkt, EntityMetadata::EnderCrystalShowBottom, EntityMetadataType::Boolean);
|
||||
a_Pkt.WriteBool(EnderCrystal.ShowsBottom());
|
||||
break;
|
||||
} // case etEnderCrystal
|
||||
|
||||
default:
|
||||
{
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user