本文整理汇总了Java中net.minecraft.network.PacketBuffer.readEnumValue方法的典型用法代码示例。如果您正苦于以下问题:Java PacketBuffer.readEnumValue方法的具体用法?Java PacketBuffer.readEnumValue怎么用?Java PacketBuffer.readEnumValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.network.PacketBuffer
的用法示例。
在下文中一共展示了PacketBuffer.readEnumValue方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: readPacketData
import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
/**
* Reads the raw packet data from the data stream.
*/
public void readPacketData(PacketBuffer buf) throws IOException
{
this.eventType = (S42PacketCombatEvent.Event)buf.readEnumValue(S42PacketCombatEvent.Event.class);
if (this.eventType == S42PacketCombatEvent.Event.END_COMBAT)
{
this.field_179772_d = buf.readVarIntFromBuffer();
this.field_179775_c = buf.readInt();
}
else if (this.eventType == S42PacketCombatEvent.Event.ENTITY_DIED)
{
this.field_179774_b = buf.readVarIntFromBuffer();
this.field_179775_c = buf.readInt();
this.deathMessage = buf.readStringFromBuffer(32767);
}
}
示例2: readPacketData
import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
/**
* Reads the raw packet data from the data stream.
*/
public void readPacketData(PacketBuffer buf) throws IOException
{
this.type = (S45PacketTitle.Type)buf.readEnumValue(S45PacketTitle.Type.class);
if (this.type == S45PacketTitle.Type.TITLE || this.type == S45PacketTitle.Type.SUBTITLE)
{
this.message = buf.readChatComponent();
}
if (this.type == S45PacketTitle.Type.TIMES)
{
this.fadeInTime = buf.readInt();
this.displayTime = buf.readInt();
this.fadeOutTime = buf.readInt();
}
}
示例3: readPacketData
import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
/**
* Reads the raw packet data from the data stream.
*/
public void readPacketData(PacketBuffer buf) throws IOException
{
this.entityId = buf.readVarIntFromBuffer();
this.action = (C02PacketUseEntity.Action)buf.readEnumValue(C02PacketUseEntity.Action.class);
if (this.action == C02PacketUseEntity.Action.INTERACT_AT)
{
this.hitVec = new Vec3((double)buf.readFloat(), (double)buf.readFloat(), (double)buf.readFloat());
}
}
示例4: readPacketData
import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
/**
* Reads the raw packet data from the data stream.
*/
public void readPacketData(PacketBuffer buf) throws IOException
{
this.position = buf.readBlockPos();
this.placedBlockDirection = (EnumFacing)buf.readEnumValue(EnumFacing.class);
this.hand = (EnumHand)buf.readEnumValue(EnumHand.class);
this.facingX = buf.readFloat();
this.facingY = buf.readFloat();
this.facingZ = buf.readFloat();
}
示例5: readPacketData
import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
/**
* Reads the raw packet data from the data stream.
*/
public void readPacketData(PacketBuffer buf) throws IOException
{
this.status = (C07PacketPlayerDigging.Action)buf.readEnumValue(C07PacketPlayerDigging.Action.class);
this.position = buf.readBlockPos();
this.facing = EnumFacing.getFront(buf.readUnsignedByte());
}
示例6: readPacketData
import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
/**
* Reads the raw packet data from the data stream.
*/
public void readPacketData(PacketBuffer buf) throws IOException
{
this.entityID = buf.readVarIntFromBuffer();
this.action = (C0BPacketEntityAction.Action)buf.readEnumValue(C0BPacketEntityAction.Action.class);
this.auxData = buf.readVarIntFromBuffer();
}
示例7: readPacketData
import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
/**
* Reads the raw packet data from the data stream.
*/
public void readPacketData(PacketBuffer buf) throws IOException
{
this.action = (SPacketWorldBorder.Action)buf.readEnumValue(SPacketWorldBorder.Action.class);
switch (this.action)
{
case SET_SIZE:
this.targetSize = buf.readDouble();
break;
case LERP_SIZE:
this.diameter = buf.readDouble();
this.targetSize = buf.readDouble();
this.timeUntilTarget = buf.readVarLong();
break;
case SET_CENTER:
this.centerX = buf.readDouble();
this.centerZ = buf.readDouble();
break;
case SET_WARNING_BLOCKS:
this.warningDistance = buf.readVarIntFromBuffer();
break;
case SET_WARNING_TIME:
this.warningTime = buf.readVarIntFromBuffer();
break;
case INITIALIZE:
this.centerX = buf.readDouble();
this.centerZ = buf.readDouble();
this.diameter = buf.readDouble();
this.targetSize = buf.readDouble();
this.timeUntilTarget = buf.readVarLong();
this.size = buf.readVarIntFromBuffer();
this.warningDistance = buf.readVarIntFromBuffer();
this.warningTime = buf.readVarIntFromBuffer();
}
}
示例8: readPacketData
import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
/**
* Reads the raw packet data from the data stream.
*/
public void readPacketData(PacketBuffer buf) throws IOException
{
this.name = buf.readStringFromBuffer(40);
this.action = (S3CPacketUpdateScore.Action)buf.readEnumValue(S3CPacketUpdateScore.Action.class);
this.objective = buf.readStringFromBuffer(16);
if (this.action != S3CPacketUpdateScore.Action.REMOVE)
{
this.value = buf.readVarIntFromBuffer();
}
}
示例9: readPacketData
import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
/**
* Reads the raw packet data from the data stream.
*/
public void readPacketData(PacketBuffer buf) throws IOException
{
this.name = buf.readStringFromBuffer(40);
this.action = (SPacketUpdateScore.Action)buf.readEnumValue(SPacketUpdateScore.Action.class);
this.objective = buf.readStringFromBuffer(16);
if (this.action != SPacketUpdateScore.Action.REMOVE)
{
this.value = buf.readVarIntFromBuffer();
}
}
示例10: readPacketData
import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
/**
* Reads the raw packet data from the data stream.
*/
public void readPacketData(PacketBuffer buf) throws IOException
{
this.lang = buf.readStringFromBuffer(7);
this.view = buf.readByte();
this.chatVisibility = (EntityPlayer.EnumChatVisibility)buf.readEnumValue(EntityPlayer.EnumChatVisibility.class);
this.enableColors = buf.readBoolean();
this.modelPartFlags = buf.readUnsignedByte();
this.mainHand = (EnumHandSide)buf.readEnumValue(EnumHandSide.class);
}
示例11: readPacketData
import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
/**
* Reads the raw packet data from the data stream.
*/
public void readPacketData(PacketBuffer buf) throws IOException
{
this.status = (C16PacketClientStatus.EnumState)buf.readEnumValue(C16PacketClientStatus.EnumState.class);
}
示例12: readPacketData
import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
/**
* Reads the raw packet data from the data stream.
*/
public void readPacketData(PacketBuffer buf) throws IOException
{
this.hash = buf.readStringFromBuffer(40);
this.status = (C19PacketResourcePackStatus.Action)buf.readEnumValue(C19PacketResourcePackStatus.Action.class);
}
示例13: read
import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
public EnumFacing read(PacketBuffer buf) throws IOException
{
return (EnumFacing)buf.readEnumValue(EnumFacing.class);
}
示例14: readPacketData
import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
/**
* Reads the raw packet data from the data stream.
*/
public void readPacketData(PacketBuffer buf) throws IOException
{
this.action = (S44PacketWorldBorder.Action)buf.readEnumValue(S44PacketWorldBorder.Action.class);
switch (this.action)
{
case SET_SIZE:
this.targetSize = buf.readDouble();
break;
case LERP_SIZE:
this.diameter = buf.readDouble();
this.targetSize = buf.readDouble();
this.timeUntilTarget = buf.readVarLong();
break;
case SET_CENTER:
this.centerX = buf.readDouble();
this.centerZ = buf.readDouble();
break;
case SET_WARNING_BLOCKS:
this.warningDistance = buf.readVarIntFromBuffer();
break;
case SET_WARNING_TIME:
this.warningTime = buf.readVarIntFromBuffer();
break;
case INITIALIZE:
this.centerX = buf.readDouble();
this.centerZ = buf.readDouble();
this.diameter = buf.readDouble();
this.targetSize = buf.readDouble();
this.timeUntilTarget = buf.readVarLong();
this.size = buf.readVarIntFromBuffer();
this.warningDistance = buf.readVarIntFromBuffer();
this.warningTime = buf.readVarIntFromBuffer();
}
}