本文整理匯總了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);
}