本文整理汇总了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);
}
示例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(); }
*/
}
示例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);
}
示例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);
}
示例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;
}
示例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();
}
}
示例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);
}