Adding basic Banner functionality (#4806)
+ Added item and block for banners Co-authored-by: 12xx12 <12xx12100@gmail.com> Co-authored-by: Tiger Wang <ziwei.tiger@outlook.com>
This commit is contained in:
co-authored by
12xx12
Tiger Wang
parent
ca5608c66c
commit
243083e01a
@@ -30,6 +30,7 @@ Implements the 1.11 protocol classes:
|
||||
|
||||
#include "../Mobs/IncludeAllMonsters.h"
|
||||
|
||||
#include "../BlockEntities/BannerEntity.h"
|
||||
#include "../BlockEntities/BeaconEntity.h"
|
||||
#include "../BlockEntities/BedEntity.h"
|
||||
#include "../BlockEntities/CommandBlockEntity.h"
|
||||
@@ -416,6 +417,18 @@ void cProtocol_1_11_0::WriteBlockEntity(cPacketizer & a_Pkt, const cBlockEntity
|
||||
|
||||
switch (a_BlockEntity.GetBlockType())
|
||||
{
|
||||
case E_BLOCK_WALL_BANNER:
|
||||
case E_BLOCK_STANDING_BANNER:
|
||||
{
|
||||
auto & BannerEntity = static_cast<const cBannerEntity &>(a_BlockEntity);
|
||||
Writer.AddInt("x", BannerEntity.GetPosX());
|
||||
Writer.AddInt("y", BannerEntity.GetPosY());
|
||||
Writer.AddInt("z", BannerEntity.GetPosZ());
|
||||
Writer.AddString("id", "Banner");
|
||||
Writer.AddInt("Base", static_cast<Int32>(BannerEntity.GetBaseColor()));
|
||||
break;
|
||||
}
|
||||
|
||||
case E_BLOCK_BEACON:
|
||||
{
|
||||
auto & BeaconEntity = static_cast<const cBeaconEntity &>(a_BlockEntity);
|
||||
|
||||
Reference in New Issue
Block a user