本文整理汇总了Java中net.minecraft.entity.player.EntityPlayer.EnumChatVisibility方法的典型用法代码示例。如果您正苦于以下问题:Java EntityPlayer.EnumChatVisibility方法的具体用法?Java EntityPlayer.EnumChatVisibility怎么用?Java EntityPlayer.EnumChatVisibility使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.entity.player.EntityPlayer
的用法示例。
在下文中一共展示了EntityPlayer.EnumChatVisibility方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: sendPacket
import net.minecraft.entity.player.EntityPlayer; //导入方法依赖的package包/类
public void sendPacket(final Packet packetIn)
{
if (packetIn instanceof S02PacketChat)
{
S02PacketChat s02packetchat = (S02PacketChat)packetIn;
EntityPlayer.EnumChatVisibility entityplayer$enumchatvisibility = this.playerEntity.getChatVisibility();
if (entityplayer$enumchatvisibility == EntityPlayer.EnumChatVisibility.HIDDEN)
{
return;
}
if (entityplayer$enumchatvisibility == EntityPlayer.EnumChatVisibility.SYSTEM && !s02packetchat.isChat())
{
return;
}
}
try
{
this.netManager.sendPacket(packetIn);
}
catch (Throwable throwable)
{
CrashReport crashreport = CrashReport.makeCrashReport(throwable, "Sending packet");
CrashReportCategory crashreportcategory = crashreport.makeCategory("Packet being sent");
crashreportcategory.addCrashSectionCallable("Packet class", new Callable<String>()
{
public String call() throws Exception
{
return packetIn.getClass().getCanonicalName();
}
});
throw new ReportedException(crashreport);
}
}
示例2: C15PacketClientSettings
import net.minecraft.entity.player.EntityPlayer; //导入方法依赖的package包/类
public C15PacketClientSettings(String langIn, int viewIn, EntityPlayer.EnumChatVisibility chatVisibilityIn, boolean enableColorsIn, int modelPartFlagsIn)
{
this.lang = langIn;
this.view = viewIn;
this.chatVisibility = chatVisibilityIn;
this.enableColors = enableColorsIn;
this.modelPartFlags = modelPartFlagsIn;
}
示例3: sendPacket
import net.minecraft.entity.player.EntityPlayer; //导入方法依赖的package包/类
public void sendPacket(final Packet<?> packetIn)
{
if (packetIn instanceof SPacketChat)
{
SPacketChat spacketchat = (SPacketChat)packetIn;
EntityPlayer.EnumChatVisibility entityplayer$enumchatvisibility = this.playerEntity.getChatVisibility();
if (entityplayer$enumchatvisibility == EntityPlayer.EnumChatVisibility.HIDDEN && spacketchat.getType() != 2)
{
return;
}
if (entityplayer$enumchatvisibility == EntityPlayer.EnumChatVisibility.SYSTEM && !spacketchat.isSystem())
{
return;
}
}
try
{
this.netManager.sendPacket(packetIn);
}
catch (Throwable throwable)
{
CrashReport crashreport = CrashReport.makeCrashReport(throwable, "Sending packet");
CrashReportCategory crashreportcategory = crashreport.makeCategory("Packet being sent");
crashreportcategory.setDetail("Packet class", new ICrashReportDetail<String>()
{
public String call() throws Exception
{
return packetIn.getClass().getCanonicalName();
}
});
throw new ReportedException(crashreport);
}
}
示例4: CPacketClientSettings
import net.minecraft.entity.player.EntityPlayer; //导入方法依赖的package包/类
public CPacketClientSettings(String langIn, int renderDistanceIn, EntityPlayer.EnumChatVisibility chatVisibilityIn, boolean chatColorsIn, int modelPartsIn, EnumHandSide mainHandIn)
{
this.lang = langIn;
this.view = renderDistanceIn;
this.chatVisibility = chatVisibilityIn;
this.enableColors = chatColorsIn;
this.modelPartFlags = modelPartsIn;
this.mainHand = mainHandIn;
}
示例5: readPacketData
import net.minecraft.entity.player.EntityPlayer; //导入方法依赖的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);
}
示例6: sendPacket
import net.minecraft.entity.player.EntityPlayer; //导入方法依赖的package包/类
public void sendPacket(final Packet<?> packetIn)
{
if (packetIn instanceof SPacketChat)
{
SPacketChat spacketchat = (SPacketChat)packetIn;
EntityPlayer.EnumChatVisibility entityplayer$enumchatvisibility = this.playerEntity.getChatVisibility();
if (entityplayer$enumchatvisibility == EntityPlayer.EnumChatVisibility.HIDDEN)
{
return;
}
if (entityplayer$enumchatvisibility == EntityPlayer.EnumChatVisibility.SYSTEM && !spacketchat.isSystem())
{
return;
}
}
try
{
this.netManager.sendPacket(packetIn);
}
catch (Throwable throwable)
{
CrashReport crashreport = CrashReport.makeCrashReport(throwable, "Sending packet");
CrashReportCategory crashreportcategory = crashreport.makeCategory("Packet being sent");
crashreportcategory.setDetail("Packet class", new ICrashReportDetail<String>()
{
public String call() throws Exception
{
return packetIn.getClass().getCanonicalName();
}
});
throw new ReportedException(crashreport);
}
}
示例7: CPacketClientSettings
import net.minecraft.entity.player.EntityPlayer; //导入方法依赖的package包/类
@SideOnly(Side.CLIENT)
public CPacketClientSettings(String langIn, int renderDistanceIn, EntityPlayer.EnumChatVisibility chatVisibilityIn, boolean chatColorsIn, int modelPartsIn, EnumHandSide mainHandIn)
{
this.lang = langIn;
this.view = renderDistanceIn;
this.chatVisibility = chatVisibilityIn;
this.enableColors = chatColorsIn;
this.modelPartFlags = modelPartsIn;
this.mainHand = mainHandIn;
}
示例8: getChatVisibility
import net.minecraft.entity.player.EntityPlayer; //导入方法依赖的package包/类
public EntityPlayer.EnumChatVisibility getChatVisibility()
{
return this.chatVisibility;
}