当前位置: 首页>>代码示例>>Java>>正文


Java EntityPlayer.EnumChatVisibility方法代码示例

本文整理汇总了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);
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:37,代码来源:NetHandlerPlayServer.java

示例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;
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:9,代码来源:C15PacketClientSettings.java

示例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);
    }
}
 
开发者ID:NSExceptional,项目名称:Zombe-Modpack,代码行数:37,代码来源:NetHandlerPlayServer.java

示例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;
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:10,代码来源:CPacketClientSettings.java

示例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);
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:13,代码来源:CPacketClientSettings.java

示例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);
    }
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:37,代码来源:NetHandlerPlayServer.java

示例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;
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:11,代码来源:CPacketClientSettings.java

示例8: getChatVisibility

import net.minecraft.entity.player.EntityPlayer; //导入方法依赖的package包/类
public EntityPlayer.EnumChatVisibility getChatVisibility()
{
    return this.chatVisibility;
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:5,代码来源:C15PacketClientSettings.java


注:本文中的net.minecraft.entity.player.EntityPlayer.EnumChatVisibility方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。