当前位置: 首页>>代码示例>>Java>>正文


Java PacketBuffer.writeCompoundTag方法代码示例

本文整理汇总了Java中net.minecraft.network.PacketBuffer.writeCompoundTag方法的典型用法代码示例。如果您正苦于以下问题:Java PacketBuffer.writeCompoundTag方法的具体用法?Java PacketBuffer.writeCompoundTag怎么用?Java PacketBuffer.writeCompoundTag使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在net.minecraft.network.PacketBuffer的用法示例。


在下文中一共展示了PacketBuffer.writeCompoundTag方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: toBytes

import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
@Override
public void toBytes(ByteBuf buf)
{
	PacketBuffer pbuf = new PacketBuffer(buf);

	pbuf.writeCompoundTag(notebookInfo);
}
 
开发者ID:raphydaphy,项目名称:ArcaneMagic,代码行数:8,代码来源:PacketNotebookOpened.java

示例2: toBytes

import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
@Override
public void toBytes(ByteBuf buf)
{
	PacketBuffer pbuf = new PacketBuffer(buf);
	pbuf.writeInt(slot);
	pbuf.writeCompoundTag(cap);
	pbuf.writeItemStack(stack);

}
 
开发者ID:raphydaphy,项目名称:ArcaneMagic,代码行数:10,代码来源:PacketItemAnimaChanged.java

示例3: toBytes

import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
@Override
public void toBytes(ByteBuf buf) {

	PacketBuffer ibuf = new PacketBuffer(buf);

	m_guiMsg.toBytes(ibuf);

	ibuf.writeInt(m_blockId);
	ibuf.writeCompoundTag(m_updateTag); // internally handles null
	ibuf.writeCompoundTag(m_readTag); // internally handles null
	ibuf.writeCompoundTag(m_remoteTag); // internally handles null
	ibuf.writeInt(m_dimensionId);

}
 
开发者ID:orbwoi,项目名称:UniversalRemote,代码行数:15,代码来源:RemoteGuiMessage.java

示例4: toBytes

import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
@Override
public void toBytes(ByteBuf buf) {
	PacketBuffer beef = new PacketBuffer(buf);
	try {
		buf.writeInt(PacketHandler.HANDLERS.indexOf(handler));
		beef.writeCompoundTag(data);
	} catch(Exception e) {
		Solar.LOG.error("[Packet] Failed to send packet");
		e.printStackTrace();
	}
}
 
开发者ID:ArekkuusuJerii,项目名称:Solar,代码行数:12,代码来源:ClientToServerPacket.java

示例5: writeSpawnData

import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
@Override
public void writeSpawnData(ByteBuf buffer) {
	
	
	if(!this.first) {
		PacketBuffer buff = new PacketBuffer(buffer);
		buffer.writeBoolean(this.player);
		if (this.profile != null) {
			buff.writeUniqueId(this.profile.getId());
               buff.writeString(this.profile.getName());
               buff.writeVarInt(this.profile.getProperties().size());

               for (Property property : this.profile.getProperties().values())
               {
                   buff.writeString(property.getName());
                   buff.writeString(property.getValue());

                   if (property.hasSignature())
                   {
                       buff.writeBoolean(true);
                       buff.writeString(property.getSignature());
                   }
                   else
                   {
                       buff.writeBoolean(false);
                   }
               }
		}
		buff.writeCompoundTag(data);
		buff.writeBoolean(useHand);
	}
}
 
开发者ID:rafradek,项目名称:Mods,代码行数:33,代码来源:EntityStatue.java

示例6: toBytes

import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
@Override
public void toBytes(final ByteBuf buf) {
  final PacketBuffer buffer = new PacketBuffer(buf);
  buffer.writeCompoundTag(nbt);
}
 
开发者ID:ToroCraft,项目名称:Minecoprocessors,代码行数:6,代码来源:MessageBookCodeData.java

示例7: toBytes

import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
@Override
public void toBytes(ByteBuf buf) {
	PacketBuffer buffer = new PacketBuffer(buf);
	buffer.writeCompoundTag(this.tag);
}
 
开发者ID:Arez0101,项目名称:Dynamic-GUIs,代码行数:6,代码来源:PacketToServer.java


注:本文中的net.minecraft.network.PacketBuffer.writeCompoundTag方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。