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); } }
/** * 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); }
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); }
/** * "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); }
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); }
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); } } }
@Override public void processUpdateSign(C12PacketUpdateSign p_147343_1_) { }
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); } } }
void processUpdateSign(C12PacketUpdateSign packetIn);
void processUpdateSign(C12PacketUpdateSign var1);
void processUpdateSign(C12PacketUpdateSign p_147343_1_);