packetbuffer = new PacketBuffer(Unpooled.wrappedBuffer(p_147349_1_.func_149558_e()));
try
{
byte b0 = packetbuffer.readByte();
CommandBlockLogic commandblocklogic = null;
if (b0 == 0)
{
TileEntity tileentity = net.playerEntity.worldObj.getTileEntity(packetbuffer.readInt(), packetbuffer.readInt(), packetbuffer.readInt());
if (tileentity instanceof TileEntityCommandBlock)
{
commandblocklogic = ((TileEntityCommandBlock)tileentity).func_145993_a();
}
}
else if (b0 == 1)
{
Entity entity = net.playerEntity.worldObj.getEntityByID(packetbuffer.readInt());
if (entity instanceof EntityMinecartCommandBlock)
{
commandblocklogic = ((EntityMinecartCommandBlock)entity).func_145822_e();
}
}
String s1 = packetbuffer.readStringFromBuffer(packetbuffer.readableBytes());
if (commandblocklogic != null)
{
commandblocklogic.func_145752_a(s1);
commandblocklogic.func_145756_e();
net.playerEntity.addChatMessage(new ChatComponentTranslation("advMode.setCommand.success", new Object[] {s1}));
}
}
catch (Exception exception1)
{