• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java C12PacketUpdateSign类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中net.minecraft.network.play.client.C12PacketUpdateSign的典型用法代码示例。如果您正苦于以下问题:Java C12PacketUpdateSign类的具体用法?Java C12PacketUpdateSign怎么用?Java C12PacketUpdateSign使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



C12PacketUpdateSign类属于net.minecraft.network.play.client包,在下文中一共展示了C12PacketUpdateSign类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: processUpdateSign

import net.minecraft.network.play.client.C12PacketUpdateSign; //导入依赖的package包/类
public void processUpdateSign(C12PacketUpdateSign packetIn)
{
    PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.playerEntity.getServerForPlayer());
    this.playerEntity.markPlayerActive();
    WorldServer worldserver = this.serverController.worldServerForDimension(this.playerEntity.dimension);
    BlockPos blockpos = packetIn.getPosition();

    if (worldserver.isBlockLoaded(blockpos))
    {
        TileEntity tileentity = worldserver.getTileEntity(blockpos);

        if (!(tileentity instanceof TileEntitySign))
        {
            return;
        }

        TileEntitySign tileentitysign = (TileEntitySign)tileentity;

        if (!tileentitysign.getIsEditable() || tileentitysign.getPlayer() != this.playerEntity)
        {
            this.serverController.logWarning("Player " + this.playerEntity.getName() + " just tried to change non-editable sign");
            return;
        }

        IChatComponent[] aichatcomponent = packetIn.getLines();

        for (int i = 0; i < aichatcomponent.length; ++i)
        {
            tileentitysign.signText[i] = new ChatComponentText(EnumChatFormatting.getTextWithoutFormattingCodes(aichatcomponent[i].getUnformattedText()));
        }

        tileentitysign.markDirty();
        worldserver.markBlockForUpdate(blockpos);
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:36,代码来源:NetHandlerPlayServer.java


示例2: onGuiClosed

import net.minecraft.network.play.client.C12PacketUpdateSign; //导入依赖的package包/类
/**
 * Called when the screen is unloaded. Used to disable keyboard repeat events
 */
public void onGuiClosed()
{
    Keyboard.enableRepeatEvents(false);
    NetHandlerPlayClient nethandlerplayclient = this.mc.getNetHandler();

    if (nethandlerplayclient != null)
    {
        nethandlerplayclient.addToSendQueue(new C12PacketUpdateSign(this.tileSign.getPos(), this.tileSign.signText));
    }

    this.tileSign.setEditable(true);
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:16,代码来源:GuiEditSign.java


示例3: sendSign

import net.minecraft.network.play.client.C12PacketUpdateSign; //导入依赖的package包/类
public static void sendSign(final @Nonnull EntryId entryId, final @Nonnull TileEntitySign sourceentity) {
	entryId.toEntity(sourceentity);
	sourceentity.markDirty();
	final NetHandlerPlayClient nethandlerplayclient = Client.mc.getNetHandler();
	if (nethandlerplayclient!=null)
		nethandlerplayclient.addToSendQueue(new C12PacketUpdateSign(sourceentity.xCoord, sourceentity.yCoord, sourceentity.zCoord, sourceentity.signText));
	sourceentity.setEditable(true);
}
 
开发者ID:Team-Fruit,项目名称:SignPicture,代码行数:9,代码来源:Sign.java


示例4: onGuiClosed

import net.minecraft.network.play.client.C12PacketUpdateSign; //导入依赖的package包/类
/**
 * "Called when the screen is unloaded. Used to disable keyboard repeat events."
 */
public void onGuiClosed()
{
    Keyboard.enableRepeatEvents(false);
    NetHandlerPlayClient var1 = this.mc.getNetHandler();

    if (var1 != null)
    {
        var1.addToSendQueue(new C12PacketUpdateSign(this.field_146848_f.field_145851_c, this.field_146848_f.field_145848_d, this.field_146848_f.field_145849_e, this.field_146848_f.field_145915_a));
    }

    this.field_146848_f.func_145913_a(true);
}
 
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:16,代码来源:GuiEditSign.java


示例5: onGuiClosed

import net.minecraft.network.play.client.C12PacketUpdateSign; //导入依赖的package包/类
public void onGuiClosed()
{
    Keyboard.enableRepeatEvents(false);
    NetHandlerPlayClient nethandlerplayclient = this.mc.getNetHandler();

    if (nethandlerplayclient != null)
    {
        nethandlerplayclient.addToSendQueue(new C12PacketUpdateSign(this.tileSign.xCoord, this.tileSign.yCoord, this.tileSign.zCoord, this.tileSign.signText));
    }

    this.tileSign.setEditable(true);
}
 
开发者ID:xtrafrancyz,项目名称:Cauldron,代码行数:13,代码来源:GuiEditSign.java


示例6: processUpdateSign

import net.minecraft.network.play.client.C12PacketUpdateSign; //导入依赖的package包/类
public void processUpdateSign(C12PacketUpdateSign p_147343_1_)
{
    this.playerEntity.func_143004_u();
    WorldServer var2 = this.serverController.worldServerForDimension(this.playerEntity.dimension);

    if (var2.blockExists(p_147343_1_.func_149588_c(), p_147343_1_.func_149586_d(), p_147343_1_.func_149585_e()))
    {
        TileEntity var3 = var2.getTileEntity(p_147343_1_.func_149588_c(), p_147343_1_.func_149586_d(), p_147343_1_.func_149585_e());

        if (var3 instanceof TileEntitySign)
        {
            TileEntitySign var4 = (TileEntitySign)var3;

            if (!var4.func_145914_a() || var4.func_145911_b() != this.playerEntity)
            {
                this.serverController.logWarning("Player " + this.playerEntity.getCommandSenderName() + " just tried to change non-editable sign");
                return;
            }
        }

        int var6;
        int var8;

        for (var8 = 0; var8 < 4; ++var8)
        {
            boolean var5 = true;

            if (p_147343_1_.func_149589_f()[var8].length() > 15)
            {
                var5 = false;
            }
            else
            {
                for (var6 = 0; var6 < p_147343_1_.func_149589_f()[var8].length(); ++var6)
                {
                    if (!ChatAllowedCharacters.isAllowedCharacter(p_147343_1_.func_149589_f()[var8].charAt(var6)))
                    {
                        var5 = false;
                    }
                }
            }

            if (!var5)
            {
                p_147343_1_.func_149589_f()[var8] = "!?";
            }
        }

        if (var3 instanceof TileEntitySign)
        {
            var8 = p_147343_1_.func_149588_c();
            int var9 = p_147343_1_.func_149586_d();
            var6 = p_147343_1_.func_149585_e();
            TileEntitySign var7 = (TileEntitySign)var3;
            System.arraycopy(p_147343_1_.func_149589_f(), 0, var7.field_145915_a, 0, 4);
            var7.onInventoryChanged();
            var2.func_147471_g(var8, var9, var6);
        }
    }
}
 
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:61,代码来源:NetHandlerPlayServer.java


示例7: processUpdateSign

import net.minecraft.network.play.client.C12PacketUpdateSign; //导入依赖的package包/类
@Override
public void processUpdateSign(C12PacketUpdateSign p_147343_1_) {
}
 
开发者ID:makeoo,项目名称:Gadomancy,代码行数:4,代码来源:FakeNetServerHandler.java


示例8: processUpdateSign

import net.minecraft.network.play.client.C12PacketUpdateSign; //导入依赖的package包/类
public void processUpdateSign(C12PacketUpdateSign p_147343_1_)
{
    this.playerEntity.func_143004_u();
    WorldServer worldserver = this.serverController.worldServerForDimension(this.playerEntity.dimension);

    if (worldserver.blockExists(p_147343_1_.func_149588_c(), p_147343_1_.func_149586_d(), p_147343_1_.func_149585_e()))
    {
        TileEntity tileentity = worldserver.getTileEntity(p_147343_1_.func_149588_c(), p_147343_1_.func_149586_d(), p_147343_1_.func_149585_e());

        if (tileentity instanceof TileEntitySign)
        {
            TileEntitySign tileentitysign = (TileEntitySign)tileentity;

            if (!tileentitysign.func_145914_a() || tileentitysign.func_145911_b() != this.playerEntity)
            {
                this.serverController.logWarning("Player " + this.playerEntity.getCommandSenderName() + " just tried to change non-editable sign");
                return;
            }
        }

        int i;
        int j;

        for (j = 0; j < 4; ++j)
        {
            boolean flag = true;

            if (p_147343_1_.func_149589_f()[j].length() > 15)
            {
                flag = false;
            }
            else
            {
                for (i = 0; i < p_147343_1_.func_149589_f()[j].length(); ++i)
                {
                    if (!ChatAllowedCharacters.isAllowedCharacter(p_147343_1_.func_149589_f()[j].charAt(i)))
                    {
                        flag = false;
                    }
                }
            }

            if (!flag)
            {
                p_147343_1_.func_149589_f()[j] = "!?";
            }
        }

        if (tileentity instanceof TileEntitySign)
        {
            j = p_147343_1_.func_149588_c();
            int k = p_147343_1_.func_149586_d();
            i = p_147343_1_.func_149585_e();
            TileEntitySign tileentitysign1 = (TileEntitySign)tileentity;
            System.arraycopy(p_147343_1_.func_149589_f(), 0, tileentitysign1.signText, 0, 4);
            tileentitysign1.markDirty();
            worldserver.markBlockForUpdate(j, k, i);
        }
    }
}
 
开发者ID:xtrafrancyz,项目名称:Cauldron,代码行数:61,代码来源:NetHandlerPlayServer.java


示例9: processUpdateSign

import net.minecraft.network.play.client.C12PacketUpdateSign; //导入依赖的package包/类
void processUpdateSign(C12PacketUpdateSign packetIn); 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:2,代码来源:INetHandlerPlayServer.java


示例10: processUpdateSign

import net.minecraft.network.play.client.C12PacketUpdateSign; //导入依赖的package包/类
void processUpdateSign(C12PacketUpdateSign var1); 
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:2,代码来源:INetHandlerPlayServer.java


示例11: processUpdateSign

import net.minecraft.network.play.client.C12PacketUpdateSign; //导入依赖的package包/类
void processUpdateSign(C12PacketUpdateSign p_147343_1_); 
开发者ID:xtrafrancyz,项目名称:Cauldron,代码行数:2,代码来源:INetHandlerPlayServer.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java Target类代码示例发布时间:2022-05-23
下一篇:
Java AbstractObjectArrayAssert类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap