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


Java EntityDataManager.readEntries方法代码示例

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


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

示例1: readPacketData

import net.minecraft.network.datasync.EntityDataManager; //导入方法依赖的package包/类
/**
 * Reads the raw packet data from the data stream.
 */
public void readPacketData(PacketBuffer buf) throws IOException
{
    this.entityId = buf.readVarIntFromBuffer();
    this.uniqueId = buf.readUuid();
    this.type = buf.readVarIntFromBuffer();
    this.x = buf.readDouble();
    this.y = buf.readDouble();
    this.z = buf.readDouble();
    this.yaw = buf.readByte();
    this.pitch = buf.readByte();
    this.headPitch = buf.readByte();
    this.velocityX = buf.readShort();
    this.velocityY = buf.readShort();
    this.velocityZ = buf.readShort();
    this.dataManagerEntries = EntityDataManager.readEntries(buf);
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:20,代码来源:SPacketSpawnMob.java

示例2: fromBytes

import net.minecraft.network.datasync.EntityDataManager; //导入方法依赖的package包/类
@Override
public void fromBytes(ByteBuf buf) {
	entityID = buf.readInt();
	healTarget = buf.readInt();
	try {
		entries = EntityDataManager.readEntries(new PacketBuffer(buf));
		//System.out.println("Entries rec: "+(entries != null ? entries.size() : 0));
	} catch (IOException e) {
		// TODO Auto-generated catch block
		e.printStackTrace();
	}
	/*
	 * try { tag=CompressedStreamTools.read(new ByteBufInputStream(buf),
	 * new NBTSizeTracker(2097152L)); } catch (IOException e) { // TODO
	 * Auto-generated catch block e.printStackTrace(); }
	 */
}
 
开发者ID:rafradek,项目名称:Mods,代码行数:18,代码来源:TF2Message.java

示例3: readPacketData

import net.minecraft.network.datasync.EntityDataManager; //导入方法依赖的package包/类
/**
 * Reads the raw packet data from the data stream.
 */
public void readPacketData(PacketBuffer buf) throws IOException
{
    this.entityId = buf.readVarIntFromBuffer();
    this.uniqueId = buf.readUuid();
    this.type = buf.readByte() & 255;
    this.x = buf.readDouble();
    this.y = buf.readDouble();
    this.z = buf.readDouble();
    this.yaw = buf.readByte();
    this.pitch = buf.readByte();
    this.headPitch = buf.readByte();
    this.velocityX = buf.readShort();
    this.velocityY = buf.readShort();
    this.velocityZ = buf.readShort();
    this.dataManagerEntries = EntityDataManager.readEntries(buf);
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:20,代码来源:SPacketSpawnMob.java

示例4: readPacketData

import net.minecraft.network.datasync.EntityDataManager; //导入方法依赖的package包/类
/**
 * Reads the raw packet data from the data stream.
 */
public void readPacketData(PacketBuffer buf) throws IOException
{
    this.entityId = buf.readVarIntFromBuffer();
    this.uniqueId = buf.readUuid();
    this.x = buf.readDouble();
    this.y = buf.readDouble();
    this.z = buf.readDouble();
    this.yaw = buf.readByte();
    this.pitch = buf.readByte();
    this.dataManagerEntries = EntityDataManager.readEntries(buf);
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:15,代码来源:SPacketSpawnPlayer.java

示例5: fromBytes

import net.minecraft.network.datasync.EntityDataManager; //导入方法依赖的package包/类
@Override
void fromBytes(ByteBuf dat)
{
    super.fromBytes(dat);
    modId = ByteBufUtils.readUTF8String(dat);
    modEntityTypeId = dat.readInt();
    entityUUID = new UUID(dat.readLong(), dat.readLong());
    rawX = dat.readDouble();
    rawY = dat.readDouble();
    rawZ = dat.readDouble();
    scaledYaw = dat.readByte() * 360F / 256F;
    scaledPitch = dat.readByte() * 360F / 256F;
    scaledHeadYaw = dat.readByte() * 360F / 256F;
    try
    {
        dataWatcherList = EntityDataManager.readEntries(new PacketBuffer(dat));
    } catch (IOException e)
    {
        FMLLog.log(Level.FATAL, e, "There was a critical error decoding the datawatcher stream for a mod entity.");
        throw Throwables.propagate(e);
    }

    throwerId = dat.readInt();
    if (throwerId != 0)
    {
        speedScaledX = dat.readInt() / 8000D;
        speedScaledY = dat.readInt() / 8000D;
        speedScaledZ = dat.readInt() / 8000D;
    }
    this.dataStream = dat;
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:32,代码来源:FMLMessage.java

示例6: fromBytes

import net.minecraft.network.datasync.EntityDataManager; //导入方法依赖的package包/类
@Override
public void fromBytes(ByteBuf buffer) {
    this.entityID = buffer.readInt();
    try {
        this.entries = EntityDataManager.readEntries(new PacketBuffer(buffer));
    } catch (IOException e) {
        e.printStackTrace();
    }
}
 
开发者ID:Fararise,项目名称:Possessed,代码行数:10,代码来源:UpdatePossessedDataMessage.java

示例7: readPacketData

import net.minecraft.network.datasync.EntityDataManager; //导入方法依赖的package包/类
/**
 * Reads the raw packet data from the data stream.
 */
public void readPacketData(PacketBuffer buf) throws IOException
{
    this.entityId = buf.readVarIntFromBuffer();
    this.dataManagerEntries = EntityDataManager.readEntries(buf);
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:9,代码来源:SPacketEntityMetadata.java


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