當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。